/*! For license information please see 428.50a233546d6911ae.js.LICENSE.txt */ (self.webpackChunkWebComponents=self.webpackChunkWebComponents||[]).push([[428],{455:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(89081),a=n(79989),o=function(e){function t(t){var n=e.call(this,null)||this;if(t=t||{name:"source"},i.isInlineData(t))n._data={values:t.values};else if(i.isUrlData(t)){if(n._data={url:t.url},t.format||(t.format={}),!t.format||!t.format.type){var o=/(?:\.([^.]+))?$/.exec(t.url)[1];a.contains(["json","csv","tsv","dsv","topojson"],o)||(o="json"),t.format.type=o}}else i.isNamedData(t)&&(n._data={});if(t.name&&(n._name=t.name),t.format){var s=t.format,l=(s.parse,r.__rest(s,["parse"]));n._data.format=l}return n}return r.__extends(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),t.prototype.hasName=function(){return!!this._name},Object.defineProperty(t.prototype,"dataName",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{set:function(e){throw new Error("Source nodes have to be roots.")},enumerable:!0,configurable:!0}),t.prototype.remove=function(){throw new Error("Source nodes are roots and cannot be removed.")},t.prototype.hash=function(){return i.isInlineData(this._data)?(this._hash||(this._hash=a.hash(this._data)),this._hash):i.isUrlData(this._data)?a.hash([this._data.url,this._data.format]):this._name},t.prototype.assemble=function(){return r.__assign({name:this._name},this._data,{transform:[]})},t}(n(74686).DataFlowNode);t.SourceNode=o},867:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMarkSpecificConfigMixins=function(e,t){var n,r=e[t];return void 0!==r?((n={})[t]={value:r},n):{}}},1628:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(45948),a=n(95290),o=n(56133),s=n(11964),l=r.__importStar(n(42155)),u="_translate_anchor",c="_translate_delta",f={has:function(e){return"interval"===e.type&&e.translate},signals:function(e,t,n){var r=t.name,f=l.default.has(t),h=r+u,p=s.positionalProjections(t),m=p.x,g=p.y,v=i.selector(t.translate,"scope");return f||(v=v.map((function(e){return e.between[0].markname=r+o.BRUSH,e}))),n.push({name:h,value:{},on:[{events:v.map((function(e){return e.between[0]})),update:"{x: x(unit), y: y(unit)"+(null!==m?", extent_x: "+(f?l.domain(e,a.X):"slice("+s.channelSignalName(t,"x","visual")+")"):"")+(null!==g?", extent_y: "+(f?l.domain(e,a.Y):"slice("+s.channelSignalName(t,"y","visual")+")"):"")+"}"}]},{name:r+c,value:{},on:[{events:v,update:"{x: "+h+".x - x(unit), y: "+h+".y - y(unit)}"}]}),null!==m&&d(e,t,a.X,"width",n),null!==g&&d(e,t,a.Y,"height",n),n}};function d(e,t,n,r,i){var o=t.name,f=l.default.has(t),d=i.filter((function(e){return e.name===s.channelSignalName(t,n,f?"data":"visual")}))[0],h=o+u,p=o+c,m=e.getSizeSignalRef(r).signal,g=e.getScaleComponent(n),v=g.get("type"),y=f&&n===a.X?"-":"",b=h+".extent_"+n,_=(f?"log"===v?"panLog":"pow"===v?"panPow":"panLinear":"panLinear")+"("+b+", "+y+p+"."+n+" / "+(f?""+m:"span("+b+")")+(f&&"pow"===v?", "+(g.get("exponent")||1):"")+")";d.on.push({events:{signal:p},update:f?_:"clampRange("+_+", 0, "+m+")"})}t.default=f},3209:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__assign:()=>a,__asyncDelegator:()=>_,__asyncGenerator:()=>b,__asyncValues:()=>x,__await:()=>y,__awaiter:()=>c,__classPrivateFieldGet:()=>C,__classPrivateFieldSet:()=>E,__createBinding:()=>d,__decorate:()=>s,__exportStar:()=>h,__extends:()=>i,__generator:()=>f,__importDefault:()=>S,__importStar:()=>k,__makeTemplateObject:()=>w,__metadata:()=>u,__param:()=>l,__read:()=>m,__rest:()=>o,__spread:()=>g,__spreadArrays:()=>v,__values:()=>p});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o}function l(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function g(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof y?Promise.resolve(n.value.v).then(l,u):c(a[0][2],n)}catch(e){c(a[0][3],e)}var n}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function _(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:y(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}}function w(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function k(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}function C(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function E(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},3297:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(84847),a=function(e){function t(t){return e.call(this,t)||this}return r.__extends(t,e),t.prototype.clone=function(){return new t(null)},t.prototype.producedFields=function(){var e;return(e={})[i.SELECTION_ID]=!0,e},t.prototype.assemble=function(){return{type:"identifier",as:i.SELECTION_ID}},t}(n(74686).DataFlowNode);t.IdentifierNode=a},3715:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(32530),o=r.__importStar(n(68171)),s=n(46681);function l(e,t){return a.isRepeatRef(e.field)?e.field.repeat in t?r.__assign({},e,{field:t[e.field.repeat]}):void o.warn(o.message.noSuchRepeatedValue(e.field.repeat)):e}function u(e,t){if(void 0!==(e=l(e,t))){if(e.sort&&s.isSortField(e.sort)){var n=l(e.sort,t);e=r.__assign({},e,n?{sort:n}:{})}return e}}function c(e,t){return a.isFieldDef(e)?(n=u(e,t))?n:a.isConditionalDef(e)?{condition:e.condition}:void 0:a.hasConditionalFieldDef(e)?(n=u(e.condition,t))?r.__assign({},e,{condition:n}):(e.condition,r.__rest(e,["condition"])):e;var n}function f(e,t){var n={};for(var r in e)if(e.hasOwnProperty(r)){var a=e[r];if(i.isArray(a))n[r]=a.map((function(e){return c(e,t)})).filter((function(e){return e}));else{var o=c(a,t);o&&(n[r]=o)}}return n}t.replaceRepeaterInFacet=function(e,t){return f(e,t)},t.replaceRepeaterInEncoding=function(e,t){return f(e,t)}},4976:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(11964),o=n(32530),s=n(96598),l=n(79989);function u(e){return e&&e.selection}function c(e){return e&&!!e.field&&void 0!==e.equal}function f(e){return e&&!!e.field&&void 0!==e.lt}function d(e){return e&&!!e.field&&void 0!==e.lte}function h(e){return e&&!!e.field&&void 0!==e.gt}function p(e){return e&&!!e.field&&void 0!==e.gte}function m(e){return!!(e&&e.field&&i.isArray(e.range)&&2===e.range.length)}function g(e){return e&&!!e.field&&(i.isArray(e.oneOf)||i.isArray(e.in))}function v(e){return g(e)||c(e)||m(e)||f(e)||h(e)||d(e)||p(e)}function y(e,t){return o.valueExpr(e,{timeUnit:t,time:!0})}function b(e,t){void 0===t&&(t=!0);var n=e.field,r=e.timeUnit,i=r?"time("+s.fieldExpr(r,n)+")":o.vgField(e,{expr:"datum"});if(c(e))return i+"==="+y(e.equal,r);if(f(e))return i+"<"+y(u=e.lt,r);if(h(e))return i+">"+y(l=e.gt,r);if(d(e))return i+"<="+y(u=e.lte,r);if(p(e))return i+">="+y(l=e.gte,r);if(g(e)){var a=e.oneOf;return"indexof(["+function(e,t){return e.map((function(e){return y(e,t)}))}(a=a||e.in,r).join(",")+"], "+i+") !== -1"}if(m(e)){var l=e.range[0],u=e.range[1];if(null!==l&&null!==u&&t)return"inrange("+i+", ["+y(l,r)+", "+y(u,r)+"])";var v=[];return null!==l&&v.push(i+" >= "+y(l,r)),null!==u&&v.push(i+" <= "+y(u,r)),v.length>0?v.join(" && "):"true"}throw new Error("Invalid field predicate: "+JSON.stringify(e))}t.isSelectionPredicate=u,t.isFieldEqualPredicate=c,t.isFieldLTPredicate=f,t.isFieldLTEPredicate=d,t.isFieldGTPredicate=h,t.isFieldGTEPredicate=p,t.isFieldRangePredicate=m,t.isFieldOneOfPredicate=g,t.isFieldPredicate=v,t.expression=function(e,t,n){return l.logicalExpr(t,(function(t){return i.isString(t)?t:u(t)?a.selectionPredicate(e,t.selection,n):b(t)}))},t.fieldFilterExpression=b,t.normalizePredicate=function(e){return v(e)&&e.timeUnit?r.__assign({},e,{timeUnit:s.normalizeTimeUnit(e.timeUnit)}):e}},5593:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(65032),o=n(32530),s=n(79989);function l(e,t,n,l){void 0===l&&(l={header:!1});var u=e.combine(),c=u.orient,f=u.scale,d=u.title,h=u.zindex,p=r.__rest(u,["orient","scale","title","zindex"]);if(s.keys(p).forEach((function(e){var n=a.AXIS_PROPERTY_TYPE[e];n&&n!==t&&"both"!==n&&delete p[e]})),"grid"===t){if(!p.grid)return;if(p.encode){var m=p.encode.grid;p.encode=r.__assign({},m?{grid:m}:{}),0===s.keys(p.encode).length&&delete p.encode}return r.__assign({scale:f,orient:c},p,{domain:!1,labels:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:void 0!==h?h:0})}if(l.header||!e.mainExtracted){if(p.encode){for(var g=0,v=a.AXIS_PARTS;g{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(26372),i=n(79989);t.isVgSignalRef=function(e){return!!e.signal},t.isVgRangeStep=function(e){return!!e.step},t.isDataRefUnionedDomain=function(e){return!r.isArray(e)&&"fields"in e&&!("data"in e)},t.isFieldRefUnionDomain=function(e){return!r.isArray(e)&&"fields"in e&&"data"in e},t.isDataRefDomain=function(e){return!r.isArray(e)&&"field"in e&&"data"in e},t.isSignalRefDomain=function(e){return!r.isArray(e)&&"signal"in e},t.VG_MARK_CONFIGS=i.flagKeys({opacity:1,fill:1,fillOpacity:1,stroke:1,strokeCap:1,strokeWidth:1,strokeOpacity:1,strokeDash:1,strokeDashOffset:1,strokeJoin:1,strokeMiterLimit:1,size:1,shape:1,interpolate:1,tension:1,orient:1,align:1,baseline:1,text:1,dir:1,dx:1,dy:1,ellipsis:1,limit:1,radius:1,theta:1,angle:1,font:1,fontSize:1,fontWeight:1,fontStyle:1,cursor:1,href:1,tooltip:1,cornerRadius:1})},5767:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(45948),a=n(26372),o=n(95290),s=n(56133),l=n(11964),u=r.__importStar(n(42155)),c="_zoom_anchor",f="_zoom_delta",d={has:function(e){return"interval"===e.type&&e.zoom},signals:function(e,t,n){var r=t.name,d=u.default.has(t),p=r+f,m=l.positionalProjections(t),g=m.x,v=m.y,y=a.stringValue(e.scaleName(o.X)),b=a.stringValue(e.scaleName(o.Y)),_=i.selector(t.zoom,"scope");return d||(_=_.map((function(e){return e.markname=r+s.BRUSH,e}))),n.push({name:r+c,on:[{events:_,update:d?"{"+[y?"x: invert("+y+", x(unit))":"",b?"y: invert("+b+", y(unit))":""].filter((function(e){return!!e})).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:p,on:[{events:_,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),null!==g&&h(e,t,"x","width",n),null!==v&&h(e,t,"y","height",n),n}};function h(e,t,n,r,i){var a=t.name,o=u.default.has(t),s=i.filter((function(e){return e.name===l.channelSignalName(t,n,o?"data":"visual")}))[0],d=e.getSizeSignalRef(r).signal,h=e.getScaleComponent(n),p=h.get("type"),m=o?u.domain(e,n):s.name,g=a+f,v=(o?"log"===p?"zoomLog":"pow"===p?"zoomPow":"zoomLinear":"zoomLinear")+"("+m+", "+a+c+"."+n+", "+g+(o&&"pow"===p?", "+(h.get("exponent")||1):"")+")";s.on.push({events:{signal:g},update:o?v:"clampRange("+v+", 0, "+d+")"})}t.default=d},6871:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(31179),i=n(5711),a=n(7302);function o(e,t){var n="width"===t?"x":"y",o=e.component.layoutSize.get(t);if(!o||"merged"===o)return[];var u=e.getSizeSignalRef(t).signal;if("range-step"===o){var c=e.getScaleComponent(n);if(c){var f=c.get("type"),d=c.get("range");if(r.hasDiscreteDomain(f)&&i.isVgRangeStep(d)){var h=e.scaleName(n);return a.isFacetModel(e.parent)&&"independent"===e.parent.component.resolve.scale[n]?[s(h,d)]:[s(h,d),{name:u,update:l(h,c,"domain('"+h+"').length")}]}}throw new Error("layout size is range step although there is no rangeStep.")}return[{name:u,value:o}]}function s(e,t){return{name:e+"_step",value:t.step}}function l(e,t,n){var r=t.get("type"),i=t.get("padding"),a=t.get("paddingOuter");a=void 0!==a?a:i;var o=t.get("paddingInner");return"bandspace("+n+", "+(o="band"===r?void 0!==o?o:i:1)+", "+a+") * "+e+"_step"}t.assembleLayoutSignals=function(e){return[].concat(o(e,"width"),o(e,"height"))},t.sizeSignals=o,t.sizeExpr=l},7302:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(95290),o=n(98348),s=n(32530),l=r.__importStar(n(68171)),u=n(31179),c=n(76426),f=n(76447),d=n(63286),h=n(65393),p=n(79989),m=n(5711),g=n(5593),v=n(98469),y=n(6871),b=n(86985),_=n(16182),x=n(85013),w=n(98066),k=n(39276),S=n(63760),C=n(9021),E=n(96159),A=function(){function e(){this.nameMap={}}return e.prototype.rename=function(e,t){this.nameMap[e]=t},e.prototype.has=function(e){return void 0!==this.nameMap[e]},e.prototype.get=function(e){for(;this.nameMap[e]&&e!==this.nameMap[e];)e=this.nameMap[e];return e},e}();function M(e){return e&&"unit"===e.type}function D(e){return e&&"facet"===e.type}t.NameMap=A,t.isUnitModel=M,t.isFacetModel=D,t.isRepeatModel=function(e){return e&&"repeat"===e.type},t.isConcatModel=function(e){return e&&"concat"===e.type},t.isLayerModel=function(e){return e&&"layer"===e.type};var T=function(){function e(e,t,n,a,o,s){var l=this;this.children=[],this.correctDataNames=function(e){return e.from&&e.from.data&&(e.from.data=l.lookupDataSource(e.from.data)),e.from&&e.from.facet&&e.from.facet.data&&(e.from.facet.data=l.lookupDataSource(e.from.facet.data)),e},this.parent=t,this.config=a,this.repeater=o,this.name=e.name||n,this.title=i.isString(e.title)?{text:e.title}:e.title,this.scaleNameMap=t?t.scaleNameMap:new A,this.projectionNameMap=t?t.projectionNameMap:new A,this.layoutSizeNameMap=t?t.layoutSizeNameMap:new A,this.data=e.data,this.description=e.description,this.transforms=h.normalizeTransform(e.transform||[]),this.layout=c.isUnitSpec(e)||c.isLayerSpec(e)?void 0:d.extractCompositionLayout(e),this.component={data:{sources:t?t.component.data.sources:{},outputNodes:t?t.component.data.outputNodes:{},outputNodeRefCounts:t?t.component.data.outputNodeRefCounts:{},isFaceted:c.isFacetSpec(e)||t&&t.component.data.isFaceted&&!e.data},layoutSize:new E.Split,layoutHeaders:{row:{},column:{}},mark:null,resolve:r.__assign({scale:{},axis:{},legend:{}},s||{}),selection:null,scales:null,projection:null,axes:{},legends:{}}}return Object.defineProperty(e.prototype,"width",{get:function(){return this.getSizeSignalRef("width")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.getSizeSignalRef("height")},enumerable:!0,configurable:!0}),e.prototype.initSize=function(e){var t=e.width,n=e.height;t&&this.component.layoutSize.set("width",t,!0),n&&this.component.layoutSize.set("height",n,!0)},e.prototype.parse=function(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSize(),this.parseSelection(),this.parseProjection(),this.parseData(),this.parseAxisAndHeader(),this.parseLegend(),this.parseMarkGroup()},e.prototype.parseScale=function(){C.parseScale(this)},e.prototype.parseProjection=function(){w.parseProjection(this)},e.prototype.renameTopLevelLayoutSize=function(){"width"!==this.getName("width")&&this.renameLayoutSize(this.getName("width"),"width"),"height"!==this.getName("height")&&this.renameLayoutSize(this.getName("height"),"height")},e.prototype.parseLegend=function(){_.parseLegend(this)},e.prototype.assembleGroupStyle=function(){if("unit"===this.type||"layer"===this.type)return"cell"},e.prototype.assembleLayoutSize=function(){if("unit"===this.type||"layer"===this.type)return{width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height")}},e.prototype.assembleLayout=function(){if(this.layout){var e=this.layout,t=e.align,n=e.bounds,a=e.center,o=e.spacing,s=void 0===o?{}:o;return r.__assign({padding:i.isNumber(s)?s:{row:s.row||10,column:s.column||10}},this.assembleDefaultLayout(),t?{align:t}:{},n?{bounds:n}:{},a?{center:a}:{})}},e.prototype.assembleDefaultLayout=function(){return{}},e.prototype.assembleHeaderMarks=function(){for(var e=this.component.layoutHeaders,t=[],n=0,r=v.HEADER_CHANNELS;n0?e:void 0},e.prototype.assembleGroup=function(e){void 0===e&&(e=[]);var t={};(e=e.concat(this.assembleSelectionSignals())).length>0&&(t.signals=e);var n=this.assembleLayout();n&&(t.layout=n),t.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());var r=!this.parent||D(this.parent)?k.assembleScales(this):[];r.length>0&&(t.scales=r);var i=this.assembleAxes();i.length>0&&(t.axes=i);var a=this.assembleLegends();return a.length>0&&(t.legends=a),t},e.prototype.hasDescendantWithFieldOnChannel=function(e){for(var t=0,n=this.children;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(15058),a=r.__importStar(n(74439)),o=r.__importStar(n(38851));t.text={vgMark:"text",encodeEntry:function(e){var t=e.config,n=(e.encoding,e.width),s=e.height,l=e.markDef;return r.__assign({},a.baseEncodeEntry(e,{size:"ignore",orient:"ignore"}),a.pointPosition("x",e,o.mid(n)),a.pointPosition("y",e,o.mid(s)),a.text(e),a.nonPosition("size",e,r.__assign({},l.size?{defaultValue:l.size}:{},{vgChannel:"fontSize"})),a.valueIfDefined("align",function(e,t,n){if(void 0===(e.align||i.getMarkConfig("align",e,n)))return"center"}(e.markDef,0,t)))}}},9021:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95290),i=n(32530),a=n(75028),o=n(31179),s=n(99273),l=n(79989),u=n(7302),c=n(91387),f=n(96159),d=n(39621),h=n(63760),p=n(70585),m=n(76387),g=n(78540);function v(e){u.isUnitModel(e)?e.component.scales=function(e){var t=e.encoding,n=e.config,o=e.mark;return r.SCALE_CHANNELS.reduce((function(l,u){var c,f=void 0,h=t[u];if(i.isFieldDef(h)&&o===a.GEOSHAPE&&u===r.SHAPE&&h.type===s.GEOJSON)return l;if(i.isFieldDef(h)?(c=h,f=h.scale):i.hasConditionalFieldDef(h)?(c=h.condition,f=h.condition.scale):u===r.X?c=i.getFieldDef(t.x2):u===r.Y&&(c=i.getFieldDef(t.y2)),c&&null!==f&&!1!==f){var p=(f=f||{}).type,m=g.scaleType(f.type,u,c,o,n.scale);l[u]=new d.ScaleComponent(e.scaleName(u+"",!0),{value:m,explicit:p===m})}return l}),{})}(e):e.component.scales=function(e){for(var t=e.component.scales={},n={},r=e.component.resolve,i=function(t){v(t),l.keys(t.component.scales).forEach((function(i){if(r.scale[i]=r.scale[i]||c.defaultScaleResolve(i,e),"shared"===r.scale[i]){var a=n[i],s=t.component.scales[i].getWithExplicit("type");a?o.scaleCompatible(a.value,s.value)?n[i]=f.mergeValuesWithExplicit(a,s,"type","scale",y):(r.scale[i]="independent",delete n[i]):n[i]=s}}))},a=0,s=e.children;a{!function(e){"use strict";var t="CodeMirror-hint-active";function n(e,t){if(this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)},e.defineExtension("showHint",(function(t){t=function(e,t,n){var r=e.options.hintOptions,i={};for(var a in u)i[a]=u[a];if(r)for(var a in r)void 0!==r[a]&&(i[a]=r[a]);if(n)for(var a in n)void 0!==n[a]&&(i[a]=n[a]);return i.hint.resolve&&(i.hint=i.hint.resolve(e,t)),i}(this,this.getCursor("start"),t);var r=this.listSelections();if(!(r.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var i=0;ic.clientHeight+1;if(setTimeout((function(){D=s.getScrollInfo()})),T.bottom-M>0){var O=T.bottom-T.top;if(y.top-(y.bottom-T.top)-O>0)c.style.top=(_=y.top-O-k)+"px",x=!1;else if(O>M){c.style.height=M-5+"px",c.style.top=(_=y.bottom-T.top-k)+"px";var F=s.getCursor();r.from.ch!=F.ch&&(y=s.cursorCoords(F),c.style.left=(b=y.left-w)+"px",T=c.getBoundingClientRect())}}var L,P=T.right-A;if(N&&(P+=s.display.nativeBarWidth),P>0&&(T.right-T.left>A&&(c.style.width=A-5+"px",P-=T.right-T.left-A),c.style.left=(b=Math.max(y.left-P-w,0))+"px"),N)for(var z=c.firstChild;z;z=z.nextSibling)z.style.paddingRight=s.display.nativeBarWidth+"px";s.addKeyMap(this.keyMap=function(e,t){var n={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(1-t.menuSize(),!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close};/Mac/.test(navigator.platform)&&(n["Ctrl-P"]=function(){t.moveFocus(-1)},n["Ctrl-N"]=function(){t.moveFocus(1)});var r=e.options.customKeys,i=r?{}:n;function a(e,r){var a;a="string"!=typeof r?function(e){return r(e,t)}:n.hasOwnProperty(r)?n[r]:r,i[e]=a}if(r)for(var o in r)r.hasOwnProperty(o)&&a(o,r[o]);var s=e.options.extraKeys;if(s)for(var o in s)s.hasOwnProperty(o)&&a(o,s[o]);return i}(n,{moveFocus:function(e,t){i.changeActive(i.selectedHint+e,t)},setFocus:function(e){i.changeActive(e)},menuSize:function(){return i.screenAmount()},length:d.length,close:function(){n.close()},pick:function(){i.pick()},data:r})),n.options.closeOnUnfocus&&(s.on("blur",this.onBlur=function(){L=setTimeout((function(){n.close()}),100)}),s.on("focus",this.onFocus=function(){clearTimeout(L)})),s.on("scroll",this.onScroll=function(){var e=s.getScrollInfo(),t=s.getWrapperElement().getBoundingClientRect();D||(D=s.getScrollInfo());var r=_+D.top-e.top,i=r-(u.pageYOffset||(l.documentElement||l.body).scrollTop);if(x||(i+=c.offsetHeight),i<=t.top||i>=t.bottom)return n.close();c.style.top=r+"px",c.style.left=b+D.left-e.left+"px"}),e.on(c,"dblclick",(function(e){var t=o(c,e.target||e.srcElement);t&&null!=t.hintId&&(i.changeActive(t.hintId),i.pick())})),e.on(c,"click",(function(e){var t=o(c,e.target||e.srcElement);t&&null!=t.hintId&&(i.changeActive(t.hintId),n.options.completeOnSingleClick&&i.pick())})),e.on(c,"mousedown",(function(){setTimeout((function(){s.focus()}),20)}));var R=this.getSelectedHintRange();return 0===R.from&&0===R.to||this.scrollToActive(),e.signal(r,"select",d[this.selectedHint],c.childNodes[this.selectedHint]),!0}function l(e,t,n,r){if(e.async)e(t,r,n);else{var i=e(t,n);i&&i.then?i.then(r):r(i)}}n.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n],i=this;this.cm.operation((function(){r.hint?r.hint(i.cm,t,r):i.cm.replaceRange(a(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),i.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(i(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),n=this.cm.getLine(t.line);if(t.line!=this.startPos.line||n.length-t.ch!=this.startLen-this.startPos.ch||t.ch=this.data.list.length?n=r?this.data.list.length-1:0:n<0&&(n=r?0:this.data.list.length-1),this.selectedHint!=n){var i=this.hints.childNodes[this.selectedHint];i&&(i.className=i.className.replace(" "+t,""),i.removeAttribute("aria-selected")),(i=this.hints.childNodes[this.selectedHint=n]).className+=" "+t,i.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",i.id),this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],i)}},scrollToActive:function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from],n=this.hints.childNodes[e.to],r=this.hints.firstChild;t.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}},e.registerHelper("hint","auto",{resolve:function(t,n){var r,i=t.getHelpers(n,"hint");if(i.length){var a=function(e,t,n){var r=function(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r0?t(e):i(a+1)}))}(0)};return a.async=!0,a.supportsSelection=!0,a}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}}),e.registerHelper("hint","fromList",(function(t,n){var r,i=t.getCursor(),a=t.getTokenAt(i),o=e.Pos(i.line,a.start),s=i;a.start,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)}(n(15237))},11964:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(45948),a=n(26372),o=n(95290),s=n(68171),l=n(84847),u=n(79989),c=n(7302),f=r.__importDefault(n(56133)),d=r.__importDefault(n(40387)),h=r.__importDefault(n(95312)),p=n(94169);function m(e,t){return g(e,(function(n,r){t=r.marks?r.marks(e,n,t):t,p.forEachTransform(n,(function(r){r.marks&&(t=r.marks(e,n,t))}))})),t}function g(e,t){var n=e.component.selection;for(var r in n)if(n.hasOwnProperty(r)){var i=n[r];t(i,v(i.type))}}function v(e){switch(e){case"single":return h.default;case"multi":return d.default;case"interval":return f.default}return null}function y(e){for(var t=e.parent;t&&!c.isFacetModel(t);)t=t.parent;return t}t.STORE="_store",t.TUPLE="_tuple",t.MODIFY="_modify",t.SELECTION_DOMAIN="_selection_domain_",t.parseUnitSelection=function(e,t){var n={},o=e.config.selection,s=function(s){if(!t.hasOwnProperty(s))return"continue";var l=t[s],c=o[l.type];for(var f in c)"encodings"===f&&l.fields||"fields"===f&&l.encodings||("mark"===f&&(l[f]=r.__assign({},c[f],l[f])),void 0!==l[f]&&!0!==l[f]||(l[f]=c[f]||l[f]));s=u.varName(s);var d=n[s]=r.__assign({},l,{name:s,events:a.isString(l.on)?i.selector(l.on,"scope"):l.on});p.forEachTransform(d,(function(t){t.parse&&t.parse(e,l,d)}))};for(var l in t)s(l);return n},t.assembleUnitSelectionSignals=function(e,n){g(e,(function(r,i){var o=r.name,s=i.modifyExpr(e,r);n.push.apply(n,i.signals(e,r)),p.forEachTransform(r,(function(t){t.signals&&(n=t.signals(e,r,n)),t.modifyExpr&&(s=t.modifyExpr(e,r,s))})),n.push({name:o+t.MODIFY,on:[{events:{signal:o+t.TUPLE},update:"modify("+a.stringValue(r.name+t.STORE)+", "+s+")"}]})}));var r=y(e);if(n.length&&r){var o=a.stringValue(r.getName("cell"));n.unshift({name:"facet",value:{},on:[{events:i.selector("mousemove","scope"),update:"isTuple(facet) ? facet : group("+o+").datum"}]})}return n},t.assembleTopLevelSignals=function(e,t){var n=!1;return g(e,(function(r,i){i.topLevelSignals&&(t=i.topLevelSignals(e,r,t)),p.forEachTransform(r,(function(n){n.topLevelSignals&&(t=n.topLevelSignals(e,r,t))})),n=!0})),n&&(t.filter((function(e){return"unit"===e.name})).length||t.unshift({name:"unit",value:{},on:[{events:"mousemove",update:"isTuple(group()) ? group() : unit"}]})),t},t.assembleUnitSelectionData=function(e,n){return g(e,(function(e){n.filter((function(n){return n.name===e.name+t.STORE})).length||n.push({name:e.name+t.STORE})})),n},t.assembleUnitSelectionMarks=m,t.assembleLayerSelectionMarks=function(e,t){return e.children.forEach((function(e){c.isUnitModel(e)&&(t=m(e,t))})),t},t.selectionPredicate=function(e,n,r){var i=[],o=u.logicalExpr(n,(function(n){var o=u.varName(n),s=e.getSelectionComponent(o,n),l=a.stringValue(o+t.STORE);if(s.timeUnit){var c=r||e.component.data.raw,f=s.timeUnit.clone();c.parent?f.insertAsParentOf(c):c.parent=f}return"none"!==s.empty&&i.push(l),v(s.type).predicate+"("+l+", datum"+("global"===s.resolve?")":", "+a.stringValue(s.resolve)+")")}));return(i.length?"!("+i.map((function(e){return"length(data("+e+"))"})).join(" || ")+") || ":"")+"("+o+")"},t.isRawSelectionDomain=function(e){return e.signal.indexOf(t.SELECTION_DOMAIN)>=0},t.selectionScaleDomain=function(e,n){var r=JSON.parse(n.signal.replace(t.SELECTION_DOMAIN,"")),i=u.varName(r.selection),o=e.component.selection&&e.component.selection[i];return o?(s.warn('Use "bind": "scales" to setup a binding for scales and selections within the same view.'),{signal:"null"}):(o=e.getSelectionComponent(i,r.selection),r.encoding||r.field||(r.field=o.project[0].field,o.project.length>1&&s.warn('A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": '+a.stringValue(r.field)+".")),{signal:v(o.type).scaleDomain+"("+a.stringValue(i+t.STORE)+", "+a.stringValue(r.encoding||null)+", "+a.stringValue(r.field||null)+("global"===o.resolve?")":", "+a.stringValue(o.resolve)+")")})},t.unitName=function(e){var t=a.stringValue(e.name),n=y(e);return n&&(t+=(n.facet.row?" + '_' + ("+u.accessPathWithDatum(n.vgField("row"),"facet")+")":"")+(n.facet.column?" + '_' + ("+u.accessPathWithDatum(n.vgField("column"),"facet")+")":"")),t},t.requiresSelectionId=function(e){var t=!1;return g(e,(function(e){t=t||e.project.some((function(e){return e.field===l.SELECTION_ID}))})),t},t.channelSignalName=function(e,t,n){var r=e._signalNames||(e._signalNames={});if(r[t]&&r[t][n])return r[t][n];r[t]=r[t]||{};for(var i=u.varName(e.name+"_"+("visual"===n?t:e.fields[t])),a=i,o=1;r[a];)a=i+"_"+o++;return r[a]=r[t][n]=a},t.positionalProjections=function(e){var t=null,n=null,r=null,i=null;return e.project.forEach((function(e,a){e.channel===o.X?(t=e,n=a):e.channel===o.Y&&(r=e,i=a)})),{x:t,xi:n,y:r,yi:i}}},12520:(e,t,n)=>{!function(e){"use strict";var t={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};var n={};function r(e,t){var r=e.match(function(e){return n[e]||(n[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(t));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function i(e,t){return new RegExp((t?"^":"")+"","i")}function a(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),i=e[n],a=i.length-1;a>=0;a--)r.unshift(i[a])}e.defineMode("htmlmixed",(function(n,o){var s=e.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:o.multilineTagIndentFactor,multilineTagIndentPastTag:o.multilineTagIndentPastTag,allowMissingTagName:o.allowMissingTagName}),l={},u=o&&o.tags,c=o&&o.scriptTypes;if(a(t,l),u&&a(u,l),c)for(var f=c.length-1;f>=0;f--)l.script.unshift(["type",c[f].matches,c[f].mode]);function d(t,a){var o,u=s.token(t,a.htmlState),c=/\btag\b/.test(u);if(c&&!/[<>\s\/]/.test(t.current())&&(o=a.htmlState.tagName&&a.htmlState.tagName.toLowerCase())&&l.hasOwnProperty(o))a.inTag=o+" ";else if(a.inTag&&c&&/>$/.test(t.current())){var f=/^([\S]+) (.*)/.exec(a.inTag);a.inTag=null;var h=">"==t.current()&&function(e,t){for(var n=0;n-1?e.backUp(r.length-i):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}(e,g,t.localMode.token(e,t.localState))},a.localMode=p,a.localState=e.startState(p,s.indent(a.htmlState,"",""))}else a.inTag&&(a.inTag+=t.current(),t.eol()&&(a.inTag+=" "));return u}return{startState:function(){return{token:d,inTag:null,localMode:null,localState:null,htmlState:e.startState(s)}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(s,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,r){return!t.localMode||/^\s*<\//.test(n)?s.indent(t.htmlState,n,r):t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||s}}}}),"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}(n(15237),n(40576),n(16792),n(68656))},13995:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(95290),a=n(99273),o=n(79989),s=function(e){function t(t,n,r,i){var a=e.call(this,t)||this;return a.fields=n,a.geojson=r,a.signal=i,a}return r.__extends(t,e),t.prototype.clone=function(){return new t(null,o.duplicate(this.fields),this.geojson,this.signal)},t.parseAll=function(e,n){var r=0;if([[i.LONGITUDE,i.LATITUDE],[i.LONGITUDE2,i.LATITUDE2]].forEach((function(i){var a=i.map((function(e){return n.channelHasField(e)?n.fieldDef(e).field:void 0}));(a[0]||a[1])&&(e=new t(e,a,null,n.getName("geojson_"+r++)))})),n.channelHasField(i.SHAPE)){var o=n.fieldDef(i.SHAPE);o.type===a.GEOJSON&&(e=new t(e,null,o.field,n.getName("geojson_"+r++)))}return e},t.prototype.assemble=function(){return r.__assign({type:"geojson"},this.fields?{fields:this.fields}:{},this.geojson?{geojson:this.geojson}:{},{signal:this.signal})},t}(n(74686).DataFlowNode);t.GeoJSONNode=s},15058:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(95290),o=n(32530),s=n(31179),l=n(96598),u=n(99273),c=n(79989),f=n(74439);function d(e){return[].concat(e.type,e.style||[])}function h(e,t,n){var r=n.mark[e],i=n[t.type];void 0!==i[e]&&(r=i[e]);for(var a=0,o=d(t);a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PROJECTION_PROPERTIES=["type","clipAngle","clipExtent","center","rotate","precision","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"]},15237:function(e){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),a=/Edge\/(\d+)/.exec(e),o=r||i||a,s=o&&(r?document.documentMode||6:+(a||i)[1]),l=!a&&/WebKit\//.test(e),u=l&&/Qt\/\d+\.\d+/.test(e),c=!a&&/Chrome\/(\d+)/.exec(e),f=c&&+c[1],d=/Opera\//.test(e),h=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),m=/PhantomJS/.test(e),g=h&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),y=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=g||/Mac/.test(t),_=/\bCrOS\b/.test(e),x=/win/i.test(t),w=d&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(d=!1,l=!0);var k=b&&(u||d&&(null==w||w<12.11)),S=n||o&&s>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var E,A=function(e,t){var n=e.className,r=C(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function D(e,t){return M(e).appendChild(t)}function T(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a=t)return o+(t-a);o+=s-a,o+=n-o%n,a=s+1}}g?z=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:o&&(z=function(e){try{e.select()}catch(e){}});var q=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};function W(e,t){for(var n=0;n=t)return r+Math.min(o,t-i);if(i+=a-r,r=a+1,(i+=n-i%n)>=t)return r}}var X=[""];function K(e){for(;X.length<=e;)X.push(Q(X)+" ");return X[e]}function Q(e){return e[e.length-1]}function Z(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||te.test(e))}function re(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ne(e))||t.test(e):ne(e)}function ie(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ae=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function oe(e){return e.charCodeAt(0)>=768&&ae.test(e)}function se(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,a=r<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:n;e(a)?n=a:t=a+r}}var ue=null;function ce(e,t,n){var r;ue=null;for(var i=0;it)return i;a.to==t&&(a.from!=a.to&&"before"==n?r=i:ue=i),a.from==t&&(a.from!=a.to&&"before"!=n?r=i:ue=i)}return null!=r?r:ue}var fe=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function a(e,t,n){this.level=e,this.from=t,this.to=n}return function(o,s){var l,u="ltr"==s?"L":"R";if(0==o.length||"ltr"==s&&!e.test(o))return!1;for(var c=o.length,f=[],d=0;d-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function ve(e,t){var n=me(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function xe(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.off=function(e,t){ge(this,e,t)}}function we(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Se(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ce(e){we(e),ke(e)}function Ee(e){return e.target||e.srcElement}function Ae(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Me,De,Te=function(){if(o&&s<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}();function Ne(e){if(null==Me){var t=T("span","​");D(e,T("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Me=t.offsetWidth<=1&&t.offsetHeight>2&&!(o&&s<8))}var n=Me?T("span","​"):T("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Oe(e){if(null!=De)return De;var t=D(e,document.createTextNode("AخA")),n=E(t,0,1).getBoundingClientRect(),r=E(t,1,2).getBoundingClientRect();return M(e),!(!n||n.left==n.right)&&(De=r.right-n.right<3)}var Fe,Le=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var a=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),o=a.indexOf("\r");-1!=o?(n.push(a.slice(0,o)),t+=o+1):(n.push(a),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Pe=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},ze="oncopy"in(Fe=T("div"))||(Fe.setAttribute("oncopy","return;"),"function"==typeof Fe.oncopy),Re=null;var Ie={},je={};function Be(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ie[e]=t}function Ue(e){if("string"==typeof e&&je.hasOwnProperty(e))e=je[e];else if(e&&"string"==typeof e.name&&je.hasOwnProperty(e.name)){var t=je[e.name];"string"==typeof t&&(t={name:t}),(e=ee(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ue("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ue("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function qe(e,t){t=Ue(t);var n=Ie[t.name];if(!n)return qe(e,"text/plain");var r=n(e,t);if(We.hasOwnProperty(t.name)){var i=We[t.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=i[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r}var We={};function He(e,t){B(t,We.hasOwnProperty(e)?We[e]:We[e]={})}function Ve(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ge(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ye(e,t,n){return!e.startState||e.startState(t,n)}var $e=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Xe(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t=e.first&&tn?rt(n,Xe(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?rt(e.line,t):n<0?rt(e.line,0):e}(t,Xe(e,t.line).text.length)}function ft(e,t){for(var n=[],r=0;r=this.string.length},$e.prototype.sol=function(){return this.pos==this.lineStart},$e.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},$e.prototype.next=function(){if(this.post},$e.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},$e.prototype.skipToEnd=function(){this.pos=this.string.length},$e.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},$e.prototype.backUp=function(e){this.pos-=e},$e.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},$e.prototype.current=function(){return this.string.slice(this.start,this.pos)},$e.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},$e.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},$e.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var dt=function(e,t){this.state=e,this.lookAhead=t},ht=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function pt(e,t,n,r){var i=[e.state.modeGen],a={};kt(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),a,r);for(var o=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,u=0;n.state=!0,kt(e,t.text,s.mode,n,(function(e,t){for(var n=l;ue&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&Ve(e.doc.mode,r.state),a=pt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function gt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ht(r,!0,t);var a=function(e,t,n){for(var r,i,a=e.doc,o=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=a.first)return a.first;var l=Xe(a,s-1),u=l.stateAfter;if(u&&(!n||s+(u instanceof dt?u.lookAhead:0)<=a.modeFrontier))return s;var c=U(l.text,null,e.options.tabSize);(null==i||r>c)&&(i=s-1,r=c)}return i}(e,t,n),o=a>r.first&&Xe(r,a-1).stateAfter,s=o?ht.fromSaved(r,o,a):new ht(r,Ye(r.mode),a);return r.iter(a,t,(function(n){vt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}ht.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ht.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ht.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ht.fromSaved=function(e,t,n){return t instanceof dt?new ht(e,Ve(e.mode,t.state),n,t.lookAhead):new ht(e,Ve(e.mode,t),n)},ht.prototype.save=function(e){var t=!1!==e?Ve(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new dt(t,this.maxLookAhead):t};var _t=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function xt(e,t,n,r){var i,a,o=e.doc,s=o.mode,l=Xe(o,(t=ct(o,t)).line),u=gt(e,t.line,n),c=new $e(l.text,e.options.tabSize,u);for(r&&(a=[]);(r||c.pose.options.maxHighlightLength?(s=!1,o&&vt(e,t,r,f.pos),f.pos=t.length,l=null):l=wt(bt(n,f,r.state,d),a),d){var h=d[0].name;h&&(l="m-"+(l?h+" "+l:h))}if(!s||c!=l){for(;u=t:a.to>t);(r||(r=[])).push(new Et(o,a.from,s?null:a.to))}}return r}(n,i,o),l=function(e,t,n){var r;if(e)for(var i=0;i=t:a.to>t)||a.from==t&&"bookmark"==o.type&&(!n||a.marker.insertLeft)){var s=null==a.from||(o.inclusiveLeft?a.from<=t:a.from0&&s)for(var b=0;bt)&&(!n||Pt(n,a.marker)<0)&&(n=a.marker)}return n}function Bt(e,t,n,r,i){var a=Xe(e,t),o=Ct&&a.markedSpans;if(o)for(var s=0;s=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?it(u.to,n)>=0:it(u.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?it(u.from,r)<=0:it(u.from,r)<0)))return!0}}}function Ut(e){for(var t;t=Rt(e);)e=t.find(-1,!0).line;return e}function qt(e,t){var n=Xe(e,t),r=Ut(n);return n==r?t:Je(r)}function Wt(e,t){if(t>e.lastLine())return t;var n,r=Xe(e,t);if(!Ht(e,r))return t;for(;n=It(r);)r=n.find(1,!0).line;return Je(r)+1}function Ht(e,t){var n=Ct&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Xt=function(e,t,n){this.text=e,Ot(this,t),this.height=n?n(this):1};function Kt(e){e.parent=null,Nt(e)}Xt.prototype.lineNo=function(){return Je(this)},xe(Xt);var Qt={},Zt={};function Jt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Zt:Qt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function en(e,t){var n=N("span",null,null,l?"padding-right: .1px":null),r={pre:N("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,o=void 0;r.pos=0,r.addToken=nn,Oe(e.display.measure)&&(o=de(a,e.doc.direction))&&(r.addToken=rn(r.addToken,o)),r.map=[],on(a,r,mt(e,a,t!=e.display.externalMeasured&&Je(a))),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=P(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=P(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ne(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ve(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=P(r.pre.className,r.textClass||"")),r}function tn(e){var t=T("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function nn(e,t,n,r,i,a,l){if(t){var u,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;iu&&f.from<=u);d++);if(f.to>=c)return e(n,r,i,a,o,s,l);e(n,r.slice(0,f.to-u),i,a,null,s,l),a=null,r=r.slice(f.to-u),u=f.to}}}function an(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function on(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(r)for(var o,s,l,u,c,f,d,h=i.length,p=0,m=1,g="",v=0;;){if(v==p){l=u=c=s="",d=null,f=null,v=1/0;for(var y=[],b=void 0,_=0;_p||w.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,u=""),w.className&&(l+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&x.from==p&&(c+=" "+w.startStyle),w.endStyle&&x.to==v&&(b||(b=[])).push(w.endStyle,x.to),w.title&&((d||(d={})).title=w.title),w.attributes)for(var k in w.attributes)(d||(d={}))[k]=w.attributes[k];w.collapsed&&(!f||Pt(f.marker,w)<0)&&(f=x)}else x.from>p&&v>x.from&&(v=x.from)}if(b)for(var S=0;S=h)break;for(var E=Math.min(h,v);;){if(g){var A=p+g.length;if(!f){var M=A>E?g.slice(0,E-p):g;t.addToken(t,M,o?o+l:l,c,p+M.length==v?u:"",s,d)}if(A>=E){g=g.slice(E-p),p=E;break}p=A,c=""}g=i.slice(a,a=n[m++]),o=Jt(n[m++],t.cm.options)}}else for(var D=1;Dn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Fn(e,t,n,r){return zn(e,Pn(e,t),n,r)}function Ln(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&a.push((l.bottom+u.top)/2-n.top)}}a.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(a=function(e,t,n,r){var i,a=jn(t.map,n,r),l=a.node,u=a.start,c=a.end,f=a.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;u&&oe(t.line.text.charAt(a.coverStart+u));)--u;for(;a.coverStart+c1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var h;u>0&&(f=r="right"),i=e.options.lineWrapping&&(h=l.getClientRects()).length>1?h["right"==r?h.length-1:0]:l.getBoundingClientRect()}if(o&&s<9&&!u&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+sr(e.display),top:p.top,bottom:p.bottom}:In}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;bt)&&(i=(a=l-s)-1,t>=l&&(o="right")),null!=i){if(r=e[u+2],s==l&&n==(r.insertLeft?"left":"right")&&(o=n),"left"==n&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],o="left";if("right"==n&&i==l-s)for(;u=0&&(n=e[i]).left==n.right;i--);return n}function Un(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(l=r.text.length,u="before"):l<=0&&(l=0,u="after"),!s)return o("before"==u?l-1:l,"before"==u);function c(e,t,n){return o(n?e-1:e,1==s[t].level!=n)}var f=ce(s,l,u),d=ue,h=c(l,f,"before"==u);return null!=d&&(h.other=c(l,d,"before"!=u)),h}function Qn(e,t){var n=0;t=ct(e.doc,t),e.options.lineWrapping||(n=sr(e.display)*t.ch);var r=Xe(e.doc,t.line),i=Gt(r)+En(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Zn(e,t,n,r,i){var a=rt(e,t,n);return a.xRel=i,r&&(a.outside=r),a}function Jn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Zn(r.first,0,null,-1,-1);var i=et(r,n),a=r.first+r.size-1;if(i>a)return Zn(r.first+r.size-1,Xe(r,a).text.length,null,1,1);t<0&&(t=0);for(var o=Xe(r,i);;){var s=rr(e,o,i,t,n),l=jt(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var u=l.find(1);if(u.line==i)return u;o=Xe(r,i=u.line)}}function er(e,t,n,r){r-=Gn(t);var i=t.text.length,a=le((function(t){return zn(e,n,t-1).bottom<=r}),i,0);return{begin:a,end:i=le((function(t){return zn(e,n,t).top>r}),a,i)}}function tr(e,t,n,r){return n||(n=Pn(e,t)),er(e,t,n,Yn(e,t,zn(e,n,r),"line").top)}function nr(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function rr(e,t,n,r,i){i-=Gt(t);var a=Pn(e,t),o=Gn(t),s=0,l=t.text.length,u=!0,c=de(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?ar:ir)(e,t,n,a,c,r,i);s=(u=1!=f.level)?f.from:f.to-1,l=u?f.to:f.from-1}var d,h,p=null,m=null,g=le((function(t){var n=zn(e,a,t);return n.top+=o,n.bottom+=o,!!nr(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,m=n),!0)}),s,l),v=!1;if(m){var y=r-m.left=_.bottom?1:0}return Zn(n,g=se(t.text,g,1),h,v,r-d)}function ir(e,t,n,r,i,a,o){var s=le((function(s){var l=i[s],u=1!=l.level;return nr(Kn(e,rt(n,u?l.to:l.from,u?"before":"after"),"line",t,r),a,o,!0)}),0,i.length-1),l=i[s];if(s>0){var u=1!=l.level,c=Kn(e,rt(n,u?l.from:l.to,u?"after":"before"),"line",t,r);nr(c,a,o,!0)&&c.top>o&&(l=i[s-1])}return l}function ar(e,t,n,r,i,a,o){var s=er(e,t,r,o),l=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,f=null,d=0;d=u||h.to<=l)){var p=zn(e,r,1!=h.level?Math.min(u,h.to)-1:Math.max(l,h.from)).right,m=pm)&&(c=h,f=m)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function or(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Rn){Rn=T("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Rn.appendChild(document.createTextNode("x")),Rn.appendChild(T("br"));Rn.appendChild(document.createTextNode("x"))}D(e.measure,Rn);var n=Rn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),M(e.measure),n||1}function sr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=T("span","xxxxxxxxxx"),n=T("pre",[t],"CodeMirror-line-like");D(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function lr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=e.display.gutterSpecs[o].className;n[s]=a.offsetLeft+a.clientLeft+i,r[s]=a.clientWidth}return{fixedPos:ur(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ur(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function cr(e){var t=or(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/sr(e.display)-3);return function(i){if(Ht(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o0&&(l=Xe(e.doc,u.line).text).length==u.ch){var c=U(l,l.length,e.options.tabSize)-l.length;u=rt(u.line,Math.max(0,Math.round((a-Mn(e.display).left)/sr(e.display))-c))}return u}function hr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ct&&qt(e.doc,t)i.viewFrom?gr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)gr(e);else if(t<=i.viewFrom){var a=vr(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):gr(e)}else if(n>=i.viewTo){var o=vr(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):gr(e)}else{var s=vr(e,t,t,-1),l=vr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(ln(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):gr(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var a=r.view[hr(e,t)];if(null!=a.node){var o=a.changes||(a.changes=[]);-1==W(o,n)&&o.push(n)}}}function gr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function vr(e,t,n,r){var i,a=hr(e,t),o=e.display.view;if(!Ct||n==e.doc.first+e.doc.size)return{index:a,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(a==o.length-1)return null;i=s+o[a].size-t,a++}else i=s-t;t+=i,n+=i}for(;qt(e.doc,n)!=n;){if(a==(r<0?0:o.length-1))return null;n+=r*o[a-(r<0?1:0)].size,a+=r}return{index:a,lineN:n}}function yr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||l.to().line0?o:e.defaultCharWidth())+"px"}if(r.other){var s=n.appendChild(T("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=r.other.left+"px",s.style.top=r.other.top+"px",s.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function wr(e,t){return e.top-t.top||e.left-t.left}function kr(e,t,n){var r=e.display,i=e.doc,a=document.createDocumentFragment(),o=Mn(e.display),s=o.left,l=Math.max(r.sizerWidth,Tn(e)-r.sizer.offsetLeft)-o.right,u="ltr"==i.direction;function c(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),a.appendChild(T("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n height: "+(r-t)+"px"))}function f(t,n,r){var a,o,f=Xe(i,t),d=f.text.length;function h(n,r){return Xn(e,rt(t,n),"div",f,r)}function p(t,n,r){var i=tr(e,f,null,t),a="ltr"==n==("after"==r)?"left":"right";return h("after"==r?i.begin:i.end-(/\s/.test(f.text.charAt(i.end-1))?2:1),a)[a]}var m=de(f,i.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,a=0;at||t==n&&o.to==t)&&(r(Math.max(o.from,t),Math.min(o.to,n),1==o.level?"rtl":"ltr",a),i=!0)}i||r(t,n,"ltr")}(m,n||0,null==r?d:r,(function(e,t,i,f){var g="ltr"==i,v=h(e,g?"left":"right"),y=h(t-1,g?"right":"left"),b=null==n&&0==e,_=null==r&&t==d,x=0==f,w=!m||f==m.length-1;if(y.top-v.top<=3){var k=(u?_:b)&&w,S=(u?b:_)&&x?s:(g?v:y).left,C=k?l:(g?y:v).right;c(S,v.top,C-S,v.bottom)}else{var E,A,M,D;g?(E=u&&b&&x?s:v.left,A=u?l:p(e,i,"before"),M=u?s:p(t,i,"after"),D=u&&_&&w?l:y.right):(E=u?p(e,i,"before"):s,A=!u&&b&&x?l:v.right,M=!u&&_&&w?s:y.left,D=u?p(t,i,"after"):l),c(E,v.top,A-E,v.bottom),v.bottom0?t.blinker=setInterval((function(){e.hasFocus()||Mr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Cr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Ar(e))}function Er(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Mr(e))}),100)}function Ar(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ve(e,"focus",e,t),e.state.focused=!0,L(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Sr(e))}function Mr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ve(e,"blur",e,t),e.state.focused=!1,A(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Dr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,a=0,l=0;l.005||m<-.005)&&(ie.display.sizerWidth){var v=Math.ceil(d/sr(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function Tr(e){if(e.widgets)for(var t=0;t=o&&(a=et(t,Gt(Xe(t,l))-e.wrapper.clientHeight),o=l)}return{from:a,to:Math.max(o,a+1)}}function Or(e,t){var n=e.display,r=or(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,a=Nn(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var s=e.doc.height+An(n),l=t.tops-r;if(t.topi+a){var c=Math.min(t.top,(u?s:t.bottom)-a);c!=i&&(o.scrollTop=c)}var f=e.options.fixedGutter?0:n.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-f,h=Tn(e)-n.gutters.offsetWidth,p=t.right-t.left>h;return p&&(t.right=t.left+h),t.left<10?o.scrollLeft=0:t.lefth+d-3&&(o.scrollLeft=t.right+(p?0:10)-h),o}function Fr(e,t){null!=t&&(zr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Lr(e){zr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Pr(e,t,n){null==t&&null==n||zr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function zr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Rr(e,Qn(e,t.from),Qn(e,t.to),t.margin))}function Rr(e,t,n,r){var i=Or(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Pr(e,i.scrollLeft,i.scrollTop)}function Ir(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||di(e,{top:t}),jr(e,t,!0),n&&di(e),oi(e,100))}function jr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Br(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,mi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Ur(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+An(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Dn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var qr=function(e,t,n){this.cm=n;var r=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),pe(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),pe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};qr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},qr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},qr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},qr.prototype.zeroWidthHack=function(){var e=b&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new q,this.disableVert=new q},qr.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="",t.set(1e3,(function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.visibility="hidden":t.set(1e3,r)}))},qr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Wr=function(){};function Hr(e,t){t||(t=Ur(e));var n=e.display.barWidth,r=e.display.barHeight;Vr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Dr(e),Vr(e,Ur(e)),n=e.display.barWidth,r=e.display.barHeight}function Vr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Wr.prototype.update=function(){return{bottom:0,right:0}},Wr.prototype.setScrollLeft=function(){},Wr.prototype.setScrollTop=function(){},Wr.prototype.clear=function(){};var Gr={native:qr,null:Wr};function Yr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&A(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Gr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),pe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Br(e,t):Ir(e,t)}),e),e.display.scrollbars.addClass&&L(e.display.wrapper,e.display.scrollbars.addClass)}var $r=0;function Xr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++$r,markArrays:null},t=e.curOp,un?un.ops.push(t):t.ownsGroup=un={ops:[t],delayedCallbacks:[]}}function Kr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new li(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Zr(e){e.updatedDisplay=e.mustUpdate&&ci(e.cm,e.update)}function Jr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Dr(t),e.barMeasure=Ur(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Fn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Dn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Tn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function ei(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(a.defaultView.innerHeight||a.documentElement.clientHeight)&&(i=!1),null!=i&&!m){var o=T("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-En(e.display))+"px;\n height: "+(t.bottom-t.top+Dn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?rt(t.line,t.ch+1,"before"):t,t=t.ch?rt(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var o=!1,s=Kn(e,t),l=n&&n!=t?Kn(e,n):s,u=Or(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(Ir(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(o=!0)),null!=u.scrollLeft&&(Br(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(o=!0)),!o)break}return i}(t,ct(r,e.scrollToPos.from),ct(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(i)for(var o=0;o=e.display.viewTo)){var n=+new Date+e.options.workTime,r=gt(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(a){if(r.line>=e.display.viewFrom){var o=a.styles,s=a.text.length>e.options.maxHighlightLength?Ve(t.mode,r.state):null,l=pt(e,a,r,!0);s&&(r.state=s),a.styles=l.styles;var u=a.styleClasses,c=l.classes;c?a.styleClasses=c:u&&(a.styleClasses=null);for(var f=!o||o.length!=a.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),d=0;!f&&dn)return oi(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&ni(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==yr(e))return!1;gi(e)&&(gr(e),t.dims=lr(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFromo&&n.viewTo-o<20&&(o=Math.min(i,n.viewTo)),Ct&&(a=qt(e.doc,a),o=Wt(e.doc,o));var s=a!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;(function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=ln(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=ln(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,hr(e,n)))),r.viewTo=n})(e,a,o),n.viewOffset=Gt(Xe(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=yr(e);if(!s&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=ui(e);return u>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,a=r.lineDiv,o=a.firstChild;function s(t){var n=t.nextSibling;return l&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,c=r.viewFrom,f=0;f-1&&(h=!1),hn(e,d,c,n)),h&&(M(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(nt(e.options,c)))),o=d.node.nextSibling}else{var p=_n(e,d,c,n);a.insertBefore(p,o)}c+=d.size}for(;o;)o=s(o)}(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=F(e.activeElt.ownerDocument)&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&O(document.body,e.anchorNode)&&O(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,n=t.defaultView.getSelection(),r=t.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),n.removeAllRanges(),n.addRange(r),n.extend(e.focusNode,e.focusOffset)}}(c),M(n.cursorDiv),M(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,oi(e,400)),n.updateLineNumbers=null,!0}function fi(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Tn(e))r&&(t.visible=Nr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+An(e.display)-Nn(e),n.top)}),t.visible=Nr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ci(e,t))break;Dr(e);var i=Ur(e);br(e),Hr(e,i),pi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function di(e,t){var n=new li(e,t);if(ci(e,n)){Dr(e),fi(e,n);var r=Ur(e);br(e),Hr(e,r),pi(e,r),n.finish()}}function hi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",fn(e,"gutterChanged",e)}function pi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Dn(e)+"px"}function mi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ur(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+"px",o=0;ou.clientWidth,p=u.scrollHeight>u.clientHeight;if(i&&h||a&&p){if(a&&b&&l)e:for(var m=t.target,g=s.view;m!=u;m=m.parentNode)for(var v=0;v=0&&it(e,r.to())<=0)return n}return-1};var Ai=function(e,t){this.anchor=e,this.head=t};function Mi(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return it(e.from(),t.from())})),n=W(t,i);for(var a=1;a0:l>=0){var u=lt(s.from(),o.from()),c=st(s.to(),o.to()),f=s.empty()?o.from()==o.head:s.from()==s.head;a<=n&&--n,t.splice(--a,2,new Ai(f?c:u,f?u:c))}}return new Ei(t,n)}function Di(e,t){return new Ei([new Ai(e,t||e)],0)}function Ti(e){return e.text?rt(e.from.line+e.text.length-1,Q(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ni(e,t){if(it(e,t.from)<0)return e;if(it(e,t.to)<=0)return Ti(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Ti(t).ch-t.to.ch),rt(n,r)}function Oi(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,p-1),e.insert(s.line+1,v)}fn(e,"change",e,t)}function Ii(e,t,n){!function e(r,i,a){if(r.linked)for(var o=0;os-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(a=function(e,t){return t?(Wi(e.done),Q(e.done)):e.done.length&&!Q(e.done).ranges?Q(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Q(e.done)):void 0}(i,i.lastOp==r)))o=Q(a.changes),0==it(t.from,t.to)&&0==it(t.from,o.to)?o.to=Ti(t):a.changes.push(qi(e,t));else{var l=Q(i.done);for(l&&l.ranges||Gi(e.sel,i.done),a={changes:[qi(e,t)],generation:i.generation},i.done.push(a);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,o||ve(e,"historyAdded")}function Vi(e,t,n,r){var i=e.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,a,Q(i.done),t))?i.done[i.done.length-1]=t:Gi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&!1!==r.clearRedo&&Wi(i.undone)}function Gi(e,t){var n=Q(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Yi(e,t,n,r){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=n.markedSpans),++a}))}function $i(e){if(!e)return null;for(var t,n=0;n-1&&(Q(s)[f]=u[f],delete u[f])}}}return r}function Qi(e,t,n,r){if(r){var i=e.anchor;if(n){var a=it(t,i)<0;a!=it(n,i)<0?(i=t,t=n):a!=it(t,n)<0&&(t=n)}return new Ai(i,t)}return new Ai(n||t,t)}function Zi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),ra(e,new Ei([Qi(e.sel.primary(),t,n,i)],0),r)}function Ji(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a=t.ch:s.to>t.ch))){if(i&&(ve(l,"beforeCursorEnter"),l.explicitlyCleared)){if(a.markedSpans){--o;continue}break}if(!l.atomic)continue;if(n){var f=l.find(r<0?1:-1),d=void 0;if((r<0?c:u)&&(f=ca(e,f,-r,f&&f.line==t.line?a:null)),f&&f.line==t.line&&(d=it(f,n))&&(r<0?d<0:d>0))return la(e,f,t,r,i)}var h=l.find(r<0?-1:1);return(r<0?u:c)&&(h=ca(e,h,r,h.line==t.line?a:null)),h?la(e,h,t,r,i):null}}return t}function ua(e,t,n,r,i){var a=r||1;return la(e,t,n,a,i)||!i&&la(e,t,n,a,!0)||la(e,t,n,-a,i)||!i&&la(e,t,n,-a,!0)||(e.cantEdit=!0,rt(e.first,0))}function ca(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?ct(e,rt(t.line-1)):null:n>0&&t.ch==(r||Xe(e,t.line)).text.length?t.line0)){var c=[l,1],f=it(u.from,s.from),d=it(u.to,s.to);(f<0||!o.inclusiveLeft&&!f)&&c.push({from:u.from,to:s.from}),(d>0||!o.inclusiveRight&&!d)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),l+=c.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)pa(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else pa(e,t)}}function pa(e,t){if(1!=t.text.length||""!=t.text[0]||0!=it(t.from,t.to)){var n=Oi(e,t);Hi(e,t,n,e.cm?e.cm.curOp.id:NaN),va(e,t,n,Dt(e,t));var r=[];Ii(e,(function(e,n){n||-1!=W(r,e.history)||(xa(e.history,t),r.push(e.history)),va(e,t,null,Dt(e,t))}))}}function ma(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,a=e.history,o=e.sel,s="undo"==t?a.done:a.undone,l="undo"==t?a.undone:a.done,u=0;u=0;--h){var p=d(h);if(p)return p.v}}}}function ga(e,t){if(0!=t&&(e.first+=t,e.sel=new Ei(Z(e.sel.ranges,(function(e){return new Ai(rt(e.anchor.line+t,e.anchor.ch),rt(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){pr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linea&&(t={from:t.from,to:rt(a,Xe(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ke(e,t.from,t.to),n||(n=Oi(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,a=t.from,o=t.to,s=!1,l=a.line;e.options.lineWrapping||(l=Je(Ut(Xe(r,a.line))),r.iter(l,o.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&be(e),Ri(r,t,n,cr(e)),e.options.lineWrapping||(r.iter(l,a.line+t.text.length,(function(e){var t=Yt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Xe(e,r).stateAfter;if(i&&(!(i instanceof dt)||r+i.lookAhead1||!(this.children[0]instanceof ka))){var s=[];this.collapse(s),this.children=[new ka(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var o=i.lines.length%25+25,s=o;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==o&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=N("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Bt(e,t.line,t,n,a)||t.line!=n.line&&Bt(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ct=!0}a.addToHistory&&Hi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,n.line+1,(function(r){u&&a.collapsed&&!u.options.lineWrapping&&Ut(r)==u.display.maxLine&&(s=!0),a.collapsed&&l!=t.line&&Ze(r,0),function(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}(r,new Et(a,l==t.line?t.ch:null,l==n.line?n.ch:null),e.cm&&e.cm.curOp),++l})),a.collapsed&&e.iter(t.line,n.line+1,(function(t){Ht(e,t)&&Ze(t,0)})),a.clearOnEnter&&pe(a,"beforeCursorEnter",(function(){return a.clear()})),a.readOnly&&(St=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Aa,a.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),a.collapsed)pr(u,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var c=t.line;c<=n.line;c++)mr(u,c,"text");a.atomic&&oa(u.doc),fn(u,"markerAdded",u,a)}return a}Ma.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Xr(e),_e(this,"clear")){var n=this.find();n&&fn(this,"clear",n.from,n.to)}for(var r=null,i=null,a=0;ae.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&pr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&oa(e.doc)),e&&fn(e,"markerCleared",e,this,r,i),t&&Kr(e),this.parent&&this.parent.clear()}},Ma.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;l--)ha(this,r[l]);s?na(this,s):this.cm&&Lr(this.cm)})),undo:ai((function(){ma(this,"undo")})),redo:ai((function(){ma(this,"redo")})),undoSelection:ai((function(){ma(this,"undo",!0)})),redoSelection:ai((function(){ma(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=ct(this,e),t=ct(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(a){var o=a.markedSpans;if(o)for(var s=0;s=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=a,++n})),ct(this,rt(n,t))},indexFromPos:function(e){var t=(e=ct(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var f=e.dataTransfer.getData("Text");if(f){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),ia(t.doc,Di(n,n)),d)for(var h=0;h=0;t--)ya(e.doc,"",r[t].from,r[t].to,"+delete");Lr(e)}))}function to(e,t,n){var r=se(e.text,t+n,n);return r<0||r>e.text.length?null:r}function no(e,t,n){var r=to(e,t.ch,n);return null==r?null:new rt(t.line,r,n<0?"after":"before")}function ro(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var a=de(n,t.doc.direction);if(a){var o,s=i<0?Q(a):a[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var u=Pn(t,n);o=i<0?n.text.length-1:0;var c=zn(t,u,o).top;o=le((function(e){return zn(t,u,e).top==c}),i<0==(1==s.level)?s.from:s.to-1,o),"before"==l&&(o=to(n,o,1))}else o=i<0?s.to:s.from;return new rt(r,o,l)}}return new rt(r,i<0?n.text.length:0,i<0?"before":"after")}Ga.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ga.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ga.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ga.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ga.default=b?Ga.macDefault:Ga.pcDefault;var io={selectAll:fa,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return eo(e,(function(t){if(t.empty()){var n=Xe(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new rt(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),rt(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=Xe(e.doc,i.line-1).text;o&&(i=new rt(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),rt(i.line-1,o.length-1),i,"+transpose"))}n.push(new Ai(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return ni(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(it((i=u.ranges[i]).from(),t)<0||t.xRel>0)&&(it(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,a=!1,u=ri(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Er(e)),ge(i.wrapper.ownerDocument,"mouseup",u),ge(i.wrapper.ownerDocument,"mousemove",c),ge(i.scroller,"dragstart",f),ge(i.scroller,"drop",u),a||(we(t),r.addNew||Zi(e.doc,n,null,null,r.extend),l&&!h||o&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),c=function(e){a=a||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return a=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,pe(i.wrapper.ownerDocument,"mouseup",u),pe(i.wrapper.ownerDocument,"mousemove",c),pe(i.scroller,"dragstart",f),pe(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}(e,r,t,a):function(e,t,n,r){o&&Er(e);var i=e.display,a=e.doc;we(t);var s,l,u=a.sel,c=u.ranges;if(r.addNew&&!r.extend?(l=a.sel.contains(n),s=l>-1?c[l]:new Ai(n,n)):(s=a.sel.primary(),l=a.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new Ai(n,n)),n=dr(e,t,!0,!0),l=-1;else{var f=xo(e,n,r.unit);s=r.extend?Qi(s,f.anchor,f.head,r.extend):f}r.addNew?-1==l?(l=c.length,ra(a,Mi(e,c.concat([s]),l),{scroll:!1,origin:"*mouse"})):c.length>1&&c[l].empty()&&"char"==r.unit&&!r.extend?(ra(a,Mi(e,c.slice(0,l).concat(c.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=a.sel):ea(a,l,s,G):(l=0,ra(a,new Ei([s],0),G),u=a.sel);var d=n;function h(t){if(0!=it(d,t))if(d=t,"rectangle"==r.unit){for(var i=[],o=e.options.tabSize,c=U(Xe(a,n.line).text,n.ch,o),f=U(Xe(a,t.line).text,t.ch,o),h=Math.min(c,f),p=Math.max(c,f),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Xe(a,m).text,y=$(v,h,o);h==p?i.push(new Ai(rt(m,y),rt(m,y))):v.length>y&&i.push(new Ai(rt(m,y),rt(m,$(v,p,o))))}i.length||i.push(new Ai(n,n)),ra(a,Mi(e,u.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,_=s,x=xo(e,t,r.unit),w=_.anchor;it(x.anchor,w)>0?(b=x.head,w=lt(_.from(),x.anchor)):(b=x.anchor,w=st(_.to(),x.head));var k=u.ranges.slice(0);k[l]=function(e,t){var n=t.anchor,r=t.head,i=Xe(e.doc,n.line);if(0==it(n,r)&&n.sticky==r.sticky)return t;var a=de(i);if(!a)return t;var o=ce(a,n.ch,n.sticky),s=a[o];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,u=o+(s.from==n.ch==(1!=s.level)?0:1);if(0==u||u==a.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ce(a,r.ch,r.sticky),f=c-o||(r.ch-n.ch)*(1==s.level?-1:1);l=c==u-1||c==u?f<0:f>0}var d=a[u+(l?-1:0)],h=l==(1==d.level),p=h?d.from:d.to,m=h?"after":"before";return n.ch==p&&n.sticky==m?t:new Ai(new rt(n.line,p,m),r)}(e,new Ai(ct(a,w),b)),ra(a,Mi(e,k,l),G)}}var p=i.wrapper.getBoundingClientRect(),m=0;function g(t){var n=++m,o=dr(e,t,!0,"rectangle"==r.unit);if(o)if(0!=it(o,d)){e.curOp.focus=F(R(e)),h(o);var s=Nr(i,a);(o.line>=s.to||o.linep.bottom?20:0;l&&setTimeout(ri(e,(function(){m==n&&(i.scroller.scrollTop+=l,g(t))})),50)}}function v(t){e.state.selectingText=!1,m=1/0,t&&(we(t),i.input.focus()),ge(i.wrapper.ownerDocument,"mousemove",y),ge(i.wrapper.ownerDocument,"mouseup",b),a.history.lastSelOrigin=null}var y=ri(e,(function(e){0!==e.buttons&&Ae(e)?g(e):v(e)})),b=ri(e,v);e.state.selectingText=b,pe(i.wrapper.ownerDocument,"mousemove",y),pe(i.wrapper.ownerDocument,"mouseup",b)}(e,r,t,a)}(t,r,a,e):Ee(e)==n.scroller&&we(e):2==i?(r&&Zi(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(S?t.display.input.onContextMenu(e):Er(t)))}}function xo(e,t,n){if("char"==n)return new Ai(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Ai(rt(t.line,0),ct(e.doc,rt(t.line+1,0)));var r=n(e,t);return new Ai(r.from,r.to)}function wo(e,t,n,r){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&we(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!_e(e,n))return Se(t);a-=s.top-o.viewOffset;for(var l=0;l=i)return ve(e,n,e,et(e.doc,a),e.display.gutterSpecs[l].className,t),Se(t)}}function ko(e,t){return wo(e,t,"gutterClick",!0)}function So(e,t){Cn(e.display,t)||function(e,t){return!!_e(e,"gutterContextMenu")&&wo(e,t,"gutterContextMenu",!1)}(e,t)||ye(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function Co(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Wn(e)}bo.prototype.compare=function(e,t,n){return this.time+400>e&&0==it(t,this.pos)&&n==this.button};var Eo={toString:function(){return"CodeMirror.Init"}},Ao={},Mo={};function Do(e,t,n){if(!t!=!(n&&n!=Eo)){var r=e.display.dragFunctions,i=t?pe:ge;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function To(e){e.options.lineWrapping?(L(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(A(e.display.wrapper,"CodeMirror-wrap"),$t(e)),fr(e),pr(e),Wn(e),setTimeout((function(){return Hr(e)}),100)}function No(e,t){var n=this;if(!(this instanceof No))return new No(e,t);this.options=t=t?B(t):{},B(Ao,t,!1);var r=t.value;"string"==typeof r?r=new La(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new No.inputStyles[t.inputStyle](this),a=this.display=new _i(e,r,i,t);for(var u in a.wrapper.CodeMirror=this,Co(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Yr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new q,keySeq:null,specialChars:null},t.autofocus&&!y&&a.input.focus(),o&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;pe(t.scroller,"mousedown",ri(e,_o)),pe(t.scroller,"dblclick",o&&s<11?ri(e,(function(t){if(!ye(e,t)){var n=dr(e,t);if(n&&!ko(e,t)&&!Cn(e.display,t)){we(t);var r=e.findWordAt(n);Zi(e.doc,r.anchor,r.head)}}})):function(t){return ye(e,t)||we(t)}),pe(t.scroller,"contextmenu",(function(t){return So(e,t)})),pe(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||So(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function a(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function l(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}pe(t.scroller,"touchstart",(function(i){if(!ye(e,i)&&!a(i)&&!ko(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),pe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),pe(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Cn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,o=e.coordsChar(t.activeTouch,"page");a=!r.prev||l(r,r.prev)?new Ai(o,o):!r.prev.prev||l(r,r.prev.prev)?e.findWordAt(o):new Ai(rt(o.line,0),ct(e.doc,rt(o.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),we(n)}i()})),pe(t.scroller,"touchcancel",i),pe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Ir(e,t.scroller.scrollTop),Br(e,t.scroller.scrollLeft,!0),ve(e,"scroll",e))})),pe(t.scroller,"mousewheel",(function(t){return Ci(e,t)})),pe(t.scroller,"DOMMouseScroll",(function(t){return Ci(e,t)})),pe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ye(e,t)||Ce(t)},over:function(t){ye(e,t)||(function(e,t){var n=dr(e,t);if(n){var r=document.createDocumentFragment();xr(e,n,r),e.display.dragCursor||(e.display.dragCursor=T("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),D(e.display.dragCursor,r)}}(e,t),Ce(t))},start:function(t){return function(e,t){if(o&&(!e.state.draggingText||+new Date-Pa<100))Ce(t);else if(!ye(e,t)&&!Cn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!h)){var n=T("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(e,t)},drop:ri(e,za),leave:function(t){ye(e,t)||Ra(e)}};var u=t.input.getField();pe(u,"keyup",(function(t){return mo.call(e,t)})),pe(u,"keydown",ri(e,po)),pe(u,"keypress",ri(e,go)),pe(u,"focus",(function(t){return Ar(e,t)})),pe(u,"blur",(function(t){return Mr(e,t)}))}(this),Ba(),Xr(this),this.curOp.forceUpdate=!0,ji(this,r),t.autofocus&&!y||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Ar(n)}),20):Mr(this),Mo)Mo.hasOwnProperty(u)&&Mo[u](this,t[u],Eo);gi(this),t.finishInit&&t.finishInit(this);for(var c=0;c150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>a.first?U(Xe(a,t-1).text,null,o):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var f="",d=0;if(e.options.indentWithTabs)for(var h=Math.floor(u/o);h;--h)d+=o,f+="\t";if(do,l=Le(t),u=null;if(s&&r.ranges.length>1)if(Lo&&Lo.text.join("\n")==t){if(r.ranges.length%Lo.text.length==0){u=[];for(var c=0;c=0;d--){var h=r.ranges[d],p=h.from(),m=h.to();h.empty()&&(n&&n>0?p=rt(p.line,p.ch-n):e.state.overwrite&&!s?m=rt(m.line,Math.min(Xe(a,m.line).text.length,m.ch+Q(l).length)):s&&Lo&&Lo.lineWise&&Lo.text.join("\n")==l.join("\n")&&(p=m=rt(p.line,0)));var g={from:p,to:m,text:u?u[d%u.length]:l,origin:i||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};ha(e.doc,g),fn(e,"inputRead",e,g)}t&&!s&&Io(e,t),Lr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ro(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||ni(t,(function(){return zo(t,n,0,null,"paste")})),!0}function Io(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var s=0;s-1){o=Fo(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Xe(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=Fo(e,i.head.line,"smart"));o&&fn(e,"electricInput",e,i.head.line)}}}function jo(e){for(var t=[],n=[],r=0;r0?0:-1));if(isNaN(c))o=null;else{var f=n>0?c>=55296&&c<56320:c>=56320&&c<57343;o=new rt(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(f?2:1))),-n)}}else o=i?function(e,t,n,r){var i=de(t,e.doc.direction);if(!i)return no(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var a=ce(i,n.ch,n.sticky),o=i[a];if("ltr"==e.doc.direction&&o.level%2==0&&(r>0?o.to>n.ch:o.from=o.from&&d>=c.begin)){var h=f?"before":"after";return new rt(n.line,d,h)}}var p=function(e,t,r){for(var a=function(e,t){return t?new rt(n.line,l(e,1),"before"):new rt(n.line,e,"after")};e>=0&&e0==(1!=o.level),u=s?r.begin:l(r.end,-1);if(o.from<=u&&u0?c.end:l(c.begin,-1);return null==g||r>0&&g==t.text.length||!(m=p(r>0?0:i.length-1,r,u(g)))?null:m}(e.cm,s,t,n):no(s,t,n);if(null==o){if(a||((u=t.line+l)=e.first+e.size||(t=new rt(u,t.ch,t.sticky),!(s=Xe(e,u)))))return!1;t=ro(i,e.cm,s,t.line,l)}else t=o;return!0}if("char"==r||"codepoint"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var c=null,f="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||u(!h);h=!1){var p=s.text.charAt(t.ch)||"\n",m=re(p,d)?"w":f&&"\n"==p?"n":!f||/\s/.test(p)?null:"p";if(!f||h||m||(m="s"),c&&c!=m){n<0&&(n=1,u(),t.sticky="after");break}if(m&&(c=m),n>0&&!u(!h))break}var g=ua(e,t,a,o,!0);return at(a,g)&&(g.hitSide=!0),g}function Wo(e,t,n,r){var i,a,o=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,I(e).innerHeight||o(e).documentElement.clientHeight),u=Math.max(l-.5*or(e.display),3);i=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(a=Jn(e,s,i)).outside;){if(n<0?i<=0:i>=o.height){a.hitSide=!0;break}i+=5*n}return a}var Ho=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new q,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Vo(e,t){var n=Ln(e,t.line);if(!n||n.hidden)return null;var r=Xe(e.doc,t.line),i=On(n,r,t.line),a=de(r,e.doc.direction),o="left";a&&(o=ce(a,t.ch)%2?"right":"left");var s=jn(i.map,t.ch,o);return s.offset="right"==s.collapse?s.end:s.start,s}function Go(e,t){return t&&(e.bad=!0),e}function Yo(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Go(e.clipPos(rt(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||a.line=t.display.viewFrom&&Vo(t,i)||{node:l[0].measure.map[2],offset:0},c=a.liner.firstLine()&&(o=rt(o.line-1,Xe(r.doc,o.line-1).length)),s.ch==Xe(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;o.line==i.viewFrom||0==(e=hr(r,o.line))?(t=Je(i.view[0].line),n=i.view[0].node):(t=Je(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,u,c=hr(r,s.line);if(c==i.view.length-1?(l=i.viewTo-1,u=i.lineDiv.lastChild):(l=Je(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!n)return!1;for(var f=r.doc.splitLines(function(e,t,n,r,i){var a="",o=!1,s=e.doc.lineSeparator(),l=!1;function u(){o&&(a+=s,l&&(a+=s),o=l=!1)}function c(e){e&&(u(),a+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void c(n);var a,d=t.getAttribute("cm-marker");if(d){var h=e.findMarks(rt(r,0),rt(i+1,0),(g=+d,function(e){return e.id==g}));return void(h.length&&(a=h[0].find(0))&&c(Ke(e.doc,a.from,a.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&u();for(var m=0;m1&&d.length>1;)if(Q(f)==Q(d))f.pop(),d.pop(),l--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),t++}for(var h=0,p=0,m=f[0],g=d[0],v=Math.min(m.length,g.length);ho.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)h--,p++;f[f.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(h).replace(/\u200b+$/,"");var x=rt(t,h),w=rt(l,d.length?Q(d).length-p:0);return f.length>1||f[0]||it(x,w)?(ya(r.doc,f,x,w,"+input"),!0):void 0},Ho.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ho.prototype.reset=function(){this.forceCompositionEnd()},Ho.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ho.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ho.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||ni(this.cm,(function(){return pr(e.cm)}))},Ho.prototype.setUneditable=function(e){e.contentEditable="false"},Ho.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ri(this.cm,zo)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ho.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ho.prototype.onContextMenu=function(){},Ho.prototype.resetPosition=function(){},Ho.prototype.needsContentAttribute=!0;var Xo=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new q,this.hasSelection=!1,this.composing=null,this.resetting=!1};Xo.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function a(e){if(!ye(r,e)){if(r.somethingSelected())Po({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=jo(r);Po({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,V):(n.prevInput="",i.value=t.text.join("\n"),z(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),pe(i,"input",(function(){o&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),pe(i,"paste",(function(e){ye(r,e)||Ro(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),pe(i,"cut",a),pe(i,"copy",a),pe(e.scroller,"paste",(function(t){if(!Cn(e,t)&&!ye(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var a=new Event("paste");a.clipboardData=t.clipboardData,i.dispatchEvent(a)}})),pe(e.lineSpace,"selectstart",(function(t){Cn(e,t)||we(t)})),pe(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),pe(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Xo.prototype.createField=function(e){this.wrapper=Uo(),this.textarea=this.wrapper.firstChild},Xo.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Xo.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=_r(e);if(e.options.moveInputWithCursor){var i=Kn(e,n.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return r},Xo.prototype.showSelection=function(e){var t=this.cm.display;D(t.cursorDiv,e.cursors),D(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Xo.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&z(this.textarea),o&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",o&&s>=9&&(this.hasSelection=null));this.resetting=!1}},Xo.prototype.getField=function(){return this.textarea},Xo.prototype.supportsTouch=function(){return!1},Xo.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||F(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch(e){}},Xo.prototype.blur=function(){this.textarea.blur()},Xo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Xo.prototype.receivedFocus=function(){this.slowPoll()},Xo.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Xo.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Xo.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Pe(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(o&&s>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(8203!=a||r||(r="​"),8666==a)return this.reset(),this.cm.execCommand("undo")}for(var l=0,u=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Xo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Xo.prototype.onKeyPress=function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},Xo.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=dr(n,e),u=r.scroller.scrollTop;if(a&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(a)&&ri(n,ra)(n.doc,Di(a),V);var c,f=i.style.cssText,h=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(c=i.ownerDocument.defaultView.scrollY),r.input.focus(),l&&i.ownerDocument.defaultView.scrollTo(null,c),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),o&&s>=9&&g(),S){Ce(e);var m=function(){ge(window,"mouseup",m),setTimeout(v,20)};pe(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),a="​"+(e?i.value:"");i.value="⇚",i.value=a,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=a.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=h,i.style.cssText=f,o&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=i.selectionStart)){(!o||o&&s<9)&&g();var e=0,a=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?ri(n,fa)(n):e++<10?r.detectingSelectAll=setTimeout(a,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(a,200)}}},Xo.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Xo.prototype.setUneditable=function(){},Xo.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,a){e.defaults[n]=r,i&&(t[n]=a?function(e,t,n){n!=Eo&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Eo,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Li(e)}),!0),n("indentUnit",2,Li,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Pi(e),Wn(e),pr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var a=e.text.indexOf(t,i);if(-1==a)break;i=a+t.length,n.push(rt(r,a))}r++}));for(var i=n.length-1;i>=0;i--)ya(e.doc,t,n[i],rt(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Eo&&e.refresh()})),n("specialCharPlaceholder",tn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Co(e),bi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Ja(t),i=n!=Eo&&Ja(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,To,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=vi(t,e.options.lineNumbers),bi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?ur(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Hr(e)}),!0),n("scrollbarStyle","native",(function(e){Yr(e),Hr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=vi(e.options.gutters,t),bi(e)}),!0),n("firstLineNumber",1,bi,!0),n("lineNumberFormatter",(function(e){return e}),bi,!0),n("showCursorWhenSelecting",!1,br,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Mr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Do),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,br,!0),n("singleCursorHeightPerLine",!0,br,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Pi,!0),n("addModeClass",!1,Pi,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Pi,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(No),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){I(this).focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ri(this,t[e])(this,n,i),ve(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Ja(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Fo(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Lr(this));else{var a=i.from(),o=i.to(),s=Math.max(n,a.line);n=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var l=s;l0&&ea(this.doc,r,new Ai(a,u[r].to()),V)}}})),getTokenAt:function(e,t){return xt(this,e,t)},getLineTokens:function(e,t){return xt(this,rt(e),t,!0)},getTokenTypeAt:function(e){e=ct(this.doc,e);var t,n=mt(this,Xe(this.doc,e.line)),r=0,i=(n.length-1)/2,a=e.ch;if(0==a)t=n[2];else for(;;){var o=r+i>>1;if((o?n[2*o-1]:0)>=a)i=o;else{if(!(n[2*o+1]a&&(e=a,i=!0),r=Xe(this.doc,e)}else r=e;return Yn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Gt(r):0)},defaultTextHeight:function(){return or(this.display)},defaultCharWidth:function(){return sr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var a,o,s,l=this.display,u=(e=Kn(this,ct(this.doc,e))).bottom,c=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)u=e.top;else if("above"==r||"near"==r){var f=Math.max(l.wrapper.clientHeight,this.doc.height),d=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>f)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=f&&(u=e.bottom),c+t.offsetWidth>d&&(c=d-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==i?(c=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),n&&(a=this,o={left:c,top:u,right:c+t.offsetWidth,bottom:u+t.offsetHeight},null!=(s=Or(a,o)).scrollTop&&Ir(a,s.scrollTop),null!=s.scrollLeft&&Br(a,s.scrollLeft))},triggerOnKeyDown:ii(po),triggerOnKeyPress:ii(go),triggerOnKeyUp:mo,triggerOnMouseDown:ii(_o),execCommand:function(e){if(io.hasOwnProperty(e))return io[e].call(null,this)},triggerElectric:ii((function(e){Io(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var a=ct(this.doc,e),o=0;o0&&o(t.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&fr(this),ve(this,"refresh",this)})),swapDoc:ii((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),ji(this,e),Wn(this),this.display.input.reset(),Pr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,fn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},xe(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,a){e.registerHelper(t,r,a),n[t]._global.push({pred:i,val:a})}}(No);var Ko="iter insert remove copy getEditor constructor".split(" ");for(var Qo in La.prototype)La.prototype.hasOwnProperty(Qo)&&W(Ko,Qo)<0&&(No.prototype[Qo]=function(e){return function(){return e.apply(this.doc,arguments)}}(La.prototype[Qo]));return xe(La),No.inputStyles={textarea:Xo,contenteditable:Ho},No.defineMode=function(e){No.defaults.mode||"null"==e||(No.defaults.mode=e),Be.apply(this,arguments)},No.defineMIME=function(e,t){je[e]=t},No.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),No.defineMIME("text/plain","null"),No.defineExtension=function(e,t){No.prototype[e]=t},No.defineDocExtension=function(e,t){La.prototype[e]=t},No.fromTextArea=function(e,t){if((t=t?B(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=F(e.ownerDocument);t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(pe(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var o=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=o}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(ge(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=No((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=ge,e.on=pe,e.wheelEventPixels=Si,e.Doc=La,e.splitLines=Le,e.countColumn=U,e.findColumn=$,e.isWordChar=ne,e.Pass=H,e.signal=ve,e.Line=Xt,e.changeEnd=Ti,e.scrollbarModel=Gr,e.Pos=rt,e.cmpPos=it,e.modes=Ie,e.mimeModes=je,e.resolveMode=Ue,e.getMode=qe,e.modeExtensions=We,e.extendMode=He,e.copyState=Ve,e.startState=Ye,e.innerMode=Ge,e.commands=io,e.keyMap=Ga,e.keyName=Za,e.isModifierKey=Ka,e.lookupKey=Xa,e.normalizeKeyMap=$a,e.StringStream=$e,e.SharedTextMarker=Ta,e.TextMarker=Ma,e.LineWidget=Ca,e.e_preventDefault=we,e.e_stopPropagation=ke,e.e_stop=Ce,e.addClass=L,e.contains=O,e.rmClass=A,e.keyNames=qa}(No),No.version="5.65.8",No}()},16182:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(95290),a=n(32530),o=n(54116),s=n(99273),l=n(79989),u=n(15058),c=n(7302),f=n(91387),d=n(96159),h=n(46602),p=r.__importStar(n(33375)),m=r.__importStar(n(55516));function g(e,t){var n=e.fieldDef(t),r=e.legend(t),s=new h.LegendComponent({},function(e,t){var n;switch(t){case i.COLOR:var r=e.scaleName(i.COLOR);return e.markDef.filled?{fill:r}:{stroke:r};case i.FILL:case i.STROKE:case i.SIZE:case i.SHAPE:case i.OPACITY:return(n={})[t]=e.scaleName(t),n}}(e,t));o.LEGEND_PROPERTIES.forEach((function(n){var i=function(e,t,n,r){var i=r.fieldDef(n);switch(e){case"format":return u.numberFormat(i,t.format,r.config);case"title":var o=void 0!==i.title?i.title:t.title||(void 0===t.title?void 0:null);return u.getSpecifiedOrDefaultValue(o,a.title(i,r.config))||void 0;case"values":return m.values(t,i);case"type":return u.getSpecifiedOrDefaultValue(t.type,m.type(i.type,n,r.getScaleComponent(n).get("type")))}return t[e]}(n,r,t,e);if(void 0!==i){var o="values"===n?!!r.values:"title"===n&&i===e.fieldDef(t).title||i===r[n];(o||void 0===e.config.legend[n])&&s.set(n,i,o)}}));var c=r.encoding||{},f=["labels","legend","title","symbols","gradient"].reduce((function(r,i){var a=u.guideEncodeEntry(c[i]||{},e),o=p[i]?p[i](n,a,e,t,s.get("type")):a;return void 0!==o&&l.keys(o).length>0&&(r[i]={update:o}),r}),{});return l.keys(f).length>0&&s.set("encode",f,!!r.encoding),s}function v(e,t){if(!e)return t.clone();var n=e.getWithExplicit("orient"),r=t.getWithExplicit("orient");if(!n.explicit||!r.explicit||n.value===r.value){for(var i=!1,a=function(n){var r=d.mergeValuesWithExplicit(e.getWithExplicit(n),t.getWithExplicit(n),n,"legend",(function(e,t){switch(n){case"title":return u.mergeTitleComponent(e,t);case"type":return i=!0,d.makeImplicit("symbol")}return d.defaultTieBreaker(e,t,n,"legend")}));e.setWithExplicit(n,r)},s=0,c=o.VG_LEGEND_PROPERTIES;s{!function(e){"use strict";var t=/[\w$]+/;e.registerHelper("hint","anyword",(function(n,r){for(var i=r&&r.word||t,a=r&&r.range||500,o=n.getCursor(),s=n.getLine(o.line),l=o.ch,u=l;u&&i.test(s.charAt(u-1));)--u;for(var c=u!=l&&s.slice(u,l),f=r&&r.list||[],d={},h=new RegExp(i.source,"g"),p=-1;p<=1;p+=2)for(var m=o.line,g=Math.min(Math.max(m+p*a,n.firstLine()),n.lastLine())+p;m!=g;m+=p)for(var v,y=n.getLine(m);v=h.exec(y);)m==o.line&&v[0]===c||c&&0!=v[0].lastIndexOf(c,0)||Object.prototype.hasOwnProperty.call(d,v[0])||(d[v[0]]=!0,f.push(v[0]));return{list:f,from:e.Pos(o.line,u),to:e.Pos(o.line,l)}}))}(n(15237))},16792:(e,t,n)=>{!function(e){"use strict";e.defineMode("javascript",(function(t,n){var r,i,a=t.indentUnit,o=n.statementIndent,s=n.jsonld,l=n.json||s,u=!1!==n.trackScope,c=n.typescript,f=n.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("keyword d"),a=e("operator"),o={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:e("new"),delete:r,void:r,throw:r,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:a,typeof:a,instanceof:a,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r,await:r}}(),h=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function m(e,t,n){return r=e,i=n,t}function g(e,t){var n,r=e.next();if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){var r,i=!1;if(s&&"@"==e.peek()&&e.match(p))return t.tokenize=g,m("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=n||i);)i=!i&&"\\"==r;return i||(t.tokenize=g),m("string","string")}),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return m("number","number");if("."==r&&e.match(".."))return m("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return m(r);if("="==r&&e.eat(">"))return m("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return m("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),m("number","number");if("/"==r)return e.eat("*")?(t.tokenize=v,v(e,t)):e.eat("/")?(e.skipToEnd(),m("comment","comment")):Je(e,t,1)?(function(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),m("regexp","string-2")):(e.eat("="),m("operator","operator",e.current()));if("`"==r)return t.tokenize=y,y(e,t);if("#"==r&&"!"==e.peek())return e.skipToEnd(),m("meta","meta");if("#"==r&&e.eatWhile(f))return m("variable","property");if("<"==r&&e.match("!--")||"-"==r&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),m("comment","comment");if(h.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-|&?]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),"?"==r&&e.eat(".")?m("."):m("operator","operator",e.current());if(f.test(r)){e.eatWhile(f);var i=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(i)){var a=d[i];return m(a.type,a.style,i)}if("async"==i&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return m("async","keyword",i)}return m("variable","variable",i)}}function v(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=g;break}r="*"==n}return m("comment","comment")}function y(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=g;break}r=!r&&"\\"==n}return m("quasi","string-2",e.current())}function b(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(c){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,a=!1,o=n-1;o>=0;--o){var s=e.string.charAt(o),l="([{}])".indexOf(s);if(l>=0&&l<3){if(!i){++o;break}if(0==--i){"("==s&&(a=!0);break}}else if(l>=3&&l<6)++i;else if(f.test(s))a=!0;else if(/["'\/`]/.test(s))for(;;--o){if(0==o)return;if(e.string.charAt(o-1)==s&&"\\"!=e.string.charAt(o-2)){o--;break}}else if(a&&!i){++o;break}}a&&!i&&(t.fatArrowAt=o)}}var _={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function x(e,t,n,r,i,a){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=a,null!=r&&(this.align=r)}function w(e,t){if(!u)return!1;for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}function k(e,t,n,r,i){var a=e.cc;for(S.state=e,S.stream=i,S.marked=null,S.cc=a,S.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((a.length?a.pop():l?q:B)(n,r)){for(;a.length&&a[a.length-1].lex;)a.pop()();return S.marked?S.marked:"variable"==n&&w(e,r)?"variable-2":t}}var S={state:null,column:null,marked:null,cc:null};function C(){for(var e=arguments.length-1;e>=0;e--)S.cc.push(arguments[e])}function E(){return C.apply(null,arguments),!0}function A(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function M(e){var t=S.state;if(S.marked="def",u){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=D(e,t.context);if(null!=r)return void(t.context=r)}else if(!A(e,t.localVars))return void(t.localVars=new O(e,t.localVars));n.globalVars&&!A(e,t.globalVars)&&(t.globalVars=new O(e,t.globalVars))}}function D(e,t){if(t){if(t.block){var n=D(e,t.prev);return n?n==t.prev?t:new N(n,t.vars,!0):null}return A(e,t.vars)?t:new N(t.prev,new O(e,t.vars),!1)}return null}function T(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function N(e,t,n){this.prev=e,this.vars=t,this.block=n}function O(e,t){this.name=e,this.next=t}var F=new O("this",new O("arguments",null));function L(){S.state.context=new N(S.state.context,S.state.localVars,!1),S.state.localVars=F}function P(){S.state.context=new N(S.state.context,S.state.localVars,!0),S.state.localVars=null}function z(){S.state.localVars=S.state.context.vars,S.state.context=S.state.context.prev}function R(e,t){var n=function(){var n=S.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new x(r,S.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function I(){var e=S.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function j(e){return function t(n){return n==e?E():";"==e||"}"==n||")"==n||"]"==n?C():E(t)}}function B(e,t){return"var"==e?E(R("vardef",t),Se,j(";"),I):"keyword a"==e?E(R("form"),H,B,I):"keyword b"==e?E(R("form"),B,I):"keyword d"==e?S.stream.match(/^\s*$/,!1)?E():E(R("stat"),G,j(";"),I):"debugger"==e?E(j(";")):"{"==e?E(R("}"),P,le,I,z):";"==e?E():"if"==e?("else"==S.state.lexical.info&&S.state.cc[S.state.cc.length-1]==I&&S.state.cc.pop()(),E(R("form"),H,B,I,Te)):"function"==e?E(Le):"for"==e?E(R("form"),P,Ne,B,z,I):"class"==e||c&&"interface"==t?(S.marked="keyword",E(R("form","class"==e?e:t),je,I)):"variable"==e?c&&"declare"==t?(S.marked="keyword",E(B)):c&&("module"==t||"enum"==t||"type"==t)&&S.stream.match(/^\s*\w/,!1)?(S.marked="keyword","enum"==t?E(Qe):"type"==t?E(ze,j("operator"),he,j(";")):E(R("form"),Ce,j("{"),R("}"),le,I,I)):c&&"namespace"==t?(S.marked="keyword",E(R("form"),q,B,I)):c&&"abstract"==t?(S.marked="keyword",E(B)):E(R("stat"),te):"switch"==e?E(R("form"),H,j("{"),R("}","switch"),P,le,I,I,z):"case"==e?E(q,j(":")):"default"==e?E(j(":")):"catch"==e?E(R("form"),L,U,B,I,z):"export"==e?E(R("stat"),We,I):"import"==e?E(R("stat"),Ve,I):"async"==e?E(B):"@"==t?E(q,B):C(R("stat"),q,j(";"),I)}function U(e){if("("==e)return E(Re,j(")"))}function q(e,t){return V(e,t,!1)}function W(e,t){return V(e,t,!0)}function H(e){return"("!=e?C():E(R(")"),G,j(")"),I)}function V(e,t,n){if(S.state.fatArrowAt==S.stream.start){var r=n?Z:Q;if("("==e)return E(L,R(")"),oe(Re,")"),I,j("=>"),r,z);if("variable"==e)return C(L,Ce,j("=>"),r,z)}var i=n?$:Y;return _.hasOwnProperty(e)?E(i):"function"==e?E(Le,i):"class"==e||c&&"interface"==t?(S.marked="keyword",E(R("form"),Ie,I)):"keyword c"==e||"async"==e?E(n?W:q):"("==e?E(R(")"),G,j(")"),I,i):"operator"==e||"spread"==e?E(n?W:q):"["==e?E(R("]"),Ke,I,i):"{"==e?se(re,"}",null,i):"quasi"==e?C(X,i):"new"==e?E(function(e){return function(t){return"."==t?E(e?ee:J):"variable"==t&&c?E(xe,e?$:Y):C(e?W:q)}}(n)):E()}function G(e){return e.match(/[;\}\)\],]/)?C():C(q)}function Y(e,t){return","==e?E(G):$(e,t,!1)}function $(e,t,n){var r=0==n?Y:$,i=0==n?q:W;return"=>"==e?E(L,n?Z:Q,z):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?E(r):c&&"<"==t&&S.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?E(R(">"),oe(he,">"),I,r):"?"==t?E(q,j(":"),i):E(i):"quasi"==e?C(X,r):";"!=e?"("==e?se(W,")","call",r):"."==e?E(ne,r):"["==e?E(R("]"),G,j("]"),I,r):c&&"as"==t?(S.marked="keyword",E(he,r)):"regexp"==e?(S.state.lastType=S.marked="operator",S.stream.backUp(S.stream.pos-S.stream.start-1),E(i)):void 0:void 0}function X(e,t){return"quasi"!=e?C():"${"!=t.slice(t.length-2)?E(X):E(G,K)}function K(e){if("}"==e)return S.marked="string-2",S.state.tokenize=y,E(X)}function Q(e){return b(S.stream,S.state),C("{"==e?B:q)}function Z(e){return b(S.stream,S.state),C("{"==e?B:W)}function J(e,t){if("target"==t)return S.marked="keyword",E(Y)}function ee(e,t){if("target"==t)return S.marked="keyword",E($)}function te(e){return":"==e?E(I,B):C(Y,j(";"),I)}function ne(e){if("variable"==e)return S.marked="property",E()}function re(e,t){return"async"==e?(S.marked="property",E(re)):"variable"==e||"keyword"==S.style?(S.marked="property","get"==t||"set"==t?E(ie):(c&&S.state.fatArrowAt==S.stream.start&&(n=S.stream.match(/^\s*:\s*/,!1))&&(S.state.fatArrowAt=S.stream.pos+n[0].length),E(ae))):"number"==e||"string"==e?(S.marked=s?"property":S.style+" property",E(ae)):"jsonld-keyword"==e?E(ae):c&&T(t)?(S.marked="keyword",E(re)):"["==e?E(q,ue,j("]"),ae):"spread"==e?E(W,ae):"*"==t?(S.marked="keyword",E(re)):":"==e?C(ae):void 0;var n}function ie(e){return"variable"!=e?C(ae):(S.marked="property",E(Le))}function ae(e){return":"==e?E(W):"("==e?C(Le):void 0}function oe(e,t,n){function r(i,a){if(n?n.indexOf(i)>-1:","==i){var o=S.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),E((function(n,r){return n==t||r==t?C():C(e)}),r)}return i==t||a==t?E():n&&n.indexOf(";")>-1?C(e):E(j(t))}return function(n,i){return n==t||i==t?E():C(e,r)}}function se(e,t,n){for(var r=3;r"),he):"quasi"==e?C(ve,_e):void 0}function pe(e){if("=>"==e)return E(he)}function me(e){return e.match(/[\}\)\]]/)?E():","==e||";"==e?E(me):C(ge,me)}function ge(e,t){return"variable"==e||"keyword"==S.style?(S.marked="property",E(ge)):"?"==t||"number"==e||"string"==e?E(ge):":"==e?E(he):"["==e?E(j("variable"),ce,j("]"),ge):"("==e?C(Pe,ge):e.match(/[;\}\)\],]/)?void 0:E()}function ve(e,t){return"quasi"!=e?C():"${"!=t.slice(t.length-2)?E(ve):E(he,ye)}function ye(e){if("}"==e)return S.marked="string-2",S.state.tokenize=y,E(ve)}function be(e,t){return"variable"==e&&S.stream.match(/^\s*[?:]/,!1)||"?"==t?E(be):":"==e?E(he):"spread"==e?E(be):C(he)}function _e(e,t){return"<"==t?E(R(">"),oe(he,">"),I,_e):"|"==t||"."==e||"&"==t?E(he):"["==e?E(he,j("]"),_e):"extends"==t||"implements"==t?(S.marked="keyword",E(he)):"?"==t?E(he,j(":"),he):void 0}function xe(e,t){if("<"==t)return E(R(">"),oe(he,">"),I,_e)}function we(){return C(he,ke)}function ke(e,t){if("="==t)return E(he)}function Se(e,t){return"enum"==t?(S.marked="keyword",E(Qe)):C(Ce,ue,Me,De)}function Ce(e,t){return c&&T(t)?(S.marked="keyword",E(Ce)):"variable"==e?(M(t),E()):"spread"==e?E(Ce):"["==e?se(Ae,"]"):"{"==e?se(Ee,"}"):void 0}function Ee(e,t){return"variable"!=e||S.stream.match(/^\s*:/,!1)?("variable"==e&&(S.marked="property"),"spread"==e?E(Ce):"}"==e?C():"["==e?E(q,j("]"),j(":"),Ee):E(j(":"),Ce,Me)):(M(t),E(Me))}function Ae(){return C(Ce,Me)}function Me(e,t){if("="==t)return E(W)}function De(e){if(","==e)return E(Se)}function Te(e,t){if("keyword b"==e&&"else"==t)return E(R("form","else"),B,I)}function Ne(e,t){return"await"==t?E(Ne):"("==e?E(R(")"),Oe,I):void 0}function Oe(e){return"var"==e?E(Se,Fe):"variable"==e?E(Fe):C(Fe)}function Fe(e,t){return")"==e?E():";"==e?E(Fe):"in"==t||"of"==t?(S.marked="keyword",E(q,Fe)):C(q,Fe)}function Le(e,t){return"*"==t?(S.marked="keyword",E(Le)):"variable"==e?(M(t),E(Le)):"("==e?E(L,R(")"),oe(Re,")"),I,fe,B,z):c&&"<"==t?E(R(">"),oe(we,">"),I,Le):void 0}function Pe(e,t){return"*"==t?(S.marked="keyword",E(Pe)):"variable"==e?(M(t),E(Pe)):"("==e?E(L,R(")"),oe(Re,")"),I,fe,z):c&&"<"==t?E(R(">"),oe(we,">"),I,Pe):void 0}function ze(e,t){return"keyword"==e||"variable"==e?(S.marked="type",E(ze)):"<"==t?E(R(">"),oe(we,">"),I):void 0}function Re(e,t){return"@"==t&&E(q,Re),"spread"==e?E(Re):c&&T(t)?(S.marked="keyword",E(Re)):c&&"this"==e?E(ue,Me):C(Ce,ue,Me)}function Ie(e,t){return"variable"==e?je(e,t):Be(e,t)}function je(e,t){if("variable"==e)return M(t),E(Be)}function Be(e,t){return"<"==t?E(R(">"),oe(we,">"),I,Be):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(S.marked="keyword"),E(c?he:q,Be)):"{"==e?E(R("}"),Ue,I):void 0}function Ue(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&T(t))&&S.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(S.marked="keyword",E(Ue)):"variable"==e||"keyword"==S.style?(S.marked="property",E(qe,Ue)):"number"==e||"string"==e?E(qe,Ue):"["==e?E(q,ue,j("]"),qe,Ue):"*"==t?(S.marked="keyword",E(Ue)):c&&"("==e?C(Pe,Ue):";"==e||","==e?E(Ue):"}"==e?E():"@"==t?E(q,Ue):void 0}function qe(e,t){if("!"==t)return E(qe);if("?"==t)return E(qe);if(":"==e)return E(he,Me);if("="==t)return E(W);var n=S.state.lexical.prev;return C(n&&"interface"==n.info?Pe:Le)}function We(e,t){return"*"==t?(S.marked="keyword",E(Xe,j(";"))):"default"==t?(S.marked="keyword",E(q,j(";"))):"{"==e?E(oe(He,"}"),Xe,j(";")):C(B)}function He(e,t){return"as"==t?(S.marked="keyword",E(j("variable"))):"variable"==e?C(W,He):void 0}function Ve(e){return"string"==e?E():"("==e?C(q):"."==e?C(Y):C(Ge,Ye,Xe)}function Ge(e,t){return"{"==e?se(Ge,"}"):("variable"==e&&M(t),"*"==t&&(S.marked="keyword"),E($e))}function Ye(e){if(","==e)return E(Ge,Ye)}function $e(e,t){if("as"==t)return S.marked="keyword",E(Ge)}function Xe(e,t){if("from"==t)return S.marked="keyword",E(q)}function Ke(e){return"]"==e?E():C(oe(W,"]"))}function Qe(){return C(R("form"),Ce,j("{"),R("}"),oe(Ze,"}"),I,I)}function Ze(){return C(Ce,Me)}function Je(e,t,n){return t.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return L.lex=P.lex=!0,z.lex=!0,I.lex=!0,{startState:function(e){var t={tokenize:g,lastType:"sof",cc:[],lexical:new x((e||0)-a,0,"block",!1),localVars:n.localVars,context:n.localVars&&new N(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),b(e,t)),t.tokenize!=v&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==r?n:(t.lastType="operator"!=r||"++"!=i&&"--"!=i?r:"incdec",k(t,n,r,i,e))},indent:function(t,r){if(t.tokenize==v||t.tokenize==y)return e.Pass;if(t.tokenize!=g)return 0;var i,s=r&&r.charAt(0),l=t.lexical;if(!/^\s*else\b/.test(r))for(var u=t.cc.length-1;u>=0;--u){var c=t.cc[u];if(c==I)l=l.prev;else if(c!=Te&&c!=z)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(i=t.cc[t.cc.length-1])&&(i==Y||i==$)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;o&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var f=l.type,d=s==f;return"vardef"==f?l.indented+("operator"==t.lastType||","==t.lastType?l.info.length+1:0):"form"==f&&"{"==s?l.indented:"form"==f?l.indented+a:"stat"==f?l.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||h.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,r)?o||a:0):"switch"!=l.info||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:a):l.indented+(/^(?:case|default)\b/.test(r)?a:2*a)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:s,jsonMode:l,expressionAllowed:Je,skipExpression:function(t){k(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(15237))},19609:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VL_ONLY_GUIDE_CONFIG=["shortTimeLabels"]},19664:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(26372),i=n(95290),a=n(79989);t.binToString=function(e){return r.isBoolean(e)?"bin":"bin"+a.keys(e).map((function(t){return a.varName("_"+t+"_"+e[t])})).join("")},t.isBinParams=function(e){return e&&!r.isBoolean(e)},t.autoMaxBins=function(e){switch(e){case i.ROW:case i.COLUMN:case i.SIZE:case i.COLOR:case i.FILL:case i.STROKE:case i.OPACITY:case i.SHAPE:return 6;default:return 10}}},19760:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(75028),a=n(67982),o=n(55833),s=r.__importStar(n(67982)),l={};function u(e,t){l[e]=t}t.add=u,t.remove=function(e){delete l[e]},t.COMPOSITE_MARK_STYLES=s.BOXPLOT_STYLES,t.VL_ONLY_COMPOSITE_MARK_SPECIFIC_CONFIG_PROPERTY_INDEX=r.__assign({},a.VL_ONLY_BOXPLOT_CONFIG_PROPERTY_INDEX),u(a.BOXPLOT,a.normalizeBoxPlot),u(o.ERRORBAR,o.normalizeErrorBar),t.normalize=function(e,t){var n=i.isMarkDef(e.mark)?e.mark.type:e.mark,r=l[n];if(r)return r(e,t);throw new Error('Invalid mark type "'+n+'"')}},20032:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=r.__importStar(n(68171)),o=n(79989);t.isDateTime=function(e){return!(!e||!(e.year||e.quarter||e.month||e.date||e.day||e.hours||e.minutes||e.seconds||e.milliseconds))},t.MONTHS=["january","february","march","april","may","june","july","august","september","october","november","december"],t.SHORT_MONTHS=t.MONTHS.map((function(e){return e.substr(0,3)})),t.DAYS=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],t.SHORT_DAYS=t.DAYS.map((function(e){return e.substr(0,3)})),t.dateTimeExpr=function(e,n){void 0===n&&(n=!1);var r=[];if(n&&void 0!==e.day&&o.keys(e).length>1&&(a.warn(a.message.droppedDay(e)),delete(e=o.duplicate(e)).day),void 0!==e.year?r.push(e.year):void 0!==e.day?r.push(2006):r.push(0),void 0!==e.month){var s=n?function(e){if(i.isNumber(e))return e-1+"";var n=e.toLowerCase(),r=t.MONTHS.indexOf(n);if(-1!==r)return r+"";var o=n.substr(0,3),s=t.SHORT_MONTHS.indexOf(o);if(-1!==s)return s+"";throw new Error(a.message.invalidTimeUnit("month",e))}(e.month):e.month;r.push(s)}else if(void 0!==e.quarter){var l=n?function(e){if(i.isNumber(e))return e>4&&a.warn(a.message.invalidTimeUnit("quarter",e)),e-1+"";throw new Error(a.message.invalidTimeUnit("quarter",e))}(e.quarter):e.quarter;r.push(l+"*3")}else r.push(0);if(void 0!==e.date)r.push(e.date);else if(void 0!==e.day){var u=n?function(e){if(i.isNumber(e))return e%7+"";var n=e.toLowerCase(),r=t.DAYS.indexOf(n);if(-1!==r)return r+"";var o=n.substr(0,3),s=t.SHORT_DAYS.indexOf(o);if(-1!==s)return s+"";throw new Error(a.message.invalidTimeUnit("day",e))}(e.day):e.day;r.push(u+"+1")}else r.push(1);for(var c=0,f=["hours","minutes","seconds","milliseconds"];c{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAxisConfig=function(e,t,n,r,i){void 0===r&&(r="");for(var a=0,o=("band"===i?["axisBand"]:[]).concat(["x"===n?"axisX":"axisY","axis"+r.substr(0,1).toUpperCase()+r.substr(1),"axis"]);a{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(19760),o=n(19760),s=n(19609),l=n(54116),u=r.__importStar(n(75028)),c=n(75028),f=n(31179),d=n(84847),h=n(76447),p=n(79989);t.defaultViewConfig={width:200,height:200},t.defaultConfig={padding:5,timeFormat:"",countTitle:"Number of Records",invalidValues:"filter",view:t.defaultViewConfig,mark:u.defaultMarkConfig,area:{},bar:u.defaultBarConfig,circle:{},geoshape:{},line:{},point:{},rect:{},rule:{color:"black"},square:{},text:{color:"black"},tick:u.defaultTickConfig,trail:{},box:{size:14,extent:1.5},boxWhisker:{},boxMid:{color:"white"},scale:f.defaultScaleConfig,projection:{},axis:{},axisX:{},axisY:{minExtent:30},axisLeft:{},axisRight:{},axisTop:{},axisBottom:{},axisBand:{},legend:l.defaultLegendConfig,selection:d.defaultConfig,style:{},title:{}},t.initConfig=function(e){return p.mergeDeep(p.duplicate(t.defaultConfig),e)};var m=["view"].concat(c.PRIMITIVE_MARKS,a.COMPOSITE_MARK_STYLES),g=["padding","numberFormat","timeFormat","countTitle","stack","scale","selection","invalidValues","overlay"],v=r.__assign({view:["width","height"]},c.VL_ONLY_MARK_SPECIFIC_CONFIG_PROPERTY_INDEX,o.VL_ONLY_COMPOSITE_MARK_SPECIFIC_CONFIG_PROPERTY_INDEX);function y(e,t,n){var i="title"===t?h.extractTitleConfig(e.title).mark:e[t];"view"===t&&(n="cell");var a=r.__assign({},i,e.style[t]);p.keys(a).length>0&&(e.style[n||t]=a),delete e[t]}t.stripAndRedirectConfig=function(e){e=p.duplicate(e);for(var t=0,n=g;t0?e:void 0}},25473:(e,t,n)=>{var r="undefined"!=typeof JSON?JSON:n(84343);e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var n=t.space||"";"number"==typeof n&&(n=Array(n+1).join(" "));var o,s="boolean"==typeof t.cycles&&t.cycles,l=t.replacer||function(e,t){return t},u=t.cmp&&(o=t.cmp,function(e){return function(t,n){var r={key:t,value:e[t]},i={key:n,value:e[n]};return o(r,i)}}),c=[];return function e(t,o,f,d){var h=n?"\n"+new Array(d+1).join(n):"",p=n?": ":":";if(f&&f.toJSON&&"function"==typeof f.toJSON&&(f=f.toJSON()),void 0!==(f=l.call(t,o,f))){if("object"!=typeof f||null===f)return r.stringify(f);if(i(f)){for(var m=[],g=0;g{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=r.__importStar(n(74439));t.area={vgMark:"area",encodeEntry:function(e){return r.__assign({},i.baseEncodeEntry(e,{size:"ignore",orient:"include"}),i.pointPosition("x",e,"zeroOrMin"),i.pointPosition("y",e,"zeroOrMin"),i.pointPosition2(e,"zeroOrMin","horizontal"===e.markDef.orient?"x2":"y2"),i.defined(e))}}},26372:(e,t,n)=>{"use strict";function r(e,t,n){return e.fields=t||[],e.fname=n,e}function i(e){return null==e?null:e.fname}function a(e){return null==e?null:e.fields}function o(e){return 1===e.length?s(e[0]):l(e)}n.r(t),n.d(t,{Debug:()=>k,Error:()=>_,Info:()=>w,None:()=>b,Warn:()=>x,accessor:()=>r,accessorFields:()=>a,accessorName:()=>i,array:()=>K,ascending:()=>te,clampRange:()=>Q,compare:()=>ee,constant:()=>ae,debounce:()=>oe,error:()=>u,extend:()=>se,extent:()=>le,extentIndex:()=>ue,falsy:()=>v,fastmap:()=>he,field:()=>f,flush:()=>pe,hasOwnProperty:()=>fe,id:()=>d,identity:()=>h,inherits:()=>me,inrange:()=>ge,isArray:()=>C,isBoolean:()=>ve,isDate:()=>ye,isFunction:()=>Z,isIterable:()=>be,isNumber:()=>_e,isObject:()=>E,isRegExp:()=>xe,isString:()=>we,key:()=>ke,lerp:()=>Se,logger:()=>S,lruCache:()=>Ee,merge:()=>Ae,mergeConfig:()=>M,one:()=>m,pad:()=>De,panLinear:()=>j,panLog:()=>B,panPow:()=>U,panSymlog:()=>q,peek:()=>N,quarter:()=>$,repeat:()=>Me,span:()=>Te,splitAccessPath:()=>c,stringValue:()=>Ne,toBoolean:()=>Oe,toDate:()=>Le,toNumber:()=>O,toSet:()=>ze,toString:()=>Pe,truncate:()=>Re,truthy:()=>g,utcquarter:()=>X,visitArray:()=>Ie,writeConfig:()=>D,zero:()=>p,zoomLinear:()=>H,zoomLog:()=>V,zoomPow:()=>G,zoomSymlog:()=>Y});const s=e=>function(t){return t[e]},l=e=>{const t=e.length;return function(n){for(let r=0;rr&&c(),s=r=i+1):"]"===a&&(s||u("Access path missing open bracket: "+e),s>0&&c(),s=0,r=i+1):i>r?c():r=i+1}return s&&u("Access path missing closing bracket: "+e),o&&u("Access path missing closing quote: "+e),i>r&&(i++,c()),t}function f(e,t,n){const i=c(e);return e=1===i.length?i[0]:e,r((n&&n.get||o)(i),[e],t||e)}const d=f("id"),h=r((e=>e),[],"identity"),p=r((()=>0),[],"zero"),m=r((()=>1),[],"one"),g=r((()=>!0),[],"true"),v=r((()=>!1),[],"false");function y(e,t,n){const r=[t].concat([].slice.call(n));console[e].apply(console,r)}const b=0,_=1,x=2,w=3,k=4;function S(e,t,n=y){let r=e||b;return{level(e){return arguments.length?(r=+e,this):r},error(){return r>=_&&n(t||"error","ERROR",arguments),this},warn(){return r>=x&&n(t||"warn","WARN",arguments),this},info(){return r>=w&&n(t||"log","INFO",arguments),this},debug(){return r>=k&&n(t||"log","DEBUG",arguments),this}}}var C=Array.isArray;function E(e){return e===Object(e)}const A=e=>"__proto__"!==e;function M(...e){return e.reduce(((e,t)=>{for(const n in t)if("signals"===n)e.signals=T(e.signals,t.signals);else{const r="legend"===n?{layout:1}:"style"===n||null;D(e,n,t[n],r)}return e}),{})}function D(e,t,n,r){if(!A(t))return;let i,a;if(E(n)&&!C(n))for(i in a=E(e[t])?e[t]:e[t]={},n)r&&(!0===r||r[i])?D(a,i,n[i]):A(i)&&(a[i]=n[i]);else e[t]=n}function T(e,t){if(null==e)return t;const n={},r=[];function i(e){n[e.name]||(n[e.name]=1,r.push(e))}return t.forEach(i),e.forEach(i),r}function N(e){return e[e.length-1]}function O(e){return null==e||""===e?null:+e}const F=e=>t=>e*Math.exp(t),L=e=>t=>Math.log(e*t),P=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),z=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,R=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function I(e,t,n,r){const i=n(e[0]),a=n(N(e)),o=(a-i)*t;return[r(i-o),r(a-o)]}function j(e,t){return I(e,t,O,h)}function B(e,t){var n=Math.sign(e[0]);return I(e,t,L(n),F(n))}function U(e,t,n){return I(e,t,R(n),R(1/n))}function q(e,t,n){return I(e,t,P(n),z(n))}function W(e,t,n,r,i){const a=r(e[0]),o=r(N(e)),s=null!=t?r(t):(a+o)/2;return[i(s+(a-s)*n),i(s+(o-s)*n)]}function H(e,t,n){return W(e,t,n,O,h)}function V(e,t,n){const r=Math.sign(e[0]);return W(e,t,n,L(r),F(r))}function G(e,t,n,r){return W(e,t,n,R(r),R(1/r))}function Y(e,t,n,r){return W(e,t,n,P(r),z(r))}function $(e){return 1+~~(new Date(e).getMonth()/3)}function X(e){return 1+~~(new Date(e).getUTCMonth()/3)}function K(e){return null!=e?C(e)?e:[e]:[]}function Q(e,t,n){let r,i=e[0],a=e[1];return a=n-t?[t,n]:[i=Math.min(Math.max(i,t),n-r),i+r]}function Z(e){return"function"==typeof e}const J="descending";function ee(e,t,n){n=n||{},t=K(t)||[];const i=[],o=[],s={},l=n.comparator||ne;return K(e).forEach(((e,r)=>{null!=e&&(i.push(t[r]===J?-1:1),o.push(e=Z(e)?e:f(e,null,n)),(a(e)||[]).forEach((e=>s[e]=1)))})),0===o.length?null:r(l(o,i),Object.keys(s))}const te=(e,t)=>(et||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),ne=(e,t)=>1===e.length?re(e[0],t[0]):ie(e,t,e.length),re=(e,t)=>function(n,r){return te(e(n),e(r))*t},ie=(e,t,n)=>(t.push(0),function(r,i){let a,o=0,s=-1;for(;0===o&&++se}function oe(e,t){let n;return r=>{n&&clearTimeout(n),n=setTimeout((()=>(t(r),n=null)),e)}}function se(e){for(let t,n,r=1,i=arguments.length;ra&&(a=r))}else{for(r=t(e[o]);oa&&(a=r))}return[i,a]}function ue(e,t){const n=e.length;let r,i,a,o,s,l=-1;if(null==t){for(;++l=i){r=a=i;break}if(l===n)return[-1,-1];for(o=s=l;++li&&(r=i,o=l),a=i){r=a=i;break}if(l===n)return[-1,-1];for(o=s=l;++li&&(r=i,o=l),ar(e)?n[e]:void 0,set(e,t){return r(e)||(++i.size,n[e]===de&&--i.empty),n[e]=t,this},delete(e){return r(e)&&(--i.size,++i.empty,n[e]=de),this},clear(){i.size=i.empty=0,i.object=n={}},test(e){return arguments.length?(t=e,i):t},clean(){const e={};let r=0;for(const i in n){const a=n[i];a===de||t&&t(a)||(e[i]=a,++r)}i.size=r,i.empty=0,i.object=n=e}};return e&&Object.keys(e).forEach((t=>{i.set(t,e[t])})),i}function pe(e,t,n,r,i,a){if(!n&&0!==n)return a;const o=+n;let s,l=e[0],u=N(e);uo&&(i=a,a=o,o=i),r=void 0===r||r,((n=void 0===n||n)?a<=e:ae.replace(/\\(.)/g,"$1"))):K(e));const i=e&&e.length,a=n&&n.get||o,s=e=>a(t?[e]:c(e));let l;if(i)if(1===i){const t=s(e[0]);l=function(e){return""+t(e)}}else{const t=e.map(s);l=function(e){let n=""+t[0](e),r=0;for(;++r{t={},n={},r=0},a=(i,a)=>(++r>e&&(n=t,t={},r=1),t[i]=a);return i(),{clear:i,has:e=>fe(t,e)||fe(n,e),get:e=>fe(t,e)?t[e]:fe(n,e)?a(e,n[e]):void 0,set:(e,n)=>fe(t,e)?t[e]=n:a(e,n)}}function Ae(e,t,n,r){const i=t.length,a=n.length;if(!a)return t;if(!i)return n;const o=r||new t.constructor(i+a);let s=0,l=0,u=0;for(;s0?n[l++]:t[s++];for(;s=0;)n+=e;return n}function De(e,t,n,r){const i=n||" ",a=e+"",o=t-a.length;return o<=0?a:"left"===r?Me(i,o)+a:"center"===r?Me(i,~~(o/2))+a+Me(i,Math.ceil(o/2)):a+Me(i,o)}function Te(e){return e&&N(e)-e[0]||0}function Ne(e){return C(e)?"["+e.map(Ne)+"]":E(e)||we(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function Oe(e){return null==e||""===e?null:!(!e||"false"===e||"0"===e||!e)}const Fe=e=>_e(e)||ye(e)?e:Date.parse(e);function Le(e,t){return t=t||Fe,null==e||""===e?null:t(e)}function Pe(e){return null==e||""===e?null:e+""}function ze(e){const t={},n=e.length;for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209).__importStar(n(68171)),i=n(79989),a=n(62277),o={has:function(e){var t=e;return void 0!==t.fields||void 0!==t.encodings},parse:function(e,t,n){var o={},s={};(t.fields||[]).forEach((function(e){return o[e]=null})),(t.encodings||[]).forEach((function(t){var n=e.fieldDef(t);if(n)if(n.timeUnit){var i=e.vgField(t);o[i]=t,s[i]={as:i,field:n.field,timeUnit:n.timeUnit}}else o[n.field]=t;else r.warn(r.message.cannotProjectOnChannelWithoutField(t))}));var l=n.project||(n.project=[]);for(var u in o)o.hasOwnProperty(u)&&l.push({field:u,channel:o[u]});var c=n.fields||(n.fields={});l.filter((function(e){return e.channel})).forEach((function(e){return c[e.channel]=e.field})),i.keys(s).length&&(n.timeUnit=new a.TimeUnitNode(null,s))}};t.default=o},27588:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(31179),i=n(5711),a=n(96159);function o(e){s(e);var t=e.component.layoutSize;t.setWithExplicit("width",l(e,"width")),t.setWithExplicit("height",l(e,"height"))}function s(e){for(var t=0,n=e.children;t{"use strict";t.A=function(e){var t=/\/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1,3);return{library:t[0],version:t[1]}}},29532:(e,t,n)=>{!function(e){"use strict";function t(e){for(var t;null!=(t=e.next());)if("`"==t&&!e.eat("`"))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null}function n(e){return e.eat("@")&&(e.match("session."),e.match("local."),e.match("global.")),e.eat("'")?(e.match(/^.*'/),"variable-2"):e.eat('"')?(e.match(/^.*"/),"variable-2"):e.eat("`")?(e.match(/^.*`/),"variable-2"):e.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function r(e){return e.eat("N")?"atom":e.match(/^[a-zA-Z.#!?]/)?"variable-2":null}e.defineMode("sql",(function(t,n){var r=n.client||{},s=n.atoms||{false:!0,true:!0,null:!0},l=n.builtin||a(o),u=n.keywords||a(i),c=n.operatorChars||/^[*+\-%<>!=&|~^\/]/,f=n.support||{},d=n.hooks||{},h=n.dateSQL||{date:!0,time:!0,timestamp:!0},p=!1!==n.backslashStringEscapes,m=n.brackets||/^[\{}\(\)\[\]]/,g=n.punctuation||/^[;.,:]/;function v(e,t){var n=e.next();if(d[n]){var i=d[n](e,t);if(!1!==i)return i}if(f.hexNumber&&("0"==n&&e.match(/^[xX][0-9a-fA-F]+/)||("x"==n||"X"==n)&&e.match(/^'[0-9a-fA-F]*'/)))return"number";if(f.binaryNumber&&(("b"==n||"B"==n)&&e.match(/^'[01]*'/)||"0"==n&&e.match(/^b[01]+/)))return"number";if(n.charCodeAt(0)>47&&n.charCodeAt(0)<58)return e.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),f.decimallessFloat&&e.match(/^\.(?!\.)/),"number";if("?"==n&&(e.eatSpace()||e.eol()||e.eat(";")))return"variable-3";if("'"==n||'"'==n&&f.doubleQuote)return t.tokenize=y(n),t.tokenize(e,t);if((f.nCharCast&&("n"==n||"N"==n)||f.charsetCast&&"_"==n&&e.match(/[a-z][a-z0-9]*/i))&&("'"==e.peek()||'"'==e.peek()))return"keyword";if(f.escapeConstant&&("e"==n||"E"==n)&&("'"==e.peek()||'"'==e.peek()&&f.doubleQuote))return t.tokenize=function(e,t){return(t.tokenize=y(e.next(),!0))(e,t)},"keyword";if(f.commentSlashSlash&&"/"==n&&e.eat("/"))return e.skipToEnd(),"comment";if(f.commentHash&&"#"==n||"-"==n&&e.eat("-")&&(!f.commentSpaceRequired||e.eat(" ")))return e.skipToEnd(),"comment";if("/"==n&&e.eat("*"))return t.tokenize=b(1),t.tokenize(e,t);if("."!=n){if(c.test(n))return e.eatWhile(c),"operator";if(m.test(n))return"bracket";if(g.test(n))return e.eatWhile(g),"punctuation";if("{"==n&&(e.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||e.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";e.eatWhile(/^[_\w\d]/);var a=e.current().toLowerCase();return h.hasOwnProperty(a)&&(e.match(/^( )+'[^']*'/)||e.match(/^( )+"[^"]*"/))?"number":s.hasOwnProperty(a)?"atom":l.hasOwnProperty(a)?"type":u.hasOwnProperty(a)?"keyword":r.hasOwnProperty(a)?"builtin":null}return f.zerolessFloat&&e.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":e.match(/^\.+/)?null:f.ODBCdotTable&&e.match(/^[\w\d_$#]+/)?"variable-2":void 0}function y(e,t){return function(n,r){for(var i,a=!1;null!=(i=n.next());){if(i==e&&!a){r.tokenize=v;break}a=(p||t)&&!a&&"\\"==i}return"string"}}function b(e){return function(t,n){var r=t.match(/^.*?(\/\*|\*\/)/);return r?"/*"==r[1]?n.tokenize=b(e+1):n.tokenize=e>1?b(e-1):v:t.skipToEnd(),"comment"}}function _(e,t,n){t.context={prev:t.context,indent:e.indentation(),col:e.column(),type:n}}return{startState:function(){return{tokenize:v,context:null}},token:function(e,t){if(e.sol()&&t.context&&null==t.context.align&&(t.context.align=!1),t.tokenize==v&&e.eatSpace())return null;var n=t.tokenize(e,t);if("comment"==n)return n;t.context&&null==t.context.align&&(t.context.align=!0);var r=e.current();return"("==r?_(e,t,")"):"["==r?_(e,t,"]"):t.context&&t.context.type==r&&function(e){e.indent=e.context.indent,e.context=e.context.prev}(t),n},indent:function(n,r){var i=n.context;if(!i)return e.Pass;var a=r.charAt(0)==i.type;return i.align?i.col+(a?0:1):i.indent+(a?0:t.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:f.commentSlashSlash?"//":f.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``"}}));var i="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function a(e){for(var t={},n=e.split(" "),r=0;r!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:a("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":n}}),e.defineMIME("text/x-mysql",{name:"sql",client:a("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:a(i+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:a("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:a("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:a("date time timestamp"),support:a("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":n,"`":t,"\\":r}}),e.defineMIME("text/x-mariadb",{name:"sql",client:a("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:a(i+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group group_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:a("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:a("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:a("date time timestamp"),support:a("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":n,"`":t,"\\":r}}),e.defineMIME("text/x-sqlite",{name:"sql",client:a("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:a(i+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:a("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:a("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:a("date time timestamp datetime"),support:a("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":n,":":n,"?":n,$:n,'"':function(e){for(var t;null!=(t=e.next());)if('"'==t&&!e.eat('"'))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null},"`":t}}),e.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:a("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:a("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:a("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:a("commentSlashSlash decimallessFloat"),hooks:{}}),e.defineMIME("text/x-plsql",{name:"sql",client:a("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:a("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:a("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:a("date time timestamp"),support:a("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),e.defineMIME("text/x-hive",{name:"sql",keywords:a("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:a("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:a("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:a("date timestamp"),support:a("ODBCdotTable doubleQuote binaryNumber hexNumber")}),e.defineMIME("text/x-pgsql",{name:"sql",client:a("source"),keywords:a(i+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:a("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:a("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:a("date time timestamp"),support:a("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),e.defineMIME("text/x-gql",{name:"sql",keywords:a("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:a("false true"),builtin:a("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),e.defineMIME("text/x-gpsql",{name:"sql",client:a("source"),keywords:a("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:a("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:a("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:a("date time timestamp"),support:a("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),e.defineMIME("text/x-sparksql",{name:"sql",keywords:a("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:a("abs acos acosh add_months aggregate and any approx_count_distinct approx_percentile array array_contains array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_repeat array_sort array_union arrays_overlap arrays_zip ascii asin asinh assert_true atan atan2 atanh avg base64 between bigint bin binary bit_and bit_count bit_get bit_length bit_or bit_xor bool_and bool_or boolean bround btrim cardinality case cast cbrt ceil ceiling char char_length character_length chr coalesce collect_list collect_set concat concat_ws conv corr cos cosh cot count count_if count_min_sketch covar_pop covar_samp crc32 cume_dist current_catalog current_database current_date current_timestamp current_timezone current_user date date_add date_format date_from_unix_date date_part date_sub date_trunc datediff day dayofmonth dayofweek dayofyear decimal decode degrees delimited dense_rank div double e element_at elt encode every exists exp explode explode_outer expm1 extract factorial filter find_in_set first first_value flatten float floor forall format_number format_string from_csv from_json from_unixtime from_utc_timestamp get_json_object getbit greatest grouping grouping_id hash hex hour hypot if ifnull in initcap inline inline_outer input_file_block_length input_file_block_start input_file_name inputformat instr int isnan isnotnull isnull java_method json_array_length json_object_keys json_tuple kurtosis lag last last_day last_value lcase lead least left length levenshtein like ln locate log log10 log1p log2 lower lpad ltrim make_date make_dt_interval make_interval make_timestamp make_ym_interval map map_concat map_entries map_filter map_from_arrays map_from_entries map_keys map_values map_zip_with max max_by md5 mean min min_by minute mod monotonically_increasing_id month months_between named_struct nanvl negative next_day not now nth_value ntile nullif nvl nvl2 octet_length or outputformat overlay parse_url percent_rank percentile percentile_approx pi pmod posexplode posexplode_outer position positive pow power printf quarter radians raise_error rand randn random rank rcfile reflect regexp regexp_extract regexp_extract_all regexp_like regexp_replace repeat replace reverse right rint rlike round row_number rpad rtrim schema_of_csv schema_of_json second sentences sequence sequencefile serde session_window sha sha1 sha2 shiftleft shiftright shiftrightunsigned shuffle sign signum sin sinh size skewness slice smallint some sort_array soundex space spark_partition_id split sqrt stack std stddev stddev_pop stddev_samp str_to_map string struct substr substring substring_index sum tan tanh textfile timestamp timestamp_micros timestamp_millis timestamp_seconds tinyint to_csv to_date to_json to_timestamp to_unix_timestamp to_utc_timestamp transform transform_keys transform_values translate trim trunc try_add try_divide typeof ucase unbase64 unhex uniontype unix_date unix_micros unix_millis unix_seconds unix_timestamp upper uuid var_pop var_samp variance version weekday weekofyear when width_bucket window xpath xpath_boolean xpath_double xpath_float xpath_int xpath_long xpath_number xpath_short xpath_string xxhash64 year zip_with"),atoms:a("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:a("date time timestamp"),support:a("ODBCdotTable doubleQuote zerolessFloat")}),e.defineMIME("text/x-esper",{name:"sql",client:a("source"),keywords:a("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:a("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:a("time"),support:a("decimallessFloat zerolessFloat binaryNumber hexNumber")}),e.defineMIME("text/x-trino",{name:"sql",keywords:a("abs absent acos add admin after all all_match alter analyze and any any_match approx_distinct approx_most_frequent approx_percentile approx_set arbitrary array_agg array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_sort array_union arrays_overlap as asc asin at at_timezone atan atan2 authorization avg bar bernoulli beta_cdf between bing_tile bing_tile_at bing_tile_coordinates bing_tile_polygon bing_tile_quadkey bing_tile_zoom_level bing_tiles_around bit_count bitwise_and bitwise_and_agg bitwise_left_shift bitwise_not bitwise_or bitwise_or_agg bitwise_right_shift bitwise_right_shift_arithmetic bitwise_xor bool_and bool_or both by call cardinality cascade case cast catalogs cbrt ceil ceiling char2hexint checksum chr classify coalesce codepoint column columns combinations comment commit committed concat concat_ws conditional constraint contains contains_sequence convex_hull_agg copartition corr cos cosh cosine_similarity count count_if covar_pop covar_samp crc32 create cross cube cume_dist current current_catalog current_date current_groups current_path current_role current_schema current_time current_timestamp current_timezone current_user data date_add date_diff date_format date_parse date_trunc day day_of_month day_of_week day_of_year deallocate default define definer degrees delete dense_rank deny desc describe descriptor distinct distributed dow doy drop e element_at else empty empty_approx_set encoding end error escape evaluate_classifier_predictions every except excluding execute exists exp explain extract false features fetch filter final first first_value flatten floor following for format format_datetime format_number from from_base from_base32 from_base64 from_base64url from_big_endian_32 from_big_endian_64 from_encoded_polyline from_geojson_geometry from_hex from_ieee754_32 from_ieee754_64 from_iso8601_date from_iso8601_timestamp from_iso8601_timestamp_nanos from_unixtime from_unixtime_nanos from_utf8 full functions geometric_mean geometry_from_hadoop_shape geometry_invalid_reason geometry_nearest_points geometry_to_bing_tiles geometry_union geometry_union_agg grant granted grants graphviz great_circle_distance greatest group grouping groups hamming_distance hash_counts having histogram hmac_md5 hmac_sha1 hmac_sha256 hmac_sha512 hour human_readable_seconds if ignore in including index infinity initial inner input insert intersect intersection_cardinality into inverse_beta_cdf inverse_normal_cdf invoker io is is_finite is_infinite is_json_scalar is_nan isolation jaccard_index join json_array json_array_contains json_array_get json_array_length json_exists json_extract json_extract_scalar json_format json_object json_parse json_query json_size json_value keep key keys kurtosis lag last last_day_of_month last_value lateral lead leading learn_classifier learn_libsvm_classifier learn_libsvm_regressor learn_regressor least left length level levenshtein_distance like limit line_interpolate_point line_interpolate_points line_locate_point listagg ln local localtime localtimestamp log log10 log2 logical lower lpad ltrim luhn_check make_set_digest map_agg map_concat map_entries map_filter map_from_entries map_keys map_union map_values map_zip_with match match_recognize matched matches materialized max max_by md5 measures merge merge_set_digest millisecond min min_by minute mod month multimap_agg multimap_from_entries murmur3 nan natural next nfc nfd nfkc nfkd ngrams no none none_match normal_cdf normalize not now nth_value ntile null nullif nulls numeric_histogram object objectid_timestamp of offset omit on one only option or order ordinality outer output over overflow parse_data_size parse_datetime parse_duration partition partitions passing past path pattern per percent_rank permute pi position pow power preceding prepare privileges properties prune qdigest_agg quarter quotes radians rand random range rank read recursive reduce reduce_agg refresh regexp_count regexp_extract regexp_extract_all regexp_like regexp_position regexp_replace regexp_split regr_intercept regr_slope regress rename render repeat repeatable replace reset respect restrict returning reverse revoke rgb right role roles rollback rollup round row_number rows rpad rtrim running scalar schema schemas second security seek select sequence serializable session set sets sha1 sha256 sha512 show shuffle sign simplify_geometry sin skewness skip slice some soundex spatial_partitioning spatial_partitions split split_part split_to_map split_to_multimap spooky_hash_v2_32 spooky_hash_v2_64 sqrt st_area st_asbinary st_astext st_boundary st_buffer st_centroid st_contains st_convexhull st_coorddim st_crosses st_difference st_dimension st_disjoint st_distance st_endpoint st_envelope st_envelopeaspts st_equals st_exteriorring st_geometries st_geometryfromtext st_geometryn st_geometrytype st_geomfrombinary st_interiorringn st_interiorrings st_intersection st_intersects st_isclosed st_isempty st_isring st_issimple st_isvalid st_length st_linefromtext st_linestring st_multipoint st_numgeometries st_numinteriorring st_numpoints st_overlaps st_point st_pointn st_points st_polygon st_relate st_startpoint st_symdifference st_touches st_union st_within st_x st_xmax st_xmin st_y st_ymax st_ymin start starts_with stats stddev stddev_pop stddev_samp string strpos subset substr substring sum system table tables tablesample tan tanh tdigest_agg text then ties timestamp_objectid timezone_hour timezone_minute to to_base to_base32 to_base64 to_base64url to_big_endian_32 to_big_endian_64 to_char to_date to_encoded_polyline to_geojson_geometry to_geometry to_hex to_ieee754_32 to_ieee754_64 to_iso8601 to_milliseconds to_spherical_geography to_timestamp to_unixtime to_utf8 trailing transaction transform transform_keys transform_values translate trim trim_array true truncate try try_cast type typeof uescape unbounded uncommitted unconditional union unique unknown unmatched unnest update upper url_decode url_encode url_extract_fragment url_extract_host url_extract_parameter url_extract_path url_extract_port url_extract_protocol url_extract_query use user using utf16 utf32 utf8 validate value value_at_quantile values values_at_quantiles var_pop var_samp variance verbose version view week week_of_year when where width_bucket wilson_interval_lower wilson_interval_upper window with with_timezone within without word_stem work wrapper write xxhash64 year year_of_week yow zip zip_with"),builtin:a("array bigint bingtile boolean char codepoints color date decimal double function geometry hyperloglog int integer interval ipaddress joniregexp json json2016 jsonpath kdbtree likepattern map model objectid p4hyperloglog precision qdigest re2jregexp real regressor row setdigest smallint sphericalgeography tdigest time timestamp tinyint uuid varbinary varchar zone"),atoms:a("false true null unknown"),operatorChars:/^[[\]|<>=!\-+*/%]/,dateSQL:a("date time timestamp zone"),support:a("ODBCdotTable decimallessFloat zerolessFloat hexNumber")})}(n(15237))},30366:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(54814),o=n(20032),s=n(32530),l=r.__importStar(n(68171)),u=n(90386),c=n(4976),f=n(46681),d=n(79989),h=n(7302),p=n(96159),m=function(e){function t(t,n){var r=e.call(this,t)||this;return r._parse=n,r}return r.__extends(t,e),t.prototype.clone=function(){return new t(null,d.duplicate(this._parse))},t.makeExplicit=function(e,t,n){var r={},i=t.data;return i&&i.format&&i.format.parse&&(r=i.format.parse),this.makeWithAncestors(e,r,{},n)},t.makeImplicitFromFilterTransform=function(e,t,n){var r={};return u.forEachLeaf(t.filter,(function(e){if(c.isFieldPredicate(e)){var t=null;c.isFieldEqualPredicate(e)?t=e.equal:c.isFieldRangePredicate(e)?t=e.range[0]:c.isFieldOneOfPredicate(e)&&(t=(e.oneOf||e.in)[0]),t&&(o.isDateTime(t)?r[e.field]="date":i.isNumber(t)?r[e.field]="number":i.isString(t)&&(r[e.field]="string")),e.timeUnit&&(r[e.field]="date")}})),0===d.keys(r).length?null:this.makeWithAncestors(e,{},r,n)},t.makeImplicitFromEncoding=function(e,t,n){var r={};return(h.isUnitModel(t)||h.isFacetModel(t))&&t.forEachFieldDef((function(e){s.isTimeFieldDef(e)?r[e.field]="date":s.isNumberFieldDef(e)?a.isCountingAggregateOp(e.aggregate)||(r[e.field]="number"):d.accessPathDepth(e.field)>1?e.field in r||(r[e.field]="flatten"):s.isScaleFieldDef(e)&&f.isSortField(e.sort)&&d.accessPathDepth(e.sort.field)>1&&(e.sort.field in r||(r[e.sort.field]="flatten"))})),this.makeWithAncestors(e,{},r,n)},t.makeWithAncestors=function(e,n,r,i){for(var a=0,o=d.keys(r);a1})).map((function(e){var n=function(e,t){var n=d.accessPathWithDatum(e);return"number"===t?"toNumber("+n+")":"boolean"===t?"toBoolean("+n+")":"string"===t?"toString("+n+")":"date"===t?"toDate("+n+")":"flatten"===t?n:0===t.indexOf("date:")?"timeParse("+n+","+t.slice(5,t.length)+")":0===t.indexOf("utc:")?"utcParse("+n+","+t.slice(4,t.length)+")":(l.warn(l.message.unrecognizedParse(t)),null)}(e,t._parse[e]);return n?{type:"formula",expr:n,as:d.removePathFromField(e)}:null})).filter((function(e){return null!==e}))},t}(n(74686).DataFlowNode);t.ParseNode=m},31179:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(3209),a=n(26372),o=n(95290),s=i.__importStar(n(68171)),l=n(99273),u=n(79989);!function(e){e.LINEAR="linear",e.BIN_LINEAR="bin-linear",e.LOG="log",e.POW="pow",e.SQRT="sqrt",e.TIME="time",e.UTC="utc",e.SEQUENTIAL="sequential",e.QUANTILE="quantile",e.QUANTIZE="quantize",e.THRESHOLD="threshold",e.ORDINAL="ordinal",e.BIN_ORDINAL="bin-ordinal",e.POINT="point",e.BAND="band"}(r=t.ScaleType||(t.ScaleType={}));var c={linear:"numeric",log:"numeric",pow:"numeric",sqrt:"numeric","bin-linear":"bin-linear",time:"time",utc:"time",sequential:"sequential",ordinal:"ordinal","bin-ordinal":"bin-ordinal",point:"ordinal-position",band:"ordinal-position"};t.SCALE_TYPES=u.keys(c),t.scaleCompatible=function(e,t){var n=c[e],r=c[t];return n===r||"ordinal-position"===n&&"time"===r||"ordinal-position"===r&&"time"===n};var f={linear:0,log:1,pow:1,sqrt:1,time:0,utc:0,point:10,band:11,"bin-linear":0,sequential:0,ordinal:0,"bin-ordinal":0};t.scaleTypePrecedence=function(e){return f[e]},t.CONTINUOUS_TO_CONTINUOUS_SCALES=["linear","bin-linear","log","pow","sqrt","time","utc"];var d=a.toSet(t.CONTINUOUS_TO_CONTINUOUS_SCALES);t.CONTINUOUS_DOMAIN_SCALES=t.CONTINUOUS_TO_CONTINUOUS_SCALES.concat(["sequential"]);var h=a.toSet(t.CONTINUOUS_DOMAIN_SCALES);t.DISCRETE_DOMAIN_SCALES=["ordinal","bin-ordinal","point","band"];var p=a.toSet(t.DISCRETE_DOMAIN_SCALES),m=a.toSet(["bin-linear","bin-ordinal"]);function g(e){return e in p}function v(e){return e in h}function y(e){return e in d}t.TIME_SCALE_TYPES=["time","utc"],t.hasDiscreteDomain=g,t.isBinScale=function(e){return e in m},t.hasContinuousDomain=v,t.isContinuousToContinuous=y,t.defaultScaleConfig={textXRangeStep:90,rangeStep:21,pointPadding:.5,bandPaddingInner:.1,facetSpacing:16,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:9,minStrokeWidth:1,maxStrokeWidth:4},t.isExtendedScheme=function(e){return e&&!!e.name},t.isSelectionDomain=function(e){return e&&e.selection};var b={type:1,domain:1,range:1,rangeStep:1,scheme:1,reverse:1,round:1,clamp:1,nice:1,base:1,exponent:1,interpolate:1,zero:1,padding:1,paddingInner:1,paddingOuter:1};t.SCALE_PROPERTIES=u.flagKeys(b);var _=i.__rest(b,["type","domain","range","rangeStep","scheme"]);function x(e,t,n){return u.contains([l.Type.ORDINAL,l.Type.NOMINAL],t)?void 0===e||g(e):t===l.Type.TEMPORAL?u.contains([r.TIME,r.UTC,r.SEQUENTIAL,void 0],e):t!==l.Type.QUANTITATIVE||(n?u.contains([r.BIN_LINEAR,r.BIN_ORDINAL,r.LINEAR],e):u.contains([r.LOG,r.POW,r.SQRT,r.QUANTILE,r.QUANTIZE,r.LINEAR,r.SEQUENTIAL,void 0],e))}function w(e,t){switch(e){case o.Channel.X:case o.Channel.Y:case o.Channel.SIZE:case o.Channel.OPACITY:return y(t)||u.contains(["band","point"],t);case o.Channel.COLOR:case o.Channel.FILL:case o.Channel.STROKE:return"band"!==t;case o.Channel.SHAPE:return"ordinal"===t}return!1}function k(e,t,n){var r=e+"_"+t;return n?r+"_bin":r}t.NON_TYPE_DOMAIN_RANGE_VEGA_SCALE_PROPERTIES=u.flagKeys(_),t.SCALE_TYPE_INDEX=function(){for(var e={},n=0,r=o.CHANNELS;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(65032),a=n(95290),o=n(32530),s=n(79989),l=n(15058),u=n(91387),c=n(96159),f=n(33434),d=n(22115),h=r.__importStar(n(57807)),p=r.__importStar(n(43852));t.parseUnitAxis=function(e){return a.POSITION_SCALE_CHANNELS.reduce((function(t,n){return e.component.scales[n]&&e.axis(n)&&(t[n]=[b(n,e)]),t}),{})};var m={bottom:"top",top:"bottom",left:"right",right:"left"};function g(e,t){if(!e)return t.map((function(e){return e.clone()}));if(e.length===t.length){for(var n=e.length,r=0;r0&&(n[i]={update:u}),n}),{});return s.keys(u).length>0&&r.set("encode",u,!!n.encoding||void 0!==n.labelAngle),r}t.parseLayerAxis=function(e){for(var t=e.component,n=t.axes,r=t.resolve,i={top:0,bottom:0,right:0,left:0},o=0,l=e.children;o0&&!C){var E=m[S];i[S]>i[E]&&w.set("orient",E,!1)}i[S]++}}delete b.component.axes[d]}}}}},32530:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(54814),o=n(19664),s=n(95290),l=n(20032),u=r.__importStar(n(68171)),c=n(96598),f=n(99273),d=n(79989);function h(e){return!!e&&!!e.condition&&!i.isArray(e.condition)&&p(e.condition)}function p(e){return!(!e||!e.field&&"count"!==e.aggregate)}function m(e){return e&&"value"in e&&void 0!==e.value}function g(e){switch(e.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return!!e.bin;case"latitude":case"longitude":case"temporal":return!1}throw new Error(u.message.invalidFieldType(e.type))}function v(e){return!g(e)}function y(e){return"count"===e.aggregate}function b(e,t){var n=e.field,r=e.bin,i=e.timeUnit,a=e.aggregate;return"count"===a?t.countTitle:r?n+" (binned)":i?n+" ("+c.getTimeUnitParts(i).join("-")+")":a?d.titlecase(a)+" of "+n:n}function _(e,t){var n=e.aggregate||e.timeUnit||e.bin&&"bin";return n?n.toUpperCase()+"("+e.field+")":e.field}t.isConditionalSelection=function(e){return e.selection},t.isRepeatRef=function(e){return e&&!i.isString(e)&&"repeat"in e},t.toFieldDefBase=function(e){var t=e.field,n=e.timeUnit,i=e.bin,a=e.aggregate;return r.__assign({},n?{timeUnit:n}:{},i?{bin:i}:{},a?{aggregate:a}:{},{field:t})},t.isConditionalDef=function(e){return!!e&&!!e.condition},t.hasConditionalFieldDef=h,t.hasConditionalValueDef=function(e){return!!e&&!!e.condition&&(i.isArray(e.condition)||m(e.condition))},t.isFieldDef=p,t.isStringFieldDef=function(e){return p(e)&&i.isString(e.field)},t.isValueDef=m,t.isScaleFieldDef=function(e){return!(!e||!e.scale&&!e.sort)},t.vgField=function(e,t){void 0===t&&(t={});var n=e.field,r=t.prefix,i=t.suffix;if(y(e))n="count_*";else{var a=void 0;t.nofn||(function(e){return!!e.op}(e)?a=e.op:e.bin?(a=o.binToString(e.bin),i=t.binSuffix||""):e.aggregate?a=String(e.aggregate):e.timeUnit&&(a=String(e.timeUnit))),a&&(n=n?a+"_"+n:a)}return i&&(n=n+"_"+i),r&&(n=r+"_"+n),t.expr?d.flatAccessWithDatum(n,t.expr):d.replacePathInField(n)},t.isDiscrete=g,t.isContinuous=v,t.isCount=y,t.verbalTitleFormatter=b,t.functionalTitleFormatter=_,t.defaultTitleFormatter=function(e,t){switch(t.fieldTitle){case"plain":return e.field;case"functional":return _(e);default:return b(e,t)}};var x=t.defaultTitleFormatter;function w(e){x=e}function k(e,t){if(e.timeUnit)return"temporal";if(e.bin)return"quantitative";switch(s.rangeType(t)){case"continuous":default:return"quantitative";case"discrete":case"flexible":return"nominal"}}function S(e,t){if(e.aggregate&&!a.isAggregateOp(e.aggregate)){e.aggregate;var n=r.__rest(e,["aggregate"]);u.warn(u.message.invalidAggregate(e.aggregate)),e=n}if(e.timeUnit&&(e=r.__assign({},e,{timeUnit:c.normalizeTimeUnit(e.timeUnit)})),e.bin&&(e=r.__assign({},e,{bin:C(e.bin,t)})),e.type){var i=f.getFullName(e.type);e.type!==i&&(e=r.__assign({},e,{type:i})),"quantitative"!==e.type&&a.isCountingAggregateOp(e.aggregate)&&(u.warn(u.message.invalidFieldTypeForCountAggregate(e.type,e.aggregate)),e=r.__assign({},e,{type:"quantitative"}))}else{var o=k(e,t);u.warn(u.message.emptyOrInvalidFieldType(e.type,t,o)),e=r.__assign({},e,{type:o})}var s=A(e,t),l=s.compatible,d=s.warning;return l||u.warn(d),e}function C(e,t){return i.isBoolean(e)?{maxbins:o.autoMaxBins(t)}:e.maxbins||e.step?e:r.__assign({},e,{maxbins:o.autoMaxBins(t)})}t.setTitleFormatter=w,t.resetTitleFormatter=function(){w(t.defaultTitleFormatter)},t.title=function(e,t){return x(e,t)},t.defaultType=k,t.getFieldDef=function(e){return p(e)?e:h(e)?e.condition:void 0},t.normalize=function(e,t){if(i.isString(e)||i.isNumber(e)||i.isBoolean(e)){var n=i.isString(e)?"string":i.isNumber(e)?"number":"boolean";return u.warn(u.message.primitiveChannelDef(t,n,e)),{value:e}}return p(e)?S(e,t):h(e)?r.__assign({},e,{condition:S(e.condition,t)}):e},t.normalizeFieldDef=S,t.normalizeBin=C;var E={compatible:!0};function A(e,t){var n=e.type;switch(t){case"row":case"column":return v(e)?{compatible:!1,warning:u.message.facetChannelShouldBeDiscrete(t)}:E;case"x":case"y":case"color":case"fill":case"stroke":case"text":case"detail":case"key":case"tooltip":case"href":return E;case"longitude":case"longitude2":case"latitude":case"latitude2":return n!==f.QUANTITATIVE?{compatible:!1,warning:"Channel "+t+" should be used with a quantitative field only, not "+e.type+" field."}:E;case"opacity":case"size":case"x2":case"y2":return"nominal"===n&&!e.sort||"geojson"===n?{compatible:!1,warning:"Channel "+t+" should not be used with an unsorted discrete field."}:E;case"shape":return"nominal"!==e.type&&"geojson"!==e.type?{compatible:!1,warning:"Shape channel should be used with only either nominal or geojson data"}:E;case"order":return"nominal"!==e.type||"sort"in e?E:{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}}throw new Error("channelCompatability not implemented for channel "+t)}function M(e,t){var n,r=t.timeUnit,a=t.type,o=t.time,s=t.undefinedIfExprNotRequired,u=void 0;return l.isDateTime(e)?u=l.dateTimeExpr(e,!0):(i.isString(e)||i.isNumber(e))&&(r||"temporal"===a)&&(u=c.isLocalSingleTimeUnit(r)?l.dateTimeExpr(((n={})[r]=e,n),!0):c.isUtcSingleTimeUnit(r)?M(e,{timeUnit:c.getLocalTimeUnit(r)}):"datetime("+JSON.stringify(e)+")"),u?o?"time("+u+")":u:s?void 0:JSON.stringify(e)}t.channelCompatibility=A,t.isNumberFieldDef=function(e){return"quantitative"===e.type||!!e.bin},t.isTimeFieldDef=function(e){return"temporal"===e.type||!!e.timeUnit},t.valueExpr=M,t.valueArray=function(e,t){var n=e.timeUnit,r=e.type;return t.map((function(e){var t=M(e,{timeUnit:n,type:r,undefinedIfExprNotRequired:!0});return void 0!==t?{signal:t}:e}))}},32632:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(11964),i="_toggle",a={has:function(e){return"multi"===e.type&&e.toggle},signals:function(e,t,n){return n.concat({name:t.name+i,value:!1,on:[{events:t.events,update:t.toggle}]})},modifyExpr:function(e,t,n){var a=t.name+r.TUPLE,o=t.name+i;return o+" ? null : "+a+", "+("global"===t.resolve?o+" ? null : true, ":o+" ? null : {unit: "+r.unitName(e)+"}, ")+o+" ? "+a+" : null"}};t.default=a},33375:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(95290),o=n(32530),s=n(75028),l=n(31179),u=n(79989),c=n(15058),f=r.__importStar(n(74439));function d(e){return p(e,(function(e,t){return Math.max(e,t.value)}))}function h(e){return p(e,(function(e,t){return void 0!==e?e:t.value}))}function p(e,t){return o.hasConditionalValueDef(e)?(i.isArray(e.condition)?e.condition:[e.condition]).reduce(t,e.value):o.isValueDef(e)?e.value:void 0}t.symbols=function(e,t,n,o,l){if("gradient"!==l){var p=r.__assign({},c.applyMarkConfig({},n,s.FILL_STROKE_CONFIG),f.color(n));switch(n.mark){case s.BAR:case s.TICK:case s.TEXT:p.shape={value:"square"};break;case s.CIRCLE:case s.SQUARE:p.shape={value:n.mark};case s.POINT:case s.LINE:case s.GEOSHAPE:case s.AREA:}var m=n.markDef,g=n.encoding,v=m.filled;if(p.fill)if("fill"===o||v&&o===a.COLOR)delete p.fill;else if(p.fill.field)delete p.fill;else if(i.isArray(p.fill)){var y=h(g.fill||g.color)||m.fill||v&&m.color;y&&(p.fill={value:y})}if(p.stroke)if("stroke"===o||!v&&o===a.COLOR)delete p.stroke;else if(p.stroke.field)delete p.stroke;else if(i.isArray(p.stroke)){var b=h(g.stroke||g.color)||m.stroke||!v&&m.color;b&&(p.stroke={value:b})}if(p.fill&&"transparent"!==p.fill.value&&!p.stroke&&(p.stroke={value:"transparent"}),o!==a.SHAPE){var _=h(g.shape)||m.shape;_&&(p.shape={value:_})}if(o!==a.OPACITY){var x=d(g.opacity)||m.opacity;x&&(p.opacity={value:x})}return p=r.__assign({},p,t),u.keys(p).length>0?p:void 0}},t.gradient=function(e,t,n,i,a){var o={};if("gradient"===a){var s=d(n.encoding.opacity)||n.markDef.opacity;s&&(o.opacity={value:s})}return o=r.__assign({},o,t),u.keys(o).length>0?o:void 0},t.labels=function(e,t,n,i,a){var s=n.legend(i),f=n.config,d={};if(o.isTimeFieldDef(e)){var h=n.getScaleComponent(i).get("type")===l.ScaleType.UTC,p=c.timeFormatExpression("datum.value",e.timeUnit,s.format,f.legend.shortTimeLabels,f.timeFormat,h);t=r.__assign({},p?{text:{signal:p}}:{},t)}return d=r.__assign({},d,t),u.keys(d).length>0?d:void 0}},33434:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(79989),a=function(e){function t(t,n,r){void 0===t&&(t={}),void 0===n&&(n={}),void 0===r&&(r=!1);var i=e.call(this)||this;return i.explicit=t,i.implicit=n,i.mainExtracted=r,i}return r.__extends(t,e),t.prototype.clone=function(){return new t(i.duplicate(this.explicit),i.duplicate(this.implicit),this.mainExtracted)},t.prototype.hasAxisPart=function(e){return!("axis"!==e&&("grid"===e||"title"===e?!this.get(e):!1===(t=this.get(e))||null===t));var t},t}(n(96159).Split);t.AxisComponent=a},33828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(95290),o=n(98348),s=n(32530),l=r.__importStar(n(68171)),u=n(31179),c=n(46681),f=n(79989),d=n(5711),h=n(5593),p=n(36598),m=n(81458),g=n(77524),v=n(80219),y=n(98469),b=n(27588),_=n(7302),x=n(3715),w=n(91387),k=n(63760);function S(e,t,n){return s.vgField(t,{expr:n,suffix:"by_"+s.vgField(e)})}t.facetSortFieldName=S;var C=function(e){function t(t,n,r,i,a){var o=e.call(this,t,n,r,a,i,t.resolve)||this;o.type="facet",o.child=p.buildModel(t.spec,o,o.getName("child"),void 0,i,a,!1),o.children=[o.child];var s=x.replaceRepeaterInFacet(t.facet,i);return o.facet=o.initFacet(s),o}return r.__extends(t,e),t.prototype.initFacet=function(e){return o.reduce(e,(function(e,t,n){return f.contains([a.ROW,a.COLUMN],n)?void 0===t.field?(l.warn(l.message.emptyFieldDef(t,n)),e):(e[n]=s.normalize(t,n),e):(l.warn(l.message.incompatibleChannel(n,"facet")),e)}),{})},t.prototype.channelHasField=function(e){return!!this.facet[e]},t.prototype.fieldDef=function(e){return this.facet[e]},t.prototype.parseData=function(){this.component.data=v.parseData(this),this.child.parseData()},t.prototype.parseLayoutSize=function(){b.parseChildrenLayoutSize(this)},t.prototype.parseSelection=function(){this.child.parseSelection(),this.component.selection=this.child.component.selection},t.prototype.parseMarkGroup=function(){this.child.parseMarkGroup()},t.prototype.parseAxisAndHeader=function(){this.child.parseAxisAndHeader(),this.parseHeader("column"),this.parseHeader("row"),this.mergeChildAxis("x"),this.mergeChildAxis("y")},t.prototype.parseHeader=function(e){if(this.channelHasField(e)){var t=this.facet[e],n=t.header||{},r=void 0!==t.title?t.title:void 0!==n.title?n.title:s.title(t,this.config);this.child.component.layoutHeaders[e].title&&(r+=" / "+this.child.component.layoutHeaders[e].title,this.child.component.layoutHeaders[e].title=null),this.component.layoutHeaders[e]={title:r,facetFieldDef:t,header:[this.makeHeaderComponent(e,!0)]}}},t.prototype.makeHeaderComponent=function(e,t){var n="row"===e?"height":"width";return{labels:t,sizeSignal:this.child.component.layoutSize.get(n)?this.child.getSizeSignalRef(n):void 0,axes:[]}},t.prototype.mergeChildAxis=function(e){var t=this.child;if(t.component.axes[e]){var n=this.component,r=n.layoutHeaders,i=n.resolve;if(i.axis[e]=w.parseGuideResolve(i,e),"shared"===i.axis[e])for(var a="x"===e?"column":"row",o=r[a],s=0,l=t.component.axes[e];s0?{data:n}:{},i?{encode:{update:i}}:{},e.assembleGroup())]},t.prototype.getMapping=function(){return this.facet},t}(_.ModelWithField);t.FacetModel=C},36598:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209).__importStar(n(68171)),i=n(76426),a=n(73799),o=n(33828),s=n(51878),l=n(85004),u=n(92649);t.buildModel=function(e,t,n,c,f,d,h){if(i.isFacetSpec(e))return new o.FacetModel(e,t,n,f,d);if(i.isLayerSpec(e))return new s.LayerModel(e,t,n,c,f,d,h);if(i.isUnitSpec(e))return new u.UnitModel(e,t,n,c,f,d,h);if(i.isRepeatSpec(e))return new l.RepeatModel(e,t,n,f,d);if(i.isConcatSpec(e))return new a.ConcatModel(e,t,n,f,d);throw new Error(r.message.INVALID_SPEC)}},38406:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(79989),a=n(80219),o=n(6871),s=function(e){function t(t,n,r,i,a,o){return e.call(this,t,n,r,i,a,o)||this}return r.__extends(t,e),t.prototype.parseData=function(){this.component.data=a.parseData(this),this.children.forEach((function(e){e.parseData()}))},t.prototype.parseSelection=function(){var e=this;this.component.selection={};for(var t=function(t){t.parseSelection(),i.keys(t.component.selection).forEach((function(n){e.component.selection[n]=t.component.selection[n]}))},n=0,r=this.children;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(95290),o=n(32530),s=r.__importStar(n(68171)),l=n(31179),u=n(99273),c=n(79989),f=n(15058);function d(e,t,n,i){var a=r.__assign({},t?{scale:t}:{},{field:o.vgField(e,n)});return i?r.__assign({},a,i):a}function h(e,t,n,r,s,h){if(t){if(o.isFieldDef(t)){if(t.bin)return c.contains([a.X,a.Y],e)&&t.type===u.QUANTITATIVE?s&&s.impute?d(t,n,{binSuffix:"mid"}):function(e,t){return{signal:'(scale("'+t+'", '+o.vgField(e,{expr:"datum"})+') + scale("'+t+'", '+o.vgField(e,{binSuffix:"end",expr:"datum"})+"))/2"}}(t,n):d(t,n,f.binRequiresRange(t,e)?{binSuffix:"range"}:{});if(r){var p=r.get("type");if(l.hasDiscreteDomain(p))return"band"===p?d(t,n,{binSuffix:"range"},{band:.5}):d(t,n,{binSuffix:"range"})}return d(t,n,{})}if(o.isValueDef(t)){var m=t.value;return c.contains(["x","x2"],e)&&"width"===m?{field:{group:"width"}}:c.contains(["y","y2"],e)&&"height"===m?{field:{group:"height"}}:{value:m}}}return i.isFunction(h)?h():h}t.position=function(e,t,n,r,i,a){return o.isFieldDef(t)&&i&&e===i.fieldChannel?d(t,n,{suffix:"end"}):h(e,t,n,r,i,a)},t.position2=function(e,t,n,r,i,a,s){return o.isFieldDef(t)&&a&&e.charAt(0)===a.fieldChannel.charAt(0)?d(t,r,{suffix:"start"}):h(e,n,r,i,a,s)},t.getOffset=function(e,t){var n=t[e+"Offset"];if(n)return n},t.bin=function(e,t,n,r){return d(e,t,{binSuffix:"start"===n?void 0:"end"},r?{offset:r}:{})},t.fieldRef=d,t.bandRef=function(e,t){return void 0===t&&(t=!0),{scale:e,band:t}},t.midPoint=h,t.text=function(e,t){if(e){if(o.isFieldDef(e))return f.formatSignalRef(e,e.format,"datum",t);if(o.isValueDef(e))return{value:e.value}}},t.mid=function(e){return r.__assign({},e,{mult:.5})},t.getDefaultRef=function(e,t,n,r,a){return function(){if(i.isString(e)){if(n){var o=r.get("type");if(c.contains([l.ScaleType.LOG,l.ScaleType.TIME,l.ScaleType.UTC],o))"bar"!==a&&"area"!==a||s.warn(s.message.nonZeroScaleUsedWithLengthMark(a,t,{scaleType:o}));else{if(function(e){if(!1!==e.get("zero"))return!0;var t=e.domains;return!!i.isArray(t)&&c.some(t,(function(e){return i.isArray(e)&&2===e.length&&e[0]<=0&&e[1]>=0}))}(r))return{scale:n,value:0};"bar"!==a&&"area"!==a||s.warn(s.message.nonZeroScaleUsedWithLengthMark(a,t,{zeroFalse:!1===r.explicit.zero}))}}return"zeroOrMin"===e?"x"===t?{value:0}:{field:{group:"height"}}:"x"===t?{field:{group:"width"}}:{value:0}}return e}}},39276:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(79989),o=n(5711),s=n(7302),l=n(11964),u=n(63760);function c(e){return a.keys(e.component.scales).reduce((function(t,n){var i=e.component.scales[n];if(i.merged)return t;var a=i.combine(),o=a.domainRaw,s=a.range,c=a.name,d=a.type,h=(a.domainRaw,a.range,r.__rest(a,["name","type","domainRaw","range"]));return s=f(s,c,e,n),o&&l.isRawSelectionDomain(o)&&(o=l.selectionScaleDomain(e,o)),t.push(r.__assign({name:c,type:d,domain:u.assembleDomain(e,n)},o?{domainRaw:o}:{},{range:s},h)),t}),[])}function f(e,t,n,r){if("x"===r||"y"===r){if(o.isVgRangeStep(e))return{step:{signal:t+"_step"}};if(i.isArray(e)&&2===e.length){var a=e[0],s=e[1];if(0===a&&o.isVgSignalRef(s))return[0,{signal:n.getSizeName(s.signal)}];if(o.isVgSignalRef(a)&&0===s)return[{signal:n.getSizeName(a.signal)},0]}}return e}t.assembleScales=function e(t){return s.isLayerModel(t)||s.isConcatModel(t)||s.isRepeatModel(t)?t.children.reduce((function(t,n){return t.concat(e(n))}),c(t)):c(t)},t.assembleScalesForModel=c,t.assembleScaleRange=f},39621:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=function(e){function t(t,n){var r=e.call(this,{},{name:t})||this;return r.merged=!1,r.domains=[],r.setWithExplicit("type",n),r}return r.__extends(t,e),t}(n(96159).Split);t.ScaleComponent=i},40387:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(79989),o=n(11964),s=r.__importDefault(n(95992));function l(e,t){var n=t.project,r=s.default.has(t)?"(item().isVoronoi ? datum.datum : datum)":"datum",l=[],u=n.map((function(e){return i.stringValue(e.channel)})).filter((function(e){return e})).join(", "),c=n.map((function(e){return i.stringValue(e.field)})).join(", "),f=n.map((function(t){var n=t.channel,i=e.fieldDef(n);return i&&i.bin?(l.push(t.field),"["+a.accessPathWithDatum(e.vgField(n,{}),r)+", "+a.accessPathWithDatum(e.vgField(n,{binSuffix:"end"}),r)+"]"):""+a.accessPathWithDatum(t.field,r)})).join(", ");return[{name:t.name+o.TUPLE,value:{},on:[{events:t.events,update:"datum && item().mark.marktype !== 'group' ? {unit: "+o.unitName(e)+", encodings: ["+u+"], fields: ["+c+"], values: ["+f+"]"+(l.length?", "+l.map((function(e){return i.stringValue("bin_"+e)+": 1"})).join(", "):"")+"} : null",force:!0}]}]}t.signals=l;var u={predicate:"vlMulti",scaleDomain:"vlMultiDomain",signals:l,modifyExpr:function(e,t){return t.name+o.TUPLE+", "+("global"===t.resolve?"null":"{unit: "+o.unitName(e)+"}")}};t.default=u},40576:(e,t,n)=>{!function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,i){var a,o,s=r.indentUnit,l={},u=i.htmlMode?t:n;for(var c in u)l[c]=u[c];for(var c in i)l[c]=i[c];function f(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(h("atom","]]>")):null:e.match("--")?n(h("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(p(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=h("meta","?>"),"meta"):(a=e.eat("/")?"closeTag":"openTag",t.tokenize=d,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function d(e,t){var n,r,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=f,a=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return a="equals",null;if("<"==i){t.tokenize=f,t.state=b,t.tagName=t.tagStart=null;var o=t.tokenize(e,t);return o?o+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(n=i,r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=d;break}return"string"},r.isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=f;break}n.next()}return e}}function p(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=p(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=f;break}return n.tokenize=p(e-1),n.tokenize(t,n)}}return"meta"}}function m(e){return e&&e.toLowerCase()}function g(e,t,n){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function v(e){e.context&&(e.context=e.context.prev)}function y(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(m(n))||!l.contextGrabbers[m(n)].hasOwnProperty(m(t)))return;v(e)}}function b(e,t,n){return"openTag"==e?(n.tagStart=t.column(),_):"closeTag"==e?x:b}function _(e,t,n){return"word"==e?(n.tagName=t.current(),o="tag",S):l.allowMissingTagName&&"endTag"==e?(o="tag bracket",S(e,0,n)):(o="error",_)}function x(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(m(n.context.tagName))&&v(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(o="tag",w):(o="tag error",k)}return l.allowMissingTagName&&"endTag"==e?(o="tag bracket",w(e,0,n)):(o="error",k)}function w(e,t,n){return"endTag"!=e?(o="error",w):(v(n),b)}function k(e,t,n){return o="error",w(e,0,n)}function S(e,t,n){if("word"==e)return o="attribute",C;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(m(r))?y(n,r):(y(n,r),n.context=new g(n,r,i==n.indented)),b}return o="error",S}function C(e,t,n){return"equals"==e?E:(l.allowMissing||(o="error"),S(e,0,n))}function E(e,t,n){return"string"==e?A:"word"==e&&l.allowUnquoted?(o="string",S):(o="error",S(e,0,n))}function A(e,t,n){return"string"==e?A:S(e,0,n)}return f.isInText=!0,{startState:function(e){var t={tokenize:f,state:b,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;a=null;var n=t.tokenize(e,t);return(n||a)&&"comment"!=n&&(o=null,t.state=t.state(a||n,e,t),o&&(n="error"==o?n+" error":o)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=d&&t.tokenize!=f)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==E&&(e.state=S)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(15237))},41028:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HEADER_TITLE_PROPERTIES_MAP={titleAnchor:"anchor",titleAngle:"angle",titleBaseline:"baseline",titleColor:"color",titleFont:"font",titleFontSize:"fontSize",titleFontWeight:"fontWeight",titleLimit:"limit"},t.HEADER_LABEL_PROPERTIES_MAP={labelAngle:"angle",labelColor:"color",labelFont:"font",labelFontSize:"fontSize",labelLimit:"limit"},t.HEADER_TITLE_PROPERTIES=Object.keys(t.HEADER_TITLE_PROPERTIES_MAP),t.HEADER_LABEL_PROPERTIES=Object.keys(t.HEADER_LABEL_PROPERTIES_MAP)},42155:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(95290),o=r.__importStar(n(68171)),s=n(31179),l=n(11964),u={has:function(e){return"interval"===e.type&&"global"===e.resolve&&e.bind&&"scales"===e.bind},parse:function(e,t,n){var r=n.scales=[];n.project.forEach((function(t){var i=t.channel,u=e.getScaleComponent(i),c=u?u.get("type"):void 0;u&&s.hasContinuousDomain(c)&&!s.isBinScale(c)?(u.set("domainRaw",{signal:l.channelSignalName(n,i,"data")},!0),r.push(i),e.repeater&&e.repeater.row===e.repeater.column&&e.getScaleComponent(i===a.X?a.Y:a.X).set("domainRaw",{signal:l.channelSignalName(n,i,"data")},!0)):o.warn(o.message.SCALE_BINDINGS_CONTINUOUS)}))},topLevelSignals:function(e,t,n){if(!e.parent)return n;var r=t.scales.filter((function(e){return!n.filter((function(n){return n.name===l.channelSignalName(t,e,"data")})).length}));return n.concat(r.map((function(e){return{name:l.channelSignalName(t,e,"data")}})))},signals:function(e,t,n){return e.parent&&t.scales.forEach((function(e){var r=n.filter((function(n){return n.name===l.channelSignalName(t,e,"data")}))[0];r.push="outer",delete r.value,delete r.update})),n}};t.default=u,t.domain=function(e,t){return"domain("+i.stringValue(e.scaleName(t))+")"}},43852:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(19664),o=n(95290),s=n(32530),l=r.__importStar(n(68171)),u=n(31179),c=n(99273),f=n(79989);t.grid=function(e,t){return!u.hasDiscreteDomain(e)&&!t.bin},t.gridScale=function(e,t){var n="x"===t?"y":"x";if(e.getScaleComponent(n))return e.scaleName(n)},t.labelFlush=function(e,t,n){return void 0!==n.labelFlush?n.labelFlush:!("x"!==t||!f.contains(["quantitative","temporal"],e.type))||void 0},t.labelOverlap=function(e,t,n,r){return void 0!==t.labelOverlap?t.labelOverlap:"nominal"!==e.type?"log"!==r||"greedy":void 0},t.orient=function(e){switch(e){case o.X:return"bottom";case o.Y:return"left"}throw new Error(l.message.INVALID_CHANNEL_FOR_AXIS)},t.tickCount=function(e,t,n,r){if(!u.hasDiscreteDomain(n)&&"log"!==n&&!f.contains(["month","hours","day","quarter"],t.timeUnit))return t.bin?{signal:"ceil("+r.signal+"/20)"}:{signal:"ceil("+r.signal+"/40)"}},t.title=function(e,t,n){var r=s.title(t,n);return e?i.truncate(r,e):r},t.values=function(e,t,n,r){var i=e.values;if(i)return s.valueArray(n,i);if(n.bin&&n.type===c.QUANTITATIVE){var o=t.scaleDomain(r);if(o&&"unaggregated"!==o&&!u.isSelectionDomain(o))return;var l=t.getName(a.binToString(n.bin)+"_"+n.field+"_bins");return{signal:"sequence("+l+".start, "+l+".stop + "+l+".step, "+l+".step)"}}}},45948:(e,t,n)=>{"use strict";n.r(t),n.d(t,{selector:()=>g});const r="view",i="[",a="]",o="{",s="}",l=":",u=",",c="@",f=">",d=/[[\]{}]/,h={"*":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};let p,m;function g(e,t,n){return p=t||r,m=n||h,y(e.trim()).map(b)}function v(e,t,n,r,i){const a=e.length;let o,s=0;for(;t=0?--s:r&&r.indexOf(o)>=0&&++s}return t}function y(e){const t=[],n=e.length;let r=0,l=0;for(;l' after between selector: "+e;n=n.map(b);const o=b(e.slice(1).trim());return o.between?{between:n,stream:o}:(o.between=n,o)}(e):function(e){const t={source:p},n=[];let r,f,h=[0,0],g=0,y=0,b=e.length,_=0;if(e[b-1]===s){if(_=e.lastIndexOf(o),!(_>=0))throw"Unmatched right brace: "+e;try{h=function(e){const t=e.split(u);if(!e.length||t.length>2)throw e;return t.map((t=>{const n=+t;if(n!=n)throw e;return n}))}(e.substring(_+1,b-1))}catch(t){throw"Invalid throttle specification: "+e}b=(e=e.slice(0,_).trim()).length,_=0}if(!b)throw e;if(e[0]===c&&(g=++_),r=v(e,_,l),r1?(t.type=n[1],g?t.markname=n[0].slice(1):(x=n[0],m[x]?t.marktype=n[0]:t.source=n[0])):t.type=n[0],"!"===t.type.slice(-1)&&(t.consume=!0,t.type=t.type.slice(0,-1)),null!=f&&(t.filter=f),h[0]&&(t.throttle=h[0]),h[1]&&(t.debounce=h[1]),t}(e)}},46602:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(n(96159).Split);t.LegendComponent=i},46681:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(26372);t.isSortField=function(e){return!(!e||"count"!==e.op&&!e.field||!e.op)},t.isSortArray=function(e){return!!e&&r.isArray(e)}},47880:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(95290),o=n(32530),s=r.__importStar(n(68171)),l=n(31179),u=n(5711),c=r.__importStar(n(74439)),f=r.__importStar(n(38851));function d(e,t,n,r){if(void 0!==e.size)return{value:e.size};if(r.bar.discreteBandSize)return{value:r.bar.discreteBandSize};if(n){var a=n.get("type");if(a!==l.ScaleType.POINT)return a===l.ScaleType.BAND?f.bandRef(t):{value:r.bar.continuousBandSize};var o=n.get("range");if(u.isVgRangeStep(o)&&i.isNumber(o.step))return{value:o.step-1};s.warn(s.message.BAR_WITH_POINT_SCALE_AND_RANGESTEP_NULL)}else if(r.scale.rangeStep&&null!==r.scale.rangeStep)return{value:r.scale.rangeStep-1};return{value:20}}t.bar={vgMark:"rect",encodeEntry:function(e){return r.__assign({},c.baseEncodeEntry(e,{size:"ignore",orient:"ignore"}),function(e){var t=e.config,n=e.encoding,i=e.markDef,s=e.width,u=i.orient,h=n.size,p=n.x,m=n.x2,g=e.scaleName(a.X),v=e.getScaleComponent(a.X);if("horizontal"===u||m)return r.__assign({},c.pointPosition("x",e,"zeroOrMin"),c.pointPosition2(e,"zeroOrMin","x2"));if(o.isFieldDef(p)){var y=v.get("type");if(p.bin&&!h&&!l.hasDiscreteDomain(y))return c.binnedPosition(p,"x",e.scaleName("x"),void 0===i.binSpacing?t.bar.binSpacing:i.binSpacing,v.get("reverse"));if(y===l.ScaleType.BAND)return c.bandPosition(p,"x",e)}return c.centeredBandPosition("x",e,r.__assign({},f.mid(s)),d(i,g,v,t))}(e),function(e){var t=e.config,n=e.encoding,i=e.height,s=e.markDef,u=s.orient,h=n.size,p=n.y,m=n.y2,g=e.scaleName(a.Y),v=e.getScaleComponent(a.Y);if("vertical"===u||m)return r.__assign({},c.pointPosition("y",e,"zeroOrMin"),c.pointPosition2(e,"zeroOrMin","y2"));if(o.isFieldDef(p)){var y=v.get("type");if(p.bin&&!h&&!l.hasDiscreteDomain(y))return c.binnedPosition(p,"y",e.scaleName("y"),void 0===s.binSpacing?t.bar.binSpacing:s.binSpacing,v.get("reverse"));if(y===l.ScaleType.BAND)return c.bandPosition(p,"y",e)}return c.centeredBandPosition("y",e,f.mid(i),d(s,g,v,t))}(e))}}},48116:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(5711),a=r.__importStar(n(74439)),o=r.__importStar(n(38851));function s(e){var t=e.config,n=e.markDef,r=n.orient,a=e.getScaleComponent("horizontal"===r?"x":"y");if(void 0!==n.size)return n.size;if(void 0!==t.tick.bandSize)return t.tick.bandSize;var o=a?a.get("range"):void 0,s=o&&i.isVgRangeStep(o)?o.step:t.scale.rangeStep;if("number"!=typeof s)throw new Error("Function does not handle non-numeric rangeStep");return s/1.5}t.tick={vgMark:"rect",encodeEntry:function(e){var t,n=e.config,i=e.markDef,l=e.width,u=e.height,c=i.orient,f="horizontal"===c?"width":"height",d="horizontal"===c?"height":"width";return r.__assign({},a.baseEncodeEntry(e,{size:"ignore",orient:"ignore"}),a.pointPosition("x",e,o.mid(l),"xc"),a.pointPosition("y",e,o.mid(u),"yc"),a.nonPosition("size",e,{defaultValue:s(e),vgChannel:f}),((t={})[d]={value:i.thickness||n.tick.thickness},t))}}},48166:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(24007),a=r.__importStar(n(32530)),o=r.__importStar(n(68171)),s=n(76426),l=n(63286),u=n(79989),c=n(36598),f=n(81458),d=n(80449);t.compile=function(e,t){void 0===t&&(t={}),t.logger&&o.set(t.logger),t.fieldTitle&&a.setTitleFormatter(t.fieldTitle);try{var n=i.initConfig(u.mergeDeep({},t.config,e.config)),h=s.normalize(e,n),p=l.normalizeAutoSize(e.autosize,n.autosize,s.isLayerSpec(h)||s.isUnitSpec(h)),m=c.buildModel(h,null,"",void 0,void 0,n,"fit"===p.type);return m.parse(),d.optimizeDataflow(m.component.data),function(e,t){var n=e.config?i.stripAndRedirectConfig(e.config):void 0,a=[].concat(e.assembleSelectionData([]),f.assembleRootData(e.component.data,t.datasets||{}));delete t.datasets;var o=e.assembleProjections(),s=e.assembleTitle(),l=e.assembleGroupStyle(),u=e.assembleLayoutSignals();return u=u.filter((function(e){return"width"!==e.name&&"height"!==e.name||void 0===e.value||(t[e.name]=+e.value,!1)})),{spec:r.__assign({$schema:"https://vega.github.io/schema/vega/v4.json"},e.description?{description:e.description}:{},t,s?{title:s}:{},l?{style:l}:{},{data:a},o.length>0?{projections:o}:{},e.assembleGroup(u.concat(e.assembleSelectionTopLevelSignals([]))),n?{config:n}:{})}}(m,function(e,t,n){return r.__assign({autosize:1===u.keys(n).length&&n.type?n.type:n},l.extractTopLevelProperties(t),l.extractTopLevelProperties(e))}(e,n,p))}finally{t.logger&&o.reset(),t.fieldTitle&&a.resetTitleFormatter()}}},48712:(e,t,n)=>{!function(e){"use strict";function t(e,t,n,r,i,a){this.indented=e,this.column=t,this.type=n,this.info=r,this.align=i,this.prev=a}function n(e,n,r,i){var a=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=r&&(a=e.context.indented),e.context=new t(a,n,r,i,null,e.context)}function r(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function i(e,t,n){return"variable"==t.prevToken||"type"==t.prevToken||!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0}function a(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function o(e){for(var t={},n=e.split(" "),r=0;r!?|\/]/,D=l.isIdentifierChar||/[\w\$_\xa1-\uffff]/,T=l.isReservedIdentifier||!1;function N(e,t){var n,r=e.next();if(_[r]){var i=_[r](e,t);if(!1!==i)return i}if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){for(var r,i=!1,a=!1;null!=(r=e.next());){if(r==n&&!i){a=!0;break}i=!i&&"\\"==r}return(a||!i&&!x)&&(t.tokenize=null),"string"}),t.tokenize(e,t);if(E.test(r)){if(e.backUp(1),e.match(A))return"number";e.next()}if(C.test(r))return u=r,null;if("/"==r){if(e.eat("*"))return t.tokenize=O,O(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(M.test(r)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(M););return"operator"}if(e.eatWhile(D),S)for(;e.match(S);)e.eatWhile(D);var a=e.current();return s(p,a)?(s(v,a)&&(u="newstatement"),s(y,a)&&(c=!0),"keyword"):s(m,a)?"type":s(g,a)||T&&T(a)?(s(v,a)&&(u="newstatement"),"builtin"):s(b,a)?"atom":"variable"}function O(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function F(e,t){l.typeFirstDefinitions&&e.eol()&&a(t.context)&&(t.typeAtEndOfLine=i(e,t,e.pos))}return{startState:function(e){return{tokenize:null,context:new t((e||0)-f,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var o=t.context;if(e.sol()&&(null==o.align&&(o.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return F(e,t),null;u=c=null;var s=(t.tokenize||N)(e,t);if("comment"==s||"meta"==s)return s;if(null==o.align&&(o.align=!0),";"==u||":"==u||","==u&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)r(t);else if("{"==u)n(t,e.column(),"}");else if("["==u)n(t,e.column(),"]");else if("("==u)n(t,e.column(),")");else if("}"==u){for(;"statement"==o.type;)o=r(t);for("}"==o.type&&(o=r(t));"statement"==o.type;)o=r(t)}else u==o.type?r(t):w&&(("}"==o.type||"top"==o.type)&&";"!=u||"statement"==o.type&&"newstatement"==u)&&n(t,e.column(),"statement",e.current());if("variable"==s&&("def"==t.prevToken||l.typeFirstDefinitions&&i(e,t,e.start)&&a(t.context)&&e.match(/^\s*\(/,!1))&&(s="def"),_.token){var f=_.token(e,t,s);void 0!==f&&(s=f)}return"def"==s&&!1===l.styleDefs&&(s="variable"),t.startOfLine=!1,t.prevToken=c?"def":s||u,F(e,t),s},indent:function(t,n){if(t.tokenize!=N&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var r=t.context,i=n&&n.charAt(0),a=i==r.type;if("statement"==r.type&&"}"==i&&(r=r.prev),l.dontIndentStatements)for(;"statement"==r.type&&l.dontIndentStatements.test(r.info);)r=r.prev;if(_.indent){var o=_.indent(t,r,n,f);if("number"==typeof o)return o}var s=r.prev&&"switch"==r.prev.info;if(l.allmanIndentation&&/[{(]/.test(i)){for(;"top"!=r.type&&"}"!=r.type;)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==i?0:d):!r.align||h&&")"==r.type?")"!=r.type||a?r.indented+(a?0:f)+(a||!s||/^(?:case|default)\b/.test(n)?0:f):r.indented+d:r.column+(a?0:1)},electricInput:k?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}}));var l="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",u="alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq",c="bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available",f="FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT",d=o("int long char short double float unsigned signed void bool"),h=o("SEL instancetype id Class Protocol BOOL");function p(e){return s(d,e)||/.+_t$/.test(e)}function m(e){return p(e)||s(h,e)}var g="case do else for if switch while struct enum union",v="struct enum union";function y(e,t){if(!t.startOfLine)return!1;for(var n,r=null;n=e.peek();){if("\\"==n&&e.match(/^.$/)){r=y;break}if("/"==n&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=r,"meta"}function b(e,t){return"type"==t.prevToken&&"type"}function _(e){return!(!e||e.length<2||"_"!=e[0]||"_"!=e[1]&&e[1]===e[1].toLowerCase())}function x(e){return e.eatWhile(/[\w\.']/),"number"}function w(e,t){if(e.backUp(1),e.match(/^(?:R|u8R|uR|UR|LR)/)){var n=e.match(/^"([^\s\\()]{0,16})\(/);return!!n&&(t.cpp11RawStringDelim=n[1],t.tokenize=C,C(e,t))}return e.match(/^(?:u8|u|U|L)/)?!!e.match(/^["']/,!1)&&"string":(e.next(),!1)}function k(e){var t=/(\w+)::~?(\w+)$/.exec(e);return t&&t[1]==t[2]}function S(e,t){for(var n;null!=(n=e.next());)if('"'==n&&!e.eat('"')){t.tokenize=null;break}return"string"}function C(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return e.match(new RegExp(".*?\\)"+n+'"'))?t.tokenize=null:e.skipToEnd(),"string"}function E(t,n){"string"==typeof t&&(t=[t]);var r=[];function i(e){if(e)for(var t in e)e.hasOwnProperty(t)&&r.push(t)}i(n.keywords),i(n.types),i(n.builtin),i(n.atoms),r.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],r));for(var a=0;a!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=A,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,n){var r=n.context;return!("}"!=r.type||!r.align||!e.eat(">"))&&(n.context=new t(r.indented,r.column,r.type,r.info,null,r.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=M(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}}),E("text/x-kotlin",{name:"clike",keywords:o("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam value"),types:o("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:o("catch class do else finally for if where try while enum"),defKeywords:o("class val var object interface fun"),atoms:o("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},"*":function(e,t){return"."==t.prevToken?"variable":"operator"},'"':function(e,t){return t.tokenize=(n=e.match('""'),function(e,t){for(var r,i=!1,a=!1;!e.eol();){if(!n&&!i&&e.match('"')){a=!0;break}if(n&&e.match('"""')){a=!0;break}r=e.next(),!i&&"$"==r&&e.match("{")&&e.skipTo("}"),i=!i&&"\\"==r&&!n}return!a&&n||(t.tokenize=null),"string"}),t.tokenize(e,t);var n},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=M(1),t.tokenize(e,t))},indent:function(e,t,n,r){var i=n&&n.charAt(0);return"}"!=e.prevToken&&")"!=e.prevToken||""!=n?"operator"==e.prevToken&&"}"!=n&&"}"!=e.context.type||"variable"==e.prevToken&&"."==i||("}"==e.prevToken||")"==e.prevToken)&&"."==i?2*r+t.indented:t.align&&"}"==t.type?t.indented+(e.context.type==(n||"").charAt(0)?0:r):void 0:e.indented}},modeProps:{closeBrackets:{triples:'"'}}}),E(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:o("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:o("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:o("for while do if else struct"),builtin:o("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:o("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":y},modeProps:{fold:["brace","include"]}}),E("text/x-nesc",{name:"clike",keywords:o(l+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:p,blockKeywords:o(g),atoms:o("null true false"),hooks:{"#":y},modeProps:{fold:["brace","include"]}}),E("text/x-objectivec",{name:"clike",keywords:o(l+" "+c),types:m,builtin:o(f),blockKeywords:o(g+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:o(v+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:o("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:_,hooks:{"#":y,"*":b},modeProps:{fold:["brace","include"]}}),E("text/x-objectivec++",{name:"clike",keywords:o(l+" "+c+" "+u),types:m,builtin:o(f),blockKeywords:o(g+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:o(v+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:o("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:_,hooks:{"#":y,"*":b,u:w,U:w,L:w,R:w,0:x,1:x,2:x,3:x,4:x,5:x,6:x,7:x,8:x,9:x,token:function(e,t,n){if("variable"==n&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&k(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),E("text/x-squirrel",{name:"clike",keywords:o("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:p,blockKeywords:o("case catch class else for foreach if switch try while"),defKeywords:o("function local class"),typeFirstDefinitions:!0,atoms:o("true false null"),hooks:{"#":y},modeProps:{fold:["brace","include"]}});var D=null;function T(e){return function(t,n){for(var r,i=!1,a=!1;!t.eol();){if(!i&&t.match('"')&&("single"==e||t.match('""'))){a=!0;break}if(!i&&t.match("``")){D=T(e),a=!0;break}r=t.next(),i="single"==e&&!i&&"\\"==r}return a&&(n.tokenize=null),"string"}}E("text/x-ceylon",{name:"clike",keywords:o("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:o("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:o("class dynamic function interface module object package value"),builtin:o("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:o("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=T(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!D||!e.match("`"))&&(t.tokenize=D,D=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,n){if(("variable"==n||"type"==n)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}(n(15237))},51422:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(32530),a=n(46681),o=n(79989),s=n(33828),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r.transform=n,r}return r.__extends(t,e),t.makeFromFacet=function(e,n){var r=n.row,o=n.column;if(r&&o){for(var l=null,u=0,c=[r,o];u{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=function(e){function t(t,n,i,a){var o=e.call(this,r.__assign({},n),{name:t})||this;return o.specifiedProjection=n,o.size=i,o.data=a,o.merged=!1,o}return r.__extends(t,e),t}(n(96159).Split);t.ProjectionComponent=i},51878:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=r.__importStar(n(68171)),a=n(76426),o=n(79989),s=n(32134),l=n(80219),u=n(6871),c=n(27588),f=n(86985),d=n(7302),h=n(11964),p=n(92649),m=function(e){function t(n,o,s,l,u,c,f){var d=e.call(this,n,o,s,c,u,n.resolve)||this;d.type="layer";var h=r.__assign({},l,n.width?{width:n.width}:{},n.height?{height:n.height}:{});return d.initSize(h),d.children=n.layer.map((function(e,n){if(a.isLayerSpec(e))return new t(e,d,d.getName("layer_"+n),h,u,c,f);if(a.isUnitSpec(e))return new p.UnitModel(e,d,d.getName("layer_"+n),h,u,c,f);throw new Error(i.message.INVALID_SPEC)})),d}return r.__extends(t,e),t.prototype.parseData=function(){this.component.data=l.parseData(this);for(var e=0,t=this.children;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(79989);t.defaultLegendConfig={};var a={entryPadding:1,format:1,offset:1,orient:1,padding:1,tickCount:1,title:1,type:1,values:1,zindex:1},o=r.__assign({},a,{opacity:1,shape:1,stroke:1,fill:1,size:1,encode:1});t.LEGEND_PROPERTIES=i.flagKeys(a),t.VG_LEGEND_PROPERTIES=i.flagKeys(o)},54814:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(26372),i=n(79989),a={argmax:1,argmin:1,average:1,count:1,distinct:1,max:1,mean:1,median:1,min:1,missing:1,q1:1,q3:1,ci0:1,ci1:1,stderr:1,stdev:1,stdevp:1,sum:1,valid:1,values:1,variance:1,variancep:1};t.AGGREGATE_OPS=i.flagKeys(a),t.isAggregateOp=function(e){return!!a[e]},t.COUNTING_OPS=["count","valid","missing","distinct"],t.isCountingAggregateOp=function(e){return e&&i.contains(t.COUNTING_OPS,e)},t.SUM_OPS=["count","sum","distinct","valid","missing"],t.SHARED_DOMAIN_OPS=["mean","average","median","q1","q3","min","max"],t.SHARED_DOMAIN_OP_INDEX=r.toSet(t.SHARED_DOMAIN_OPS)},55320:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=r.__importStar(n(68171)),o=n(74686),s=n(455),l=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.transform=n,i.secondary=r,i}return r.__extends(t,e),t.make=function(e,n,r,i){var a=n.component.data.sources,l=new s.SourceNode(r.from.data),u=a[l.hash()];u||(a[l.hash()]=l,u=l);var c=n.getName("lookup_"+i),f=new o.OutputNode(u,c,"lookup",n.component.data.outputNodeRefCounts);return n.component.data.outputNodes[c]=f,new t(e,r,f.getSource())},t.prototype.producedFields=function(){return i.toSet(this.transform.from.fields||(this.transform.as instanceof Array?this.transform.as:[this.transform.as]))},t.prototype.assemble=function(){var e;if(this.transform.from.fields)e=r.__assign({values:this.transform.from.fields},this.transform.as?{as:this.transform.as instanceof Array?this.transform.as:[this.transform.as]}:{});else{var t=this.transform.as;i.isString(t)||(a.warn(a.message.NO_FIELDS_NEEDS_AS),t="_lookup"),e={as:[t]}}return r.__assign({type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup]},e,this.transform.default?{default:this.transform.default}:{})},t}(o.DataFlowNode);t.LookupNode=l},55516:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95290),i=n(32530),a=n(31179),o=n(79989);t.values=function(e,t){var n=e.values;if(n)return i.valueArray(t,n)},t.type=function(e,t,n){if(r.isColorChannel(t)&&("quantitative"===e&&!a.isBinScale(n)||"temporal"===e&&o.contains(["time","utc"],n)))return"gradient"}},55776:e=>{var t,n,r,i,a={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},o=function(e){throw{name:"SyntaxError",message:e,at:t,text:r}},s=function(e){return e&&e!==n&&o("Expected '"+e+"' instead of '"+n+"'"),n=r.charAt(t),t+=1,n},l=function(){var e,t="";for("-"===n&&(t="-",s("-"));n>="0"&&n<="9";)t+=n,s();if("."===n)for(t+=".";s()&&n>="0"&&n<="9";)t+=n;if("e"===n||"E"===n)for(t+=n,s(),"-"!==n&&"+"!==n||(t+=n,s());n>="0"&&n<="9";)t+=n,s();if(e=+t,isFinite(e))return e;o("Bad number")},u=function(){var e,t,r,i="";if('"'===n)for(;s();){if('"'===n)return s(),i;if("\\"===n)if(s(),"u"===n){for(r=0,t=0;t<4&&(e=parseInt(s(),16),isFinite(e));t+=1)r=16*r+e;i+=String.fromCharCode(r)}else{if("string"!=typeof a[n])break;i+=a[n]}else i+=n}o("Bad string")},c=function(){for(;n&&n<=" ";)s()};i=function(){switch(c(),n){case"{":return function(){var e,t={};if("{"===n){if(s("{"),c(),"}"===n)return s("}"),t;for(;n;){if(e=u(),c(),s(":"),Object.hasOwnProperty.call(t,e)&&o('Duplicate key "'+e+'"'),t[e]=i(),c(),"}"===n)return s("}"),t;s(","),c()}}o("Bad object")}();case"[":return function(){var e=[];if("["===n){if(s("["),c(),"]"===n)return s("]"),e;for(;n;){if(e.push(i()),c(),"]"===n)return s("]"),e;s(","),c()}}o("Bad array")}();case'"':return u();case"-":return l();default:return n>="0"&&n<="9"?l():function(){switch(n){case"t":return s("t"),s("r"),s("u"),s("e"),!0;case"f":return s("f"),s("a"),s("l"),s("s"),s("e"),!1;case"n":return s("n"),s("u"),s("l"),s("l"),null}o("Unexpected '"+n+"'")}()}},e.exports=function(e,a){var s;return r=e,t=0,n=" ",s=i(),c(),n&&o("Syntax error"),"function"==typeof a?function e(t,n){var r,i,o=t[n];if(o&&"object"==typeof o)for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(void 0!==(i=e(o,r))?o[r]=i:delete o[r]);return a.call(t,n,o)}({"":s},""):s}},55823:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(98348),a=n(32530),o=r.__importStar(n(68171)),s=n(75028),l=n(99273),u=n(79989),c=n(15058);t.normalizeMarkDef=function(e,t,n){var f=s.isMarkDef(e)?r.__assign({},e):{type:e},d=f.orient||c.getMarkConfig("orient",f,n);return f.orient=function(e,t,n){switch(e){case s.POINT:case s.CIRCLE:case s.SQUARE:case s.TEXT:case s.RECT:return}var r=t.y2,i=t.x2;switch(e){case s.BAR:if(r||i){if(n)return n;var o=t.x;if(!i&&a.isFieldDef(o)&&o.type===l.QUANTITATIVE&&!o.bin)return"horizontal";var u=t.y;if(!r&&a.isFieldDef(u)&&u.type===l.QUANTITATIVE&&!u.bin)return"vertical"}case s.RULE:if(i&&r)return;case s.AREA:if(r)return"vertical";if(i)return"horizontal";if(e===s.RULE){if(t.x&&!t.y)return"vertical";if(t.y&&!t.x)return"horizontal"}case s.LINE:case s.TICK:var c=a.isFieldDef(t.x)&&a.isContinuous(t.x),f=a.isFieldDef(t.y)&&a.isContinuous(t.y);if(c&&!f)return"tick"!==e?"horizontal":"vertical";if(!c&&f)return"tick"!==e?"vertical":"horizontal";if(c&&f){o=t.x,u=t.y;var d=o.type===l.TEMPORAL,h=u.type===l.TEMPORAL;return d&&!h?"tick"!==e?"vertical":"horizontal":!d&&h?"tick"!==e?"horizontal":"vertical":!o.aggregate&&u.aggregate?"tick"!==e?"vertical":"horizontal":o.aggregate&&!u.aggregate?"tick"!==e?"horizontal":"vertical":n||"vertical"}return n||void 0}return"vertical"}(f.type,t,d),void 0!==d&&d!==f.orient&&o.warn(o.message.orientOverridden(f.orient,d)),void 0===(void 0!==f.opacity?f.opacity:c.getMarkConfig("opacity",f,n))&&(f.opacity=function(e,t){if(u.contains([s.POINT,s.TICK,s.CIRCLE,s.SQUARE],e)&&!i.isAggregate(t))return.7}(f.type,t)),void 0===f.filled&&(f.filled=function(e,t){var n=c.getMarkConfig("filled",e,t),r=e.type;return void 0!==n?n:r!==s.POINT&&r!==s.LINE&&r!==s.RULE}(f,n)),void 0===(f.cursor||c.getMarkConfig("cursor",f,n))&&(f.cursor=function(e,t,n){return t.href||e.href||c.getMarkConfig("href",e,n)?"pointer":e.cursor}(f,t,n)),f}},55833:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209);t.ERRORBAR="error-bar",t.normalizeErrorBar=function(e){e.mark,e.selection,e.projection;var t=e.encoding,n=r.__rest(e,["mark","selection","projection","encoding"]),i=(t.size,r.__rest(t,["size"])),a=(t.x2,t.y2,r.__rest(t,["x2","y2"])),o=(a.x,a.y,r.__rest(a,["x","y"]));if(!t.x2&&!t.y2)throw new Error("Neither x2 or y2 provided");return r.__assign({},n,{layer:[{mark:"rule",encoding:i},{mark:"tick",encoding:a},{mark:"tick",encoding:t.x2?r.__assign({x:t.x2,y:t.y},o):r.__assign({x:t.x,y:t.y2},o)}]})}},56133:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(95290),o=n(68171),s=n(31179),l=n(79989),u=n(11964),c=r.__importDefault(n(42155));t.BRUSH="_brush",t.SCALE_TRIGGER="_scale_trigger";var f={predicate:"vlInterval",scaleDomain:"vlIntervalDomain",signals:function(e,n){var r=n.name,l=c.default.has(n),f=[],h=[],p=[],m=[];if(n.translate&&!l){var g="!event.item || event.item.mark.name !== "+i.stringValue(r+t.BRUSH);d(n,(function(e,t){var n=t.between[0].filter||(t.between[0].filter=[]);n.indexOf(g)<0&&n.push(g)}))}return n.project.forEach((function(r){var l=r.channel;if(l===a.X||l===a.Y){var g=function(e,n,r){var o=u.channelSignalName(n,r,"visual"),l=u.channelSignalName(n,r,"data"),f=c.default.has(n),h=e.scaleName(r),p=i.stringValue(h),m=e.getScaleComponent(r),g=m?m.get("type"):void 0,v=e.getSizeSignalRef(r===a.X?"width":"height").signal,y=r+"(unit)",b=d(n,(function(e,t){return e.concat({events:t.between[0],update:"["+y+", "+y+"]"},{events:t,update:"["+o+"[0], clamp("+y+", 0, "+v+")]"})}));return b.push({events:{signal:n.name+t.SCALE_TRIGGER},update:s.hasContinuousDomain(g)&&!s.isBinScale(g)?"[scale("+p+", "+l+"[0]), scale("+p+", "+l+"[1])]":"[0, 0]"}),f?[{name:l,on:[]}]:[{name:o,value:[],on:b},{name:l,on:[{events:{signal:o},update:o+"[0] === "+o+"[1] ? null : invert("+p+", "+o+")"}]}]}(e,n,l),v=u.channelSignalName(n,l,"data"),y=u.channelSignalName(n,l,"visual"),b=i.stringValue(e.scaleName(l)),_=e.getScaleComponent(l).get("type"),x=s.hasContinuousDomain(_)?"+":"";f.push.apply(f,g),p.push(v),h.push("{encoding: "+i.stringValue(l)+", field: "+i.stringValue(r.field)+", extent: "+v+"}"),m.push({scaleName:e.scaleName(l),expr:"(!isArray("+v+") || ("+x+"invert("+b+", "+y+")[0] === "+x+v+"[0] && "+x+"invert("+b+", "+y+")[1] === "+x+v+"[1]))"})}else o.warn("Interval selections only support x and y encoding channels.")})),l||f.push({name:r+t.SCALE_TRIGGER,update:m.map((function(e){return e.expr})).join(" && ")+" ? "+(r+t.SCALE_TRIGGER)+" : {}"}),f.concat({name:r+u.TUPLE,on:[{events:p.map((function(e){return{signal:e}})),update:p.join(" && ")+" ? {unit: "+u.unitName(e)+", intervals: ["+h.join(", ")+"]} : null"}]})},modifyExpr:function(e,t){return t.name+u.TUPLE+", "+("global"===t.resolve?"true":"{unit: "+u.unitName(e)+"}")},marks:function(e,n,a){var o=n.name,s=u.positionalProjections(n),f=s.xi,d=s.yi,h="data("+i.stringValue(n.name+u.STORE)+")";if(c.default.has(n))return a;var p={x:null!==f?{signal:o+"_x[0]"}:{value:0},y:null!==d?{signal:o+"_y[0]"}:{value:0},x2:null!==f?{signal:o+"_x[1]"}:{field:{group:"width"}},y2:null!==d?{signal:o+"_y[1]"}:{field:{group:"height"}}};if("global"===n.resolve)for(var m=0,g=l.keys(p);m{"use strict";n.d(t,{Ay:()=>iR});var r={};n.r(r),n.d(r,{aggregate:()=>_a,bin:()=>wa,collect:()=>Ca,compare:()=>Ea,countpattern:()=>Ma,cross:()=>Ta,density:()=>za,expression:()=>ja,extent:()=>Ua,facet:()=>Ha,field:()=>Ga,filter:()=>$a,flatten:()=>Ka,fold:()=>Qa,formula:()=>Za,generate:()=>Ja,impute:()=>lo,joinaggregate:()=>uo,key:()=>fo,load:()=>po,lookup:()=>mo,multiextent:()=>go,multivalues:()=>yo,params:()=>_o,pivot:()=>xo,prefacet:()=>ko,project:()=>So,proxy:()=>Co,relay:()=>Eo,sample:()=>Ao,sequence:()=>Mo,sieve:()=>Do,subflow:()=>qa,tupleindex:()=>To,values:()=>No,window:()=>Ro});var i={};n.r(i),n.d(i,{bound:()=>qf,identifier:()=>Vf,mark:()=>Gf,overlap:()=>Yf,render:()=>td,viewlayout:()=>dd});var a={};n.r(a),n.d(a,{interpolate:()=>fp,interpolateArray:()=>rp,interpolateBasis:()=>Vh,interpolateBasisClosed:()=>Gh,interpolateCubehelix:()=>Eg,interpolateCubehelixLong:()=>Ag,interpolateDate:()=>ap,interpolateDiscrete:()=>Cm,interpolateHcl:()=>hg,interpolateHclLong:()=>pg,interpolateHsl:()=>Hm,interpolateHslLong:()=>Vm,interpolateHue:()=>Em,interpolateLab:()=>fg,interpolateNumber:()=>op,interpolateNumberArray:()=>tp,interpolateObject:()=>sp,interpolateRgb:()=>Qh,interpolateRgbBasis:()=>Jh,interpolateRgbBasisClosed:()=>ep,interpolateRound:()=>dp,interpolateString:()=>cp,interpolateTransformCss:()=>Pm,interpolateTransformSvg:()=>zm,interpolateZoom:()=>qm,piecewise:()=>Mg,quantize:()=>Dg});var o={};n.r(o),n.d(o,{interpolateBlues:()=>ty,interpolateBrBG:()=>hv,interpolateBuGn:()=>Nv,interpolateBuPu:()=>Fv,interpolateCividis:()=>dy,interpolateCool:()=>rv,interpolateCubehelixDefault:()=>hy,interpolateGnBu:()=>Pv,interpolateGreens:()=>ry,interpolateGreys:()=>ay,interpolateInferno:()=>ev,interpolateMagma:()=>Jg,interpolateOrRd:()=>Rv,interpolateOranges:()=>fy,interpolatePRGn:()=>mv,interpolatePiYG:()=>vv,interpolatePlasma:()=>tv,interpolatePuBu:()=>Uv,interpolatePuBuGn:()=>jv,interpolatePuOr:()=>bv,interpolatePuRd:()=>Wv,interpolatePurples:()=>sy,interpolateRainbow:()=>av,interpolateRdBu:()=>xv,interpolateRdGy:()=>kv,interpolateRdPu:()=>Vv,interpolateRdYlBu:()=>Cv,interpolateRdYlGn:()=>Av,interpolateReds:()=>uy,interpolateSinebow:()=>uv,interpolateSpectral:()=>Dv,interpolateTurbo:()=>py,interpolateViridis:()=>Zg,interpolateWarm:()=>nv,interpolateYlGn:()=>Xv,interpolateYlGnBu:()=>Yv,interpolateYlOrBr:()=>Qv,interpolateYlOrRd:()=>Jv,schemeAccent:()=>Wg,schemeBlues:()=>ey,schemeBrBG:()=>dv,schemeBuGn:()=>Tv,schemeBuPu:()=>Ov,schemeCategory10:()=>qg,schemeDark2:()=>Hg,schemeGnBu:()=>Lv,schemeGreens:()=>ny,schemeGreys:()=>iy,schemeOrRd:()=>zv,schemeOranges:()=>cy,schemePRGn:()=>pv,schemePaired:()=>Vg,schemePastel1:()=>Gg,schemePastel2:()=>Yg,schemePiYG:()=>gv,schemePuBu:()=>Bv,schemePuBuGn:()=>Iv,schemePuOr:()=>yv,schemePuRd:()=>qv,schemePurples:()=>oy,schemeRdBu:()=>_v,schemeRdGy:()=>wv,schemeRdPu:()=>Hv,schemeRdYlBu:()=>Sv,schemeRdYlGn:()=>Ev,schemeReds:()=>ly,schemeSet1:()=>$g,schemeSet2:()=>Xg,schemeSet3:()=>Kg,schemeSpectral:()=>Mv,schemeTableau10:()=>cv,schemeYlGn:()=>$v,schemeYlGnBu:()=>Gv,schemeYlOrBr:()=>Kv,schemeYlOrRd:()=>Zv});var s={};n.r(s),n.d(s,{axisticks:()=>My,datajoin:()=>Dy,encode:()=>Oy,legendentries:()=>zy,linkpath:()=>qy,pie:()=>Gy,scale:()=>Ky,sortitems:()=>eb,stack:()=>ab,validTicks:()=>Cy});var l={};n.r(l),n.d(l,{contour:()=>Lb,geojson:()=>zb,geopath:()=>lS,geopoint:()=>uS,geoshape:()=>cS,graticule:()=>hS,projection:()=>pS});var u={};n.r(u),n.d(u,{force:()=>sC});var c={};n.r(c),n.d(c,{nest:()=>_C,pack:()=>VC,partition:()=>KC,stratify:()=>rE,tree:()=>mE,treelinks:()=>vE,treemap:()=>CE});var f={};n.r(f),n.d(f,{voronoi:()=>fA});var d={};n.r(d),n.d(d,{wordcloud:()=>CA});var h={};n.r(h),n.d(h,{crossfilter:()=>OA,resolvefilter:()=>LA});var p={};n.r(p),n.d(p,{Bounds:()=>as,CanvasHandler:()=>Xc,CanvasRenderer:()=>ef,Dataflow:()=>Qr,Debug:()=>Se.Debug,Error:()=>Se.Error,EventStream:()=>Ge,Gradient:()=>ls,GroupItem:()=>cs,Handler:()=>Uc,Info:()=>Se.Info,Item:()=>us,Marks:()=>Sc,MultiPulse:()=>Wr,None:()=>Se.None,Operator:()=>qe,Parameters:()=>Ie,Pulse:()=>Ir,RenderType:()=>Lf,Renderer:()=>Hc,ResourceLoader:()=>hs,SVGHandler:()=>af,SVGRenderer:()=>pf,SVGStringRenderer:()=>Ef,Scenegraph:()=>Oc,Transform:()=>ei,View:()=>qP,Warn:()=>Se.Warn,accessor:()=>Se.accessor,accessorFields:()=>Se.accessorFields,accessorName:()=>Se.accessorName,array:()=>Se.array,ascending:()=>Se.ascending,bandwidthNRD:()=>Ci,bin:()=>Ei,bootstrapCI:()=>Di,boundClip:()=>If,boundContext:()=>vu,boundItem:()=>Cc,boundMark:()=>Ac,boundStroke:()=>du,changeset:()=>ze,clampRange:()=>Se.clampRange,closeTag:()=>uf,compare:()=>Se.compare,constant:()=>Se.constant,cumulativeLogNormal:()=>Hi,cumulativeNormal:()=>Ii,cumulativeUniform:()=>Ki,debounce:()=>Se.debounce,definition:()=>ri,densityLogNormal:()=>Wi,densityNormal:()=>Ri,densityUniform:()=>Xi,domChild:()=>Rc,domClear:()=>Ic,domCreate:()=>Pc,domFind:()=>zc,dotbin:()=>Ti,error:()=>Se.error,expressionFunction:()=>IN,extend:()=>Se.extend,extent:()=>Se.extent,extentIndex:()=>Se.extentIndex,falsy:()=>Se.falsy,fastmap:()=>Se.fastmap,field:()=>Se.field,flush:()=>Se.flush,font:()=>vc,fontFamily:()=>gc,fontSize:()=>hc,format:()=>Et,formatLocale:()=>Rp,formats:()=>At,hasOwnProperty:()=>Se.hasOwnProperty,id:()=>Se.id,identity:()=>Se.identity,inferType:()=>st,inferTypes:()=>lt,ingest:()=>Ne,inherits:()=>Se.inherits,inrange:()=>Se.inrange,interpolate:()=>Fg,interpolateRange:()=>Tg,isArray:()=>Se.isArray,isBoolean:()=>Se.isBoolean,isDate:()=>Se.isDate,isFunction:()=>Se.isFunction,isIterable:()=>Se.isIterable,isNumber:()=>Se.isNumber,isObject:()=>Se.isObject,isRegExp:()=>Se.isRegExp,isString:()=>Se.isString,isTuple:()=>Me,key:()=>Se.key,lerp:()=>Se.lerp,loader:()=>Qe,logger:()=>Se.logger,lruCache:()=>Se.lruCache,merge:()=>Se.merge,mergeConfig:()=>Se.mergeConfig,one:()=>Se.one,openTag:()=>lf,pad:()=>Se.pad,panLinear:()=>Se.panLinear,panLog:()=>Se.panLog,panPow:()=>Se.panPow,panSymlog:()=>Se.panSymlog,parse:()=>yP,pathCurves:()=>cl,pathEqual:()=>Uf,pathParse:()=>hl,pathRectangle:()=>jl,pathRender:()=>_l,pathSymbols:()=>Cl,pathTrail:()=>Ul,peek:()=>Se.peek,point:()=>Bc,projection:()=>aS,quantileLogNormal:()=>Vi,quantileNormal:()=>ji,quantileUniform:()=>Qi,quantiles:()=>ki,quarter:()=>Se.quarter,quartiles:()=>Si,random:()=>Ai,randomInteger:()=>Oi,randomKDE:()=>Ui,randomLCG:()=>Ni,randomLogNormal:()=>Gi,randomMixture:()=>Yi,randomNormal:()=>Bi,randomUniform:()=>Zi,read:()=>Fr,regressionExp:()=>aa,regressionLinear:()=>ra,regressionLoess:()=>da,regressionLog:()=>ia,regressionPoly:()=>la,regressionPow:()=>oa,regressionQuad:()=>sa,renderModule:()=>zf,repeat:()=>Se.repeat,resetSVGClipId:()=>qu,runtime:()=>EP,runtimeContext:()=>MP,sampleCurve:()=>ga,sampleLogNormal:()=>qi,sampleNormal:()=>zi,sampleUniform:()=>$i,scale:()=>wm,sceneEqual:()=>Bf,sceneFromJSON:()=>Tc,scenePickVisit:()=>Au,sceneToJSON:()=>Dc,sceneVisit:()=>Eu,sceneZOrder:()=>Cu,scheme:()=>yy,schemeDiscretized:()=>by,setRandom:()=>Mi,span:()=>Se.span,splitAccessPath:()=>Se.splitAccessPath,stringValue:()=>Se.stringValue,textMetrics:()=>lc,timeFormatLocale:()=>Or,timeInterval:()=>wy,toBoolean:()=>Se.toBoolean,toDate:()=>Se.toDate,toNumber:()=>Se.toNumber,toSet:()=>Se.toSet,toString:()=>Se.toString,transform:()=>ii,transforms:()=>ni,truncate:()=>Se.truncate,truthy:()=>Se.truthy,tupleid:()=>De,typeParsers:()=>it,utcInterval:()=>ky,utcquarter:()=>Se.utcquarter,version:()=>PA.rE,visitArray:()=>Se.visitArray,writeConfig:()=>Se.writeConfig,zero:()=>Se.zero,zoomLinear:()=>Se.zoomLinear,zoomLog:()=>Se.zoomLog,zoomPow:()=>Se.zoomPow,zoomSymlog:()=>Se.zoomSymlog});var m={};n.r(m),n.d(m,{dark:()=>QP,excel:()=>JP,fivethirtyeight:()=>iz,ggplot2:()=>oz,googlecharts:()=>Az,latimes:()=>dz,powerbi:()=>Bz,quartz:()=>mz,urbaninstitute:()=>kz,version:()=>Uz,vox:()=>vz});var g=function(){return g=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt?1:e>=t?0:NaN}Object.create,Object.create,x.prototype={constructor:x,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var C="http://www.w3.org/1999/xhtml";const E={svg:"http://www.w3.org/2000/svg",xhtml:C,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function A(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),E.hasOwnProperty(t)?{space:E[t],local:e}:e}function M(e){return function(){this.removeAttribute(e)}}function D(e){return function(){this.removeAttributeNS(e.space,e.local)}}function T(e,t){return function(){this.setAttribute(e,t)}}function N(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function O(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function F(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function L(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function P(e){return function(){this.style.removeProperty(e)}}function z(e,t,n){return function(){this.style.setProperty(e,t,n)}}function R(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function I(e){return function(){delete this[e]}}function j(e,t){return function(){this[e]=t}}function B(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function U(e){return e.trim().split(/^|\s+/)}function q(e){return e.classList||new W(e)}function W(e){this._node=e,this._names=U(e.getAttribute("class")||"")}function H(e,t){for(var n=q(e),r=-1,i=t.length;++r=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var ce={},fe=null;function de(e,t,n){return e=he(e,t,n),function(t){var n=t.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||e.call(this,t)}}function he(e,t,n){return function(r){var i=fe;fe=r;try{e.call(this,this.__data__,t,n)}finally{fe=i}}}function pe(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,a=t.length;r=_&&(_=b+1);!(y=g[_])&&++_=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=S);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a1?this.each((null==t?P:"function"==typeof t?R:z)(e,t,null==n?"":n)):function(e,t){return e.style.getPropertyValue(t)||L(e).getComputedStyle(e,null).getPropertyValue(t)}(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?I:"function"==typeof t?B:j)(e,t)):this.node()[e]},classed:function(e,t){var n=U(e+"");if(arguments.length<2){for(var r=q(this.node()),i=-1,a=n.length;++i=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),o=a.length;if(!(arguments.length<2)){for(s=t?me:pe,null==n&&(n=!1),r=0;r=0&&n.splice(i,1)),n},n}var Ee=Symbol("vega_id"),Ae=1;function Me(e){return!(!e||!De(e))}function De(e){return e[Ee]}function Te(e,t){return e[Ee]=t,e}function Ne(e){var t=e===Object(e)?e:{data:e};return De(t)?t:Te(t,Ae++)}function Oe(e){return Fe(e,Ne({}))}function Fe(e,t){for(var n in e)t[n]=e[n];return t}function Le(e,t){return Te(t,De(e))}function Pe(e){return e&&e.constructor===ze}function ze(){var e=[],t=[],n=[],r=[],i=[],a=!1;return{constructor:ze,insert:function(t){for(var n=(0,Se.array)(t),r=0,i=n.length;r0&&(g(d,f,c.value),o.modifies(f));for(l=0,u=i.length;l0&&g(e,c.field,c.value)})),o.modifies(c.field);if(a)o.mod=t.length||r.length?s.filter((function(e){return p[De(e)]>0})):s.slice();else for(h in m)o.mod.push(m[h]);return o}}}var Re="_:mod:_";function Ie(){Object.defineProperty(this,Re,{writable:!0,value:{}})}var je=Ie.prototype;je.set=function(e,t,n,r){var i=this,a=i[e],o=i[Re];return null!=t&&t>=0?(a[t]!==n||r)&&(a[t]=n,o[t+":"+e]=-1,o[e]=-1):(a!==n||r)&&(i[e]=n,o[e]=(0,Se.isArray)(n)?1+n.length:-1),i},je.modified=function(e,t){var n,r=this[Re];if(!arguments.length){for(n in r)if(r[n])return!0;return!1}if((0,Se.isArray)(e)){for(n=0;n=0?t+1e?(t=n,1):0}))},$e.debounce=function(e){var t=Ye();return this.targets().add(Ye(null,null,(0,Se.debounce)(e,(function(e){var n=e.dataflow;t.receive(e),n&&n.run&&n.run()})))),t},$e.between=function(e,t){var n=!1;return e.targets().add(Ye(null,null,(function(){n=!0}))),t.targets().add(Ye(null,null,(function(){n=!1}))),this.filter((function(){return n}))};var Xe=/^([A-Za-z]+:)?\/\//,Ke="file://";function Qe(e){return{options:e||{},sanitize:Je,load:Ze,file:tt,http:et}}function Ze(e,t){var n=this;return n.sanitize(e,t).then((function(e){var r=e.href;return e.localFile?n.file(r):n.http(r,t)}))}function Je(e,t){return t=(0,Se.extend)({},this.options,t),new Promise((function(n,r){var i,a,o,s,l={href:null};null!=e&&"string"==typeof e?(a=Xe.test(e),(s=t.baseURL)&&!a&&(rt(e,"/")||"/"===s[s.length-1]||(e="/"+e),e=s+e),o=(i=rt(e,Ke))||"file"===t.mode||"http"!==t.mode&&!a&&nt(),i?e=e.slice(Ke.length):rt(e,"//")&&("file"===t.defaultProtocol?(e=e.slice(2),o=!0):e=(t.defaultProtocol||"http")+":"+e),Object.defineProperty(l,"localFile",{value:!!o}),l.href=e,t.target&&(l.target=t.target+""),n(l)):r("Sanitize failure, invalid URI: "+(0,Se.stringValue)(e))}))}function et(e,t){return function(e,t){var r="function"==typeof fetch?fetch:n(67476);return r?r(e,t):Promise.reject("No fetch method available.")}(e,(0,Se.extend)({},this.options.http,t)).then((function(e){if(!e.ok)throw e.status+""+e.statusText;return e.text()}))}function tt(e){return new Promise((function(t,n){var r=nt();r?r.readFile(e,(function(e,r){e?n(e):t(r)})):n("No file system access for "+e)}))}function nt(){var e=n(65678);return e&&(0,Se.isFunction)(e.readFile)?e:null}function rt(e,t){return null!=e&&0===e.lastIndexOf(t,0)}var it={boolean:Se.toBoolean,integer:Se.toNumber,number:Se.toNumber,date:Se.toDate,string:Se.toString,unknown:Se.identity},at=[function(e){return"true"===e||"false"===e||!0===e||!1===e},function(e){return ut(e)&&(e=+e)==~~e},ut,function(e){return!isNaN(Date.parse(e))}],ot=["boolean","integer","number","date"];function st(e,t){if(!e||!e.length)return"unknown";var n,r,i,a,o=0,s=e.length,l=at.length,u=at.map((function(e,t){return t+1}));for(r=0,s=e.length;r=a?l=!0:10===(r=e.charCodeAt(o++))?u=!0:13===r&&(u=!0,10===e.charCodeAt(o)&&++o),e.slice(i+1,t-1).replace(/""/g,'"')}for(;o9999?"+"+pt(e,6):pt(e,4)}(e.getUTCFullYear())+"-"+pt(e.getUTCMonth()+1,2)+"-"+pt(e.getUTCDate(),2)+(i?"T"+pt(t,2)+":"+pt(n,2)+":"+pt(r,2)+"."+pt(i,3)+"Z":r?"T"+pt(t,2)+":"+pt(n,2)+":"+pt(r,2)+"Z":n||t?"T"+pt(t,2)+":"+pt(n,2)+"Z":"")}(e):t.test(e+="")?'"'+e.replace(/"/g,'""')+'"':e}return{parse:function(e,t){var n,i,a=r(e,(function(e,r){if(n)return n(e,r-1);i=e,n=t?function(e,t){var n=dt(e);return function(r,i){return t(n(r),i,e)}}(e,t):dt(e)}));return a.columns=i||[],a},parseRows:r,format:function(t,n){return null==n&&(n=ht(t)),[n.map(o).join(e)].concat(i(t,n)).join("\n")},formatBody:function(e,t){return null==t&&(t=ht(e)),i(e,t).join("\n")},formatRows:function(e){return e.map(a).join("\n")},formatRow:a,formatValue:o}}function gt(e){return function(t,n){var r={delimiter:e};return vt(t,n?(0,Se.extend)(n,r):r)}}function vt(e,t){return t.header&&(e=t.header.map(Se.stringValue).join(t.delimiter)+"\n"+e),mt(t.delimiter).parse(e+"")}function yt(e,t){var n,r=t&&t.property?(0,Se.field)(t.property):Se.identity;return!(0,Se.isObject)(e)||(n=e,"function"==typeof Buffer&&(0,Se.isFunction)(Buffer.isBuffer)&&Buffer.isBuffer(n))?r(JSON.parse(e)):function(e){return e}(r(e))}function bt(e){return e}function _t(e,t){return"string"==typeof t&&(t=e.objects[t]),"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return xt(e,t)}))}:xt(e,t)}function xt(e,t){var n=t.id,r=t.bbox,i=null==t.properties?{}:t.properties,a=wt(e,t);return null==n&&null==r?{type:"Feature",properties:i,geometry:a}:null==r?{type:"Feature",id:n,properties:i,geometry:a}:{type:"Feature",id:n,bbox:r,properties:i,geometry:a}}function wt(e,t){var n=function(e){if(null==e)return bt;var t,n,r=e.scale[0],i=e.scale[1],a=e.translate[0],o=e.translate[1];return function(e,s){s||(t=n=0);var l=2,u=e.length,c=new Array(u);for(c[0]=(t+=e[0])*r+a,c[1]=(n+=e[1])*i+o;l1)r=function(e,t,n){var r,i=[],a=[];function o(e){var t=e<0?~e:e;(a[t]||(a[t]=[])).push({i:e,g:r})}function s(e){e.forEach(o)}function l(e){e.forEach(s)}return function e(t){switch(r=t,t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"LineString":s(t.arcs);break;case"MultiLineString":case"Polygon":l(t.arcs);break;case"MultiPolygon":!function(e){e.forEach(l)}(t.arcs)}}(t),a.forEach(null==n?function(e){i.push(e[0].i)}:function(e){n(e[0].g,e[e.length-1].g)&&i.push(e[0].i)}),i}(0,t,n);else for(i=0,r=new Array(a=e.arcs.length);i1?(Et[e]=t,this):Et.hasOwnProperty(e)?Et[e]:null}var Mt=new Date,Dt=new Date;function Tt(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t0))return s;do{s.push(o=new Date(+n)),t(n,a),e(n)}while(o=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return Mt.setTime(+t),Dt.setTime(+r),e(Mt),e(Dt),Math.floor(n(Mt,Dt))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var Nt=1e3,Ot=6e4,Ft=36e5,Lt=864e5,Pt=6048e5;function zt(e){return Tt((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)/Pt}))}var Rt=zt(0),It=zt(1),jt=zt(2),Bt=zt(3),Ut=zt(4),qt=zt(5),Wt=zt(6),Ht=(Rt.range,It.range,jt.range,Bt.range,Ut.range,qt.range,Wt.range,Tt((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/Lt}),(function(e){return e.getUTCDate()-1})));const Vt=Ht;function Gt(e){return Tt((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ot)/Pt}))}Ht.range;var Yt=Gt(0),$t=Gt(1),Xt=Gt(2),Kt=Gt(3),Qt=Gt(4),Zt=Gt(5),Jt=Gt(6),en=(Yt.range,$t.range,Xt.range,Kt.range,Qt.range,Zt.range,Jt.range,Tt((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ot)/Lt}),(function(e){return e.getDate()-1})));const tn=en;en.range;var nn=Tt((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()}));nn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Tt((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};const rn=nn;nn.range;var an=Tt((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()}));an.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Tt((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};const on=an;function sn(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 ln(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 un(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}an.range;var cn,fn,dn,hn,pn,mn={"-":"",_:" ",0:"0"},gn=/^\s*\d+/,vn=/^%/,yn=/[\\^$*+?|[\]().{}]/g;function bn(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a68?1900:2e3),n+r[0].length):-1}function Tn(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Nn(e,t,n){var r=gn.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function On(e,t,n){var r=gn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Fn(e,t,n){var r=gn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Ln(e,t,n){var r=gn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Pn(e,t,n){var r=gn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function zn(e,t,n){var r=gn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Rn(e,t,n){var r=gn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function In(e,t,n){var r=gn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function jn(e,t,n){var r=gn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Bn(e,t,n){var r=vn.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Un(e,t,n){var r=gn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function qn(e,t,n){var r=gn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Wn(e,t){return bn(e.getDate(),t,2)}function Hn(e,t){return bn(e.getHours(),t,2)}function Vn(e,t){return bn(e.getHours()%12||12,t,2)}function Gn(e,t){return bn(1+tn.count(rn(e),e),t,3)}function Yn(e,t){return bn(e.getMilliseconds(),t,3)}function $n(e,t){return Yn(e,t)+"000"}function Xn(e,t){return bn(e.getMonth()+1,t,2)}function Kn(e,t){return bn(e.getMinutes(),t,2)}function Qn(e,t){return bn(e.getSeconds(),t,2)}function Zn(e){var t=e.getDay();return 0===t?7:t}function Jn(e,t){return bn(Yt.count(rn(e)-1,e),t,2)}function er(e){var t=e.getDay();return t>=4||0===t?Qt(e):Qt.ceil(e)}function tr(e,t){return e=er(e),bn(Qt.count(rn(e),e)+(4===rn(e).getDay()),t,2)}function nr(e){return e.getDay()}function rr(e,t){return bn($t.count(rn(e)-1,e),t,2)}function ir(e,t){return bn(e.getFullYear()%100,t,2)}function ar(e,t){return bn((e=er(e)).getFullYear()%100,t,2)}function or(e,t){return bn(e.getFullYear()%1e4,t,4)}function sr(e,t){var n=e.getDay();return bn((e=n>=4||0===n?Qt(e):Qt.ceil(e)).getFullYear()%1e4,t,4)}function lr(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+bn(t/60|0,"0",2)+bn(t%60,"0",2)}function ur(e,t){return bn(e.getUTCDate(),t,2)}function cr(e,t){return bn(e.getUTCHours(),t,2)}function fr(e,t){return bn(e.getUTCHours()%12||12,t,2)}function dr(e,t){return bn(1+Vt.count(on(e),e),t,3)}function hr(e,t){return bn(e.getUTCMilliseconds(),t,3)}function pr(e,t){return hr(e,t)+"000"}function mr(e,t){return bn(e.getUTCMonth()+1,t,2)}function gr(e,t){return bn(e.getUTCMinutes(),t,2)}function vr(e,t){return bn(e.getUTCSeconds(),t,2)}function yr(e){var t=e.getUTCDay();return 0===t?7:t}function br(e,t){return bn(Rt.count(on(e)-1,e),t,2)}function _r(e){var t=e.getUTCDay();return t>=4||0===t?Ut(e):Ut.ceil(e)}function xr(e,t){return e=_r(e),bn(Ut.count(on(e),e)+(4===on(e).getUTCDay()),t,2)}function wr(e){return e.getUTCDay()}function kr(e,t){return bn(It.count(on(e)-1,e),t,2)}function Sr(e,t){return bn(e.getUTCFullYear()%100,t,2)}function Cr(e,t){return bn((e=_r(e)).getUTCFullYear()%100,t,2)}function Er(e,t){return bn(e.getUTCFullYear()%1e4,t,4)}function Ar(e,t){var n=e.getUTCDay();return bn((e=n>=4||0===n?Ut(e):Ut.ceil(e)).getUTCFullYear()%1e4,t,4)}function Mr(){return"+0000"}function Dr(){return"%"}function Tr(e){return+e}function Nr(e){return Math.floor(+e/1e3)}function Or(e){return cn=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,u=xn(i),c=wn(i),f=xn(a),d=wn(a),h=xn(o),p=wn(o),m=xn(s),g=wn(s),v=xn(l),y=wn(l),b={a:function(e){return o[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Wn,e:Wn,f:$n,g:ar,G:sr,H:Hn,I:Vn,j:Gn,L:Yn,m:Xn,M:Kn,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Tr,s:Nr,S:Qn,u:Zn,U:Jn,V:tr,w:nr,W:rr,x:null,X:null,y:ir,Y:or,Z:lr,"%":Dr},_={a:function(e){return o[e.getUTCDay()]},A:function(e){return a[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:ur,e:ur,f:pr,g:Cr,G:Ar,H:cr,I:fr,j:dr,L:hr,m:mr,M:gr,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Tr,s:Nr,S:vr,u:yr,U:br,V:xr,w:wr,W:kr,x:null,X:null,y:Sr,Y:Er,Z:Mr,"%":Dr},x={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return S(e,t,n,r)},d:Fn,e:Fn,f:jn,g:Dn,G:Mn,H:Pn,I:Pn,j:Ln,L:In,m:On,M:zn,p:function(e,t,n){var r=u.exec(t.slice(n));return r?(e.p=c[r[0].toLowerCase()],n+r[0].length):-1},q:Nn,Q:Un,s:qn,S:Rn,u:Sn,U:Cn,V:En,w:kn,W:An,x:function(e,t,r){return S(e,n,t,r)},X:function(e,t,n){return S(e,r,t,n)},y:Dn,Y:Mn,Z:Tn,"%":Bn};function w(e,t){return function(n){var r,i,a,o=[],s=-1,l=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=ln(un(a.y,0,1))).getUTCDay(),r=i>4||0===i?It.ceil(r):It(r),r=Vt.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=sn(un(a.y,0,1))).getDay(),r=i>4||0===i?$t.ceil(r):$t(r),r=tn.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?ln(un(a.y,0,1)).getUTCDay():sn(un(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,ln(a)):sn(a)}}function S(e,t,n,r){for(var i,a,o=0,s=t.length,l=n.length;o=l)return-1;if(37===(i=t.charCodeAt(o++))){if(i=t.charAt(o++),!(a=x[i in mn?t.charAt(o++):i])||(r=a(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(t,b),_.x=w(n,_),_.X=w(r,_),_.c=w(t,_),{format:function(e){var t=w(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=k(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=w(e+="",_);return t.toString=function(){return e},t},utcParse:function(e){var t=k(e+="",!0);return t.toString=function(){return e},t}}}(e),fn=cn.format,dn=cn.parse,hn=cn.utcFormat,pn=cn.utcParse,cn}function Fr(e,t,n){var r=At((t=t||{}).type||"json");return r||(0,Se.error)("Unknown data format type: "+t.type),e=r(e,t),t.parse&&function(e,t,n){if(e.length){n=n||dn;var r,i,a,o,s,l,u,c=e.columns||Object.keys(e[0]);for("auto"===t&&(t=lt(e,c)),r=(c=Object.keys(t)).map((function(e){var r,i,a=t[e];if(a&&(0===a.indexOf("date:")||0===a.indexOf("utc:")))return("'"===(i=(r=a.split(/:(.+)?/,2))[1])[0]&&"'"===i[i.length-1]||'"'===i[0]&&'"'===i[i.length-1])&&(i=i.slice(1,-1)),"utc"===r[0]?pn(i):n(i);if(!it[a])throw Error("Illegal format pattern: "+e+":"+a);return it[a]})),o=0,l=e.length,u=c.length;ot&&r(i,a=e[o=n-1>>1])<0;)e[n]=a,n=o;return e[n]=i}function Kr(e,t,n){for(var r,i=t,a=e.length,o=e[t],s=2*t+1;s=0&&(s=r),e[t]=e[s],s=2*(t=s)+1;return e[t]=o,Xr(e,i,t,n)}function Qr(){this._log=(0,Se.logger)(),this.logLevel(Se.Error),this._clock=0,this._rank=0;try{this._loader=Qe()}catch(e){}this._touched=Ce(Se.id),this._pulses={},this._pulse=null,this._heap=new Yr((function(e,t){return e.qrank-t.qrank})),this._postrun=[]}$r.size=function(){return this.nodes.length},$r.clear=function(){return this.nodes=[],this},$r.peek=function(){return this.nodes[0]},$r.push=function(e){var t=this.nodes;return t.push(e),Xr(t,0,t.length-1,this.cmp)},$r.pop=function(){var e,t=this.nodes,n=t.pop();return t.length?(e=t[0],t[0]=n,Kr(t,0,this.cmp)):e=n,e},$r.replace=function(e){var t=this.nodes,n=t[0];return t[0]=e,Kr(t,0,this.cmp),n},$r.pushpop=function(e){var t=this.nodes,n=t[0];return t.length&&this.cmp(n,e)<0&&(t[0]=e,e=n,Kr(t,0,this.cmp)),e};var Zr=Qr.prototype;function Jr(e){return function(){return this._log[e].apply(this,arguments)}}function ei(e,t){qe.call(this,e,null,t)}Zr.stamp=function(){return this._clock},Zr.loader=function(e){return arguments.length?(this._loader=e,this):this._loader},Zr.cleanThreshold=1e4,Zr.add=function(e,t,n,r){var i,a=1;return e instanceof qe?i=e:e&&e.prototype instanceof qe?i=new e:(0,Se.isFunction)(e)?i=new qe(null,e):(a=0,i=new qe(e,t)),this.rank(i),a&&(r=n,n=t),n&&this.connect(i,i.parameters(n,r)),this.touch(i),i},Zr.connect=function(e,t){var n,r,i=e.rank;for(n=0,r=t.length;n=0;)i.push(t=n[r]),t===e&&(0,Se.error)("Cycle detected in dataflow graph.")},Zr.pulse=function(e,t,n){this.touch(e,n||Gr);var r=new Ir(this,this._clock+(this._pulse?0:1)),i=e.pulse&&e.pulse.source||[];return r.target=e,this._pulses[e.id]=t.pulse(r,i),this},Zr.touch=function(e,t){var n=t||Gr;return this._pulse?this._enqueue(e):this._touched.add(e),n.skip&&e.skip(!0),this},Zr.update=function(e,t,n){var r=n||Gr;return(e.set(t)||r.force)&&this.touch(e,r),this},Zr.changeset=ze,Zr.ingest=function(e,t,n){return this.pulse(e,this.changeset().insert(Fr(t,n)))},Zr.request=function(e,t,n){var r=this,i=0,a=r._pending||function(e){var t,n,r=new Promise((function(r,i){t=function(){r(e)},n=i}));return r.requests=0,r.done=function(){0==--r.requests&&e.runAfter((function(){e._pending=null;try{e.run(),e._pending?e._pending.then(t):t()}catch(e){n(e)}}))},e._pending=r}(r);return a.requests+=1,r.loader().load(t,{context:"dataflow"}).then((function(e){return Fr(e,n)}),(function(e){i=-1,r.error("Loading failed",t,e)})).catch((function(e){i=-2,r.error("Data ingestion failed",t,e)})).then((function(t){return r.pulse(e,r.changeset().remove(Se.truthy).insert(t||[])),a.done(),i}))},Zr.events=function(e,t,n,r){for(var i,a=this,o=Ye(n,r),s=function(e){e.dataflow=a;try{o.receive(e)}catch(e){a.error(e)}finally{a.run()}},l=0,u=(i="string"==typeof e&&"undefined"!=typeof document?document.querySelectorAll(e):(0,Se.array)(e)).length;l=Se.Info&&(r=Date.now(),a.debug("-- START PROPAGATION ("+a._clock+") -----")),a._touched.forEach((function(e){a._enqueue(e,!0)})),a._touched=Ce(Se.id);try{for(;a._heap.size()>0;)(t=a._heap.pop()).rank===t.qrank?(n=t.run(a._getPulse(t,e)),s>=Se.Debug&&a.debug(t.id,n===Rr?"STOP":n,t),n!==Rr&&(a._pulse=n,t._targets&&t._targets.forEach((function(e){a._enqueue(e)}))),++o):a._enqueue(t,!0)}catch(e){i=e}if(a._pulses={},a._pulse=null,s>=Se.Info&&(r=Date.now()-r,a.info("> Pulse "+a._clock+": "+o+" operators; "+r+"ms")),i&&(a._postrun=[],a.error(i)),a._onrun)try{a._onrun(a,o,i)}catch(e){a.error(e)}if(a._postrun.length){var l=a._postrun;a._postrun=[],l.sort((function(e,t){return t.priority-e.priority})).forEach((function(e){Vr(a,e.callback)}))}return this},Zr.runAsync=function(){return this._pending||this.run()&&this._pending||Promise.resolve(this)},Zr.runAfter=function(e,t,n){this._pulse||t?this._postrun.push({priority:n||0,callback:e}):Vr(this,e)},Zr._enqueue=function(e,t){var n=!this._pulses[e.id];n&&(this._pulses[e.id]=this._pulse),(n||t)&&(e.qrank=e.rank,this._heap.push(e))},Zr._getPulse=function(e,t){var n,r=e.source,i=this._clock;return r&&(0,Se.isArray)(r)?new Wr(this,i,n=r.map((function(e){return e.pulse})),t):(n=this._pulses[e.id],r&&((r=r.pulse)&&r!==Rr?r.stamp===i&&n.target!==e?n=r:n.source=r.source:n.source=[]),n)},Zr.error=Jr("error"),Zr.warn=Jr("warn"),Zr.info=Jr("info"),Zr.debug=Jr("debug"),Zr.logLevel=Jr("level");var ti=(0,Se.inherits)(ei,qe);ti.run=function(e){return e.stamp<=this.stamp?e.StopPropagation:(this.skip()?this.skip(!1):t=this.evaluate(e),(t=t||e)!==e.StopPropagation&&(this.pulse=t),this.stamp=e.stamp,t);var t},ti.evaluate=function(e){var t=this.marshall(e.stamp),n=this.transform(t,e);return t.clear(),n},ti.transform=function(){};var ni={};function ri(e){var t=ii(e);return t&&t.Definition||null}function ii(e){return e=e&&e.toLowerCase(),ni.hasOwnProperty(e)?ni[e]:null}function ai(e){return e&&e.length?1===e.length?e[0]:(t=e,function(e){for(var n=t.length,r=1,i=String(t[0](e));r 1 ? this.dev / (this.valid-1) : undefined",req:["mean"],idx:1}),variancep:ci({name:"variancep",set:"this.valid > 1 ? this.dev / this.valid : undefined",req:["variance"],idx:2}),stdev:ci({name:"stdev",set:"this.valid > 1 ? Math.sqrt(this.dev / (this.valid-1)) : undefined",req:["variance"],idx:2}),stdevp:ci({name:"stdevp",set:"this.valid > 1 ? Math.sqrt(this.dev / this.valid) : undefined",req:["variance"],idx:2}),stderr:ci({name:"stderr",set:"this.valid > 1 ? Math.sqrt(this.dev / (this.valid * (this.valid-1))) : undefined",req:["variance"],idx:2}),distinct:ci({name:"distinct",set:"cell.data.distinct(this.get)",req:["values"],idx:3}),ci0:ci({name:"ci0",set:"cell.data.ci0(this.get)",req:["values"],idx:3}),ci1:ci({name:"ci1",set:"cell.data.ci1(this.get)",req:["values"],idx:3}),median:ci({name:"median",set:"cell.data.q2(this.get)",req:["values"],idx:3}),q1:ci({name:"q1",set:"cell.data.q1(this.get)",req:["values"],idx:3}),q3:ci({name:"q3",set:"cell.data.q3(this.get)",req:["values"],idx:3}),argmin:ci({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:ci({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:ci({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 = (isNaN(this.min) ? cell.data.min(this.get) : this.min)",str:["values"],idx:4}),max:ci({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 = (isNaN(this.max) ? cell.data.max(this.get) : this.max)",str:["values"],idx:4})},li=Object.keys(si);function ui(e,t){return si[e](t)}function ci(e){return function(t){var n=(0,Se.extend)({init:"",add:"",rem:"",idx:0},e);return n.out=t||e.name,n}}function fi(e,t){return e.idx-t.idx}function di(e,t){var n=t||Se.identity,r=function(e){var t,n=e.reduce((function e(t,n){function r(n){t[n]||e(t,t[n]=si[n]())}return n.req&&n.req.forEach(r),n.str&&n.str.forEach(r),t}),e.reduce((function(e,t){return e[t.name]=t,e}),{})),r=[];for(t in n)r.push(n[t]);return r.sort(fi)}(e),i="var cell = this.cell; this.valid = 0; this.missing = 0;",a="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;",l="var cell = this.cell;";return r.forEach((function(e){i+=e.init,o+=e.add,s+=e.rem})),e.slice().sort(fi).forEach((function(e){l+="t['"+e.out+"']="+e.set+";"})),l+="return t;",(a=Function("cell",a)).prototype.init=Function(i),a.prototype.add=Function("v","t",o),a.prototype.rem=Function("v","t",s),a.prototype.set=Function("t",l),a.prototype.get=n,a.fields=e.map((function(e){return e.out})),a}function hi(e,t){return null==e||null==t?NaN:et?1:e>=t?0:NaN}function pi(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n=i)&&(n=i)}return n}function mi(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function gi(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(et?1:0)}function vi(e,t,n=0,r=e.length-1,i){for(i=void 0===i?gi:function(e=hi){if(e===hi)return gi;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(i);r>n;){if(r-n>600){const a=r-n+1,o=t-n+1,s=Math.log(a),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(a-l)/a)*(o-a/2<0?-1:1);vi(e,t,Math.max(n,Math.floor(t-o*l/a+u)),Math.min(r,Math.floor(t+(a-o)*l/a+u)),i)}const a=e[t];let o=n,s=r;for(yi(e,n,t),i(e[r],a)>0&&yi(e,n,r);o0;)--s}0===i(e[n],a)?yi(e,n,s):(++s,yi(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function yi(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function bi(e){return null===e?NaN:+e}function _i(e,t,n){if(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n)),r=e.length){if((t=+t)<=0||r<2)return mi(e);if(t>=1)return pi(e);var r,i=(r-1)*t,a=Math.floor(i),o=pi(vi(e,a).subarray(0,a+1));return o+(mi(e.subarray(a+1))-o)*(i-a)}}function xi(e,t){return _i(e,.5,t)}function*wi(e,t){if(null==t)for(let t of e)null!=t&&""!==t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)r=t(r,++n,e),null!=r&&""!==r&&(r=+r)>=r&&(yield r)}}function ki(e,t,n){const r=Float64Array.from(wi(e,n));return r.sort(hi),t.map((e=>function(e,t,n=bi){if(r=e.length){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}(r,e)))}function Si(e,t){return ki(e,[.25,.5,.75],t)}function Ci(e,t){const n=e.length,r=function(e,t){const n=function(e,t){let n,r=0,i=0,a=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(n=t-i,i+=n/++r,a+=n*(t-i));else{let o=-1;for(let s of e)null!=(s=t(s,++o,e))&&(s=+s)>=s&&(n=s-i,i+=n/++r,a+=n*(s-i))}if(r>1)return a/(r-1)}(e,t);return n?Math.sqrt(n):n}(e,t),i=Si(e,t),a=(i[2]-i[0])/1.34;return 1.06*(Math.min(r,a)||r||Math.abs(i[0])||1)*Math.pow(n,-.2)}function Ei(e){const t=e.maxbins||20,n=e.base||10,r=Math.log(n),i=e.divide||[5,2];let a,o,s,l,u,c,f=e.extent[0],d=e.extent[1];const h=e.span||d-f||Math.abs(f)||1;if(e.step)a=e.step;else if(e.steps){for(l=h/t,u=0,c=e.steps.length;ut;)a*=n;for(u=0,c=i.length;u=s&&h/l<=t&&(a=l)}l=Math.log(a);const p=l>=0?0:1+~~(-l/r),m=Math.pow(n,-p-1);return(e.nice||void 0===e.nice)&&(l=Math.floor(f/a+m)*a,f=fe);const i=e.length,a=new Float64Array(i);let o,s=0,l=1,u=r(e[0]),c=u,f=u+t;for(;l=f){for(c=(u+c)/2;s>1);io;)e[i--]=e[a]}a=o,o=r}return e}(a,t+t/4):a}function Ni(e){return function(){return(e=(1103515245*e+12345)%2147483647)/2147483647}}function Oi(e,t){let n,r,i;null==t&&(t=e,e=0);const a={min(e){return arguments.length?(n=e||0,i=r-n,a):n},max(e){return arguments.length?(r=e||0,i=r-n,a):r},sample:()=>n+Math.floor(i*Ai()),pdf:e=>e===Math.floor(e)&&e>=n&&e=r?1:(t-n+1)/i},icdf:e=>e>=0&&e<=1?n-1+Math.floor(e*i):NaN};return a.min(e).max(t)}const Fi=Math.sqrt(2*Math.PI),Li=Math.SQRT2;let Pi=NaN;function zi(e,t){e=e||0,t=null==t?1:t;let n,r,i=0,a=0;if(Pi==Pi)i=Pi,Pi=NaN;else{do{i=2*Ai()-1,a=2*Ai()-1,n=i*i+a*a}while(0===n||n>1);r=Math.sqrt(-2*Math.log(n)/n),i*=r,Pi=a*r}return e+i*t}function Ri(e,t,n){const r=(e-(t||0))/(n=null==n?1:n);return Math.exp(-.5*r*r)/(n*Fi)}function Ii(e,t,n){const r=(e-(t=t||0))/(n=null==n?1:n),i=Math.abs(r);let a;if(i>37)a=0;else{const e=Math.exp(-i*i/2);let t;i<7.07106781186547?(t=.0352624965998911*i+.700383064443688,t=t*i+6.37396220353165,t=t*i+33.912866078383,t=t*i+112.079291497871,t=t*i+221.213596169931,t=t*i+220.206867912376,a=e*t,t=.0883883476483184*i+1.75566716318264,t=t*i+16.064177579207,t=t*i+86.7807322029461,t=t*i+296.564248779674,t=t*i+637.333633378831,t=t*i+793.826512519948,t=t*i+440.413735824752,a/=t):(t=i+.65,t=i+4/t,t=i+3/t,t=i+2/t,t=i+1/t,a=e/t/2.506628274631)}return r>0?1-a:a}function ji(e,t,n){return e<0||e>1?NaN:(t||0)+(null==n?1:n)*Li*function(e){let t,n=-Math.log((1-e)*(1+e));return n<6.25?(n-=3.125,t=-364441206401782e-35,t=t*n-16850591381820166e-35,t=128584807152564e-32+t*n,t=11157877678025181e-33+t*n,t=t*n-1333171662854621e-31,t=20972767875968562e-33+t*n,t=6637638134358324e-30+t*n,t=t*n-4054566272975207e-29,t=t*n-8151934197605472e-29,t=26335093153082323e-28+t*n,t=t*n-12975133253453532e-27,t=t*n-5415412054294628e-26,t=1.0512122733215323e-9+t*n,t=t*n-4.112633980346984e-9,t=t*n-2.9070369957882005e-8,t=4.2347877827932404e-7+t*n,t=t*n-13654692000834679e-22,t=t*n-13882523362786469e-21,t=.00018673420803405714+t*n,t=t*n-.000740702534166267,t=t*n-.006033670871430149,t=.24015818242558962+t*n,t=1.6536545626831027+t*n):n<16?(n=Math.sqrt(n)-3.25,t=2.2137376921775787e-9,t=9.075656193888539e-8+t*n,t=t*n-2.7517406297064545e-7,t=1.8239629214389228e-8+t*n,t=15027403968909828e-22+t*n,t=t*n-4013867526981546e-21,t=29234449089955446e-22+t*n,t=12475304481671779e-21+t*n,t=t*n-47318229009055734e-21,t=6828485145957318e-20+t*n,t=24031110387097894e-21+t*n,t=t*n-.0003550375203628475,t=.0009532893797373805+t*n,t=t*n-.0016882755560235047,t=.002491442096107851+t*n,t=t*n-.003751208507569241,t=.005370914553590064+t*n,t=1.0052589676941592+t*n,t=3.0838856104922208+t*n):Number.isFinite(n)?(n=Math.sqrt(n)-5,t=-27109920616438573e-27,t=t*n-2.555641816996525e-10,t=1.5076572693500548e-9+t*n,t=t*n-3.789465440126737e-9,t=7.61570120807834e-9+t*n,t=t*n-1.496002662714924e-8,t=2.914795345090108e-8+t*n,t=t*n-6.771199775845234e-8,t=2.2900482228026655e-7+t*n,t=t*n-9.9298272942317e-7,t=4526062597223154e-21+t*n,t=t*n-1968177810553167e-20,t=7599527703001776e-20+t*n,t=t*n-.00021503011930044477,t=t*n-.00013871931833623122,t=1.0103004648645344+t*n,t=4.849906401408584+t*n):t=1/0,t*e}(2*e-1)}function Bi(e,t){let n,r;const i={mean(e){return arguments.length?(n=e||0,i):n},stdev(e){return arguments.length?(r=null==e?1:e,i):r},sample:()=>zi(n,r),pdf:e=>Ri(e,n,r),cdf:e=>Ii(e,n,r),icdf:e=>ji(e,n,r)};return i.mean(e).stdev(t)}function Ui(e,t){const n=Bi();let r=0;const i={data(n){return arguments.length?(e=n,r=n?n.length:0,i.bandwidth(t)):e},bandwidth(n){return arguments.length?(!(t=n)&&e&&(t=Ci(e)),i):t},sample:()=>e[~~(Ai()*r)]+t*n.sample(),pdf(i){let a=0,o=0;for(;oqi(n,r),pdf:e=>Wi(e,n,r),cdf:e=>Hi(e,n,r),icdf:e=>Vi(e,n,r)};return i.mean(e).stdev(t)}function Yi(e,t){let n,r=0;const i={weights(e){return arguments.length?(n=function(e){const t=[];let n,i=0;for(n=0;n=t&&e<=n?1/(n-t):0}function Ki(e,t,n){return null==n&&(n=null==t?1:t,t=0),en?1:(e-t)/(n-t)}function Qi(e,t,n){return null==n&&(n=null==t?1:t,t=0),e>=0&&e<=1?t+e*(n-t):NaN}function Zi(e,t){let n,r;const i={min(e){return arguments.length?(n=e||0,i):n},max(e){return arguments.length?(r=null==e?1:e,i):r},sample:()=>$i(n,r),pdf:e=>Xi(e,n,r),cdf:e=>Ki(e,n,r),icdf:e=>Qi(e,n,r)};return null==t&&(t=null==e?1:e,e=0),i.min(e).max(t)}function Ji(e,t,n,r){const i=r-e*e,a=Math.abs(i)<1e-24?0:(n-e*t)/i;return[t-a*e,a]}function ea(e,t,n,r){e=e.filter((e=>{let r=t(e),i=n(e);return null!=r&&(r=+r)>=r&&null!=i&&(i=+i)>=i})),r&&e.sort(((e,n)=>t(e)-t(n)));const i=e.length,a=new Float64Array(i),o=new Float64Array(i);let s,l,u,c=0,f=0,d=0;for(u of e)a[c]=s=+t(u),o[c]=l=+n(u),++c,f+=(s-f)/c,d+=(l-d)/c;for(c=0;c=i&&null!=a&&(a=+a)>=a&&r(i,a,++o)}function na(e,t,n,r,i){let a=0,o=0;return ta(e,t,n,((e,t)=>{const n=t-i(e),s=t-r;a+=n*n,o+=s*s})),1-a/o}function ra(e,t,n){let r=0,i=0,a=0,o=0,s=0;ta(e,t,n,((e,t)=>{++s,r+=(e-r)/s,i+=(t-i)/s,a+=(e*t-a)/s,o+=(e*e-o)/s}));const l=Ji(r,i,a,o),u=e=>l[0]+l[1]*e;return{coef:l,predict:u,rSquared:na(e,t,n,i,u)}}function ia(e,t,n){let r=0,i=0,a=0,o=0,s=0;ta(e,t,n,((e,t)=>{++s,e=Math.log(e),r+=(e-r)/s,i+=(t-i)/s,a+=(e*t-a)/s,o+=(e*e-o)/s}));const l=Ji(r,i,a,o),u=e=>l[0]+l[1]*Math.log(e);return{coef:l,predict:u,rSquared:na(e,t,n,i,u)}}function aa(e,t,n){const[r,i,a,o]=ea(e,t,n);let s,l,u,c=0,f=0,d=0,h=0,p=0;ta(e,t,n,((e,t)=>{s=r[p++],l=Math.log(t),u=s*t,c+=(t*l-c)/p,f+=(u-f)/p,d+=(u*l-d)/p,h+=(s*u-h)/p}));const[m,g]=Ji(f/o,c/o,d/o,h/o),v=e=>Math.exp(m+g*(e-a));return{coef:[Math.exp(m-g*a),g],predict:v,rSquared:na(e,t,n,o,v)}}function oa(e,t,n){let r=0,i=0,a=0,o=0,s=0,l=0;ta(e,t,n,((e,t)=>{const n=Math.log(e),u=Math.log(t);++l,r+=(n-r)/l,i+=(u-i)/l,a+=(n*u-a)/l,o+=(n*n-o)/l,s+=(t-s)/l}));const u=Ji(r,i,a,o),c=e=>u[0]*Math.pow(e,u[1]);return u[0]=Math.exp(u[0]),{coef:u,predict:c,rSquared:na(e,t,n,s,c)}}function sa(e,t,n){const[r,i,a,o]=ea(e,t,n),s=r.length;let l,u,c,f,d=0,h=0,p=0,m=0,g=0;for(l=0;lb*(e-=a)*e+_*e+x+o;return{coef:[x-_*a+b*a*a+o,_-2*b*a,b],predict:w,rSquared:na(e,t,n,o,w)}}function la(e,t,n,r){if(1===r)return ra(e,t,n);if(2===r)return sa(e,t,n);const[i,a,o,s]=ea(e,t,n),l=i.length,u=[],c=[],f=r+1;let d,h,p,m,g;for(d=0;dMath.abs(e[r][o])&&(o=i);for(a=r;a=r;a--)e[a][i]-=e[a][r]*e[r][i]/e[r][r]}for(i=t-1;i>=0;--i){for(s=0,a=i+1;a{e-=o;let t=s+v[0]+v[1]*e+v[2]*e*e;for(d=3;d=0;--a)for(s=t[a],l=1,i[a]+=s,o=1;o<=a;++o)l*=(a+1-o)/o,i[a-o]+=s*Math.pow(n,o)*l;return i[0]+=r,i}const ca=2,fa=1e-12;function da(e,t,n,r){const[i,a,o,s]=ea(e,t,n,!0),l=i.length,u=Math.max(2,~~(r*l)),c=new Float64Array(l),f=new Float64Array(l),d=new Float64Array(l).fill(1);for(let e=-1;++e<=ca;){const t=[0,u-1];for(let e=0;ei[o]-n?r:o;let l=0,u=0,h=0,p=0,m=0;const g=1/Math.abs(i[s]-n||1);for(let e=r;e<=o;++e){const t=i[e],r=a[e],o=ha(Math.abs(n-t)*g)*d[e],s=t*o;l+=o,u+=s,h+=r*o,p+=r*s,m+=t*s}const[v,y]=Ji(u/l,h/l,p/l,m/l);c[e]=v+y*n,f[e]=Math.abs(a[e]-c[e]),pa(i,e+1,t)}if(e===ca)break;const n=xi(f);if(Math.abs(n)=1?fa:(t=1-e*e)*t}return function(e,t,n,r){const i=e.length,a=[];let o,s=0,l=0,u=[];for(;s=e.length))for(;t>i&&e[a]-r<=r-e[i];)n[0]=++i,n[1]=a,++a}const ma=.5*Math.PI/180;function ga(e,t,n,r){n=n||25,r=Math.max(n,r||200);const i=t=>[t,e(t)],a=t[0],o=t[1],s=o-a,l=s/r,u=[i(a)],c=[];if(n===r){for(let e=1;e0;)c.push(i(a+e/n*s));let f=u[0],d=c[c.length-1];const h=1/s,p=function(e,t){let n=e,r=e;const i=t.length;for(let e=0;er&&(r=i)}return 1/(r-n)}(f[1],c);for(;d;){const e=i((f[0]+d[0])/2);e[0]-f[0]>=l&&va(f,e,d,h,p)>ma?c.push(e):(f=d,u.push(d),c.pop()),d=c[c.length-1]}return u}function va(e,t,n,r,i){const a=Math.atan2(i*(n[1]-e[1]),r*(n[0]-e[0])),o=Math.atan2(i*(t[1]-e[1]),r*(t[0]-e[0]));return Math.abs(a-o)}function ya(e){this._key=e?(0,Se.field)(e):De,this.reset()}var ba=ya.prototype;function _a(e){ei.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}ba.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null},ba.add=function(e){this._add.push(e)},ba.rem=function(e){this._rem.push(e)},ba.values=function(){if(this._get=null,0===this._rem.length)return this._add;var e,t,n,r=this._add,i=this._rem,a=this._key,o=r.length,s=i.length,l=Array(o-s),u={};for(e=0;e=0;)t=e(n[r])+"",i.hasOwnProperty(t)||(i[t]=1,++a);return a},ba.extent=function(e){if(this._get!==e||!this._ext){var t=this.values(),n=(0,Se.extentIndex)(t,e);this._ext=[t[n[0]],t[n[1]]],this._get=e}return this._ext},ba.argmin=function(e){return this.extent(e)[0]||{}},ba.argmax=function(e){return this.extent(e)[1]||{}},ba.min=function(e){var t=this.extent(e)[0];return null!=t?e(t):void 0},ba.max=function(e){var t=this.extent(e)[1];return null!=t?e(t):void 0},ba.quartile=function(e){return this._get===e&&this._q||(this._q=Si(this.values(),e),this._get=e),this._q},ba.q1=function(e){return this.quartile(e)[0]},ba.q2=function(e){return this.quartile(e)[1]},ba.q3=function(e){return this.quartile(e)[2]},ba.ci=function(e){return this._get===e&&this._ci||(this._ci=Di(this.values(),1e3,.05,e),this._get=e),this._ci},ba.ci0=function(e){return this.ci(e)[0]},ba.ci1=function(e){return this.ci(e)[1]},_a.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:li},{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 xa=(0,Se.inherits)(_a,ei);function wa(e){ei.call(this,null,e)}xa.transform=function(e,t){var n,r=this,i=t.fork(t.NO_SOURCE|t.NO_FIELDS);return this.stamp=i.stamp,this.value&&((n=e.modified())||t.modified(this._inputs))?(this._prev=this.value,this.value=n?this.init(e):{},t.visit(t.SOURCE,(function(e){r.add(e)}))):(this.value=this.value||this.init(e),t.visit(t.REM,(function(e){r.rem(e)})),t.visit(t.ADD,(function(e){r.add(e)}))),i.modifies(this._outputs),r._drop=!1!==e.drop,e.cross&&r._dims.length>1&&(r._drop=!1,this.cross()),r.changes(i)},xa.cross=function(){var e=this,t=e.value,n=e._dnames,r=n.map((function(){return{}})),i=n.length;function a(e){var t,a,o,s;for(t in e)for(o=e[t].tuple,a=0;a=t&&(n=r=t):(n>t&&(n=t),r=a&&(n=r=a):(n>a&&(n=a),ro&&(o=t))})),isFinite(a)&&isFinite(o)||(a=o=void 0),this.value=[a,o]};var Wa=(0,Se.inherits)(qa,qe);function Ha(e){ei.call(this,{},e),this._keys=(0,Se.fastmap)();var t=this._targets=[];t.active=0,t.forEach=function(e){for(var n=0,r=t.active;n=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n=i)&&(n=i)}return n}function to(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function no(e,t){return et?1:e>=t?0:NaN}function ro(e,t,n=0,r=e.length-1,i=no){for(;r>n;){if(r-n>600){const a=r-n+1,o=t-n+1,s=Math.log(a),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(a-l)/a)*(o-a/2<0?-1:1);ro(e,t,Math.max(n,Math.floor(t-o*l/a+u)),Math.min(r,Math.floor(t+(a-o)*l/a+u)),i)}const a=e[t];let o=n,s=r;for(io(e,n,t),i(e[r],a)>0&&io(e,n,r);o0;)--s}0===i(e[n],a)?io(e,n,s):(++s,io(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function io(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function ao(e,t,n){if(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n)),r=e.length){if((t=+t)<=0||r<2)return to(e);if(t>=1)return eo(e);var r,i=(r-1)*t,a=Math.floor(i),o=eo(ro(e,a).subarray(0,a+1));return o+(to(e.subarray(a+1))-o)*(i-a)}}Va.activate=function(e){this._targets[this._targets.active++]=e},Va.subflow=function(e,t,n,r){var i,a,o=this.value,s=o.hasOwnProperty(e)&&o[e];return s?s.value.stampn.cleanThreshold&&n.runAfter(o.clean),t},(0,Se.inherits)(Ga,qe),$a.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]},(0,Se.inherits)($a,ei).transform=function(e,t){var n=t.dataflow,r=this.value,i=t.fork(),a=i.add,o=i.rem,s=i.mod,l=e.expr,u=!0;function c(t){var n=De(t),i=l(t,e),c=r.get(n);i&&c?(r.delete(n),a.push(t)):i||c?u&&i&&!c&&s.push(t):(r.set(n,1),o.push(t))}return t.visit(t.REM,(function(e){var t=De(e);r.has(t)?r.delete(t):o.push(e)})),t.visit(t.ADD,(function(t){l(t,e)?a.push(t):r.set(De(t),1)})),t.visit(t.MOD,c),e.modified()&&(u=!1,t.visit(t.REFLOW,c)),r.empty>n.cleanThreshold&&n.runAfter(r.clean),i},Ka.Definition={type:"Flatten",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0}]},(0,Se.inherits)(Ka,ei).transform=function(e,t){var n=t.fork(t.NO_SOURCE),r=e.fields,i=Xa(r,e.as||[]),a=i.length;return n.rem=this.value,t.visit(t.SOURCE,(function(e){for(var t,o,s,l=r.map((function(t){return t(e)})),u=l.reduce((function(e,t){return Math.max(e,t.length)}),0),c=0;c0){for(n=[];--s>=0;)n.push(i=Ne(l(e))),a.push(i);o.add=o.add.length?o.materialize(o.ADD).add.concat(n):n}else r=a.slice(0,-s),o.rem=o.rem.length?o.materialize(o.REM).rem.concat(r):r,a=a.slice(-s);return o.source=this.value=a,o};var oo={value:"value",median:function(e,t){return ao(e,.5,t)},mean:function(e,t){let n=0,r=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(++n,r+=t);else{let i=-1;for(let a of e)null!=(a=t(a,++i,e))&&(a=+a)>=a&&(++n,r+=a)}if(n)return r/n},min:to,max:eo},so=[];function lo(e){ei.call(this,[],e)}function uo(e){_a.call(this,e)}lo.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}]},(0,Se.inherits)(lo,ei).transform=function(e,t){var n,r,i,a,o,s,l,u,c,f,d=t.fork(t.ALL),h=function(e){var t,n=e.method||oo.value;if(null!=oo[n])return n===oo.value?(t=void 0!==e.value?e.value:0,function(){return t}):oo[n];(0,Se.error)("Unrecognized imputation method: "+n)}(e),p=function(e){var t=e.field;return function(e){return e?t(e):NaN}}(e),m=(0,Se.accessorName)(e.field),g=(0,Se.accessorName)(e.key),v=(e.groupby||[]).map(Se.accessorName),y=function(e,t,n,r){var i,a,o,s,l,u,c,f,d=function(e){return e(f)},h=[],p=r?r.slice():[],m={},g={};for(p.forEach((function(e,t){m[e]=t+1})),s=0,c=e.length;sa&&(a=r[1]);return[i,a]}function yo(e){qe.call(this,null,bo,e)}function bo(e){return this.value&&!e.modified()?this.value:e.values.reduce((function(e,t){return e.concat(t)}),[])}function _o(e){ei.call(this,null,e)}function xo(e){_a.call(this,e)}co.transform=function(e,t){var n,r=this,i=e.modified();return r.value&&(i||t.modified(r._inputs))?(n=r.value=i?r.init(e):{},t.visit(t.SOURCE,(function(e){r.add(e)}))):(n=r.value=r.value||this.init(e),t.visit(t.REM,(function(e){r.rem(e)})),t.visit(t.ADD,(function(e){r.add(e)}))),r.changes(),t.visit(t.SOURCE,(function(e){(0,Se.extend)(e,n[r.cellkey(e)].tuple)})),t.reflow(i).modifies(this._outputs)},co.changes=function(){var e,t,n=this._adds,r=this._mods;for(e=0,t=this._alen;e1&&!a&&(0,Se.error)('Multi-field lookup requires explicit "as" parameter.'),a&&a.length!==d*r&&(0,Se.error)('The "as" parameter has too few output field names.'),a=a||l.map(Se.accessorName),n=function(e){for(var t,n,i=0,c=0;it||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?i.slice(0,t):i}(n,e.limit||0,t);return{key:e.key,groupby:e.groupby,ops:o.map((function(){return i})),fields:o.map((function(e){return function(e,t,n,r){return(0,Se.accessor)((function(r){return t(r)===e?n(r):NaN}),r,e+"")}(e,n,r,a)})),as:o.map((function(e){return e+""})),modified:e.modified.bind(e)}}(e,t),t)},(0,Se.inherits)(ko,Ha).transform=function(e,t){var n=this,r=e.subflow,i=e.field;return(e.modified("field")||i&&t.modified((0,Se.accessorFields)(i)))&&(0,Se.error)("PreFacet does not support field modification."),this._targets.active=0,t.visit(t.MOD,(function(e){var a=n.subflow(De(e),r,t,e);i?i(e).forEach((function(e){a.mod(e)})):a.mod(e)})),t.visit(t.ADD,(function(e){var a=n.subflow(De(e),r,t,e);i?i(e).forEach((function(e){a.add(Ne(e))})):a.add(e)})),t.visit(t.REM,(function(e){var a=n.subflow(De(e),r,t,e);i?i(e).forEach((function(e){a.rem(e)})):a.rem(e)})),t},So.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]},(0,Se.inherits)(So,ei).transform=function(e,t){var n,r,i=e.fields,a=Xa(e.fields,e.as||[]),o=i?function(e,t){return function(e,t,n,r){for(var i=0,a=n.length;i=s&&(t=a[r],l[De(t)]&&n.rem.push(t),a[r]=e),++o}if(t.rem.length&&(t.visit(t.REM,(function(e){var t=De(e);l[t]&&(l[t]=-1,n.rem.push(e)),--o})),a=a.filter((function(e){return-1!==l[De(e)]}))),(t.rem.length||r)&&a.lengthi){for(var c=0,f=a.length-i;cn.cleanThreshold&&n.runAfter(i.clean),t.fork()},(0,Se.inherits)(No,ei).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(e.sort):t.source).map(e.field))};var Oo={row_number:function(){return{next:function(e){return e.index+1}}},rank:function(){var e;return{init:function(){e=1},next:function(t){var n=t.index,r=t.data;return n&&t.compare(r[n-1],r[n])?e=n+1:e}}},dense_rank:function(){var e;return{init:function(){e=1},next:function(t){var n=t.index,r=t.data;return n&&t.compare(r[n-1],r[n])?++e:e}}},percent_rank:function(){var e=Oo.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(){e=0},next:function(t){var n=t.index,r=t.data,i=t.compare;if(e0||(0,Se.error)("ntile num must be greater than zero.");var n=Oo.cume_dist(),r=n.next;return{init:n.init,next:function(e){return Math.ceil(t*r(e))}}},lag:function(e,t){return t=+t||1,{next:function(n){var r=n.index-t;return r>=0?e(n.data[r]):null}}},lead:function(e,t){return t=+t||1,{next:function(n){var r=n.index+t,i=n.data;return r0||(0,Se.error)("nth_value nth must be greater than zero."),{next:function(n){var r=n.i0+(t-1);return r>>1;n(e[a],t)<0?r=a+1:i=a}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=function(e){return(t,n)=>no(e(t),n)}(e)),{left:r,center:function(e,n,i,a){null==i&&(i=0),null==a&&(a=e.length);const o=r(e,n,i,a-1);return o>i&&t(e[o-1],n)>-t(e[o],n)?o-1:o},right:function(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;n(e[a],t)>0?i=a:r=a+1}return r}}}function Ro(e){ei.call(this,{},e),this._mlen=0,this._mods=[]}Po.init=function(){this.windows.forEach((function(e){e.init()})),this.cell&&this.cell.init()},Po.update=function(e,t){var n,r=this.cell,i=this.windows,a=e.data,o=i&&i.length;if(r){for(n=e.p0;n0&&!i(a[n],a[n-1])&&(e.i0=t.left(a,a[n])),rthis.x2&&(this.x2=e),t>this.y2&&(this.y2=t),this},os.expand=function(e){return this.x1-=e,this.y1-=e,this.x2+=e,this.y2+=e,this},os.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},os.translate=function(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this},os.rotate=function(e,t,n){var r=Math.cos(e),i=Math.sin(e),a=t-t*r+n*i,o=n-t*i-n*r,s=this.x1,l=this.x2,u=this.y1,c=this.y2;return this.clear().add(r*s-i*u+a,i*s+r*u+o).add(r*s-i*c+a,i*s+r*c+o).add(r*l-i*u+a,i*l+r*u+o).add(r*l-i*c+a,i*l+r*c+o)},os.union=function(e){return e.x1this.x2&&(this.x2=e.x2),e.y2>this.y2&&(this.y2=e.y2),this},os.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},os.alignsWith=function(e){return e&&(this.x1==e.x1||this.x2==e.x2||this.y1==e.y1||this.y2==e.y2)},os.intersects=function(e){return e&&!(this.x2e.x2||this.y2e.y2)},os.contains=function(e,t){return!(ethis.x2||tthis.y2)},os.width=function(){return this.x2-this.x1},os.height=function(){return this.y2-this.y1};var ss=0;function ls(e,t){var n,r=[];return n={id:"gradient_"+ss++,x1:e?e[0]:0,y1:e?e[1]:0,x2:t?t[0]:1,y2:t?t[1]:0,stops:r,stop:function(e,t){return r.push({offset:e,color:t}),n}}}function us(e){this.mark=e,this.bounds=this.bounds||new as}function cs(e){us.call(this,e),this.items=this.items||[]}function fs(e,t){if("undefined"!=typeof document&&document.createElement){const n=document.createElement("canvas");if(n&&n.getContext)return n.width=e,n.height=t,n}return null}(0,Se.inherits)(cs,us);const ds=()=>"undefined"!=typeof Image?Image:null;function hs(e){this._pending=0,this._loader=e||Qe()}var ps=hs.prototype;function ms(e){e._pending+=1}function gs(e){e._pending-=1}function vs(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function ys(e){this._context=e}function bs(){}function _s(e){this._context=e}function xs(e){this._context=e}function ws(e,t){this._basis=new ys(e),this._beta=t}ps.pending=function(){return this._pending},ps.sanitizeURL=function(e){var t=this;return ms(t),t._loader.sanitize(e,{context:"href"}).then((function(e){return gs(t),e})).catch((function(){return gs(t),null}))},ps.loadImage=function(e){var t=this,n=ds();return ms(t),t._loader.sanitize(e,{context:"image"}).then((function(e){var r=e.href;if(!r||!n)throw{url:r};var i=new n;return i.onload=function(){gs(t),i.loaded=!0},i.onerror=function(){gs(t),i.loaded=!1},i.src=r,i})).catch((function(e){return gs(t),{loaded:!1,width:0,height:0,src:e&&e.url||""}}))},ps.ready=function(){var e=this;return new Promise((function(t){!function n(r){e.pending()?setTimeout((function(){n(!0)}),10):t(r)}(!1)}))},ys.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:vs(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(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;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:vs(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},_s.prototype={areaStart:bs,areaEnd:bs,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:vs(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},xs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(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;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:vs(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},ws.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,i=e[0],a=t[0],o=e[n]-i,s=t[n]-a,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+r*o),this._beta*t[l]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const ks=function e(t){function n(e){return 1===t?new ys(e):new ws(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function Ss(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 Cs(e,t){this._context=e,this._k=(1-t)/6}Cs.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:Ss(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:Ss(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}};const Es=function e(t){function n(e){return new Cs(e,t)}return n.tension=function(t){return e(+t)},n}(0);function As(e,t){this._context=e,this._k=(1-t)/6}As.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:Ss(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}};const Ms=function e(t){function n(e){return new As(e,t)}return n.tension=function(t){return e(+t)},n}(0);function Ds(e,t){this._context=e,this._k=(1-t)/6}Ds.prototype={areaStart:bs,areaEnd:bs,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:Ss(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}};const Ts=function e(t){function n(e){return new Ds(e,t)}return n.tension=function(t){return e(+t)},n}(0);var Ns=Math.abs,Os=Math.atan2,Fs=Math.cos,Ls=Math.max,Ps=Math.min,zs=Math.sin,Rs=Math.sqrt,Is=1e-12,js=Math.PI,Bs=js/2,Us=2*js;function qs(e){return e>=1?Bs:e<=-1?-Bs:Math.asin(e)}function Ws(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>Is){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Is){var u=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);a=(a*u+e._x1*e._l23_2a-t*e._l12_2a)/c,o=(o*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function Hs(e,t){this._context=e,this._alpha=t}Hs.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,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,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:Ws(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}};const Vs=function e(t){function n(e){return t?new Hs(e,t):new Cs(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Gs(e,t){this._context=e,this._alpha=t}Gs.prototype={areaStart:bs,areaEnd:bs,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,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,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:Ws(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}};const Ys=function e(t){function n(e){return t?new Gs(e,t):new Ds(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function $s(e,t){this._context=e,this._alpha=t}$s.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,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ws(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}};const Xs=function e(t){function n(e){return t?new $s(e,t):new As(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Ks(e){this._context=e}function Qs(e){return new Ks(e)}function Zs(e){this._context=e}function Js(e){return e<0?-1:1}function el(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Js(a)+Js(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function tl(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function nl(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function rl(e){this._context=e}function il(e){this._context=new al(e)}function al(e){this._context=e}function ol(e){this._context=e}function sl(e){var t,n,r=e.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-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 ul={basis:{curve:function(e){return new ys(e)}},"basis-closed":{curve:function(e){return new _s(e)}},"basis-open":{curve:function(e){return new xs(e)}},bundle:{curve:ks,tension:"beta",value:.85},cardinal:{curve:Es,tension:"tension",value:0},"cardinal-open":{curve:Ms,tension:"tension",value:0},"cardinal-closed":{curve:Ts,tension:"tension",value:0},"catmull-rom":{curve:Vs,tension:"alpha",value:.5},"catmull-rom-closed":{curve:Ys,tension:"alpha",value:.5},"catmull-rom-open":{curve:Xs,tension:"alpha",value:.5},linear:{curve:Qs},"linear-closed":{curve:function(e){return new Zs(e)}},monotone:{horizontal:function(e){return new il(e)},vertical:function(e){return new rl(e)}},natural:{curve:function(e){return new ol(e)}},step:{curve:function(e){return new ll(e,.5)}},"step-after":{curve:function(e){return new ll(e,1)}},"step-before":{curve:function(e){return new ll(e,0)}}};function cl(e,t,n){var r=ul.hasOwnProperty(e)&&ul[e],i=null;return r&&(i=r.curve||r[t||"vertical"],r.tension&&null!=n&&(i=i[r.tension](n))),i}var fl={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},dl=[/([MLHVCSQTAZmlhvcsqtaz])/g,/###/,/(\d)([-+])/g,/\s|,|###/];function hl(e){var t,n,r,i,a,o,s,l,u,c,f,d=[];for(l=0,c=(t=e.slice().replace(dl[0],"###$1").split(dl[1]).slice(1)).length;ls)for(u=1,f=i.length;u1&&(n*=m=Math.sqrt(m),r*=m);var g=d/n,v=f/n,y=-f/r,b=d/r,_=g*s+v*l,x=y*s+b*l,w=g*e+v*t,k=y*e+b*t,S=1/((w-_)*(w-_)+(k-x)*(k-x))-.25;S<0&&(S=0);var C=Math.sqrt(S);a==i&&(C=-C);var E=.5*(_+w)-C*(k-x),A=.5*(x+k)+C*(w-_),M=Math.atan2(x-A,_-E),D=Math.atan2(k-A,w-E)-M;D<0&&1===a?D+=2*Math.PI:D>0&&0===a&&(D-=2*Math.PI);for(var T=Math.ceil(Math.abs(D/(.5*Math.PI+.001))),N=[],O=0;ODl)if(Math.abs(c*s-l*u)>Dl&&i){var d=n-a,h=r-o,p=s*s+l*l,m=d*d+h*h,g=Math.sqrt(p),v=Math.sqrt(f),y=i*Math.tan((Al-Math.acos((p+f-m)/(2*g*v)))/2),b=y/v,_=y/g;Math.abs(b-1)>Dl&&(this._+="L"+(e+b*u)+","+(t+b*c)),this._+="A"+i+","+i+",0,0,"+ +(c*d>u*h)+","+(this._x1=e+_*s)+","+(this._y1=t+_*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t)},arc:function(e,t,n,r,i,a){e=+e,t=+t,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=e+o,u=t+s,c=1^a,f=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+u:(Math.abs(this._x1-l)>Dl||Math.abs(this._y1-u)>Dl)&&(this._+="L"+l+","+u),n&&(f<0&&(f=f%Ml+Ml),f>Tl?this._+="A"+n+","+n+",0,1,"+c+","+(e-o)+","+(t-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):f>Dl&&(this._+="A"+n+","+n+",0,"+ +(f>=Al)+","+c+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const Fl=Ol;function Ll(e){return e.x}function Pl(e){return e.y}function zl(e){return e.width}function Rl(e){return e.height}function Il(e){return function(){return e}}function jl(){var e=Ll,t=Pl,n=zl,r=Rl,i=Il(0),a=null;function o(o,s,l){var u,c=null!=s?s:+e.call(this,o),f=null!=l?l:+t.call(this,o),d=+n.call(this,o),h=+r.call(this,o),p=+i.call(this,o);if(a||(a=u=Fl()),p<=0)a.rect(c,f,d,h);else{var m=c+d,g=f+h;a.moveTo(c+p,f),a.lineTo(m-p,f),a.quadraticCurveTo(m,f,m,f+p),a.lineTo(m,g-p),a.quadraticCurveTo(m,g,m-p,g),a.lineTo(c+p,g),a.quadraticCurveTo(c,g,c,g-p),a.lineTo(c,f+p),a.quadraticCurveTo(c,f,c+p,f),a.closePath()}if(u)return a=null,u+""||null}return o.x=function(t){return arguments.length?(e="function"==typeof t?t:Il(+t),o):e},o.y=function(e){return arguments.length?(t="function"==typeof e?e:Il(+e),o):t},o.width=function(e){return arguments.length?(n="function"==typeof e?e:Il(+e),o):n},o.height=function(e){return arguments.length?(r="function"==typeof e?e:Il(+e),o):r},o.cornerRadius=function(e){return arguments.length?(i="function"==typeof e?e:Il(+e),o):i},o.context=function(e){return arguments.length?(a=null==e?null:e,o):a},o}var Bl=Math.PI;function Ul(){var e,t,n,r,i,a,o,s,l=null;function u(e,t,n){var r=n/2;if(i){var u=o-t,c=e-a;if(u||c){var f=Math.sqrt(u*u+c*c),d=(u/=f)*s,h=(c/=f)*s,p=Math.atan2(c,u);l.moveTo(a-d,o-h),l.lineTo(e-u*r,t-c*r),l.arc(e,t,r,p-Bl,p),l.lineTo(a+d,o+h),l.arc(a,o,s,p,p+Bl)}else l.arc(e,t,r,0,2*Bl);l.closePath()}else i=1;a=e,o=t,s=r}function c(a){var o,s,c,f=a.length,d=!1;for(null==l&&(l=c=Fl()),o=0;o<=f;++o)!(oT*T+N*N&&(S=E,C=A),{cx:S,cy:C,x01:-c,y01:-f,x11:S*(i/x-1),y11:C*(i/x-1)}}function Xl(e){return e[0]}function Kl(e){return e[1]}function Ql(){var e=Xl,t=Kl,n=ql(!0),r=null,i=Qs,a=null;function o(o){var s,l,u,c=o.length,f=!1;for(null==r&&(a=i(u=Fl())),s=0;s<=c;++s)!(s=c;--f)s.point(g[f],v[f]);s.lineEnd(),s.areaEnd()}m&&(g[u]=+e(d,u,l),v[u]=+n(d,u,l),s.point(t?+t(d,u,l):g[u],r?+r(d,u,l):v[u]))}if(h)return s=null,h+""||null}function u(){return Ql().defined(i).curve(o).context(a)}return l.x=function(n){return arguments.length?(e="function"==typeof n?n:ql(+n),t=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:ql(+t),l):e},l.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:ql(+e),l):t},l.y=function(e){return arguments.length?(n="function"==typeof e?e:ql(+e),r=null,l):n},l.y0=function(e){return arguments.length?(n="function"==typeof e?e:ql(+e),l):n},l.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:ql(+e),l):r},l.lineX0=l.lineY0=function(){return u().x(e).y(n)},l.lineY1=function(){return u().x(e).y(r)},l.lineX1=function(){return u().x(t).y(n)},l.defined=function(e){return arguments.length?(i="function"==typeof e?e:ql(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,null!=a&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(null==e?a=s=null:s=o(a=e),l):a},l}const Jl={draw:function(e,t){var n=Math.sqrt(t/js);e.moveTo(n,0),e.arc(0,0,n,0,Us)}};Math.sqrt(1/3);Math.sin(js/10),Math.sin(7*js/10);function eu(e){return e.x||0}function tu(e){return e.y||0}function nu(e){return e.cornerRadius||0}function ru(e){return!(!1===e.defined)}Math.sin(Us/10),Math.cos(Us/10),Math.sqrt(3),Math.sqrt(3),Math.sqrt(12);var iu=function(){var e=Wl,t=Hl,n=ql(0),r=null,i=Vl,a=Gl,o=Yl,s=null;function l(){var l,u,c=+e.apply(this,arguments),f=+t.apply(this,arguments),d=i.apply(this,arguments)-Bs,h=a.apply(this,arguments)-Bs,p=Ns(h-d),m=h>d;if(s||(s=l=Fl()),fIs)if(p>Us-Is)s.moveTo(f*Fs(d),f*zs(d)),s.arc(0,0,f,d,h,!m),c>Is&&(s.moveTo(c*Fs(h),c*zs(h)),s.arc(0,0,c,h,d,m));else{var g,v,y=d,b=h,_=d,x=h,w=p,k=p,S=o.apply(this,arguments)/2,C=S>Is&&(r?+r.apply(this,arguments):Rs(c*c+f*f)),E=Ps(Ns(f-c)/2,+n.apply(this,arguments)),A=E,M=E;if(C>Is){var D=qs(C/c*zs(S)),T=qs(C/f*zs(S));(w-=2*D)>Is?(_+=D*=m?1:-1,x-=D):(w=0,_=x=(d+h)/2),(k-=2*T)>Is?(y+=T*=m?1:-1,b-=T):(k=0,y=b=(d+h)/2)}var N=f*Fs(y),O=f*zs(y),F=c*Fs(x),L=c*zs(x);if(E>Is){var P,z=f*Fs(b),R=f*zs(b),I=c*Fs(_),j=c*zs(_);if(p1?0:e<-1?js:Math.acos(e)}((B*q+U*W)/(Rs(B*B+U*U)*Rs(q*q+W*W)))/2),V=Rs(P[0]*P[0]+P[1]*P[1]);A=Ps(E,(c-V)/(H-1)),M=Ps(E,(f-V)/(H+1))}}k>Is?M>Is?(g=$l(I,j,N,O,f,M,m),v=$l(z,R,F,L,f,M,m),s.moveTo(g.cx+g.x01,g.cy+g.y01),MIs&&w>Is?A>Is?(g=$l(F,L,z,R,c,-A,m),v=$l(N,O,I,j,c,-A,m),s.lineTo(g.cx+g.x01,g.cy+g.y01),A0&&(e.globalAlpha=n,e.fillStyle=_u(e,t,t.fill),!0)}vu.beginPath=yu,vu.closePath=yu,vu.moveTo=bu,vu.lineTo=bu,vu.rect=function(e,t,n,r){bu(e,t),bu(e+n,t+r)},vu.quadraticCurveTo=function(e,t,n,r){bu(e,t),bu(n,r)},vu.bezierCurveTo=function(e,t,n,r,i,a){bu(e,t),bu(n,r),bu(i,a)},vu.arc=function(e,t,n,r,i,a){if(Math.abs(i-r)>gu)return bu(e-n,t-n),void bu(e+n,t+n);var o,s,l,u,c=1/0,f=-1/0,d=1/0,h=-1/0;function p(e){l=n*Math.cos(e),u=n*Math.sin(e),lf&&(f=l),uh&&(h=u)}if(p(r),p(i),i!==r)if((r%=pu)<0&&(r+=pu),(i%=pu)<0&&(i+=pu),ii;++s,o-=mu)p(o);else for(o=r-r%mu+mu,s=0;s<4&&o0&&(e.globalAlpha=n,e.strokeStyle=_u(e,t,t.stroke),e.lineWidth=r,e.lineCap=t.strokeCap||"butt",e.lineJoin=t.strokeJoin||"miter",e.miterLimit=t.strokeMiterLimit||10,e.setLineDash&&(e.setLineDash(t.strokeDash||wu),e.lineDashOffset=t.strokeDashOffset||0),!0)}function Su(e,t){return e.zindex-t.zindex||e.index-t.index}function Cu(e){if(!e.zdirty)return e.zitems;var t,n,r,i=e.items,a=[];for(n=0,r=i.length;n=0;)if(n=t(i[r]))return n;if(i===a)for(r=(i=e.items).length;--r>=0;)if(!i[r].zindex&&(n=t(i[r])))return n;return null}function Mu(e){return function(t,n,r){Eu(n,(function(n){r&&!r.intersects(n.bounds)||Tu(e,t,n,n)}))}}function Du(e){return function(t,n,r){!n.items.length||r&&!r.intersects(n.bounds)||Tu(e,t,n.items[0],n.items)}}function Tu(e,t,n,r){var i=null==n.opacity?1:n.opacity;0!==i&&(e(t,r)||(n.fill&&xu(t,n,i)&&t.fill(),n.stroke&&ku(t,n,i)&&t.stroke()))}var Nu=function(){return!0};function Ou(e){return e||(e=Nu),function(t,n,r,i,a,o){return r*=t.pixelRatio,i*=t.pixelRatio,Au(n,(function(n){var s=n.bounds;if((!s||s.contains(a,o))&&s)return e(t,n,r,i,a,o)?n:void 0}))}}function Fu(e,t){return function(n,r,i,a){var o,s,l=Array.isArray(r)?r[0]:r,u=null==t?l.fill:t,c=l.stroke&&n.isPointInStroke;return c&&(o=l.strokeWidth,s=l.strokeCap,n.lineWidth=null!=o?o:1,n.lineCap=null!=s?s:"butt"),!e(n,r)&&(u&&n.isPointInPath(i,a)||c&&n.isPointInStroke(i,a))}}function Lu(e){return Ou(Fu(e))}function Pu(e,t){return"translate("+e+","+t+")"}function zu(e){return Pu(e.x||0,e.y||0)}function Ru(e,t){function n(e,n){var r=n.x||0,i=n.y||0;e.translate(r,i),e.beginPath(),t(e,n),e.translate(-r,-i)}return{type:e,tag:"path",nested:!1,attr:function(e,n){e("transform",zu(n)),e("d",t(null,n))},bound:function(e,n){return t(vu(e),n),du(e,n).translate(n.x||0,n.y||0)},draw:Mu(n),pick:Lu(n)}}const Iu=Ru("arc",(function(e,t){return iu.context(e)(t)}));function ju(e,t,n){function r(e,n){e.beginPath(),t(e,n)}var i=Fu(r);return{type:e,tag:"path",nested:!0,attr:function(e,n){var r=n.mark.items;r.length&&e("d",t(null,r))},bound:function(e,n){var r=n.items;return 0===r.length?e:(t(vu(e),r),du(e,r[0]))},draw:Du(r),pick:function(e,t,n,r,a,o){var s=t.items,l=t.bounds;return!s||!s.length||l&&!l.contains(a,o)?null:(n*=e.pixelRatio,r*=e.pixelRatio,i(e,s,n,r)?s[0]:null)},tip:n}}const Bu=ju("area",(function(e,t){var n=t[0],r=n.interpolate||"linear";return("horizontal"===n.orient?ou:au).curve(cl(r,n.orient,n.tension)).context(e)(t)}),(function(e,t){for(var n,r,i="horizontal"===e[0].orient?t[1]:t[0],a="horizontal"===e[0].orient?"y":"x",o=e.length,s=1/0;--o>=0;)!1!==e[o].defined&&(r=Math.abs(e[o][a]-i))0&&(Hu(e,t),t.fill&&xu(e,t,i)&&e.fill(),t.stroke&&ku(e,t,i)&&e.stroke()),t.clip&&(e.beginPath(),e.rect(0,0,s,l),e.clip()),n&&n.translate(-a,-o),Eu(t,(function(t){r.draw(e,t,n)})),n&&n.translate(a,o),e.restore()}))},pick:function(e,t,n,r,i,a){if(t.bounds&&!t.bounds.contains(i,a)||!t.items)return null;var o=this,s=n*e.pixelRatio,l=r*e.pixelRatio;return Au(t,(function(u){var c,f,d,h;if(!(h=u.bounds)||h.contains(i,a))return f=u.x||0,d=u.y||0,e.save(),e.translate(f,d),f=i-f,d=a-d,c=Au(u,(function(e){return function(e,t,n){return(!1!==e.interactive||"group"===e.marktype)&&e.bounds&&e.bounds.contains(t,n)}(e,f,d)?o.pick(e,n,r,f,d):null})),!c&&!1!==t.interactive&&(u.fill||u.stroke)&&Vu(e,u,s,l)&&(c=u),e.restore(),c||null}))},background:function(e,t){var n=t.stroke?.5:0;e("class","background"),e("d",fu(null,t,n,n))},foreground:function(e,t,n){e("clip-path",t.clip?Wu(n,t,t):null)}};function Yu(e,t){var n=e.image;return n&&n.url===e.url||(n={loaded:!1,width:0,height:0},t.loadImage(e.url).then((function(t){e.image=t,e.image.url=e.url}))),n}function $u(e,t){return"center"===e?t/2:"right"===e?t:0}function Xu(e,t){return"middle"===e?t/2:"bottom"===e?t:0}const Ku={type:"image",tag:"image",nested:!1,attr:function(e,t,n){var r=Yu(t,n),i=t.x||0,a=t.y||0,o=(null!=t.width?t.width:r.width)||0,s=(null!=t.height?t.height:r.height)||0,l=!1===t.aspect?"none":"xMidYMid";i-=$u(t.align,o),a-=Xu(t.baseline,s),e("href",r.src||"","http://www.w3.org/1999/xlink","xlink:href"),e("transform",Pu(i,a)),e("width",o),e("height",s),e("preserveAspectRatio",l)},bound:function(e,t){var n=t.image,r=t.x||0,i=t.y||0,a=(null!=t.width?t.width:n&&n.width)||0,o=(null!=t.height?t.height:n&&n.height)||0;return r-=$u(t.align,a),i-=Xu(t.baseline,o),e.set(r,i,r+a,i+o)},draw:function(e,t,n){var r=this;Eu(t,(function(t){if(!n||n.intersects(t.bounds)){var i,a,o,s,l=Yu(t,r),u=t.x||0,c=t.y||0,f=(null!=t.width?t.width:l.width)||0,d=(null!=t.height?t.height:l.height)||0;u-=$u(t.align,f),c-=Xu(t.baseline,d),!1!==t.aspect&&(a=l.width/l.height,o=t.width/t.height,a==a&&o==o&&a!==o&&(o=0;)if(!1!==e[a].defined&&(n=e[a].x-t[0])*n+(r=e[a].y-t[1])*r0?function(e){var t,n=+e.limit,r=e.text+"";if(oc?(oc.font=vc(e),t=dc):(sc=hc(e),t=cc),t(r)>>1,t(r.slice(i))>n?s=i+1:l=i;return a+r.slice(s)}for(;s>>1),t(r.slice(0,i))=0;)if(!1!==e[i].defined&&(n=e[i].x-t[0])*n+(r=e[i].y-t[1])*r<(n=e[i].size||1)*n)return e[i];return null})),Sc={arc:Iu,area:Bu,group:Gu,image:Ku,line:Qu,path:Ju,rect:tc,rule:rc,shape:ic,symbol:ac,text:wc,trail:kc};function Cc(e,t,n){var r=Sc[e.mark.marktype],i=t||r.bound;return r.nested&&(e=e.mark),i(e.bounds||(e.bounds=new as),e,n)}var Ec={mark:null};function Ac(e,t,n){var r,i,a,o,s=Sc[e.marktype],l=s.bound,u=e.items,c=u&&u.length;if(s.nested)return c?a=u[0]:(Ec.mark=e,a=Ec),o=Cc(a,l,n),t&&t.union(o)||o;if(t=t||e.bounds&&e.bounds.clear()||new as,c)for(r=0,i=u.length;rt;)e.removeChild(n[--r]);return e}function jc(e){return"mark-"+e.marktype+(e.role?" role-"+e.role:"")+(e.name?" "+e.name:"")}function Bc(e,t){var n=t.getBoundingClientRect();return[e.clientX-n.left-(t.clientLeft||0),e.clientY-n.top-(t.clientTop||0)]}function Uc(e,t){this._active=null,this._handlers={},this._loader=e||Qe(),this._tooltip=t||qc}function qc(e,t,n,r){e.element().setAttribute("title",r||"")}Fc.toJSON=function(e){return Dc(this.root,e||0)},Fc.mark=function(e,t,n){var r=Lc(e,t=t||this.root.items[0]);return t.items[n]=r,r.zindex&&(r.group.zdirty=!0),r};var Wc=Uc.prototype;function Hc(e){this._el=null,this._bgcolor=null,this._loader=new hs(e)}Wc.initialize=function(e,t,n){return this._el=e,this._obj=n||null,this.origin(t)},Wc.element=function(){return this._el},Wc.canvas=function(){return this._el&&this._el.firstChild},Wc.origin=function(e){return arguments.length?(this._origin=e||[0,0],this):this._origin.slice()},Wc.scene=function(e){return arguments.length?(this._scene=e,this):this._scene},Wc.on=function(){},Wc.off=function(){},Wc._handlerIndex=function(e,t,n){for(var r=e?e.length:0;--r>=0;)if(e[r].type===t&&(!n||e[r].handler===n))return r;return-1},Wc.handlers=function(e){var t,n=this._handlers,r=[];if(e)r.push.apply(r,n[this.eventName(e)]);else for(t in n)r.push.apply(r,n[t]);return r},Wc.eventName=function(e){var t=e.indexOf(".");return t<0?e:e.slice(0,t)},Wc.handleHref=function(e,t,n){this._loader.sanitize(n,{context:"href"}).then((function(t){var n=new MouseEvent(e.type,e),r=Pc(null,"a");for(var i in t)r.setAttribute(i,t[i]);r.dispatchEvent(n)})).catch((function(){}))},Wc.handleTooltip=function(e,t,n){if(t&&null!=t.tooltip){t=function(e,t,n,r){var i,a,o=e&&e.mark;if(o&&(i=Sc[o.marktype]).tip){for((a=Bc(t,n))[0]-=r[0],a[1]-=r[1];e=e.mark.group;)a[0]-=e.x||0,a[1]-=e.y||0;e=i.tip(o.items,a)}return e}(t,e,this.canvas(),this._origin);var r=n&&t&&t.tooltip||null;this._tooltip.call(this._obj,this,e,t,r)}},Wc.getItemBoundingClientRect=function(e){if(t=this.canvas()){for(var t,n=t.getBoundingClientRect(),r=this._origin,i=e.bounds,a=i.x1+r[0]+n.left,o=i.y1+r[1]+n.top,s=i.width(),l=i.height();e.mark&&(e=e.mark.group);)a+=e.x||0,o+=e.y||0;return{x:a,y:o,width:s,height:l,left:a,top:o,right:a+s,bottom:o+l}}};var Vc=Hc.prototype;Vc.initialize=function(e,t,n,r,i){return this._el=e,this.resize(t,n,r,i)},Vc.element=function(){return this._el},Vc.canvas=function(){return this._el&&this._el.firstChild},Vc.background=function(e){return 0===arguments.length?this._bgcolor:(this._bgcolor=e,this)},Vc.resize=function(e,t,n,r){return this._width=e,this._height=t,this._origin=n||[0,0],this._scale=r||1,this},Vc.dirty=function(){},Vc.render=function(e){var t=this;return t._call=function(){t._render(e)},t._call(),t._call=null,t},Vc._render=function(){},Vc.renderAsync=function(e){var t=this.render(e);return this._ready?this._ready.then((function(){return t})):Promise.resolve(t)},Vc._load=function(e,t){var n=this,r=n._loader[e](t);if(!n._ready){var i=n._call;n._ready=n._loader.ready().then((function(e){e&&i(),n._ready=null}))}return r},Vc.sanitizeURL=function(e){return this._load("sanitizeURL",e)},Vc.loadImage=function(e){return this._load("loadImage",e)};var Gc="mousemove",Yc="mouseout",$c="click";function Xc(e,t){Uc.call(this,e,t),this._down=null,this._touch=null,this._first=!0}var Kc=(0,Se.inherits)(Xc,Uc);function Qc(e,t,n){return function(r){var i=this._active,a=this.pickEvent(r);a===i||(i&&i.exit||this.fire(n,r),this._active=a,this.fire(t,r)),this.fire(e,r)}}function Zc(e){return function(t){this.fire(e,t),this._active=null}}Kc.initialize=function(e,t,n){var r=this._canvas=e&&zc(e,"canvas");if(r){var i=this;this.events.forEach((function(e){r.addEventListener(e,(function(t){Kc[e]?Kc[e].call(i,t):i.fire(e,t)}))}))}return Uc.prototype.initialize.call(this,e,t,n)},Kc.canvas=function(){return this._canvas},Kc.context=function(){return this._canvas.getContext("2d")},Kc.events=["keydown","keypress","keyup","dragenter","dragleave","dragover","mousedown","mouseup","mousemove","mouseout","mouseover","click","dblclick","wheel","mousewheel","touchstart","touchmove","touchend"],Kc.DOMMouseScroll=function(e){this.fire("mousewheel",e)},Kc.mousemove=Qc("mousemove","mouseover","mouseout"),Kc.dragover=Qc("dragover","dragenter","dragleave"),Kc.mouseout=Zc("mouseout"),Kc.dragleave=Zc("dragleave"),Kc.mousedown=function(e){this._down=this._active,this.fire("mousedown",e)},Kc.click=function(e){this._down===this._active&&(this.fire("click",e),this._down=null)},Kc.touchstart=function(e){this._touch=this.pickEvent(e.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire("touchstart",e,!0)},Kc.touchmove=function(e){this.fire("touchmove",e,!0)},Kc.touchend=function(e){this.fire("touchend",e,!0),this._touch=null},Kc.fire=function(e,t,n){var r,i,a=n?this._touch:this._active,o=this._handlers[e];if(t.vegaType=e,e===$c&&a&&a.href?this.handleHref(t,a,a.href):e!==Gc&&e!==Yc||this.handleTooltip(t,a,e!==Yc),o)for(r=0,i=o.length;r=0&&r.splice(i,1),this},Kc.pickEvent=function(e){var t=Bc(e,this._canvas),n=this._origin;return this.pick(this._scene,t[0],t[1],t[0]-n[0],t[1]-n[1])},Kc.pick=function(e,t,n,r,i){var a=this.context();return Sc[e.marktype].pick.call(this,a,e,t,n,r,i)};var Jc="undefined"!=typeof window&&window.devicePixelRatio||1;function ef(e){Hc.call(this,e),this._redraw=!1,this._dirty=new as}var tf=(0,Se.inherits)(ef,Hc),nf=Hc.prototype,rf=new as;function af(e,t){Uc.call(this,e,t);var n=this;n._hrefHandler=sf(n,(function(e,t){t&&t.href&&n.handleHref(e,t,t.href)})),n._tooltipHandler=sf(n,(function(e,t){n.handleTooltip(e,t,e.type!==Yc)}))}tf.initialize=function(e,t,n,r,i){return this._canvas=fs(1,1),e&&(Ic(e,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),nf.initialize.call(this,e,t,n,r,i)},tf.resize=function(e,t,n,r){return nf.resize.call(this,e,t,n,r),function(e,t,n,r,i){var a="undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&null!=e.parentNode,o=e.getContext("2d"),s=a?Jc:i;e.width=t*s,e.height=n*s,a&&1!==s&&(e.style.width=t+"px",e.style.height=n+"px"),o.pixelRatio=s,o.setTransform(s,0,0,s,s*r[0],s*r[1])}(this._canvas,this._width,this._height,this._origin,this._scale),this._redraw=!0,this},tf.canvas=function(){return this._canvas},tf.context=function(){return this._canvas?this._canvas.getContext("2d"):null},tf.dirty=function(e){var t=function(e,t){if(null==t)return e;for(var n=rf.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)},tf._render=function(e){var t=this.context(),n=this._origin,r=this._width,i=this._height,a=this._dirty;return t.save(),this._redraw||a.empty()?(this._redraw=!1,a=null):a=function(e,t,n){return t.expand(1).round(),t.translate(-n[0]%1,-n[1]%1),e.beginPath(),e.rect(t.x1,t.y1,t.width(),t.height()),e.clip(),t}(t,a,n),this.clear(-n[0],-n[1],r,i),this.draw(t,e,a),t.restore(),this._dirty.clear(),this},tf.draw=function(e,t,n){var r=Sc[t.marktype];t.clip&&function(e,t){var n=t.clip;if(e.save(),e.beginPath(),(0,Se.isFunction)(n))n(e);else{var r=t.group;e.rect(0,0,r.width||0,r.height||0)}e.clip()}(e,t),r.draw.call(this,e,t,n),t.clip&&e.restore()},tf.clear=function(e,t,n,r){var i=this.context();i.clearRect(e,t,n,r),null!=this._bgcolor&&(i.fillStyle=this._bgcolor,i.fillRect(e,t,n,r))};var of=(0,Se.inherits)(af,Uc);function sf(e,t){return function(n){var r=n.target.__data__;n.vegaType=n.type,r=Array.isArray(r)?r[0]:r,t.call(e._obj,n,r)}}function lf(e,t,n){var r,i,a="<"+e;if(t)for(r in t)null!=(i=t[r])&&(a+=" "+r+'="'+i+'"');return n&&(a+=" "+n),a+">"}function uf(e){return""}of.initialize=function(e,t,n){var r=this._svg;return r&&(r.removeEventListener($c,this._hrefHandler),r.removeEventListener(Gc,this._tooltipHandler),r.removeEventListener(Yc,this._tooltipHandler)),this._svg=r=e&&zc(e,"svg"),r&&(r.addEventListener($c,this._hrefHandler),r.addEventListener(Gc,this._tooltipHandler),r.addEventListener(Yc,this._tooltipHandler)),Uc.prototype.initialize.call(this,e,t,n)},of.canvas=function(){return this._svg},of.on=function(e,t){var n=this.eventName(e),r=this._handlers;if(this._handlerIndex(r[n],e,t)<0){var i={type:e,handler:t,listener:sf(this,t)};(r[n]||(r[n]=[])).push(i),this._svg&&this._svg.addEventListener(n,i.listener)}return this},of.off=function(e,t){var n=this.eventName(e),r=this._handlers[n],i=this._handlerIndex(r,e,t);return i>=0&&(this._svg&&this._svg.removeEventListener(n,r[i].listener),r.splice(i,1)),this};const cf={version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"};var ff={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"},df=Object.keys(ff),hf=cf.xmlns;function pf(e){Hc.call(this,e),this._dirtyID=1,this._dirty=[],this._svg=null,this._root=null,this._defs=null}var mf=(0,Se.inherits)(pf,Hc),gf=Hc.prototype;function vf(e,t,n){var r,i,a;for((e=Rc(e,n,"linearGradient",hf)).setAttribute("id",t.id),e.setAttribute("x1",t.x1),e.setAttribute("x2",t.x2),e.setAttribute("y1",t.y1),e.setAttribute("y2",t.y2),r=0,i=t.stops.length;r1}(e)&&o.previousSibling!==n)&&t.insertBefore(o,n?n.nextSibling:t.firstChild),o}mf.initialize=function(e,t,n,r){return e&&(this._svg=Rc(e,0,"svg",hf),this._svg.setAttribute("class","marks"),Ic(e,1),this._root=Rc(this._svg,0,"g",hf),Ic(this._svg,1)),this._defs={gradient:{},clipping:{}},this.background(this._bgcolor),gf.initialize.call(this,e,t,n,r)},mf.background=function(e){return arguments.length&&this._svg&&this._svg.style.setProperty("background-color",e),gf.background.apply(this,arguments)},mf.resize=function(e,t,n,r){return gf.resize.call(this,e,t,n,r),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},mf.canvas=function(){return this._svg},mf.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 cf)e[t]=cf[t];var n=this._bgcolor?lf("rect",{width:this._width,height:this._height,style:"fill: "+this._bgcolor+";"})+uf("rect"):"";return lf("svg",e)+n+this._svg.innerHTML+uf("svg")},mf._render=function(e){return this._dirtyCheck()&&(this._dirtyAll&&this._resetDefs(),this.draw(this._root,e),Ic(this._root,1)),this.updateDefs(),this._dirty=[],++this._dirtyID,this},mf.updateDefs=function(){var e,t=this._svg,n=this._defs,r=n.el,i=0;for(e in n.gradient)r||(n.el=r=Rc(t,0,"defs",hf)),vf(r,n.gradient[e],i++);for(e in n.clipping)r||(n.el=r=Rc(t,0,"defs",hf)),yf(r,n.clipping[e],i++);r&&(0===i?(t.removeChild(r),n.el=null):Ic(r,i))},mf._resetDefs=function(){var e=this._defs;e.gradient={},e.clipping={}},mf.dirty=function(e){e.dirty!==this._dirtyID&&(e.dirty=this._dirtyID,this._dirty.push(e))},mf.isDirty=function(e){return this._dirtyAll||!e._svg||e.dirty===this._dirtyID},mf._dirtyCheck=function(){this._dirtyAll=!0;var e=this._dirty;if(!e.length)return!0;var t,n,r,i,a,o,s,l=++this._dirtyID;for(a=0,o=e.length;a0?lf("defs")+a+uf("defs"):""},Mf.attributes=function(e,t){return Af={},e(Tf,t,this),Af},Mf.href=function(e){var t,n=this,r=e.href;if(r){if(t=n._hrefs&&n._hrefs[r])return t;n.sanitizeURL(r).then((function(e){e["xlink:href"]=e.href,e.href=null,(n._hrefs||(n._hrefs={}))[r]=e}))}return null},Mf.mark=function(e){var t,n=this,r=Sc[e.marktype],i=r.tag,a=this._defs,o="";function s(s){var l=n.href(s);l&&(o+=lf("a",l)),t="g"!==i?Nf(s,e,i,a):null,o+=lf(i,n.attributes(r.attr,s),t),"text"===i?o+=mc(s).replace(/&/g,"&").replace(//g,">"):"g"===i&&(o+=lf("path",n.attributes(r.background,s),Nf(s,e,"bgrect",a))+uf("path"),o+=lf("g",n.attributes(r.foreground,s))+n.markGroup(s)+uf("g")),o+=uf(i),l&&(o+=uf("a"))}return"g"!==i&&!1===e.interactive&&(t='style="pointer-events: none;"'),o+=lf("g",{class:jc(e),"clip-path":e.clip?Wu(n,e,e.group):null},t),r.nested?e.items&&e.items.length&&s(e.items[0]):Eu(e,s),o+uf("g")},Mf.markGroup=function(e){var t=this,n="";return Eu(e,(function(e){n+=t.mark(e)})),n};var Of="canvas",Ff="none",Lf={Canvas:Of,PNG:"png",SVG:"svg",None:Ff},Pf={};function zf(e,t){return e=String(e||"").toLowerCase(),arguments.length>1?(Pf[e]=t,this):Pf[e]}Pf[Of]=Pf.png={renderer:ef,headless:ef,handler:Xc},Pf.svg={renderer:pf,headless:Ef,handler:af},Pf[Ff]={};var Rf=new as;function If(e){var t=e.clip;if((0,Se.isFunction)(t))t(vu(Rf.clear()));else{if(!t)return;Rf.set(0,0,e.group.width,e.group.height)}e.bounds.intersect(Rf)}var jf=1e-9;function Bf(e,t,n){return e===t||("path"===n?Uf(e,t):e instanceof Date&&t instanceof Date?+e==+t:(0,Se.isNumber)(e)&&(0,Se.isNumber)(t)?Math.abs(e-t)<=jf:e&&t&&((0,Se.isObject)(e)||(0,Se.isObject)(t))?null!=e&&null!=t&&function(e,t){var n,r,i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(i.sort(),a.sort(),r=i.length-1;r>=0;r--)if(i[r]!=a[r])return!1;for(r=i.length-1;r>=0;r--)if(!Bf(e[n=i[r]],t[n],n))return!1;return typeof e==typeof t}(e,t):e==t)}function Uf(e,t){return Bf(hl(e),hl(t))}function qf(e){ei.call(this,null,e)}function Wf(e,t,n){return t(e.bounds.clear(),e,n)}(0,Se.inherits)(qf,ei).transform=function(e,t){var n,r=t.dataflow,i=e.mark,a=i.marktype,o=Sc[a],s=o.bound,l=i.bounds;return o.nested?(i.items.length&&r.dirty(i.items[0]),l=Wf(i,s),i.items.forEach((function(e){e.bounds.clear().union(l)}))):a===Go||e.modified()?(t.visit(t.MOD,(function(e){r.dirty(e)})),l.clear(),i.items.forEach((function(e){l.union(Wf(e,s))})),i.role===$o&&t.reflow()):(n=t.changed(t.REM),t.visit(t.ADD,(function(e){l.union(Wf(e,s))})),t.visit(t.MOD,(function(e){n=n||l.alignsWith(e.bounds),r.dirty(e),l.union(Wf(e,s))})),n&&(l.clear(),i.items.forEach((function(e){l.union(e.bounds)})))),If(i),t.modifies("bounds")};var Hf=":vega_identifier:";function Vf(e){ei.call(this,0,e)}function Gf(e){ei.call(this,null,e)}function Yf(e){ei.call(this,null,e)}Vf.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]},(0,Se.inherits)(Vf,ei).transform=function(e,t){var n=function(e){var t=e._signals[Hf];return t||(e._signals[Hf]=t=e.add(0)),t}(t.dataflow),r=n.value,i=e.as;return t.visit(t.ADD,(function(e){e[i]||(e[i]=++r)})),n.set(this.value=r),t},(0,Se.inherits)(Gf,ei).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,n.clip=e.clip,n.interactive=e.interactive,this.value=n);var r=n.marktype===Go?cs:us;return t.visit(t.ADD,(function(e){r.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 $f=(0,Se.inherits)(Yf,ei),Xf={parity:function(e){return e.filter((function(e,t){return t%2?e.opacity=0:1}))},greedy:function(e){var t;return e.filter((function(e,n){return n&&Kf(t.bounds,e.bounds)?e.opacity=0:(t=e,1)}))}};function Kf(e,t){return!(e.x2-1t.x2||e.y2-1t.y2)}function Qf(e){for(var t,n=1,r=e.length,i=e[0].bounds;n1&&t.height()>1}function Jf(e){return e.forEach((function(e){e.opacity=1})),e}function ed(e,t){return e.reflow(t.modified()).modifies("opacity")}function td(e){ei.call(this,null,e)}function nd(e,t){for(var n=0,r=e.length;ni&&(e.warn("Grid headers exceed limit: "+i),t=t.slice(0,i)),S+=a,m=0,v=t.length;m=0&&null==(_=n[g]);g-=d);s?(x=null==h?_.x:Math.round(_.bounds.x1+h*_.bounds.width()),w=S):(x=S,w=null==h?_.y:Math.round(_.bounds.y1+h*_.bounds.height())),y.union(b.bounds.translate(x-(b.x||0),w-(b.y||0))),b.x=x,b.y=w,e.dirty(b),C=o(C,y[u])}return C}function cd(e,t,n,r,i,a){if(t){e.dirty(t);var o=n,s=n;r?o=Math.round(i.x1+a*i.width()):s=Math.round(i.y1+a*i.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)}}$f.transform=function(e,t){var n,r,i=Xf[e.method]||Xf.parity,a=t.materialize(t.SOURCE).source;if(a){if(!e.method)return e.modified("method")&&(Jf(a),t=ed(t,e)),t;if(e.sort&&(a=a.slice().sort(e.sort)),"greedy"===e.method&&(a=a.filter(Zf)),n=Jf(a),t=ed(t,e),n.length>=3&&Qf(n)){do{n=i(n)}while(n.length>=3&&Qf(n));n.length<3&&!(0,Se.peek)(a).opacity&&(n.length>1&&((0,Se.peek)(n).opacity=0),(0,Se.peek)(a).opacity=1)}return e.boundScale&&e.boundTolerance>=0&&(r=function(e,t,n){var r=e.range(),i=new as;return t===qo||t===Vo?i.set(r[0],-1/0,r[1],1/0):i.set(-1/0,r[0],1/0,r[1]),i.expand(n||1),function(e){return i.encloses(e.bounds)}}(e.boundScale,e.boundOrient,+e.boundTolerance),a.forEach((function(e){r(e)||(e.opacity=0)}))),t}},(0,Se.inherits)(td,ei).transform=function(e,t){var n=t.dataflow;if(t.visit(t.ALL,(function(e){n.dirty(e)})),t.fields&&t.fields.zindex){var r=t.source&&t.source[0];r&&(r.mark.zdirty=!0)}};var fd=new as;function dd(e){ei.call(this,null,e)}function hd(e,t,n){return e[t]===n?0:(e[t]=n,1)}function pd(e){var t=e.items[0].datum.orient;return t===Wo||t===Ho}function md(e,t,n,r){var i,a,o=t.items[0],s=o.datum,l=s.orient,u=function(e){var t=+e.grid;return[e.ticks?t++:-1,e.labels?t++:-1,t+ +e.domain]}(s),c=o.range,f=o.offset,d=o.position,h=o.minExtent,p=o.maxExtent,m=s.title&&o.items[u[2]].items[0],g=o.titlePadding,v=o.bounds,y=0,b=0;switch(fd.clear().union(v),v.clear(),(i=u[0])>-1&&v.union(o.items[i].bounds),(i=u[1])>-1&&v.union(o.items[i].bounds),l){case qo:y=d||0,b=-f,a=Math.max(h,Math.min(p,-v.y1)),m&&(a=gd(m,a,g,0,-1,v)),v.add(0,-a).add(c,0);break;case Wo:y=-f,b=d||0,a=Math.max(h,Math.min(p,-v.x1)),m&&(a=gd(m,a,g,1,-1,v)),v.add(-a,0).add(0,c);break;case Ho:y=n+f,b=d||0,a=Math.max(h,Math.min(p,v.x2)),m&&(a=gd(m,a,g,1,1,v)),v.add(0,0).add(a,c);break;case Vo:y=d||0,b=r+f,a=Math.max(h,Math.min(p,v.y2)),m&&(a=gd(m,a,g,0,1,v)),v.add(0,0).add(c,a);break;default:y=o.x,b=o.y}return du(v.translate(y,b),o),hd(o,"x",y+.5)|hd(o,"y",b+.5)&&(o.bounds=fd,e.dirty(o),o.bounds=v,e.dirty(o)),o.mark.bounds.clear().union(v)}function gd(e,t,n,r,i,a){var o=e.bounds,s=0,l=0;return e.auto?(t+=n,r?s=(e.x||0)-(e.x=i*t):l=(e.y||0)-(e.y=i*t),o.translate(-s,-l),e.mark.bounds.set(o.x1,o.y1,o.x2,o.y2),r?(a.add(0,o.y1).add(0,o.y2),t+=o.width()):(a.add(o.x1,0).add(o.x2,0),t+=o.height())):a.union(o),t}function vd(e,t){return t.reduce((function(t,n){var r=n.items[0];if(function(e,t,n){var r=t.padding-n.x,i=t.padding-n.y;if(t.datum.title){var a=t.items[1].items[0];i+=t.titlePadding+a.fontSize}(r||i)&&(n.x+=r,n.y+=i,n.bounds.translate(r,i),n.mark.bounds.translate(r,i),e.dirty(n))}(e,r,r.items[0].items[0]),r.datum.orient===Wo){var i=fd.clear();r.items.forEach((function(e){i.union(e.bounds)})),t=Math.max(t,Math.ceil(i.width()+2*r.padding-1))}return t}),0)}function yd(e,t,n,r,i,a,o){var s,l,u,c,f,d=t.items[0],h=d.datum,p=h.orient,m=d.offset,g=d.bounds,v=0,y=0;switch(p===qo||p===Vo?(u=i,v=n[p]):p!==Wo&&p!==Ho||(u=r,y=n[p]),fd.clear().union(g),g.clear(),d.items.forEach((function(e){g.union(e.bounds)})),s=2*d.padding-1,l=2*d.padding-1,g.empty()||(s=Math.ceil(g.width()+s),l=Math.ceil(g.height()+l)),"symbol"===h.type&&(c=d.items[0].items[0].items[0].items,f=c.reduce((function(e,t){return e[t.column]=Math.max(t.bounds.x2-t.x,e[t.column]||0),e}),{}),c.forEach((function(e){e.width=f[e.column],e.height=e.bounds.y2-e.y}))),p){case Wo:v-=n.leftWidth+m-Math.floor(u.x1),n.left+=l+n.margin;break;case Ho:v+=m+Math.ceil(u.x2),n.right+=l+n.margin;break;case qo:y-=l+m-Math.floor(u.y1),n.top+=s+n.margin;break;case Vo:y+=m+Math.ceil(u.y2),n.bottom+=s+n.margin;break;case"top-left":v+=m,y+=m;break;case"top-right":v+=a-s-m,y+=m;break;case"bottom-left":v+=m,y+=o-l-m;break;case"bottom-right":v+=a-s-m,y+=o-l-m;break;default:v=d.x,y=d.y}return du(g.set(v,y,v+s,y+l),d),hd(d,"x",v)|hd(d,"width",s)|hd(d,"y",y)|hd(d,"height",l)&&(d.bounds=fd,e.dirty(d),d.bounds=g,e.dirty(d)),d.mark.bounds.clear().union(g)}(0,Se.inherits)(dd,ei).transform=function(e,t){var n=t.dataflow;return e.mark.items.forEach((function(t){e.layout&&function(e,t,n){var r,i,a,o,s,l,u,c,f,d,h,p,m=function(e){for(var t,n,r=e.items,i=r.length,a=0,o={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};a1&&_)for(i=0;i0&&(l.x+=u=f/2,l.bounds.translate(u,0));if(sd(n.center,is)&&1!==C&&x)for(i=0;i0&&(l.y+=c=d/2,l.bounds.translate(0,c));for(i=0;i0?r:1:0}const Nd=zo(no),Od=Nd.right,Fd=Nd.left,Ld=(zo((function(e){return null===e?NaN:+e})).center,Od);function Pd(e,t){return et?1:e>=t?0:NaN}function zd(e){var t;return 1===e.length&&(t=e,e=function(e,n){return Pd(t(e),n)}),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;e(t[a],n)<0?r=a+1:i=a}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;e(t[a],n)>0?i=a:r=a+1}return r}}}var Rd=zd(Pd),Id=Rd.right;Rd.left;const jd=Id;var Bd=Array.prototype,Ud=(Bd.slice,Bd.map,Math.sqrt(50)),qd=Math.sqrt(10),Wd=Math.sqrt(2);function Hd(e,t,n){var r,i,a,o,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t0)for(e=Math.ceil(e/o),t=Math.floor(t/o),a=new Array(i=Math.ceil(t-e+1));++s=0?(a>=Ud?10:a>=qd?5:a>=Wd?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=Ud?10:a>=qd?5:a>=Wd?2:1)}function Gd(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=Ud?i*=10:a>=qd?i*=5:a>=Wd&&(i*=2),t=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}var Xd="$";function Kd(){}function Qd(e,t){var n=new Kd;if(e instanceof Kd)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,i=-1,a=e.length;if(null==t)for(;++i=r.length)return null!=e&&n.sort(e),null!=t?t(n):n;for(var l,u,c,f=-1,d=n.length,h=r[i++],p=Zd(),m=o();++fr.length)return e;var a,s=i[n-1];return null!=t&&n>=r.length?a=e.entries():(a=[],e.each((function(e,t){a.push({key:t,values:o(e,n)})}))),null!=s?a.sort((function(e,t){return s(e.key,t.key)})):a}return n={object:function(e){return a(e,0,eh,th)},map:function(e){return a(e,0,nh,rh)},entries:function(e){return o(a(e,0,nh,rh),0)},key:function(e){return r.push(e),n},sortKeys:function(e){return i[r.length-1]=e,n},sortValues:function(t){return e=t,n},rollup:function(e){return t=e,n}}}function eh(){return{}}function th(e,t,n){e[t]=n}function nh(){return Zd()}function rh(e,t,n){e.set(t,n)}function ih(){}var ah=Zd.prototype;ih.prototype=function(e,t){var n=new ih;if(e instanceof ih)e.each((function(e){n.add(e)}));else if(e){var r=-1,i=e.length;if(null==t)for(;++r>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Oh(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Oh(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=xh.exec(e))?new Ph(t[1],t[2],t[3],1):(t=wh.exec(e))?new Ph(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=kh.exec(e))?Oh(t[1],t[2],t[3],t[4]):(t=Sh.exec(e))?Oh(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ch.exec(e))?jh(t[1],t[2]/100,t[3]/100,1):(t=Eh.exec(e))?jh(t[1],t[2]/100,t[3]/100,t[4]):Ah.hasOwnProperty(e)?Nh(Ah[e]):"transparent"===e?new Ph(NaN,NaN,NaN,0):null}function Nh(e){return new Ph(e>>16&255,e>>8&255,255&e,1)}function Oh(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ph(e,t,n,r)}function Fh(e){return e instanceof ph||(e=Th(e)),e?new Ph((e=e.rgb()).r,e.g,e.b,e.opacity):new Ph}function Lh(e,t,n,r){return 1===arguments.length?Fh(e):new Ph(e,t,n,null==r?1:r)}function Ph(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function zh(){return"#"+Ih(this.r)+Ih(this.g)+Ih(this.b)}function Rh(){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 Ih(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function jh(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new qh(e,t,n,r)}function Bh(e){if(e instanceof qh)return new qh(e.h,e.s,e.l,e.opacity);if(e instanceof ph||(e=Th(e)),!e)return new qh;if(e instanceof qh)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(o=t===a?(n-r)/s+6*(n0&&l<1?0:o,new qh(o,s,l,e.opacity)}function Uh(e,t,n,r){return 1===arguments.length?Bh(e):new qh(e,t,n,null==r?1:r)}function qh(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Wh(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 Hh(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}function Vh(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=r180||n<-180?n-360*Math.round(n/360):n):Yh(isNaN(e)?t:e)}function Kh(e,t){var n=t-e;return n?$h(e,n):Yh(isNaN(e)?t:e)}dh(ph,Th,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Mh,formatHex:Mh,formatHsl:function(){return Bh(this).formatHsl()},formatRgb:Dh,toString:Dh}),dh(Ph,Lh,hh(ph,{brighter:function(e){return e=null==e?gh:Math.pow(gh,e),new Ph(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?mh:Math.pow(mh,e),new Ph(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:zh,formatHex:zh,formatRgb:Rh,toString:Rh})),dh(qh,Uh,hh(ph,{brighter:function(e){return e=null==e?gh:Math.pow(gh,e),new qh(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?mh:Math.pow(mh,e),new qh(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,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ph(Wh(e>=240?e-240:e+120,i,r),Wh(e,i,r),Wh(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},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+")")}}));const Qh=function e(t){var n=function(e){return 1==(e=+e)?Kh: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(r){return Math.pow(e+r*t,n)}}(t,n,e):Yh(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Lh(e)).r,(t=Lh(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=Kh(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+""}}return r.gamma=e,r}(1);function Zh(e){return function(t){var n,r,i=t.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;na&&(i=t.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,l.push({i:o,x:op(n,r)})),a=up.lastIndex;return ar&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function yp(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i2?bp:yp,i=a=null,f}function f(t){return isNaN(t=+t)?n:(i||(i=r(o.map(e),s,l)))(e(u(t)))}return f.invert=function(n){return u(t((a||(a=r(s,o.map(e),op)))(n)))},f.domain=function(e){return arguments.length?(o=sh.call(e,hp),u===mp||(u=vp(o)),c()):o.slice()},f.range=function(e){return arguments.length?(s=lh.call(e),c()):s.slice()},f.rangeRound=function(e){return s=lh.call(e),l=dp,c()},f.clamp=function(e){return arguments.length?(u=e?vp(o):mp,f):u!==mp},f.interpolate=function(e){return arguments.length?(l=e,c()):l},f.unknown=function(e){return arguments.length?(n=e,f):n},function(n,r){return e=n,t=r,c()}}function wp(e,t){return xp()(e,t)}var kp,Sp=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Cp(e){if(!(t=Sp.exec(e)))throw new Error("invalid format: "+e);var t;return new Ep({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 Ep(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function Ap(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Mp(e){return(e=Ap(Math.abs(e)))?e[1]:NaN}function Dp(e,t){var n=Ap(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Cp.prototype=Ep.prototype,Ep.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};const Tp={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Dp(100*e,t)},r:Dp,s:function(e,t){var n=Ap(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(kp=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Ap(e,Math.max(0,t+a-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function Np(e){return e}var Op,Fp,Lp,Pp=Array.prototype.map,zp=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Rp(e){return Op=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?Np:(t=Pp.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,a=[],o=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[o=(o+1)%t.length];return a.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",a=void 0===e.currency?"":e.currency[1]+"",o=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?Np:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Pp.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",u=void 0===e.minus?"-":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function f(e){var t=(e=Cp(e)).fill,n=e.align,f=e.sign,d=e.symbol,h=e.zero,p=e.width,m=e.comma,g=e.precision,v=e.trim,y=e.type;"n"===y?(m=!0,y="g"):Tp[y]||(void 0===g&&(g=12),v=!0,y="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var b="$"===d?i:"#"===d&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",_="$"===d?a:/[%p]/.test(y)?l:"",x=Tp[y],w=/[defgprs%]/.test(y);function k(e){var i,a,l,d=b,k=_;if("c"===y)k=x(e)+k,e="";else{var S=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:x(Math.abs(e),g),v&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),S&&0==+e&&"+"!==f&&(S=!1),d=(S?"("===f?f:u:"-"===f||"("===f?"":f)+d,k=("s"===y?zp[8+kp/3]:"")+k+(S&&"("===f?")":""),w)for(i=-1,a=e.length;++i(l=e.charCodeAt(i))||l>57){k=(46===l?o+e.slice(i+1):e.slice(i))+k,e=e.slice(0,i);break}}m&&!h&&(e=r(e,1/0));var C=d.length+e.length+k.length,E=C>1)+d+e+k+E.slice(C);break;default:e=E+d+e+k}return s(e)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return e+""},k}return{format:f,formatPrefix:function(e,t){var n=f(((e=Cp(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Mp(t)/3))),i=Math.pow(10,-r),a=zp[8+r/3];return function(e){return n(i*e)+a}}}}(e),Fp=Op.format,Lp=Op.formatPrefix,Op}function Ip(e){var t=e.domain;return e.ticks=function(e){var n=t();return Hd(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return function(e,t,n,r){var i,a=Gd(e,t,n);switch((r=Cp(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Mp(t)/3)))-Mp(Math.abs(e)))}(a,o))||(r.precision=i),Lp(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Mp(t)-Mp(e))+1}(a,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-Mp(Math.abs(e)))}(a))||(r.precision=i-2*("%"===r.type))}return Fp(r)}(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i=t(),a=0,o=i.length-1,s=i[a],l=i[o];return l0?r=Vd(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=Vd(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(l/r)*r,t(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(l*r)/r,t(i)),e},e}function jp(){var e=wp(mp,mp);return e.copy=function(){return _p(e,jp())},uh.apply(e,arguments),Ip(e)}function Bp(e,t){var n,r=0,i=(e=e.slice()).length-1,a=e[r],o=e[i];return o0?e>1?Tt((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):am:null};const om=am;am.range;var sm=31536e6;function lm(e){return new Date(e)}function um(e){return e instanceof Date?+e:+new Date(+e)}function cm(e,t,n,r,i,a,o,s,l){var u=wp(mp,mp),c=u.invert,f=u.domain,d=l(".%L"),h=l(":%S"),p=l("%I:%M"),m=l("%I %p"),g=l("%a %d"),v=l("%b %d"),y=l("%B"),b=l("%Y"),_=[[o,1,1e3],[o,5,5e3],[o,15,15e3],[o,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[t,1,2592e6],[t,3,7776e6],[e,1,sm]];function x(s){return(o(s)a[1-c])))return n=Math.max(0,Od(f,l)-1),o=l===u?n:Od(f,u)-1,l-f[n]>t+1e-10&&++n,c&&(s=n,n=d-o,o=d-s),n>o?void 0:r().slice(n,o+1)}},n.invert=function(e){var t=n.invertRange([e,e]);return t?t[0]:t},n.copy=function(){return vm().domain(r()).range(a).round(o).paddingInner(s).paddingOuter(l).align(u)},c()}function ym(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return ym(t())},e}mm.range;var bm=Array.prototype.map,_m=Array.prototype.slice;function xm(e){return bm.call(e,(function(e){return+e}))}function wm(e,t){return arguments.length>1?(km[e]=function(e,t){return function(){var n=t();return n.invertRange||(n.invertRange=n.invert?function(e){return function(t){var n,r=t[0],i=t[1];return i=s&&o[i]<=l&&(u<0&&(u=i),n=i);if(!(u<0))return s=e.invertExtent(o[u]),l=e.invertExtent(o[n]),[void 0===s[0]?s[1]:s[0],void 0===l[1]?l[0]:l[1]]}}(n):void 0),n.type=e,n}}(e,t),this):km.hasOwnProperty(e)?km[e]:void 0}var km={identity:function e(t){var n;function r(e){return isNaN(e=+e)?n:e}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=sh.call(e,hp),r):t.slice()},r.unknown=function(e){return arguments.length?(n=e,r):n},r.copy=function(){return e(t).unknown(n)},t=arguments.length?sh.call(t,hp):[0,1],Ip(r)},linear:jp,log:function e(){var t=function(e){var t,n,r=e(Up,qp),i=r.domain,a=10;function o(){return t=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),function(t){return Math.log(t)/e})}(a),n=function(e){return 10===e?Vp:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}(a),i()[0]<0?(t=Gp(t),n=Gp(n),e(Wp,Hp)):e(Up,qp),r}return r.base=function(e){return arguments.length?(a=+e,o()):a},r.domain=function(e){return arguments.length?(i(e),o()):i()},r.ticks=function(e){var r,o=i(),s=o[0],l=o[o.length-1];(r=l0){for(;dl)break;m.push(f)}}else for(;d=1;--c)if(!((f=u*c)l)break;m.push(f)}}else m=Hd(d,h,Math.min(h-d,p)).map(n);return r?m.reverse():m},r.tickFormat=function(e,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=Fp(i)),e===1/0)return i;null==e&&(e=10);var o=Math.max(1,a*e/r.ticks().length);return function(e){var r=e/n(Math.round(t(e)));return r*a0?i[t-1]:n[0],t=i?[a[i-1],r]:[a[t-1],a[t]]},s.unknown=function(e){return arguments.length?(t=e,s):s},s.thresholds=function(){return a.slice()},s.copy=function(){return e().domain([n,r]).range(o).unknown(t)},uh.apply(Ip(s),arguments)},threshold:function e(){var t,n=[.5],r=[0,1],i=1;function a(e){return e<=e?r[jd(n,e,0,i)]:t}return a.domain=function(e){return arguments.length?(n=lh.call(e),i=Math.min(n.length,r.length-1),a):n.slice()},a.range=function(e){return arguments.length?(r=lh.call(e),i=Math.min(n.length,r.length-1),a):r.slice()},a.invertExtent=function(e){var t=r.indexOf(e);return[n[t-1],n[t]]},a.unknown=function(e){return arguments.length?(t=e,a):t},a.copy=function(){return e().domain(n).range(r).unknown(t)},uh.apply(a,arguments)},time:function(){return uh.apply(cm(rn,Zp,Yt,tn,em,nm,im,om,fn).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},utc:function(){return uh.apply(cm(on,dm,Rt,Vt,pm,gm,im,om,hn).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},band:vm,point:function(){return ym(vm().paddingInner(1))},sequential:function e(t){var n=jp(),r=0,i=1,a=!1;function o(){var e=n.domain();r=e[0],i=(0,Se.peek)(e)-r}function s(e){var n=(e-r)/i;return t(a?Math.max(0,Math.min(1,n)):n)}return s.clamp=function(e){return arguments.length?(a=!!e,s):a},s.domain=function(e){return arguments.length?(n.domain(e),o(),s):n.domain()},s.interpolator=function(e){return arguments.length?(t=e,s):t},s.copy=function(){return e().domain(n.domain()).clamp(a).interpolator(t)},s.ticks=function(e){return n.ticks(e)},s.tickFormat=function(e,t){return n.tickFormat(e,t)},s.nice=function(e){return n.nice(e),o(),s},s},"bin-linear":function e(){var t=jp(),n=[];function r(e){return t(e)}return r.domain=function(e){return arguments.length?(function(e){n=xm(e),t.domain([n[0],(0,Se.peek)(n)])}(e),r):n.slice()},r.range=function(e){return arguments.length?(t.range(e),r):t.range()},r.rangeRound=function(e){return arguments.length?(t.rangeRound(e),r):t.rangeRound()},r.interpolate=function(e){return arguments.length?(t.interpolate(e),r):t.interpolate()},r.invert=function(e){return t.invert(e)},r.ticks=function(e){var t=n.length,i=~~(t/(e||t));return i<2?r.domain():n.filter((function(e,t){return!(t%i)}))},r.tickFormat=function(){return t.tickFormat.apply(t,arguments)},r.copy=function(){return e().domain(r.domain()).range(r.range())},r},"bin-ordinal":function e(){var t=[],n=[];function r(e){return null==e||e!=e?void 0:n[(Ld(t,e)-1)%n.length]}return r.domain=function(e){return arguments.length?(t=xm(e),r):t.slice()},r.range=function(e){return arguments.length?(n=_m.call(e),r):n.slice()},r.tickFormat=function(){var e=jp().domain([t[0],(0,Se.peek)(t)]);return e.tickFormat.apply(e,arguments)},r.copy=function(){return e().domain(r.domain()).range(r.range())},r}};for(var Sm in km)wm(Sm,km[Sm]);function Cm(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function Em(e,t){var n=Xh(+e,+t);return function(e){var t=n(e);return t-360*Math.floor(t/360)}}var Am,Mm,Dm,Tm,Nm=180/Math.PI,Om={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Fm(e,t,n,r,i,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:op(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(a.rotate,o.rotate,s,l),function(e,t,n,a){e!==t?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:op(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(a.skewX,o.skewX,s,l),function(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:op(e,n)},{i:s-2,x:op(t,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(e){for(var t,n=-1,r=l.length;++neg?Math.pow(e,1/3):e/Jm+Qm}function ag(e){return e>Zm?e*e*e:Jm*(e-Qm)}function og(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function sg(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function lg(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof ug)return new ug(e.h,e.c,e.l,e.opacity);if(e instanceof rg||(e=tg(e)),0===e.a&&0===e.b)return new ug(NaN,01)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return iv.h=360*e-100,iv.s=1.5-1.5*t,iv.l=.8-.9*t,iv+""}var ov=Lh(),sv=Math.PI/3,lv=2*Math.PI/3;function uv(e){var t;return e=(.5-e)*Math.PI,ov.r=255*(t=Math.sin(e))*t,ov.g=255*(t=Math.sin(e+sv))*t,ov.b=255*(t=Math.sin(e+lv))*t,ov+""}const cv=Ug("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function fv(e){return Jh(e[e.length-1])}var dv=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Ug);const hv=fv(dv);var pv=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Ug);const mv=fv(pv);var gv=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Ug);const vv=fv(gv);var yv=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Ug);const bv=fv(yv);var _v=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Ug);const xv=fv(_v);var wv=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Ug);const kv=fv(wv);var Sv=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Ug);const Cv=fv(Sv);var Ev=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Ug);const Av=fv(Ev);var Mv=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Ug);const Dv=fv(Mv);var Tv=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Ug);const Nv=fv(Tv);var Ov=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Ug);const Fv=fv(Ov);var Lv=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Ug);const Pv=fv(Lv);var zv=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Ug);const Rv=fv(zv);var Iv=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Ug);const jv=fv(Iv);var Bv=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Ug);const Uv=fv(Bv);var qv=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Ug);const Wv=fv(qv);var Hv=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Ug);const Vv=fv(Hv);var Gv=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Ug);const Yv=fv(Gv);var $v=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Ug);const Xv=fv($v);var Kv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Ug);const Qv=fv(Kv);var Zv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Ug);const Jv=fv(Zv);var ey=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Ug);const ty=fv(ey);var ny=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Ug);const ry=fv(ny);var iy=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Ug);const ay=fv(iy);var oy=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Ug);const sy=fv(oy);var ly=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Ug);const uy=fv(ly);var cy=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Ug);const fy=fv(cy);function dy(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-2710.57*e)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-67.37*e)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-2475.67*e)))))))+")"}const hy=Ag(kg(300,.5,0),kg(-240,.5,1));function py(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-14825.05*e)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+707.56*e)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-6838.66*e)))))))+")"}var my={blueorange:Bg},gy={category10:qg,accent:Wg,dark2:Hg,paired:Vg,pastel1:Gg,pastel2:Yg,set1:$g,set2:Xg,set3:Kg,category20:Pg,category20b:zg,category20c:Rg,tableau10:Ig,tableau20:jg,viridis:Zg,magma:Jg,inferno:ev,plasma:tv,rainbow:av,sinebow:uv,blueorange:Jh((0,Se.peek)(Bg))};function vy(e,t){gy[e]=o["interpolate"+t],my[e]=o["scheme"+t]}function yy(e,t){if(arguments.length>1)return gy[e]=t,this;var n=e.split("-");return e=n[0],(n=+n[1]+1)&&my.hasOwnProperty(e)?my[e][n-1]:!n&&gy.hasOwnProperty(e)?gy[e]:void 0}function by(e,t,n){return arguments.length>1?(my[e]=t,gy[e]=n||Jh((0,Se.peek)(t)),this):my.hasOwnProperty(e)?my[e]:void 0}vy("blues","Blues"),vy("greens","Greens"),vy("greys","Greys"),vy("purples","Purples"),vy("reds","Reds"),vy("oranges","Oranges"),vy("brownbluegreen","BrBG"),vy("purplegreen","PRGn"),vy("pinkyellowgreen","PiYG"),vy("purpleorange","PuOr"),vy("redblue","RdBu"),vy("redgrey","RdGy"),vy("redyellowblue","RdYlBu"),vy("redyellowgreen","RdYlGn"),vy("spectral","Spectral"),vy("bluegreen","BuGn"),vy("bluepurple","BuPu"),vy("greenblue","GnBu"),vy("orangered","OrRd"),vy("purplebluegreen","PuBuGn"),vy("purpleblue","PuBu"),vy("purplered","PuRd"),vy("redpurple","RdPu"),vy("yellowgreenblue","YlGnBu"),vy("yellowgreen","YlGn"),vy("yelloworangebrown","YlOrBr"),vy("yelloworangered","YlOrRd");var _y={millisecond:om,second:im,minute:nm,hour:em,day:tn,week:Yt,month:Zp,year:rn},xy={millisecond:om,second:im,minute:gm,hour:pm,day:Vt,week:Rt,month:dm,year:on};function wy(e){return _y.hasOwnProperty(e)&&_y[e]}function ky(e){return xy.hasOwnProperty(e)&&xy[e]}function Sy(e,t){var n;return(0,Se.isObject)(t)&&(n=t.step,t=t.interval),(0,Se.isString)(t)&&(t="time"===e.type?wy(t):"utc"===e.type?ky(t):(0,Se.error)("Only time and utc scales accept interval strings."),n&&(t=t.every(n))),t}function Cy(e,t,n){var r=e.range(),i=r[0],a=(0,Se.peek)(r);if(i>a&&(r=a,a=i,i=r),t=t.filter((function(t){return!((t=e(t))a)})),n>0&&t.length>1){for(var o=[t[0],(0,Se.peek)(t)];t.length>n&&t.length>=3;)t=t.filter((function(e,t){return!(t%2)}));t.length<3&&(t=o)}return t}function Ey(e,t){return e.ticks?e.ticks(t):e.domain()}function Ay(e,t,n){var r,i,a=e.tickFormat?e.tickFormat(t,n):n?Fp(n):String;return e.type===bd?(r=a,i=function(e){var t=Cp(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 r,i,a=e(n),o=a.indexOf(t);if(o<0)return a;for(r=function(e,t){var n,r=e.lastIndexOf("e");if(r>0)return r;for(r=e.length;--r>t;)if((n=e.charCodeAt(r))>=48&&n<=57)return r+1}(a,o),i=ro;)if("0"!==a[r]){++r;break}return a.slice(0,r)+i}}(Fp(t),Fp(".1f")(1)[1])}return Fp(t)}(n),function(e){return r(e)?i(e):""}):a}function My(e){ei.call(this,null,e)}function Dy(e){ei.call(this,null,e)}function Ty(){return Ne({})}function Ny(e){return e.exit}function Oy(e){ei.call(this,null,e)}(0,Se.inherits)(My,ei).transform=function(e,t){if(this.value&&!e.modified())return t.StopPropagation;var n=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=this.value,i=e.scale,a=null==e.count?e.values?e.values.length:10:Sy(i,e.count),o=e.format||Ay(i,a,e.formatSpecifier),s=e.values?Cy(i,e.values,a):Ey(i,a);return r&&(n.rem=r),r=s.map((function(e,t){return Ne({index:t/(s.length-1),value:e,label:o(e)})})),e.extra&&r.length&&r.push(Ne({index:-1,extra:{value:r[0].value},label:""})),n.source=r,n.add=r,this.value=r,n},(0,Se.inherits)(Dy,ei).transform=function(e,t){var n=t.dataflow,r=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=e.item||Ty,a=e.key||De,o=this.value;return(0,Se.isArray)(r.encode)&&(r.encode=null),o&&(e.modified("key")||t.modified(a))&&(0,Se.error)("DataJoin does not support modified key function or fields."),o||(t=t.addAll(),this.value=o=(0,Se.fastmap)().test(Ny),o.lookup=function(e){return o.get(a(e))}),t.visit(t.ADD,(function(e){var t=a(e),n=o.get(t);n?n.exit?(o.empty--,r.add.push(n)):r.mod.push(n):(o.set(t,n=i(e)),r.add.push(n)),n.datum=e,n.exit=!1})),t.visit(t.MOD,(function(e){var t=a(e),n=o.get(t);n&&(n.datum=e,r.mod.push(n))})),t.visit(t.REM,(function(e){var t=a(e),n=o.get(t);e!==n.datum||n.exit||(r.rem.push(n),n.exit=!0,++o.empty)})),t.changed(t.ADD_MOD)&&r.modifies("datum"),e.clean&&o.empty>n.cleanThreshold&&n.runAfter(o.clean),r},(0,Se.inherits)(Oy,ei).transform=function(e,t){var n=t.fork(t.ADD_REM),r=e.encoders,i=t.encode;if((0,Se.isArray)(i)){if(!n.changed()&&!i.every((function(e){return r[e]})))return t.StopPropagation;i=i[0],n.encode=null}var a="enter"===i,o=r.update||Se.falsy,s=r.enter||Se.falsy,l=r.exit||Se.falsy,u=(i&&!a?r[i]:o)||Se.falsy;if(t.changed(t.ADD)&&(t.visit(t.ADD,(function(t){s(t,e),o(t,e),u!==Se.falsy&&u!==o&&u(t,e)})),n.modifies(s.output),n.modifies(o.output),u!==Se.falsy&&u!==o&&n.modifies(u.output)),t.changed(t.REM)&&l!==Se.falsy&&(t.visit(t.REM,(function(t){l(t,e)})),n.modifies(l.output)),a||u!==Se.falsy){var c=t.MOD|(e.modified()?t.REFLOW:0);a?(t.visit(c,(function(t){var r=s(t,e);(u(t,e)||r)&&n.mod.push(t)})),n.mod.length&&n.modifies(s.output)):t.visit(c,(function(t){u(t,e)&&n.mod.push(t)})),n.mod.length&&n.modifies(u.output)}return n.changed()?n:t.StopPropagation};var Fy="symbol",Ly={};function Py(e,t){return isFinite(e)?t(e):null}function zy(e){ei.call(this,[],e)}Ly[Cd]=function(e){var t=[-1/0].concat(e.quantiles());return t.max=1/0,t},Ly[Ed]=function(e){var t=e.domain(),n=t[0],r=(0,Se.peek)(t),i=e.range().length,a=new Array(i),o=0;for(a[0]=-1/0;++oMath.PI?n<=e:n>e)?1:0)+" "+t*o+","+t*s+"L"+r*o+","+r*s},"diagonal-horizontal":function(e,t,n,r){var i=(e+n)/2;return"M"+e+","+t+"C"+i+","+t+" "+i+","+r+" "+n+","+r},"diagonal-vertical":function(e,t,n,r){var i=(t+r)/2;return"M"+e+","+t+"C"+e+","+i+" "+n+","+i+" "+n+","+r},"diagonal-radial":function(e,t,n,r){var i=Math.cos(e),a=Math.sin(e),o=Math.cos(n),s=Math.sin(n),l=(t+r)/2;return"M"+t*i+","+t*a+"C"+l*i+","+l*a+" "+l*o+","+l*s+" "+r*o+","+r*s}});function Iy(e){return e.source.x}function jy(e){return e.source.y}function By(e){return e.target.x}function Uy(e){return e.target.y}function qy(e){ei.call(this,{},e)}function Wy(e,t,n,r){return"M"+e+","+t+"L"+n+","+r}function Hy(e,t,n,r){var i=n-e,a=r-t,o=Math.sqrt(i*i+a*a)/2;return"M"+e+","+t+"A"+o+","+o+" "+180*Math.atan2(a,i)/Math.PI+" 0 1 "+n+","+r}function Vy(e,t,n,r){var i=n-e,a=r-t,o=.2*(i+a),s=.2*(a-i);return"M"+e+","+t+"C"+(e+o)+","+(t+s)+" "+(n+s)+","+(r-o)+" "+n+","+r}function Gy(e){ei.call(this,null,e)}qy.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"}]},(0,Se.inherits)(qy,ei).transform=function(e,t){var n=e.sourceX||Iy,r=e.sourceY||jy,i=e.targetX||By,a=e.targetY||Uy,o=e.as||"path",s=e.orient||"vertical",l=e.shape||"line",u=Ry.get(l+"-"+s)||Ry.get(l);return u||(0,Se.error)("LinkPath unsupported type: "+e.shape+(e.orient?"-"+e.orient:"")),t.visit(t.SOURCE,(function(e){e[o]=u(n(e),r(e),i(e),a(e))})),t.reflow(e.modified()).modifies(o)},Gy.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"]}]},(0,Se.inherits)(Gy,ei).transform=function(e,t){var n,r,i,a=e.as||["startAngle","endAngle"],o=a[0],s=a[1],l=e.field||Se.one,u=e.startAngle||0,c=null!=e.endAngle?e.endAngle:2*Math.PI,f=t.source,d=f.map(l),h=d.length,p=u,m=(c-u)/function(e){let t=0;for(let n of e)(n=+n)&&(t+=n);return t}(d),g=Pa(h);for(e.sort&&g.sort((function(e,t){return d[e]-d[t]})),n=0;n0?1:0)}),0))!==t.length&&n.warn("Log scale domain includes zero: "+(0,Se.stringValue)(t)),t}function Zy(e,t,n){return(0,Se.isFunction)(e)&&(t||n)?Tg(e,Jy(t||[0,1],n)):e}function Jy(e,t){return t?e.slice().reverse():e}function eb(e){ei.call(this,null,e)}(0,Se.inherits)(Ky,ei).transform=function(e,t){var n,r=t.dataflow,i=this.value;for(n in i&&!e.modified("type")||(this.value=i=wm((e.type||kd).toLowerCase())()),e)if(!Xy[n]){if("padding"===n&&$y[i.type])continue;(0,Se.isFunction)(i[n])?i[n](e[n]):r.warn("Unsupported scale property: "+n)}return function(e,t,n){var r=t.round||!1,i=t.range;if(null!=t.rangeStep)i=function(e,t,n){"band"!==e&&e!==wd&&(0,Se.error)("Only band and point scales support rangeStep.");var r=(null!=t.paddingOuter?t.paddingOuter:t.padding)||0,i=e===wd?1:(null!=t.paddingInner?t.paddingInner:t.padding)||0;return[0,t.rangeStep*Td(n,i,r)]}(e.type,t,n);else if(t.scheme){if(i=function(e,t,n){var r,i=t.scheme.toLowerCase(),a=yy(i),o=t.schemeExtent;return a||(0,Se.error)("Unrecognized scheme name: "+t.scheme),n=e===Ad?n+1:e===Md?n-1:e===Cd||e===Ed?+t.schemeCount||5:n,e===Dd?Zy(a,o,t.reverse):!o&&(r=yy(i+"-"+n))?r:(0,Se.isFunction)(a)?function(e,t){for(var n=new Array(t),r=t+1,i=0;i-1)return r;var i,a,o=t.domain,s=e.type,l=t.zero||void 0===t.zero&&Yy[s];return o?($y[s]&&t.padding&&o[0]!==(0,Se.peek)(o)&&(o=function(e,t,n,r,i){var a=Math.abs((0,Se.peek)(n)-n[0]),o=a/(a-2*r),s=e===bd?(0,Se.zoomLog)(t,null,o):e===xd?(0,Se.zoomPow)(t,null,o,.5):e===_d?(0,Se.zoomPow)(t,null,o,i):(0,Se.zoomLinear)(t,null,o);return(t=t.slice())[0]=s[0],t[t.length-1]=s[1],t}(s,o,t.range,t.padding,t.exponent)),(l||null!=t.domainMin||null!=t.domainMax||null!=t.domainMid)&&(i=(o=o.slice()).length-1||1,l&&(o[0]>0&&(o[0]=0),o[i]<0&&(o[i]=0)),null!=t.domainMin&&(o[0]=t.domainMin),null!=t.domainMax&&(o[i]=t.domainMax),null!=t.domainMid&&(((a=t.domainMid)o[i])&&n.warn("Scale domainMid exceeds domain min or max.",a),o.splice(i,0,a))),e.domain(Qy(s,o,n)),s===Sd&&e.unknown(t.domainImplicit?ch:void 0),t.nice&&e.nice&&e.nice(!0!==t.nice&&Sy(e,t.nice)||null),o.length):0}(i,e,r)),t.fork(t.NO_SOURCE|t.NO_FIELDS)},(0,Se.inherits)(eb,ei).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(e.sort),this.modified(n),t};var tb="zero",nb="center",rb="normalize",ib=["y0","y1"];function ab(e){ei.call(this,null,e)}function ob(e,t,n,r,i){for(var a,o=(t-e.sum)/2,s=e.length,l=0;lt?1:e>=t?0:NaN}ab.Definition={type:"Stack",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"groupby",type:"field",array:!0},{name:"sort",type:"compare"},{name:"offset",type:"enum",default:tb,values:[tb,nb,rb]},{name:"as",type:"string",array:!0,length:2,default:ib}]},(0,Se.inherits)(ab,ei).transform=function(e,t){var n,r,i,a,o=e.as||ib,s=o[0],l=o[1],u=e.field||Se.one,c=e.offset===nb?ob:e.offset===rb?sb:lb;for(n=function(e,t,n,r){var i,a,o,s,l,u,c,f,d,h=[],p=function(e){return e(l)};if(null==t)h.push(e.slice());else for(i={},a=0,o=e.length;ad&&(d=f),n&&c.sort(n)}return h.max=d,h}(t.source,e.groupby,e.sort,u),r=0,i=n.length,a=n.max;r>>1;e(t[a],n)<0?r=a+1:i=a}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;e(t[a],n)>0?i=a:r=a+1}return r}}}(ub);cb.right,cb.left;var fb=Array.prototype,db=(fb.slice,fb.map,Math.sqrt(50)),hb=Math.sqrt(10),pb=Math.sqrt(2);function mb(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=db?i*=10:a>=hb?i*=5:a>=pb&&(i*=2),tr!=h>r&&n<(d-u)*(r-c)/(h-c)+u&&(i=-i)}return i}function kb(e,t,n){var r,i,a,o;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)&&(i=e[r=+(e[0]===t[0])],a=n[r],o=t[r],i<=a&&a<=o||o<=a&&a<=i)}function Sb(){}var Cb=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function Eb(){var e=1,t=1,n=gb,r=s;function i(e){var t=n(e);if(Array.isArray(t))t=t.slice().sort(bb);else{var r=function(e){var t,n,r,i=e.length,a=-1;for(1;++a=t)for(n=r=t;++at&&(n=t),r=r,Cb[u<<1].forEach(p);++a=r,Cb[l|u<<1].forEach(p);for(Cb[0|u].forEach(p);++s=r,c=n[s*e]>=r,Cb[u<<1|c<<2].forEach(p);++a=r,f=c,c=n[s*e+a+1]>=r,Cb[l|u<<1|c<<2|f<<3].forEach(p);Cb[u|c<<3].forEach(p)}for(a=-1,c=n[s*e]>=r,Cb[c<<2].forEach(p);++a=r,Cb[c<<2|f<<3].forEach(p);function p(e){var t,n,r=[e[0][0]+a,e[0][1]+s],l=[e[1][0]+a,e[1][1]+s],u=o(r),c=o(l);(t=h[u])?(n=d[c])?(delete h[t.end],delete d[n.start],t===n?(t.ring.push(l),i(t.ring)):d[t.start]=h[n.end]={start:t.start,end:n.end,ring:t.ring.concat(n.ring)}):(delete h[t.end],t.ring.push(l),h[t.end=c]=t):(t=d[c])?(n=h[u])?(delete d[t.start],delete h[n.end],t===n?(t.ring.push(l),i(t.ring)):d[n.start]=h[t.end]={start:n.start,end:t.end,ring:n.ring.concat(t.ring)}):(delete d[t.start],t.ring.unshift(r),d[t.start=u]=t):d[u]=h[c]={start:u,end:c,ring:[r,l]}}Cb[c<<3].forEach(p)}(n,i,(function(e){r(e,n,i),function(e){for(var t=0,n=e.length,r=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];++t0?a.push([e]):s.push(e)})),s.forEach((function(e){for(var t,n=0,r=a.length;n0&&o0&&s0&&a>0))throw new Error("invalid size");return e=r,t=a,i},i.thresholds=function(e){return arguments.length?(n="function"==typeof e?e:Array.isArray(e)?_b(yb.call(e)):_b(e),i):n},i.smooth=function(e){return arguments.length?(r=e?s:Sb,i):r===s},i}function Ab(e,t,n){for(var r=e.width,i=e.height,a=1+(n<<1),o=0;o=n&&(s>=a&&(l-=e.data[s-a+o*r]),t.data[s-n+o*r]=l/Math.min(s+1,r-1+a-s,a))}function Mb(e,t,n){for(var r=e.width,i=e.height,a=1+(n<<1),o=0;o=n&&(s>=a&&(l-=e.data[o+(s-a)*r]),t.data[o+(s-n)*r]=l/Math.min(s+1,i-1+a-s,a))}function Db(e){return e[0]}function Tb(e){return e[1]}function Nb(){return 1}var Ob=["size","smooth"],Fb=["x","y","weight","size","cellSize","bandwidth"];function Lb(e){ei.call(this,null,e)}Lb.Definition={type:"Contour",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"values",type:"number",array:!0},{name:"x",type:"field"},{name:"y",type:"field"},{name:"weight",type:"field"},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number"},{name:"count",type:"number"},{name:"smooth",type:"boolean"},{name:"nice",type:"boolean",default:!1},{name:"thresholds",type:"number",array:!0}]},(0,Se.inherits)(Lb,ei).transform=function(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n,r,i,a,o=t.fork(t.NO_SOURCE|t.NO_FIELDS),s=e.count||10;return e.values?(n=Eb(),r=Ob,i=e.values):(n=function(){var e=Db,t=Tb,n=Nb,r=960,i=500,a=20,o=2,s=3*a,l=r+2*s>>o,u=i+2*s>>o,c=_b(20);function f(r){var i=new Float32Array(l*u),f=new Float32Array(l*u);r.forEach((function(r,a,c){var f=+e(r,a,c)+s>>o,d=+t(r,a,c)+s>>o,h=+n(r,a,c);f>=0&&f=0&&d>o),Mb({width:l,height:u,data:f},{width:l,height:u,data:i},a>>o),Ab({width:l,height:u,data:i},{width:l,height:u,data:f},a>>o),Mb({width:l,height:u,data:f},{width:l,height:u,data:i},a>>o),Ab({width:l,height:u,data:i},{width:l,height:u,data:f},a>>o),Mb({width:l,height:u,data:f},{width:l,height:u,data:i},a>>o);var h=c(i);if(!Array.isArray(h)){var p=function(e){var t,n,r=e.length,i=-1;for(1;++i=t)for(n=t;++in&&(n=t);return n}(i);h=mb(0,p,h),(h=vb(0,Math.floor(p/h)*h,h)).shift()}return Eb().thresholds(h).size([l,u])(i).map(d)}function d(e){return e.value*=Math.pow(2,-2*o),e.coordinates.forEach(h),e}function h(e){e.forEach(p)}function p(e){e.forEach(m)}function m(e){e[0]=e[0]*Math.pow(2,o)-s,e[1]=e[1]*Math.pow(2,o)-s}function g(){return l=r+2*(s=3*a)>>o,u=i+2*s>>o,f}return f.x=function(t){return arguments.length?(e="function"==typeof t?t:_b(+t),f):e},f.y=function(e){return arguments.length?(t="function"==typeof e?e:_b(+e),f):t},f.weight=function(e){return arguments.length?(n="function"==typeof e?e:_b(+e),f):n},f.size=function(e){if(!arguments.length)return[r,i];var t=Math.ceil(e[0]),n=Math.ceil(e[1]);if(!(t>=0||t>=0))throw new Error("invalid size");return r=t,i=n,g()},f.cellSize=function(e){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(e)/Math.LN2),g()},f.thresholds=function(e){return arguments.length?(c="function"==typeof e?e:Array.isArray(e)?_b(yb.call(e)):_b(e),f):c},f.bandwidth=function(e){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((e=+e)>=0))throw new Error("invalid bandwidth");return a=Math.round((Math.sqrt(4*e*e+1)-1)/2),g()},f}(),r=Fb,i=t.materialize(t.SOURCE).source),n.thresholds(e.thresholds||(e.nice?s:(a=s,function(e){for(var t=La(e),n=t[0],r=t[1]-n,i=[],o=1;o<=a;++o)i.push(n+r*o/(a+1));return i}))),r.forEach((function(t){null!=e[t]&&n[t](e[t])})),this.value&&(o.rem=this.value),i=i&&i.length?n(i).map(Ne):[],this.value=o.source=o.add=i,o};var Pb="FeatureCollection";function zb(e){ei.call(this,null,e)}zb.Definition={type:"GeoJSON",metadata:{},params:[{name:"fields",type:"field",array:!0,length:2},{name:"geojson",type:"field"}]},(0,Se.inherits)(zb,ei).transform=function(e,t){var n,r=this._features,i=this._points,a=e.fields,o=a&&a[0],s=a&&a[1],l=e.geojson,u=t.ADD;n=e.modified()||t.changed(t.REM)||t.modified((0,Se.accessorFields)(l))||o&&t.modified((0,Se.accessorFields)(o))||s&&t.modified((0,Se.accessorFields)(s)),this.value&&!n||(u=t.SOURCE,this._features=r=[],this._points=i=[]),l&&t.visit(u,(function(e){r.push(l(e))})),o&&s&&(t.visit(u,(function(e){var t=o(e),n=s(e);null!=t&&null!=n&&(t=+t)===t&&(n=+n)===n&&i.push([t,n])})),r=r.concat({type:"Feature",geometry:{type:"MultiPoint",coordinates:i}})),this.value={type:Pb,features:r}};const Rb=e=>e;function Ib(e,t){e&&Bb.hasOwnProperty(e.type)&&Bb[e.type](e,t)}var jb={Feature:function(e,t){Ib(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r0){for(a=e[--i];i>0&&(t=a,n=e[--i],a=t+n,r=n-(a-t),!r););i>0&&(r<0&&e[i-1]<0||r>0&&e[i-1]>0)&&(n=2*r,t=a+n,n==t-a&&(a=t))}return a}}var Vb=1e-6,Gb=Math.PI,Yb=Gb/2,$b=Gb/4,Xb=2*Gb,Kb=180/Gb,Qb=Gb/180,Zb=Math.abs,Jb=Math.atan,e_=Math.atan2,t_=Math.cos,n_=(Math.ceil,Math.exp),r_=(Math.floor,Math.hypot,Math.log),i_=Math.pow,a_=Math.sin,o_=Math.sign||function(e){return e>0?1:e<0?-1:0},s_=Math.sqrt,l_=Math.tan;function u_(e){return e>1?0:e<-1?Gb:Math.acos(e)}function c_(e){return e>1?Yb:e<-1?-Yb:Math.asin(e)}function f_(){}var d_,h_,p_,m_,g_=new Hb,v_=new Hb,y_={point:f_,lineStart:f_,lineEnd:f_,polygonStart:function(){y_.lineStart=b_,y_.lineEnd=w_},polygonEnd:function(){y_.lineStart=y_.lineEnd=y_.point=f_,g_.add(Zb(v_)),v_=new Hb},result:function(){var e=g_/2;return g_=new Hb,e}};function b_(){y_.point=__}function __(e,t){y_.point=x_,d_=p_=e,h_=m_=t}function x_(e,t){v_.add(m_*e-p_*t),p_=e,m_=t}function w_(){x_(d_,h_)}const k_=y_;var S_=1/0,C_=S_,E_=-S_,A_=E_,M_={point:function(e,t){eE_&&(E_=e),tA_&&(A_=t)},lineStart:f_,lineEnd:f_,polygonStart:f_,polygonEnd:f_,result:function(){var e=[[S_,C_],[E_,A_]];return E_=A_=-(C_=S_=1/0),e}};const D_=M_;var T_,N_,O_,F_,L_=0,P_=0,z_=0,R_=0,I_=0,j_=0,B_=0,U_=0,q_=0,W_={point:H_,lineStart:V_,lineEnd:$_,polygonStart:function(){W_.lineStart=X_,W_.lineEnd=K_},polygonEnd:function(){W_.point=H_,W_.lineStart=V_,W_.lineEnd=$_},result:function(){var e=q_?[B_/q_,U_/q_]:j_?[R_/j_,I_/j_]:z_?[L_/z_,P_/z_]:[NaN,NaN];return L_=P_=z_=R_=I_=j_=B_=U_=q_=0,e}};function H_(e,t){L_+=e,P_+=t,++z_}function V_(){W_.point=G_}function G_(e,t){W_.point=Y_,H_(O_=e,F_=t)}function Y_(e,t){var n=e-O_,r=t-F_,i=s_(n*n+r*r);R_+=i*(O_+e)/2,I_+=i*(F_+t)/2,j_+=i,H_(O_=e,F_=t)}function $_(){W_.point=H_}function X_(){W_.point=Q_}function K_(){Z_(T_,N_)}function Q_(e,t){W_.point=Z_,H_(T_=O_=e,N_=F_=t)}function Z_(e,t){var n=e-O_,r=t-F_,i=s_(n*n+r*r);R_+=i*(O_+e)/2,I_+=i*(F_+t)/2,j_+=i,B_+=(i=F_*e-O_*t)*(O_+e),U_+=i*(F_+t),q_+=3*i,H_(O_=e,F_=t)}const J_=W_;function ex(e){this._context=e}ex.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,Xb)}},result:f_};var tx,nx,rx,ix,ax,ox=new Hb,sx={point:f_,lineStart:function(){sx.point=lx},lineEnd:function(){tx&&ux(nx,rx),sx.point=f_},polygonStart:function(){tx=!0},polygonEnd:function(){tx=null},result:function(){var e=+ox;return ox=new Hb,e}};function lx(e,t){sx.point=ux,nx=ix=e,rx=ax=t}function ux(e,t){ix-=e,ax-=t,ox.add(s_(ix*ix+ax*ax)),ix=e,ax=t}const cx=sx;function fx(){this._string=[]}function dx(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function hx(e,t){var n,r,i=4.5;function a(e){return e&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Wb(e,n(r))),r.result()}return a.area=function(e){return Wb(e,n(k_)),k_.result()},a.measure=function(e){return Wb(e,n(cx)),cx.result()},a.bounds=function(e){return Wb(e,n(D_)),D_.result()},a.centroid=function(e){return Wb(e,n(J_)),J_.result()},a.projection=function(t){return arguments.length?(n=null==t?(e=null,Rb):(e=t).stream,a):e},a.context=function(e){return arguments.length?(r=null==e?(t=null,new fx):new ex(t=e),"function"!=typeof i&&r.pointRadius(i),a):t},a.pointRadius=function(e){return arguments.length?(i="function"==typeof e?e:(r.pointRadius(+e),+e),a):i},a.projection(e).context(t)}function px(){var e,t=[];return{point:function(t,n,r){e.push([t,n,r])},lineStart:function(){t.push(e=[])},lineEnd:f_,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function mx(e,t){return Zb(e[0]-t[0])=0;--a)i.point((c=u[a])[0],c[1]);else r(d.x,d.p.x,-1,i);d=d.p}u=(d=d.o).z,h=!h}while(!d.v);i.lineEnd()}}}function yx(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r=0?1:-1,E=C*S,A=E>Gb,M=g*w;if(l.add(e_(M*C*a_(E),v*k+M*t_(E))),o+=A?S+C*Xb:S,A^p>=n^_>=n){var D=wx(_x(h),_x(b));Cx(D);var T=wx(a,D);Cx(T);var N=(A^S>=0?-1:1)*c_(T[2]);(r>N||r===N&&(D[0]||D[1]))&&(s+=A^S>=0?1:-1)}}return(o<-1e-6||o0){for(f||(i.polygonStart(),f=!0),i.lineStart(),e=0;e1&&2&l&&d.push(d.pop().concat(d.shift())),o.push(d.filter(Dx))}return d}}function Dx(e){return e.length>1}function Tx(e,t){return((e=e.x)[0]<0?e[1]-Yb-Vb:Yb-e[1])-((t=t.x)[0]<0?t[1]-Yb-Vb:Yb-t[1])}fx.prototype={_radius:4.5,_circle:dx(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=dx(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}};const Nx=Mx((function(){return!0}),(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(a,o){var s=a>0?Gb:-Gb,l=Zb(a-n);Zb(l-Gb)0?Yb:-Yb),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(a,r),t=0):i!==s&&l>=Gb&&(Zb(n-i)Vb?Jb((a_(t)*(a=t_(r))*a_(n)-a_(r)*(i=t_(t))*a_(e))/(i*a*o)):(t+r)/2}(n,r,a,o),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=a,r=o),i=s},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)i=n*Yb,r.point(-Gb,i),r.point(0,i),r.point(Gb,i),r.point(Gb,0),r.point(Gb,-i),r.point(0,-i),r.point(-Gb,-i),r.point(-Gb,0),r.point(-Gb,i);else if(Zb(e[0]-t[0])>Vb){var a=e[0]0)do{u.point(0===c||3===c?e:n,c>1?r:t)}while((c=(c+s+4)%4)!==f);else u.point(a[0],a[1])}function o(r,i){return Zb(r[0]-e)0?0:3:Zb(r[0]-n)0?2:1:Zb(r[1]-t)0?1:0:i>0?3:2}function s(e,t){return l(e.x,t.x)}function l(e,t){var n=o(e,1),r=o(t,1);return n!==r?n-r: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 l,u,c,f,d,h,p,m,g,v,y,b=o,_=px(),x={point:w,lineStart:function(){x.point=k,u&&u.push(c=[]),v=!0,g=!1,p=m=NaN},lineEnd:function(){l&&(k(f,d),h&&g&&_.rejoin(),l.push(_.result())),x.point=w,g&&b.lineEnd()},polygonStart:function(){b=_,l=[],u=[],y=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,i=u.length;nr&&(d-a)*(r-o)>(h-o)*(e-a)&&++t:h<=r&&(d-a)*(r-o)<(h-o)*(e-a)&&--t;return t}(),n=y&&t,i=(l=Ax(l)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&vx(l,s,t,a,o),o.polygonEnd()),b=o,l=u=c=null}};function w(e,t){i(e,t)&&b.point(e,t)}function k(a,o){var s=i(a,o);if(u&&c.push([a,o]),v)f=a,d=o,h=s,v=!1,s&&(b.lineStart(),b.point(a,o));else if(s&&g)b.point(a,o);else{var l=[p=Math.max(Lx,Math.min(Fx,p)),m=Math.max(Lx,Math.min(Fx,m))],_=[a=Math.max(Lx,Math.min(Fx,a)),o=Math.max(Lx,Math.min(Fx,o))];!function(e,t,n,r,i,a){var o,s=e[0],l=e[1],u=0,c=1,f=t[0]-s,d=t[1]-l;if(o=n-s,f||!(o>0)){if(o/=f,f<0){if(o0){if(o>c)return;o>u&&(u=o)}if(o=i-s,f||!(o<0)){if(o/=f,f<0){if(o>c)return;o>u&&(u=o)}else if(f>0){if(o0)){if(o/=d,d<0){if(o0){if(o>c)return;o>u&&(u=o)}if(o=a-l,d||!(o<0)){if(o/=d,d<0){if(o>c)return;o>u&&(u=o)}else if(d>0){if(o0&&(e[0]=s+u*f,e[1]=l+u*d),c<1&&(t[0]=s+c*f,t[1]=l+c*d),!0}}}}}(l,_,e,t,n,r)?s&&(b.lineStart(),b.point(a,o),y=!1):(g||(b.lineStart(),b.point(l[0],l[1])),b.point(_[0],_[1]),s||b.lineEnd(),y=!1)}p=a,m=o,g=s}return x}}function zx(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n}function Rx(e,t){return[Zb(e)>Gb?e+Math.round(-e/Xb)*Xb:e,t]}function Ix(e,t,n){return(e%=Xb)?t||n?zx(Bx(e),Ux(t,n)):Bx(e):t||n?Ux(t,n):Rx}function jx(e){return function(t,n){return[(t+=e)>Gb?t-Xb:t<-Gb?t+Xb:t,n]}}function Bx(e){var t=jx(e);return t.invert=jx(-e),t}function Ux(e,t){var n=t_(e),r=a_(e),i=t_(t),a=a_(t);function o(e,t){var o=t_(t),s=t_(e)*o,l=a_(e)*o,u=a_(t),c=u*n+s*r;return[e_(l*i-c*a,s*n-u*r),c_(c*i+l*a)]}return o.invert=function(e,t){var o=t_(t),s=t_(e)*o,l=a_(e)*o,u=a_(t),c=u*i-l*a;return[e_(l*i+u*a,s*n+c*r),c_(c*n-s*r)]},o}function qx(e){return function(t){var n=new Wx;for(var r in e)n[r]=e[r];return n.stream=t,n}}function Wx(){}function Hx(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=r&&e.clipExtent(null),Wb(n,e.stream(D_)),t(D_.result()),null!=r&&e.clipExtent(r),e}function Vx(e,t,n){return Hx(e,(function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+t[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(i-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([o,s])}),n)}function Gx(e,t,n){return Vx(e,[[0,0],t],n)}function Yx(e,t,n){return Hx(e,(function(n){var r=+t,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];e.scale(150*i).translate([a,o])}),n)}function $x(e,t,n){return Hx(e,(function(n){var r=+t,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([a,o])}),n)}Rx.invert=Rx,Wx.prototype={constructor:Wx,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 Xx=t_(30*Qb);function Kx(e,t){return+t?function(e,t){function n(r,i,a,o,s,l,u,c,f,d,h,p,m,g){var v=u-r,y=c-i,b=v*v+y*y;if(b>4*t&&m--){var _=o+d,x=s+h,w=l+p,k=s_(_*_+x*x+w*w),S=c_(w/=k),C=Zb(Zb(w)-1)t||Zb((v*D+y*T)/b-.5)>.3||o*d+s*h+l*p0,i=Zb(t)>Vb;function a(e,n){return t_(e)*t_(n)>t}function o(e,n,r){var i=[1,0,0],a=wx(_x(e),_x(n)),o=xx(a,a),s=a[0],l=o-s*s;if(!l)return!r&&e;var u=t*o/l,c=-t*s/l,f=wx(i,a),d=Sx(i,u);kx(d,Sx(a,c));var h=f,p=xx(d,h),m=xx(h,h),g=p*p-m*(xx(d,d)-1);if(!(g<0)){var v=s_(g),y=Sx(h,(-p-v)/m);if(kx(y,d),y=bx(y),!r)return y;var b,_=e[0],x=n[0],w=e[1],k=n[1];x<_&&(b=_,_=x,x=b);var S=x-_,C=Zb(S-Gb)0^y[1]<(Zb(y[0]-_)Gb^(_<=y[0]&&y[0]<=x)){var E=Sx(h,(-p+v)/m);return kx(E,d),[y,bx(E)]}}}function s(t,n){var i=r?e:Gb-e,a=0;return t<-i?a|=1:t>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return Mx(a,(function(e){var t,n,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(f,d){var h,p=[f,d],m=a(f,d),g=r?m?0:s(f,d):m?s(f+(f<0?Gb:-Gb),d):0;if(!t&&(u=l=m)&&e.lineStart(),m!==l&&(!(h=o(t,p))||mx(t,h)||mx(p,h))&&(p[2]=1),m!==l)c=0,m?(e.lineStart(),h=o(p,t),e.point(h[0],h[1])):(h=o(t,p),e.point(h[0],h[1],2),e.lineEnd()),t=h;else if(i&&t&&r^m){var v;g&n||!(v=o(p,t,!0))||(c=0,r?(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],3)))}!m||t&&mx(t,p)||e.point(p[0],p[1]),t=p,l=m,n=g},lineEnd:function(){l&&e.lineEnd(),t=null},clean:function(){return c|(u&&l)<<1}}}),(function(t,r,i,a){!function(e,t,n,r,i,a){if(n){var o=t_(t),s=a_(t),l=r*n;null==i?(i=t+r*Xb,a=t-l/2):(i=Ox(o,i),a=Ox(o,a),(r>0?ia)&&(i+=r*Xb));for(var u,c=i;r>0?c>a:c2?e[2]%360*Qb:0,D()):[g*Kb,v*Kb,y*Kb]},A.angle=function(e){return arguments.length?(b=e%360*Qb,D()):b*Kb},A.reflectX=function(e){return arguments.length?(_=e?-1:1,D()):_<0},A.reflectY=function(e){return arguments.length?(x=e?-1:1,D()):x<0},A.precision=function(e){return arguments.length?(o=Kx(s,E=e*e),T()):s_(E)},A.fitExtent=function(e,t){return Vx(A,e,t)},A.fitSize=function(e,t){return Gx(A,e,t)},A.fitWidth=function(e,t){return Yx(A,e,t)},A.fitHeight=function(e,t){return $x(A,e,t)},function(){return t=e.apply(this,arguments),A.invert=t.invert&&M,D()}}function tw(e){var t=0,n=Gb/3,r=ew(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*Qb,n=e[1]*Qb):[t*Kb,n*Kb]},i}function nw(e,t){var n=a_(e),r=(n+a_(t))/2;if(Zb(r)2?e[2]*Qb:0),t.invert=function(t){return(t=e.invert(t[0]*Qb,t[1]*Qb))[0]*=Kb,t[1]*=Kb,t},t}(i.rotate()).invert([0,0]));return l(null==u?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:e===uw?[[Math.max(s[0]-a,u),t],[Math.min(s[0]+a,n),r]]:[[u,Math.max(s[1]-a,t)],[n,Math.min(s[1]+a,r)]])}return i.scale=function(e){return arguments.length?(o(e),c()):o()},i.translate=function(e){return arguments.length?(s(e),c()):s()},i.center=function(e){return arguments.length?(a(e),c()):a()},i.clipExtent=function(e){return arguments.length?(null==e?u=t=n=r=null:(u=+e[0][0],t=+e[0][1],n=+e[1][0],r=+e[1][1]),c()):null==u?null:[[u,t],[n,r]]},c()}function fw(e){return l_((Yb+e)/2)}function dw(e,t){var n=t_(e),r=e===t?a_(e):r_(n/t_(t))/r_(fw(t)/fw(e)),i=n*i_(fw(e),r)/r;if(!r)return uw;function a(e,t){i>0?t<-Yb+Vb&&(t=-Yb+Vb):t>Yb-Vb&&(t=Yb-Vb);var n=i/i_(fw(t),r);return[n*a_(r*e),i-n*t_(r*e)]}return a.invert=function(e,t){var n=i-t,a=o_(r)*s_(e*e+n*n),o=e_(e,Zb(n))*o_(n);return n*r<0&&(o-=Gb*o_(e)*o_(n)),[o/r,2*Jb(i_(i/a,1/r))-Yb]},a}function hw(e,t){return[e,t]}function pw(e,t){var n=t_(e),r=e===t?a_(e):(n-t_(t))/(t-e),i=n/r+e;if(Zb(r)1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}_w.invert=function(e,t){for(var n,r=t,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(mw+gw*i+a*(vw+yw*i))-t)/(mw+3*gw*i+a*(7*vw+9*yw*i)))*r)*i*i,!(Zb(n)<1e-12));++o);return[bw*e*(mw+3*gw*i+a*(7*vw+9*yw*i))/t_(r),c_(a_(r)/bw)]},xw.invert=ow(Jb),ww.invert=function(e,t){var n,r=t,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-t)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(Zb(n)>Vb&&--i>0);return[e/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]},kw.invert=ow(c_),Sw.invert=ow((function(e){return 2*Jb(e)})),Cw.invert=function(e,t){return[-t,2*Jb(n_(e))-Yb]};var Mw=1e-6,Dw=Math.PI,Tw=Dw/2,Nw=Dw/4,Ow=2*Dw,Fw=180/Dw,Lw=Dw/180,Pw=Math.abs,zw=Math.atan,Rw=Math.atan2,Iw=Math.cos,jw=Math.ceil,Bw=(Math.exp,Math.floor,Math.log,Math.pow,Math.sin),Uw=Math.sign||function(e){return e>0?1:e<0?-1:0},qw=Math.sqrt;function Ww(e){return e>1?Tw:e<-1?-Tw:Math.asin(e)}function Hw(e,t){return Pw(e[0]-t[0])=0;--a)i.point((c=u[a])[0],c[1]);else r(d.x,d.p.x,-1,i);d=d.p}u=(d=d.o).z,h=!h}while(!d.v);i.lineEnd()}}}function Yw(e){if(t=e.length){for(var t,n,r=0,i=e[0];++rt?1:e>=t?0:NaN}var lk=function(e){var t;return 1===e.length&&(t=e,e=function(e,n){return sk(t(e),n)}),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;e(t[a],n)<0?r=a+1:i=a}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;e(t[a],n)>0?i=a:r=a+1}return r}}}(sk);lk.right,lk.left;var uk=Array.prototype;function ck(e){for(var t,n,r,i=e.length,a=-1,o=0;++a=0;)for(t=(r=e[i]).length;--t>=0;)n[--o]=r[t];return n}function fk(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(i);++r=0?1:-1,C=S*k,E=C>Dw,A=m*x;if(ak.add(Rw(A*S*Bw(C),g*w+A*Iw(C))),o+=E?k+S*Ow:k,E^h>=n^b>=n){var M=tk(Jw(d),Jw(y));ik(M);var D=tk(a,M);ik(D);var T=(E^k>=0?-1:1)*Ww(D[2]);(r>T||r===T&&(M[0]||M[1]))&&(s+=E^k>=0?1:-1)}}return(o<-Mw||o0){for(f||(i.polygonStart(),f=!0),i.lineStart(),e=0;e1&&2&l&&d.push(d.pop().concat(d.shift())),o.push(d.filter(hk))}return d}}function hk(e){return e.length>1}function pk(e,t){return((e=e.x)[0]<0?e[1]-Tw-Mw:Tw-e[1])-((t=t.x)[0]<0?t[1]-Tw-Mw:Tw-t[1])}uk.slice,uk.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);const mk=dk((function(){return!0}),(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(a,o){var s=a>0?Dw:-Dw,l=Pw(a-n);Pw(l-Dw)0?Tw:-Tw),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(a,r),t=0):i!==s&&l>=Dw&&(Pw(n-i)Mw?zw((Bw(t)*(a=Iw(r))*Bw(n)-Bw(r)*(i=Iw(t))*Bw(e))/(i*a*o)):(t+r)/2}(n,r,a,o),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=a,r=o),i=s},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)i=n*Tw,r.point(-Dw,i),r.point(0,i),r.point(Dw,i),r.point(Dw,0),r.point(Dw,-i),r.point(0,-i),r.point(-Dw,-i),r.point(-Dw,0),r.point(-Dw,i);else if(Pw(e[0]-t[0])>Mw){var a=e[0]1?0:e<-1?Dw:Math.acos(e)}(-t[1]);return((-t[2]<0?-n:n)+Ow-Mw)%Ow}var vk=1e9,yk=-1e9;function bk(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n}function _k(e){return e}function xk(e,t){return[Pw(e)>Dw?e+Math.round(-e/Ow)*Ow:e,t]}function wk(e){return function(t,n){return[(t+=e)>Dw?t-Ow:t<-Dw?t+Ow:t,n]}}function kk(e){var t=wk(e);return t.invert=wk(-e),t}function Sk(e,t){var n=Iw(e),r=Bw(e),i=Iw(t),a=Bw(t);function o(e,t){var o=Iw(t),s=Iw(e)*o,l=Bw(e)*o,u=Bw(t),c=u*n+s*r;return[Rw(l*i-c*a,s*n-u*r),Ww(c*i+l*a)]}return o.invert=function(e,t){var o=Iw(t),s=Iw(e)*o,l=Bw(e)*o,u=Bw(t),c=u*i-l*a;return[Rw(l*i+u*a,s*n+c*r),Ww(c*n-s*r)]},o}function Ck(e){return function(t){var n=new Ek;for(var r in e)n[r]=e[r];return n.stream=t,n}}function Ek(){}function Ak(e,t){e&&Dk.hasOwnProperty(e.type)&&Dk[e.type](e,t)}xk.invert=xk,Ek.prototype={constructor:Ek,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 Mk={Feature:function(e,t){Ak(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++rPk&&(Pk=e),tzk&&(zk=t)},lineStart:Ew,lineEnd:Ew,polygonStart:Ew,polygonEnd:Ew,result:function(){var e=[[Fk,Lk],[Pk,zk]];return Pk=zk=-(Lk=Fk=1/0),e}};const Ik=Rk;function jk(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=r&&e.clipExtent(null),Ok(n,e.stream(Ik)),t(Ik.result()),null!=r&&e.clipExtent(r),e}function Bk(e,t,n){return jk(e,(function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+t[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(i-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([o,s])}),n)}var Uk=Iw(30*Lw);function qk(e,t){return+t?function(e,t){function n(r,i,a,o,s,l,u,c,f,d,h,p,m,g){var v=u-r,y=c-i,b=v*v+y*y;if(b>4*t&&m--){var _=o+d,x=s+h,w=l+p,k=qw(_*_+x*x+w*w),S=Ww(w/=k),C=Pw(Pw(w)-1)t||Pw((v*D+y*T)/b-.5)>.3||o*d+s*h+l*p0,i=Pw(t)>Mw;function a(e,n){return Iw(e)*Iw(n)>t}function o(e,n,r){var i=[1,0,0],a=tk(Jw(e),Jw(n)),o=ek(a,a),s=a[0],l=o-s*s;if(!l)return!r&&e;var u=t*o/l,c=-t*s/l,f=tk(i,a),d=rk(i,u);nk(d,rk(a,c));var h=f,p=ek(d,h),m=ek(h,h),g=p*p-m*(ek(d,d)-1);if(!(g<0)){var v=qw(g),y=rk(h,(-p-v)/m);if(nk(y,d),y=Zw(y),!r)return y;var b,_=e[0],x=n[0],w=e[1],k=n[1];x<_&&(b=_,_=x,x=b);var S=x-_,C=Pw(S-Dw)0^y[1]<(Pw(y[0]-_)Dw^(_<=y[0]&&y[0]<=x)){var E=rk(h,(-p+v)/m);return nk(E,d),[y,Zw(E)]}}}function s(t,n){var i=r?e:Dw-e,a=0;return t<-i?a|=1:t>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return dk(a,(function(e){var t,n,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(f,d){var h,p=[f,d],m=a(f,d),g=r?m?0:s(f,d):m?s(f+(f<0?Dw:-Dw),d):0;if(!t&&(u=l=m)&&e.lineStart(),m!==l&&(!(h=o(t,p))||Hw(t,h)||Hw(p,h))&&(p[2]=1),m!==l)c=0,m?(e.lineStart(),h=o(p,t),e.point(h[0],h[1])):(h=o(t,p),e.point(h[0],h[1],2),e.lineEnd()),t=h;else if(i&&t&&r^m){var v;g&n||!(v=o(p,t,!0))||(c=0,r?(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],3)))}!m||t&&Hw(t,p)||e.point(p[0],p[1]),t=p,l=m,n=g},lineEnd:function(){l&&e.lineEnd(),t=null},clean:function(){return c|(u&&l)<<1}}}),(function(t,r,i,a){!function(e,t,n,r,i,a){if(n){var o=Iw(t),s=Bw(t),l=r*n;null==i?(i=t+r*Ow,a=t-l/2):(i=gk(o,i),a=gk(o,a),(r>0?ia)&&(i+=r*Ow));for(var u,c=i;r>0?c>a:c0)do{u.point(0===c||3===c?e:n,c>1?r:t)}while((c=(c+s+4)%4)!==f);else u.point(a[0],a[1])}function o(r,i){return Pw(r[0]-e)0?0:3:Pw(r[0]-n)0?2:1:Pw(r[1]-t)0?1:0:i>0?3:2}function s(e,t){return l(e.x,t.x)}function l(e,t){var n=o(e,1),r=o(t,1);return n!==r?n-r: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 l,u,c,f,d,h,p,m,g,v,y,b=o,_=Aw(),x={point:w,lineStart:function(){x.point=k,u&&u.push(c=[]),v=!0,g=!1,p=m=NaN},lineEnd:function(){l&&(k(f,d),h&&g&&_.rejoin(),l.push(_.result())),x.point=w,g&&b.lineEnd()},polygonStart:function(){b=_,l=[],u=[],y=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,i=u.length;nr&&(d-a)*(r-o)>(h-o)*(e-a)&&++t:h<=r&&(d-a)*(r-o)<(h-o)*(e-a)&&--t;return t}(),n=y&&t,i=(l=ck(l)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&Gw(l,s,t,a,o),o.polygonEnd()),b=o,l=u=c=null}};function w(e,t){i(e,t)&&b.point(e,t)}function k(a,o){var s=i(a,o);if(u&&c.push([a,o]),v)f=a,d=o,h=s,v=!1,s&&(b.lineStart(),b.point(a,o));else if(s&&g)b.point(a,o);else{var l=[p=Math.max(yk,Math.min(vk,p)),m=Math.max(yk,Math.min(vk,m))],_=[a=Math.max(yk,Math.min(vk,a)),o=Math.max(yk,Math.min(vk,o))];!function(e,t,n,r,i,a){var o,s=e[0],l=e[1],u=0,c=1,f=t[0]-s,d=t[1]-l;if(o=n-s,f||!(o>0)){if(o/=f,f<0){if(o0){if(o>c)return;o>u&&(u=o)}if(o=i-s,f||!(o<0)){if(o/=f,f<0){if(o>c)return;o>u&&(u=o)}else if(f>0){if(o0)){if(o/=d,d<0){if(o0){if(o>c)return;o>u&&(u=o)}if(o=a-l,d||!(o<0)){if(o/=d,d<0){if(o>c)return;o>u&&(u=o)}else if(d>0){if(o0&&(e[0]=s+u*f,e[1]=l+u*d),c<1&&(t[0]=s+c*f,t[1]=l+c*d),!0}}}}}(l,_,e,t,n,r)?s&&(b.lineStart(),b.point(a,o),y=!1):(g||(b.lineStart(),b.point(l[0],l[1])),b.point(_[0],_[1]),s||b.lineEnd(),y=!1)}p=a,m=o,g=s}return x}}(S=+e[0][0],r=+e[0][1],i=+e[1][0],a=+e[1][1]),T()):null==S?null:[[S,r],[i,a]]},A.scale=function(e){return arguments.length?(f=+e,D()):f},A.translate=function(e){return arguments.length?(d=+e[0],h=+e[1],D()):[d,h]},A.center=function(e){return arguments.length?(p=e[0]%360*Lw,m=e[1]%360*Lw,D()):[p*Fw,m*Fw]},A.rotate=function(e){return arguments.length?(g=e[0]%360*Lw,v=e[1]%360*Lw,y=e.length>2?e[2]%360*Lw:0,D()):[g*Fw,v*Fw,y*Fw]},A.angle=function(e){return arguments.length?(b=e%360*Lw,D()):b*Fw},A.reflectX=function(e){return arguments.length?(_=e?-1:1,D()):_<0},A.reflectY=function(e){return arguments.length?(x=e?-1:1,D()):x<0},A.precision=function(e){return arguments.length?(o=qk(s,E=e*e),T()):qw(E)},A.fitExtent=function(e,t){return Bk(A,e,t)},A.fitSize=function(e,t){return function(e,t,n){return Bk(e,[[0,0],t],n)}(A,e,t)},A.fitWidth=function(e,t){return function(e,t,n){return jk(e,(function(n){var r=+t,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];e.scale(150*i).translate([a,o])}),n)}(A,e,t)},A.fitHeight=function(e,t){return function(e,t,n){return jk(e,(function(n){var r=+t,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([a,o])}),n)}(A,e,t)},function(){return t=e.apply(this,arguments),A.invert=t.invert&&M,D()}}((function(){return e}))()}var Yk=Math.abs,$k=(Math.atan,Math.atan2,Math.ceil,Math.cos),Xk=(Math.exp,Math.floor,Math.log,Math.max,Math.min,Math.pow,Math.round,Math.sign,Math.sin),Kk=(Math.tan,Math.PI),Qk=Kk/2,Zk=(Math.SQRT1_2,eS(2));function Jk(e){return e>1?Qk:e<-1?-Qk:Math.asin(e)}function eS(e){return e>0?Math.sqrt(e):0}function tS(e,t){var n,r=e*Xk(t),i=30;do{t-=n=(t+Xk(t)-r)/(1+$k(t))}while(Yk(n)>1e-6&&--i>0);return t/2}eS(Kk);var nS=function(e,t,n){function r(r,i){return[e*r*$k(i=tS(n,i)),t*Xk(i)]}return r.invert=function(r,i){return i=Jk(i/t),[r/(e*$k(i)),Jk((2*i+Xk(2*i))/n)]},r}(Zk/Qk,Zk,Kk);const rS=hx(),iS=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function aS(e,t){if(!e||"string"!=typeof e)throw new Error("Projection type must be a name string.");return e=e.toLowerCase(),arguments.length>1?(sS[e]=function(e,t){return function n(){const r=t();return r.type=e,r.path=hx().projection(r),r.copy=r.copy||function(){const e=n();return iS.forEach((t=>{r[t]&&e[t](r[t]())})),e.path.pointRadius(r.path.pointRadius()),e},r}}(e,t),this):sS[e]||null}function oS(e){return e&&e.path||rS}const sS={albers:iw,albersusa:function(){var e,t,n,r,i,a,o=iw(),s=rw().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=rw().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(e,t){a=[e,t]}};function c(e){var t=e[0],o=e[1];return a=null,n.point(t,o),a||(r.point(t,o),a)||(i.point(t,o),a)}function f(){return e=t=null,c}return c.invert=function(e){var t=o.scale(),n=o.translate(),r=(e[0]-n[0])/t,i=(e[1]-n[1])/t;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?l:o).invert(e)},c.stream=function(n){return e&&t===n?e:(r=[o.stream(t=n),s.stream(n),l.stream(n)],i=r.length,e={point:function(e,t){for(var n=-1;++n2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90]).scale(159.155)}};for(const e in sS)aS(e,sS[e]);function lS(e){ei.call(this,null,e)}function uS(e){ei.call(this,null,e)}function cS(e){ei.call(this,null,e)}function fS(e,t,n){var r=fk(e,t-Mw,n).concat(t);return function(e){return r.map((function(t){return[e,t]}))}}function dS(e,t,n){var r=fk(e,t-Mw,n).concat(t);return function(e){return r.map((function(t){return[t,e]}))}}function hS(e){ei.call(this,[],e),this.generator=function(){var e,t,n,r,i,a,o,s,l,u,c,f,d=10,h=d,p=90,m=360,g=2.5;function v(){return{type:"MultiLineString",coordinates:y()}}function y(){return fk(jw(r/p)*p,n,p).map(c).concat(fk(jw(s/m)*m,o,m).map(f)).concat(fk(jw(t/d)*d,e,d).filter((function(e){return Pw(e%p)>Mw})).map(l)).concat(fk(jw(a/h)*h,i,h).filter((function(e){return Pw(e%m)>Mw})).map(u))}return v.lines=function(){return y().map((function(e){return{type:"LineString",coordinates:e}}))},v.outline=function(){return{type:"Polygon",coordinates:[c(r).concat(f(o).slice(1),c(n).reverse().slice(1),f(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?(r=+e[0][0],n=+e[1][0],s=+e[0][1],o=+e[1][1],r>n&&(e=r,r=n,n=e),s>o&&(e=s,s=o,o=e),v.precision(g)):[[r,s],[n,o]]},v.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],a=+n[0][1],i=+n[1][1],t>e&&(n=t,t=e,e=n),a>i&&(n=a,a=i,i=n),v.precision(g)):[[t,a],[e,i]]},v.step=function(e){return arguments.length?v.stepMajor(e).stepMinor(e):v.stepMinor()},v.stepMajor=function(e){return arguments.length?(p=+e[0],m=+e[1],v):[p,m]},v.stepMinor=function(e){return arguments.length?(d=+e[0],h=+e[1],v):[d,h]},v.precision=function(d){return arguments.length?(g=+d,l=fS(a,i,90),u=dS(t,e,g),c=fS(s,o,90),f=dS(r,n,g),v):g},v.extentMajor([[-180,-90+Mw],[180,90-Mw]]).extentMinor([[-180,-80-Mw],[180,80+Mw]])}()}function pS(e){ei.call(this,null,e),this.modified(!0)}function mS(e,t,n){(0,Se.isFunction)(e[t])&&e[t](n)}function gS(e){return function(){return e}}function vS(){return 1e-6*(Math.random()-.5)}function yS(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,a,o,s,l,u,c,f,d,h=e._root,p={data:r},m=e._x0,g=e._y0,v=e._x1,y=e._y1;if(!h)return e._root=p,e;for(;h.length;)if((u=t>=(a=(m+v)/2))?m=a:v=a,(c=n>=(o=(g+y)/2))?g=o:y=o,i=h,!(h=h[f=c<<1|u]))return i[f]=p,e;if(s=+e._x.call(null,h.data),l=+e._y.call(null,h.data),t===s&&n===l)return p.next=h,i?i[f]=p:e._root=p,e;do{i=i?i[f]=new Array(4):e._root=new Array(4),(u=t>=(a=(m+v)/2))?m=a:v=a,(c=n>=(o=(g+y)/2))?g=o:y=o}while((f=c<<1|u)==(d=(l>=o)<<1|s>=a));return i[d]=h,i[f]=p,e}function bS(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function _S(e){return e[0]}function xS(e){return e[1]}function wS(e,t,n){var r=new kS(null==t?_S:t,null==n?xS:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function kS(e,t,n,r,i,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function SS(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}lS.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"}]},(0,Se.inherits)(lS,ei).transform=function(e,t){var n=t.fork(t.ALL),r=this.value,i=e.field||Se.identity,a=e.as||"path",o=n.SOURCE;!r||e.modified()?(this.value=r=oS(e.projection),n.materialize().reflow()):o=i===Se.identity||t.modified(i.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}(r,e.pointRadius);return n.visit(o,(function(e){e[a]=r(i(e))})),r.pointRadius(s),n.modifies(a)},uS.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"]}]},(0,Se.inherits)(uS,ei).transform=function(e,t){var n,r=e.projection,i=e.fields[0],a=e.fields[1],o=e.as||["x","y"],s=o[0],l=o[1];function u(e){var t=r([i(e),a(e)]);t?(e[s]=t[0],e[l]=t[1]):(e[s]=void 0,e[l]=void 0)}return e.modified()?t=t.materialize().reflow(!0).visit(t.SOURCE,u):(n=t.modified(i.fields)||t.modified(a.fields),t.visit(n?t.ADD_MOD:t.ADD,u)),t.modifies(o)},cS.Definition={type:"GeoShape",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"shape"}]},(0,Se.inherits)(cS,ei).transform=function(e,t){var n=t.fork(t.ALL),r=this.value,i=e.field||(0,Se.field)("datum"),a=e.as||"shape",o=n.ADD_MOD;return r&&!e.modified()||(this.value=r=function(e,t,n){var r=null==n?function(n){return e(t(n))}:function(r){var i=e.pointRadius(),a=e.pointRadius(n)(t(r));return e.pointRadius(i),a};return r.context=function(t){return e.context(t),r},r}(oS(e.projection),i,e.pointRadius),n.materialize().reflow(),o=n.SOURCE),n.visit(o,(function(e){e[a]=r})),n.modifies(a)},hS.Definition={type:"Graticule",metadata:{changes:!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}]},(0,Se.inherits)(hS,ei).transform=function(e,t){var n,r=this.value,i=this.generator;if(!r.length||e.modified())for(var a in e)(0,Se.isFunction)(i[a])&&i[a](e[a]);return n=i(),r.length?t.mod.push(Le(r[0],n)):t.add.push(Ne(n)),r[0]=n,t},(0,Se.inherits)(pS,ei).transform=function(e,t){var n,r,i=this.value;return!i||e.modified("type")?(this.value=(n=e.type,(r=aS((n||"mercator").toLowerCase()))||(0,Se.error)("Unrecognized projection type: "+n),i=r()),iS.forEach((function(t){null!=e[t]&&mS(i,t,e[t])}))):iS.forEach((function(t){e.modified(t)&&mS(i,t,e[t])})),null!=e.pointRadius&&i.path.pointRadius(e.pointRadius),e.fit&&function(e,t){var n,r=(n=t.fit,1===(n=(0,Se.array)(n)).length?n[0]:{type:Pb,features:n.reduce((function(e,t){return t&&t.type===Pb?e.push.apply(e,t.features):(0,Se.isArray)(t)?e.push.apply(e,t):e.push(t),e}),[])});t.extent?e.fitExtent(t.extent,r):t.size&&e.fitSize(t.size,r)}(i,e),t.fork(t.NO_SOURCE|t.NO_FIELDS)};var CS=wS.prototype=kS.prototype;function ES(e){return e.x+e.vx}function AS(e){return e.y+e.vy}function MS(e){return e.index}function DS(e,t){var n=e.get(t);if(!n)throw new Error("missing: "+t);return n}CS.copy=function(){var e,t,n=new kS(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=SS(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var i=0;i<4;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(4)}):r.target[i]=SS(t));return n},CS.add=function(e){var t=+this._x.call(null,e),n=+this._y.call(null,e);return yS(this.cover(t,n),t,n,e)},CS.addAll=function(e){var t,n,r,i,a=e.length,o=new Array(a),s=new Array(a),l=1/0,u=1/0,c=-1/0,f=-1/0;for(n=0;nc&&(c=r),if&&(f=i));if(l>c||u>f)return this;for(this.cover(l,u).cover(c,f),n=0;ne||e>=i||r>t||t>=a;)switch(s=(td||(a=l.y0)>h||(o=l.x1)=v)<<1|e>=g)&&(l=p[p.length-1],p[p.length-1]=p[p.length-1-u],p[p.length-1-u]=l)}else{var y=e-+this._x.call(null,m.data),b=t-+this._y.call(null,m.data),_=y*y+b*b;if(_=(s=(p+g)/2))?p=s:g=s,(c=o>=(l=(m+v)/2))?m=l:v=l,t=h,!(h=h[f=c<<1|u]))return this;if(!h.length)break;(t[f+1&3]||t[f+2&3]||t[f+3&3])&&(n=t,d=f)}for(;h.data!==e;)if(r=h,!(h=h.next))return this;return(i=h.next)&&delete h.next,r?(i?r.next=i:delete r.next,this):t?(i?t[f]=i:delete t[f],(h=t[0]||t[1]||t[2]||t[3])&&h===(t[3]||t[2]||t[1]||t[0])&&!h.length&&(n?n[d]=h:this._root=h),this):(this._root=i,this)},CS.removeAll=function(e){for(var t=0,n=e.length;t=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}(e+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a0)for(var n,r,i=new Array(n),a=0;a=0&&t._call.call(null,e),t=t._next;--IS}()}finally{IS=0,function(){for(var e,t,n=zS,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:zS=t);RS=e,ZS(r)}(),qS=0}}function QS(){var e=HS.now(),t=e-US;t>1e3&&(WS-=t,US=e)}function ZS(e){IS||(jS&&(jS=clearTimeout(jS)),e-qS>24?(e<1/0&&(jS=setTimeout(KS,e-HS.now()-WS)),BS&&(BS=clearInterval(BS))):(BS||(US=HS.now(),BS=setInterval(QS,1e3)),IS=1,VS(KS)))}function JS(e){return e.x}function eC(e){return e.y}$S.prototype=XS.prototype={constructor:$S,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?GS():+n)+(null==t?0:+t),this._next||RS===this||(RS?RS._next=this:zS=this,RS=this),this._call=e,this._time=n,ZS()},stop:function(){this._call&&(this._call=null,this._time=1/0,ZS())}};var tC=Math.PI*(3-Math.sqrt(5)),nC={center:function(e,t){var n;function r(){var r,i,a=n.length,o=0,s=0;for(r=0;rl+h||iu+h||as.index){var p=l-o.x-o.vx,m=u-o.y-o.vy,g=p*p+m*m;ge.r&&(e.r=e[t].r)}function s(){if(t){var r,i,a=t.length;for(n=new Array(a),r=0;r=o)){(e.data!==t||e.next)&&(0===c&&(h+=(c=vS())*c),0===f&&(h+=(f=vS())*f),h=0;)t+=n[r].value;else t=1;e.value=t}function mC(e,t){var n,r,i,a,o,s=new bC(e),l=+e.value&&(s.value=e.value),u=[s];for(null==t&&(t=gC);n=u.pop();)if(l&&(n.value=+n.data.value),(i=t(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)u.push(r=n.children[a]=new bC(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(yC)}function gC(e){return e.children}function vC(e){e.data=e.data.data}function yC(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function bC(e){this.data=e,this.depth=this.height=0,this.parent=null}function _C(e){ei.call(this,null,e)}function xC(e){return e.values}function wC(e){ei.call(this,null,e)}function kC(e,t){return e.parent===t.parent?1:2}lC.transform=function(e,t){var n,r,i=this.value,a=t.changed(t.ADD_REM),o=e.modified(iC),s=e.iterations||300;if(i?(a&&(t.modifies("index"),i.nodes(t.source)),(o||t.changed(t.MOD))&&uC(i,e,0,t)):(this.value=i=function(e,t){var n=function(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=Zd(),l=XS(c),u=PS("tick","end");function c(){f(),u.call("tick",t),n1?(null==n?s.remove(e):s.set(e,h(n)),t):s.get(e)},find:function(t,n,r){var i,a,o,s,l,u=0,c=e.length;for(null==r?r=1/0:r*=r,u=0;u1?(u.on(e,n),t):u.on(e)}}}(e),r=!1,i=n.stop,a=n.restart;return n.stopped=function(){return r},n.restart=function(){return r=!1,a()},n.stop=function(){return r=!0,i()},uC(n,t,!0).on("end",(function(){r=!0}))}(t.source,e),i.on("tick",(n=t.dataflow,r=this,function(){n.touch(r).run()})),e.static||(a=!0,i.tick()),t.modifies("index")),o||a||e.modified(aC)||t.changed()&&e.restart)if(i.alpha(Math.max(i.alpha(),e.alpha||1)).alphaDecay(1-Math.pow(i.alphaMin(),1/s)),e.static)for(i.stop();--s>=0;)i.tick();else if(i.stopped()&&i.restart(),!a)return t.StopPropagation;return this.finish(e,t)},lC.finish=function(e,t){for(var n,r=t.dataflow,i=this._argops,a=0,o=i.length;a=0;--n)i.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].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(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},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 mC(this).eachBefore(vC)}},_C.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]},(0,Se.inherits)(_C,ei).transform=function(e,t){t.source||(0,Se.error)("Nest transform requires an upstream data source.");var n=e.generate,r=e.modified(),i=t.clone(),a=this.value;return(!a||r||t.changed())&&(a&&a.each((function(e){e.children&&Me(e.data)&&i.rem.push(e.data)})),this.value=a=mC({values:(0,Se.array)(e.keys).reduce((function(e,t){return e.key(t),e}),Jd()).entries(i.source)},xC),n&&a.each((function(e){e.children&&(e=Ne(e.data),i.add.push(e),i.source.push(e))})),hC(a,De,De)),i.source.root=a,i},(0,Se.inherits)(wC,ei).transform=function(e,t){t.source&&t.source.root||(0,Se.error)(this.constructor.name+" transform requires a backing tree data source.");var n=this.layout(e.method),r=this.fields,i=t.source.root,a=e.as||r;e.field&&i.sum(e.field),e.sort&&i.sort(e.sort),function(e,t,n){for(var r,i=0,a=t.length;i0&&n*n>r*r+i*i}function MC(e,t){for(var n=0;n(o*=o)?(r=(u+o-i)/(2*u),a=Math.sqrt(Math.max(0,o/u-r*r)),n.x=e.x-r*s-a*l,n.y=e.y-r*l+a*s):(r=(u+i-o)/(2*u),a=Math.sqrt(Math.max(0,i/u-r*r)),n.x=t.x+r*s-a*l,n.y=t.y+r*l+a*s)):(n.x=t.x+n.r,n.y=t.y)}function FC(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function LC(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,a=(t.y*n.r+n.y*t.r)/r;return i*i+a*a}function PC(e){this._=e,this.next=null,this.previous=null}function zC(e){if(!(i=e.length))return 0;var t,n,r,i,a,o,s,l,u,c,f;if((t=e[0]).x=0,t.y=0,!(i>1))return t.r;if(n=e[1],t.x=-n.r,n.x=t.r,n.y=0,!(i>2))return t.r+n.r;OC(n,t,r=e[2]),t=new PC(t),n=new PC(n),r=new PC(r),t.next=r.previous=n,n.next=t.previous=r,r.next=n.previous=t;e:for(s=3;s0)throw new Error("cycle");return a}return n.id=function(t){return arguments.length?(e=RC(t),n):e},n.parentId=function(e){return arguments.length?(t=RC(e),n):t},n}function rE(e){ei.call(this,null,e)}function iE(e,t){return e.parent===t.parent?1:2}function aE(e){var t=e.children;return t?t[0]:e.t}function oE(e){var t=e.children;return t?t[t.length-1]:e.t}function sE(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function lE(e,t,n){return e.a.parent===t.parent?e.a:n}function uE(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 cE(e,t){return e.parent===t.parent?1:2}function fE(e,t){return e+t.x}function dE(e,t){return Math.max(e,t.y)}rE.Definition={type:"Stratify",metadata:{treesource:!0},params:[{name:"key",type:"field",required:!0},{name:"parentKey",type:"field",required:!0}]},(0,Se.inherits)(rE,ei).transform=function(e,t){t.source||(0,Se.error)("Stratify transform requires an upstream data source.");var n=this.value,r=e.modified(),i=t.fork(t.ALL).materialize(t.SOURCE),a=!this.value||r||t.changed(t.ADD_REM)||t.modified(e.key.fields)||t.modified(e.parentKey.fields);return i.source=i.source.slice(),a&&(n=i.source.length?hC(nE().id(e.key).parentId(e.parentKey)(i.source),e.key,Se.truthy):hC(nE()([{}]),e.key,e.key)),i.source.root=this.value=n,i},uE.prototype=Object.create(bC.prototype);var hE={tidy:function(){var e=iE,t=1,n=1,r=null;function i(i){var l=function(e){for(var t,n,r,i,a,o=new uE(e,0),s=[o];t=s.pop();)if(r=t._.children)for(t.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=t.children[i]=new uE(r[i],i)),n.parent=t;return(o.parent=new uE(null,0)).children=[o],o}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),r)i.eachBefore(s);else{var u=i,c=i,f=i;i.eachBefore((function(e){e.xc.x&&(c=e),e.depth>f.depth&&(f=e)}));var d=u===c?1:e(u,c)/2,h=d-u.x,p=t/(c.x+d+h),m=n/(f.depth||1);i.eachBefore((function(e){e.x=(e.x+h)*p,e.y=e.depth*m}))}return i}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,i=e.children,a=i.length;--a>=0;)(t=i[a]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,a=t,o=t,s=n,l=a.parent.children[0],u=a.m,c=o.m,f=s.m,d=l.m;s=oE(s),a=aE(a),s&&a;)l=aE(l),(o=oE(o)).a=t,(i=s.z+f-a.z-u+e(s._,a._))>0&&(sE(lE(s,t,r),t,i),u+=i,c+=i),f+=s.m,u+=a.m,d+=l.m,c+=o.m;s&&!oE(o)&&(o.t=s,o.m+=f-c),a&&!aE(l)&&(l.t=a,l.m+=u-d,r=t)}return r}(t,i,t.parent.A||r[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 i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i},cluster:function(){var e=cE,t=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter((function(t){var n=t.children;n?(t.x=function(e){return e.reduce(fE,0)/e.length}(n),t.y=function(e){return 1+e.reduce(dE,0)}(n)):(t.x=a?o+=e(t,a):0,t.y=0,a=t)}));var s=function(e){for(var t;t=e.children;)e=t[0];return e}(i),l=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(i),u=s.x-e(s,l)/2,c=l.x+e(l,s)/2;return i.eachAfter(r?function(e){e.x=(e.x-i.x)*t,e.y=(i.y-e.y)*n}:function(e){e.x=(e.x-u)/(c-u)*t,e.y=(1-(i.y?e.y/i.y:1))*n})}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}},pE=["x","y","depth","children"];function mE(e){wC.call(this,e)}mE.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:pE.length,default:pE}]};var gE=(0,Se.inherits)(mE,wC);function vE(e){ei.call(this,[],e)}function yE(e,t,n,r,i){for(var a,o=e.children,s=-1,l=o.length,u=e.value&&(i-n)/e.value;++sd&&(d=s),g=c*c*m,(h=Math.max(d/g,g/f))>p){c-=s;break}p=h}v.push(o={value:c,dice:l1?t:1)},n}(bE),wE=function e(t){function n(e,n,r,i,a){if((o=e._squarify)&&o.ratio===t)for(var o,s,l,u,c,f=-1,d=o.length,h=e.value;++f1?t:1)},n}(bE);var kE={binary:function(e,t,n,r,i){var a,o,s=e.children,l=s.length,u=new Array(l+1);for(u[0]=o=a=0;a=n-1){var c=s[t];return c.x0=i,c.y0=a,c.x1=o,void(c.y1=l)}for(var f=u[t],d=r/2+f,h=t+1,p=n-1;h>>1;u[m]l-a){var y=(i*v+o*g)/r;e(t,h,g,i,a,y,l),e(h,n,v,y,a,o,l)}else{var b=(a*v+l*g)/r;e(t,h,g,i,a,o,b),e(h,n,v,i,b,o,l)}}(0,l,e.value,t,n,r,i)},dice:$C,slice:yE,slicedice:function(e,t,n,r,i){(1&e.depth?yE:$C)(e,t,n,r,i)},squarify:xE,resquarify:wE},SE=["x0","y0","x1","y1","depth","children"];function CE(e){wC.call(this,e)}CE.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:SE.length,default:SE}]};var EE=(0,Se.inherits)(CE,wC);function AE(e){return function(){return e}}function ME(e){return e[0]}function DE(e){return e[1]}function TE(){this._=null}function NE(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function OE(e,t){var n=t,r=t.R,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function FE(e,t){var n=t,r=t.L,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function LE(e){for(;e.L;)e=e.L;return e}EE.layout=function(){var e=function(){var e=xE,t=!1,n=1,r=1,i=[0],a=IC,o=IC,s=IC,l=IC,u=IC;function c(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(f),i=[0],t&&e.eachBefore(YC),e}function f(t){var n=i[t.depth],r=t.x0+n,c=t.y0+n,f=t.x1-n,d=t.y1-n;f0)){if(a/=d,d<0){if(a0){if(a>f)return;a>c&&(c=a)}if(a=r-l,d||!(a<0)){if(a/=d,d<0){if(a>f)return;a>c&&(c=a)}else if(d>0){if(a0)){if(a/=h,h<0){if(a0){if(a>f)return;a>c&&(c=a)}if(a=i-u,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>c&&(c=a)}else if(h>0){if(a0||f<1)||(c>0&&(e[0]=[l+c*d,u+c*h]),f<1&&(e[1]=[l+f*d,u+f*h]),!0)}}}}}function BE(e,t,n,r,i){var a=e[1];if(a)return!0;var o,s,l=e[0],u=e.left,c=e.right,f=u[0],d=u[1],h=c[0],p=c[1],m=(f+h)/2,g=(d+p)/2;if(p===d){if(m=r)return;if(f>h){if(l){if(l[1]>=i)return}else l=[m,n];a=[m,i]}else{if(l){if(l[1]1)if(f>h){if(l){if(l[1]>=i)return}else l=[(n-s)/o,n];a=[(i-s)/o,i]}else{if(l){if(l[1]=r)return}else l=[t,o*t+s];a=[r,o*r+s]}else{if(l){if(l[0]=-lA)){var h=l*l+u*u,p=c*c+f*f,m=(f*h-u*p)/d,g=(l*p-c*h)/d,v=VE.pop()||new GE;v.arc=e,v.site=i,v.x=m+o,v.y=(v.cy=g+s)+Math.sqrt(m*m+g*g),e.circle=v;for(var y=null,b=aA._;b;)if(v.ysA)s=s.L;else{if(!((i=a-nA(s,o))>sA)){r>-sA?(t=s.P,n=s):i>-sA?(t=s,n=s.N):t=n=s;break}if(!s.R){t=s;break}s=s.R}!function(e){iA[e.index]={site:e,halfedges:[]}}(e);var l=QE(e);if(rA.insert(t,l),t||n){if(t===n)return $E(t),n=QE(t.site),rA.insert(l,n),l.edge=n.edge=zE(t.site,l.site),YE(t),void YE(n);if(n){$E(t),$E(n);var u=t.site,c=u[0],f=u[1],d=e[0]-c,h=e[1]-f,p=n.site,m=p[0]-c,g=p[1]-f,v=2*(d*g-h*m),y=d*d+h*h,b=m*m+g*g,_=[(g*y-h*b)/v+c,(d*b-m*y)/v+f];IE(n.edge,u,p,_),l.edge=zE(u,e,null,_),n.edge=zE(e,p,null,_),YE(t),YE(n)}else l.edge=zE(t.site,l.site)}}function tA(e,t){var n=e.site,r=n[0],i=n[1],a=i-t;if(!a)return r;var o=e.P;if(!o)return-1/0;var s=(n=o.site)[0],l=n[1],u=l-t;if(!u)return s;var c=s-r,f=1/a-1/u,d=c/u;return f?(-d+Math.sqrt(d*d-2*f*(c*c/(-2*u)-l+u/2+i-a/2)))/f+r:(r+s)/2}function nA(e,t){var n=e.N;if(n)return tA(n,t);var r=e.site;return r[1]===t?r[0]:1/0}var rA,iA,aA,oA,sA=1e-6,lA=1e-12;function uA(e,t){return t[1]-e[1]||t[0]-e[0]}function cA(e,t){var n,r,i,a=e.sort(uA).pop();for(oA=[],iA=new Array(e.length),rA=new PE,aA=new PE;;)if(i=HE,a&&(!i||a[1]sA||Math.abs(i[0][1]-i[1][1])>sA)||delete oA[a]}(o,s,l,u),function(e,t,n,r){var i,a,o,s,l,u,c,f,d,h,p,m,g=iA.length,v=!0;for(i=0;isA||Math.abs(m-d)>sA)&&(l.splice(s,0,oA.push(RE(o,h,Math.abs(p-e)sA?[e,Math.abs(f-e)sA?[Math.abs(d-r)sA?[n,Math.abs(f-n)sA?[Math.abs(d-t)=s)return null;var l=e-i.site[0],u=t-i.site[1],c=l*l+u*u;do{i=a.cells[r=o],o=null,i.halfedges.forEach((function(n){var r=a.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var l=e-s[0],u=t-s[1],f=l*l+u*u;f>5<<5,l=~~Math.max(Math.abs(y+b),Math.abs(y-b))}else o=o+31>>5<<5;if(l>h&&(h=l),f+o>=mA<<5&&(f=0,d+=h,h=0),d+l>=gA)break;i.translate((f+(o>>1))/a,(d+(l>>1))/a),t.rotate&&i.rotate(t.rotate*pA),i.fillText(t.text,0,0),t.padding&&(i.lineWidth=2*t.padding,i.strokeText(t.text,0,0)),i.restore(),t.width=o,t.height=l,t.xoff=f,t.yoff=d,t.x1=o>>1,t.y1=l>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,f+=o}for(var x=i.getImageData(0,0,(mA<<5)/a,gA/a).data,w=[];--r>=0;)if((t=n[r]).hasText){for(s=(o=t.width)>>5,l=t.y1-t.y0,u=0;u>5),E=x[(d+c)*(mA<<5)+(f+u)<<2]?1<<31-u%32:0;w[C]|=E,k|=E}k?S=c:(t.y0++,l--,c--,d++)}t.y1=t.y0+S,t.sprite=w.slice(0,(t.y1-t.y0)*s)}}}function yA(e,t,n){n>>=5;for(var r,i=e.sprite,a=e.width>>5,o=e.x-(a<<4),s=127&o,l=32-s,u=e.y1-e.y0,c=(e.y+e.y0)*n+(o>>5),f=0;f>>s:0))&t[c+d])return!0;c+=n}return!1}function bA(e,t){var n=e[0],r=e[1];t.x+t.x0r.x&&(r.x=t.x+t.x1),t.y+t.y1>r.y&&(r.y=t.y+t.y1)}function _A(e){var t=e[0]/e[1];return function(e){return[t*(e*=.1)*Math.cos(e),e*Math.sin(e)]}}function xA(e){return"function"==typeof e?e:function(){return e}}var wA={archimedean:_A,rectangular:function(e){var t=4*e[0]/e[1],n=0,r=0;return function(e){var i=e<0?-1:1;switch(Math.sqrt(1+4*i*e)-i&3){case 0:n+=t;break;case 1:r+=4;break;case 2:n-=t;break;default:r-=4}return[n,r]}}},kA=["x","y","font","fontSize","fontStyle","fontWeight","angle"],SA=["text","font","rotate","fontSize","fontStyle","fontWeight"];function CA(e){ei.call(this,function(){var e,t,n,r,i,a,o,s=[256,256],l=_A,u=[],c=Math.random,f={};function d(e,t,n){for(var r,i,a,o=t.x,u=t.y,f=Math.sqrt(s[0]*s[0]+s[1]*s[1]),d=l(s),h=c()<.5?1:-1,p=-h;(r=d(p+=h))&&(i=~~r[0],a=~~r[1],!(Math.min(Math.abs(i),Math.abs(a))>=f));)if(t.x=o+i,t.y=u+a,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>s[0]||t.y+t.y1>s[1]||n&&yA(t,e,s[0])||n&&(E=t,A=n,!(E.x+E.x1>A[0].x&&E.x+E.x0A[0].y&&E.y+E.y0>5,y=s[0]>>5,b=t.x-(v<<4),_=127&b,x=32-_,w=t.y1-t.y0,k=(t.y+t.y0)*y+(b>>5),S=0;S>>_:0);k+=y}return t.sprite=null,!0}var E,A;return!1}return f.layout=function(){for(var l=function(e){e.width=e.height=1;var t=Math.sqrt(e.getContext("2d").getImageData(0,0,1,1).data.length>>2);e.width=(mA<<5)/t,e.height=gA/t;var n=e.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:t}}(fs()),f=function(e){for(var t=[],n=-1;++n>5)*s[1]),h=null,p=u.length,m=-1,g=[],v=u.map((function(s){return{text:e(s),font:t(s),style:r(s),weight:i(s),rotate:a(s),size:~~n(s),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}));++m>1,y.y=s[1]*(c()+.5)>>1,vA(l,y,v,m),y.hasText&&d(f,y,h)&&(g.push(y),h?bA(h,y):h=[{x:y.x+y.x0,y:y.y+y.y0},{x:y.x+y.x1,y:y.y+y.y1}],y.x-=s[0]>>1,y.y-=s[1]>>1)}return g},f.words=function(e){return arguments.length?(u=e,f):u},f.size=function(e){return arguments.length?(s=[+e[0],+e[1]],f):s},f.font=function(e){return arguments.length?(t=xA(e),f):t},f.fontStyle=function(e){return arguments.length?(r=xA(e),f):r},f.fontWeight=function(e){return arguments.length?(i=xA(e),f):i},f.rotate=function(e){return arguments.length?(a=xA(e),f):a},f.text=function(t){return arguments.length?(e=xA(t),f):e},f.spiral=function(e){return arguments.length?(l=wA[e]||e,f):l},f.fontSize=function(e){return arguments.length?(n=xA(e),f):n},f.padding=function(e){return arguments.length?(o=xA(e),f):o},f.random=function(e){return arguments.length?(c=e,f):c},f}(),e)}function EA(e){return new Uint8Array(e)}function AA(e){return new Uint16Array(e)}function MA(e){return new Uint32Array(e)}function DA(e,t,n){var r=(t<257?EA:t<65537?AA:MA)(e);return n&&r.set(n),r}function TA(e,t,n){var r=1<i?1:0})),function(e,t){return Array.from(t,(t=>e[t]))}(e,t)}(f,d),u)o=t,s=e,t=Array(u+c),e=MA(u+c),function(e,t,n,r,i,a,o,s,l){var u,c=0,f=0;for(u=0;c0)for(l=0;l=t?e:((n=n||new e.constructor(t)).set(e),n)}(n,t.length)},add:function(e){for(var n,r=0,i=t.length,a=e.length;rr.length||n>e)&&(e=Math.max(n,e),r=DA(t,e,r),i=DA(t,e))}}}(),e),this._indices=null,this._dims=null}CA.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:kA}]},(0,Se.inherits)(CA,ei).transform=function(e,t){var n=e.modified();if(n||t.changed(t.ADD_REM)||SA.some((function(n){var r=e[n];return(0,Se.isFunction)(r)&&t.modified(r.fields)}))){var r,i=t.materialize(t.SOURCE).source,a=this.value,o=e.as||kA,s=e.fontSize||14;if((0,Se.isFunction)(s)?r=e.fontSizeRange:s=(0,Se.constant)(s),r){var l=s,u=wm("sqrt")().domain(function(e,t){for(var n,r=1/0,i=-1/0,a=0,o=t.length;ai&&(i=n);return[r,i]}(l,i)).range(r);s=function(e){return u(l(e))}}i.forEach((function(e){e[o[0]]=NaN,e[o[1]]=NaN,e[o[3]]=0}));for(var c,f,d=a.words(i).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(Ai).layout(),h=a.size(),p=h[0]>>1,m=h[1]>>1,g=0,v=d.length;gg)for(i=g,a=Math.min(p,v);iv)for(i=Math.max(p,v),a=m;ih)for(i=h,a=Math.min(f,p);ip)for(i=Math.max(f,p),a=d;i=$A?s*=10:l>=XA?s*=5:l>=KA&&(s*=2),a",hM[_M]="Identifier",hM[xM]="Keyword",hM[wM]="Null",hM[kM]="Numeric",hM[SM]="Punctuator",hM[CM]="String",hM[9]="RegularExpression";var EM="ArrayExpression",AM="BinaryExpression",MM="CallExpression",DM="ConditionalExpression",TM="Identifier",NM="Literal",OM="LogicalExpression",FM="MemberExpression",LM="ObjectExpression",PM="Property",zM="UnaryExpression",RM="Unexpected token %0",IM="Unexpected number",jM="Unexpected string",BM="Unexpected identifier",UM="Unexpected reserved word",qM="Unexpected end of input",WM="Invalid regular expression",HM="Invalid regular expression: missing /",VM="Octal literals are not allowed in strict mode.",GM="Duplicate data property in object literal not allowed in strict mode",YM="ILLEGAL",$M="Disabled.",XM=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]"),KM=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 QM(e,t){if(!e)throw new Error("ASSERT: "+t)}function ZM(e){return e>=48&&e<=57}function JM(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function eD(e){return"01234567".indexOf(e)>=0}function tD(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 nD(e){return 10===e||13===e||8232===e||8233===e}function rD(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&XM.test(String.fromCharCode(e))}function iD(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&KM.test(String.fromCharCode(e))}var aD={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 oD(){for(var e;mM1114111||"}"!==e)&&_D({},RM,YM),t<=65535?String.fromCharCode(t):(n=55296+(t-65536>>10),r=56320+(t-65536&1023),String.fromCharCode(n,r))}function uD(){var e,t;for(e=pM.charCodeAt(mM++),t=String.fromCharCode(e),92===e&&(117!==pM.charCodeAt(mM)&&_D({},RM,YM),++mM,(e=sD("u"))&&"\\"!==e&&rD(e.charCodeAt(0))||_D({},RM,YM),t=e);mM>>="===(r=pM.substr(mM,4))?{type:SM,value:r,start:i,end:mM+=4}:">>>"===(n=r.substr(0,3))||"<<="===n||">>="===n?{type:SM,value:n,start:i,end:mM+=3}:o===(t=n.substr(0,2))[1]&&"+-<>&|".indexOf(o)>=0||"=>"===t?{type:SM,value:t,start:i,end:mM+=2}:"<>=!+-*%&|^/".indexOf(o)>=0?(++mM,{type:SM,value:o,start:i,end:mM}):void _D({},RM,YM)}function fD(){var e,t,n;if(QM(ZM((n=pM[mM]).charCodeAt(0))||"."===n,"Numeric literal must start with a decimal digit or a decimal point"),t=mM,e="","."!==n){if(e=pM[mM++],n=pM[mM],"0"===e){if("x"===n||"X"===n)return++mM,function(e){for(var t="";mM=gM?{type:bM,start:mM,end:mM}:rD(e=pM.charCodeAt(mM))?(t=mM,n=92===pM.charCodeAt(mM)?uD():function(){var e,t;for(e=mM++;mM=0&&mM(QM(t=0&&_D({},WM,n),{value:n,literal:t}}(),r=function(e,t){var n=e;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,((e,t)=>{if(parseInt(t,16)<=1114111)return"x";_D({},WM)})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch(e){_D({},WM)}try{return new RegExp(e,t)}catch(e){return null}}(t.value,n.value),{literal:t.literal+n.literal,value:r,regex:{pattern:t.value,flags:n.value},start:e,end:mM}}()),pD()):xD(hD())}return n}function DD(){var e=[];if(wD("("),!kD(")"))for(;mM":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 LD(){var e,t;return e=function(){var e,t,n,r,i,a,o,s,l,u;if(e=vM,l=OD(),0===(i=FD(r=vM)))return l;for(r.prec=i,hD(),t=[e,vM],a=[l,r,o=OD()];(i=FD(vM))>0;){for(;a.length>2&&i<=a[a.length-2].prec;)o=a.pop(),s=a.pop().value,l=a.pop(),t.pop(),n=mD(s,l,o),a.push(n);(r=hD()).prec=i,a.push(r),t.push(vM),n=OD(),a.push(n)}for(n=a[u=a.length-1],t.pop();u>1;)t.pop(),n=mD(a[u-1].value,a[u-2],n),u-=2;return n}(),kD("?")&&(hD(),t=LD(),wD(":"),e=function(e,t,n){var r=new dM(DM);return r.test=e,r.consequent=t,r.alternate=n,r}(e,t,LD())),e}function PD(){var e=LD();if(kD(","))throw new Error($M);return e}const zD={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"};function RD(e){function t(t,n,r){return i=>function(t,n,r,i){let a=e(n[0]);return r&&(a=r+"("+a+")",0===r.lastIndexOf("new ",0)&&(a="("+a+")")),a+"."+t+(i<0?"":0===i?"()":"("+n.slice(1).map(e).join(",")+")")}(t,i,n,r)}const n="new Date",r="String",i="RegExp";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&&(0,Se.error)("Missing arguments to clamp function."),t.length>3&&(0,Se.error)("Too many arguments to clamp function.");const 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",r,0),lower:t("toLowerCase",r,0),substring:t("substring",r),split:t("split",r),replace:t("replace",r),trim:t("trim",r,0),regexp:i,test:t("test",i),if:function(t){t.length<3&&(0,Se.error)("Missing arguments to if function."),t.length>3&&(0,Se.error)("Too many arguments to if function.");const n=t.map(e);return"("+n[0]+"?"+n[1]+":"+n[2]+")"}}}var ID={};function jD(e,t,n){var r=e+":"+n,i=ID[r];return i&&i[0]===t||(ID[r]=i=[t,t(n)]),i[1]}function BD(e,t){return jD("timeFormat",fn,t)(e)}var UD=new Date(2e3,0,1);function qD(e,t,n){return UD.setMonth(e),UD.setDate(t),BD(UD,n)}function WD(e,t,n,r){var i,a=t[0],o=t[t.length-1];return a>o&&(i=a,a=o,o=i),r=void 0===r||r,((n=void 0===n||n)?a<=e:a=0?1:-1,i=r*n,a=Iw(t=(t*=Lw)/2+Nw),o=Bw(t),s=tT*o,l=eT*a+s*Iw(i),u=s*r*Bw(i);nT.add(Rw(u,l)),JD=e,eT=a,tT=o}var uT,cT,fT,dT,hT,pT,mT,gT,vT,yT,bT,_T,xT,wT,kT,ST,CT,ET,AT,MT,DT,TT,NT,OT,FT,LT,PT=$w(),zT={point:RT,lineStart:jT,lineEnd:BT,polygonStart:function(){zT.point=UT,zT.lineStart=qT,zT.lineEnd=WT,PT.reset(),iT.polygonStart()},polygonEnd:function(){iT.polygonEnd(),zT.point=RT,zT.lineStart=jT,zT.lineEnd=BT,nT<0?(uT=-(fT=180),cT=-(dT=90)):PT>Mw?dT=90:PT<-Mw&&(cT=-90),yT[0]=uT,yT[1]=fT},sphere:function(){uT=-(fT=180),cT=-(dT=90)}};function RT(e,t){vT.push(yT=[uT=e,fT=e]),tdT&&(dT=t)}function IT(e,t){var n=Jw([e*Lw,t*Lw]);if(gT){var r=tk(gT,n),i=tk([r[1],-r[0],0],r);ik(i),i=Zw(i);var a,o=e-hT,s=o>0?1:-1,l=i[0]*Fw*s,u=Pw(o)>180;u^(s*hTdT&&(dT=a):u^(s*hT<(l=(l+360)%360-180)&&ldT&&(dT=t)),u?eHT(uT,fT)&&(fT=e):HT(e,fT)>HT(uT,fT)&&(uT=e):fT>=uT?(efT&&(fT=e)):e>hT?HT(uT,e)>HT(uT,fT)&&(fT=e):HT(e,fT)>HT(uT,fT)&&(uT=e)}else vT.push(yT=[uT=e,fT=e]);tdT&&(dT=t),gT=n,hT=e}function jT(){zT.point=IT}function BT(){yT[0]=uT,yT[1]=fT,zT.point=RT,gT=null}function UT(e,t){if(gT){var n=e-hT;PT.add(Pw(n)>180?n+(n>0?360:-360):n)}else pT=e,mT=t;iT.point(e,t),IT(e,t)}function qT(){iT.lineStart()}function WT(){UT(pT,mT),iT.lineEnd(),Pw(PT)>Mw&&(uT=-(fT=180)),yT[0]=uT,yT[1]=fT,gT=null}function HT(e,t){return(t-=e)<0?t+360:t}function VT(e,t){return e[0]-t[0]}function GT(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tHT(r[0],r[1])&&(r[1]=i[1]),HT(i[0],r[1])>HT(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,t=0,r=a[n=a.length-1];t<=n;r=i,++t)i=a[t],(s=HT(r[1],i[0]))>o&&(o=s,uT=i[0],fT=r[1])}return vT=yT=null,uT===1/0||cT===1/0?[[NaN,NaN],[NaN,NaN]]:[[uT,cT],[fT,dT]]})),sN=iN("centroid",(function(e){bT=_T=xT=wT=kT=ST=CT=ET=AT=MT=DT=0,Ok(e,YT);var t=AT,n=MT,r=DT,i=t*t+n*n+r*r;return i<1e-12&&(t=ST,n=CT,r=ET,_T=2&&t[t.length-1].value)!==mN||r.hasOwnProperty(o)||(r[o]=n.getData(i).indataRef(n,a)),uN(0,t,n,r)}var bN={E_union:function(e,t){if(!e.length)return t;for(var n=0,r=t.length;n=0})):t},R_union:function(e,t){var n=(0,Se.toNumber)(t[0]),r=(0,Se.toNumber)(t[1]);return n>r&&(n=t[1],r=t[0]),e.length?(e[0]>n&&(e[0]=n),e[1]r&&(n=t[1],r=t[0]),e.length?rr&&(e[1]=r),e):[n,r]}},_N="bin_",xN="intersect",wN="union",kN="index:unit";function SN(e,t){for(var n,r=t.fields,i=t.values,a=t.getter||(t.getter=[]),o=r.length,s=0;s=2&&t[t.length-1].value)!==xN||r.hasOwnProperty(o)||(r[o]=n.getData(i).indataRef(n,a)),uN(0,t,n,r)}function DN(e,t,n,r){var i,a,o,s,l,u=this.context.data[e],c=u?u.values.value:[],f=u?u[kN]&&u[kN].value:void 0,d=c[0],h=0;if(d){for(i=t?d.encodings.length:d.fields.length;h(a=n[1])&&(a=n[0],i=n[1]),r=r?o(r,i,a):[i,a];return r&&r.length&&+r[0]!=+r[1]?r:void 0}function ON(e,t,n){return e[0]>t&&(e[0]=t),e[1]n&&(e[1]=n),e)}var LN={random:function(){return Ai()},isArray:Se.isArray,isBoolean:Se.isBoolean,isDate:Se.isDate,isNumber:Se.isNumber,isObject:Se.isObject,isRegExp:Se.isRegExp,isString:Se.isString,isTuple:Me,toBoolean:Se.toBoolean,toDate:Se.toDate,toNumber:Se.toNumber,toString:Se.toString,pad:Se.pad,peek:Se.peek,truncate:Se.truncate,rgb:Lh,lab:ng,hcl:lg,hsl:Uh,sequence:Pa,format:function(e,t){return jD("format",Fp,t)(e)},utcFormat:function(e,t){return jD("utcFormat",hn,t)(e)},utcParse:function(e,t){return jD("utcParse",pn,t)(e)},timeFormat:BD,timeParse:function(e,t){return jD("timeParse",dn,t)(e)},monthFormat:function(e){return qD(e,1,"%B")},monthAbbrevFormat:function(e){return qD(e,1,"%b")},dayFormat:function(e){return qD(0,2+e,"%A")},dayAbbrevFormat:function(e){return qD(0,2+e,"%a")},quarter:function(e){return 1+~~(new Date(e).getMonth()/3)},utcquarter:function(e){return 1+~~(new Date(e).getUTCMonth()/3)},warn:function(){return HD(this.context.dataflow,"warn",arguments)},info:function(){return HD(this.context.dataflow,"info",arguments)},debug:function(){return HD(this.context.dataflow,"debug",arguments)},extent:function(e){var t,n,r,i,a=0;if(e&&(t=e.length)){for(n=e[a];null==n||n!=n;n=e[++a]);for(r=i=n;ai&&(i=n))}return[r,i]},inScope:function(e){var t=this.context.group,n=!1;if(t)for(;e;){if(e===t){n=!0;break}e=e.mark.group}return n},clampRange:function(e,t,n){var r,i=e[0],a=e[1];return a=n-t?[t,n]:[i=Math.min(Math.max(i,t),n-r),i+r]},pinchDistance:function(e){var t=e.touches,n=t[0].clientX-t[1].clientX,r=t[0].clientY-t[1].clientY;return Math.sqrt(n*n+r*r)},pinchAngle:function(e){var t=e.touches;return Math.atan2(t[0].clientY-t[1].clientY,t[0].clientX-t[1].clientX)},screen:function(){return VD?VD.screen:{}},containerSize:function(){var e=this.context.dataflow,t=e.container&&e.container();return t?[t.clientWidth,t.clientHeight]:[void 0,void 0]},windowSize:function(){return VD?[VD.innerWidth,VD.innerHeight]:[void 0,void 0]},span:function(e){return e[e.length-1]-e[0]||0},merge:function(){var e=[].slice.call(arguments);return e.unshift({}),Se.extend.apply(null,e)},flush:function(e,t,n,r,i,a){if(!n&&0!==n)return a;var o,s,l=e[0],u=(0,Se.peek)(e),c=+n;return u2;break}return s=c.reduce((function(e,t){var n=t.intervals[o].extent,r=l?n.map((function(e){return{unit:t.unit,value:e}})):{unit:t.unit,value:n};return l?e.push.apply(e,r):e.push(r),e}),[]),l?TN(s,r):NN(s,r)}}),uN);var jN={blacklist:["_"],whitelist:["datum","event","item"],fieldvar:"datum",globalvar:function(e){return"_["+(0,Se.stringValue)("$"+e)+"]"},functions:function(e){var t=RD(e);for(var n in PN.forEach((function(e){t[e]="event.vega."+e})),LN)t[n]=zN+n;return t},constants:zD,visitors:RN},BN=function(e){const t=(e=e||{}).whitelist?(0,Se.toSet)(e.whitelist):{},n=e.blacklist?(0,Se.toSet)(e.blacklist):{},r=e.constants||zD,i=(e.functions||RD)(f),a=e.globalvar,o=e.fieldvar,s=(0,Se.isFunction)(a)?a:e=>`${a}["${e}"]`;let l={},u={},c=0;function f(e){if((0,Se.isString)(e))return e;const t=d[e.type];return null==t&&(0,Se.error)("Unsupported type: "+e.type),t(e)}const d={Literal:e=>e.raw,Identifier:e=>{const i=e.name;return c>0?i:(0,Se.hasOwnProperty)(n,i)?(0,Se.error)("Illegal identifier: "+i):(0,Se.hasOwnProperty)(r,i)?r[i]:(0,Se.hasOwnProperty)(t,i)?i:(l[i]=1,s(i))},MemberExpression:e=>{const t=!e.computed,n=f(e.object);t&&(c+=1);const r=f(e.property);return n===o&&(u[function(e){const t=e&&e.length-1;return t&&('"'===e[0]&&'"'===e[t]||"'"===e[0]&&"'"===e[t])?e.slice(1,-1):e}(r)]=1),t&&(c-=1),n+(t?"."+r:"["+r+"]")},CallExpression:e=>{"Identifier"!==e.callee.type&&(0,Se.error)("Illegal callee type: "+e.callee.type);const t=e.callee.name,n=e.arguments,r=(0,Se.hasOwnProperty)(i,t)&&i[t];return r||(0,Se.error)("Unrecognized function: "+t),(0,Se.isFunction)(r)?r(n):r+"("+n.map(f).join(",")+")"},ArrayExpression:e=>"["+e.elements.map(f).join(",")+"]",BinaryExpression:e=>"("+f(e.left)+e.operator+f(e.right)+")",UnaryExpression:e=>"("+e.operator+f(e.argument)+")",ConditionalExpression:e=>"("+f(e.test)+"?"+f(e.consequent)+":"+f(e.alternate)+")",LogicalExpression:e=>"("+f(e.left)+e.operator+f(e.right)+")",ObjectExpression:e=>"{"+e.properties.map(f).join(",")+"}",Property:e=>{c+=1;const t=f(e.key);return c-=1,t+":"+f(e.value)}};function h(e){const t={code:f(e),globals:Object.keys(l),fields:Object.keys(u)};return l={},u={},t}return h.functions=i,h.constants=r,h}(jN),UN="$";function qN(e,t,n){var r,i,a={};try{r=function(e){mM=0,gM=(pM=e).length,vM=null,pD();var t=PD();if(vM.type!==bM)throw new Error("Unexpect token after expression.");return t}(e=(0,Se.isString)(e)?e:(0,Se.stringValue)(e)+"")}catch(t){(0,Se.error)("Expression parse error: "+e)}return r.visit((function(e){if("CallExpression"===e.type){var n=e.callee.name,r=jN.visitors[n];r&&r(n,e.arguments,t,a)}})),(i=BN(r)).globals.forEach((function(e){var n=UN+e;!a.hasOwnProperty(n)&&t.getSignal(e)&&(a[n]=t.signalRef(e))})),{$expr:n?n+"return("+i.code+");":i.code,$fields:i.fields,$params:a}}function WN(e,t,n,r){this.id=-1,this.type=e,this.value=t,this.params=n,r&&(this.parent=r)}function HN(e,t,n,r){return new WN(e,t,n,r)}function VN(e,t){return HN("operator",e,t)}function GN(e){var t={$ref:e.id};return e.id<0&&(e.refs=e.refs||[]).push(t),t}var YN={$tupleid:1,toString:function(){return":_tupleid_:"}};function $N(e,t){return t?{$field:e,$name:t}:{$field:e}}var XN=$N("key");function KN(e,t){return{$compare:e,$order:t}}function QN(e,t){return(e&&e.signal?"$"+e.signal:e||"")+(e&&t?"_":"")+(t&&t.signal?"$"+t.signal:t||"")}var ZN="scope",JN="view";function eO(e){return e&&e.signal}function tO(e){if(eO(e))return!0;if((0,Se.isObject)(e))for(var t in e)if(tO(e[t]))return!0;return!1}function nO(e,t){return null!=e?e:t}function rO(e){return e&&e.signal||e}var iO="timer";function aO(e,t){return(e.merge?oO:e.stream?sO:e.type?lO:(0,Se.error)("Invalid stream specification: "+(0,Se.stringValue)(e)))(e,t)}function oO(e,t){var n=uO({merge:e.merge.map((function(e){return aO(e,t)}))},e,t);return t.addStream(n).id}function sO(e,t){var n=uO({stream:aO(e.stream,t)},e,t);return t.addStream(n).id}function lO(e,t){var n,r,i;return e.type===iO?(n=t.event(iO,e.throttle),e={between:e.between,filter:e.filter}):n=t.event((i=e.source)===ZN?JN:i||JN,e.type),r=uO({stream:n},e,t),1===Object.keys(r).length?n:t.addStream(r).id}function uO(e,t,n){var r,i,a,o,s=t.between;return s&&(2!==s.length&&(0,Se.error)('Stream "between" parameter must have 2 entries: '+(0,Se.stringValue)(t)),e.between=[aO(s[0],n),aO(s[1],n)]),s=t.filter?(0,Se.array)(t.filter):[],(t.marktype||t.markname||t.markrole)&&s.push((r=t.marktype,i=t.markname,a=t.markrole,(o="event.item")+(r&&"*"!==r?"&&"+o+".mark.marktype==='"+r+"'":"")+(a?"&&"+o+".mark.role==='"+a+"'":"")+(i?"&&"+o+".mark.name==='"+i+"'":""))),t.source===ZN&&s.push("inScope(event.item)"),s.length&&(e.filter=qN("("+s.join(")&&(")+")").$expr),null!=(s=t.throttle)&&(e.throttle=+s),null!=(s=t.debounce)&&(e.debounce=+s),t.consume&&(e.consume=!0),e}var cO=n(45948),fO="var datum=event.item&&event.item.datum;";function dO(e){return function(t,n,r){return HN(e,n,t||void 0,r)}}var hO=dO("aggregate"),pO=dO("axisticks"),mO=dO("bound"),gO=dO("collect"),vO=dO("compare"),yO=dO("datajoin"),bO=dO("encode"),_O=dO("expression"),xO=(dO("extent"),dO("facet")),wO=dO("field"),kO=dO("key"),SO=dO("legendentries"),CO=dO("load"),EO=dO("mark"),AO=dO("multiextent"),MO=dO("multivalues"),DO=dO("overlap"),TO=dO("params"),NO=dO("prefacet"),OO=dO("projection"),FO=dO("proxy"),LO=dO("relay"),PO=dO("render"),zO=dO("scale"),RO=dO("sieve"),IO=dO("sortitems"),jO=dO("viewlayout"),BO=dO("values"),UO=0,qO=["identity","ordinal","band","point","bin-linear","bin-ordinal","quantize","quantile","threshold","linear","pow","sqrt","log","sequential","time","utc"],WO=(0,Se.toSet)(qO),HO=(0,Se.toSet)(qO.slice(4,9)),VO=(0,Se.toSet)(qO.slice(9)),GO=(0,Se.toSet)(qO.slice(1,6));function YO(e){return GO.hasOwnProperty(e)}function $O(e){return HO.hasOwnProperty(e)}function XO(e){return"quantile"===e}function KO(e,t){var n,r=t.getScale(e.name).params;for(n in r.domain=JO(e.domain,e,t),null!=e.range&&(r.range=sF(e,t,r)),null!=e.interpolate&&function(e,t){t.interpolate=QO(e.type||e),null!=e.gamma&&(t.interpolateGamma=QO(e.gamma))}(e.interpolate,r),null!=e.nice&&function(e,t){t.nice=(0,Se.isObject)(e)?{interval:QO(e.interval),step:QO(e.step)}:QO(e)}(e.nice,r),e)r.hasOwnProperty(n)||"name"===n||(r[n]=QO(e[n],t))}function QO(e,t){return(0,Se.isObject)(e)?e.signal?t.signalRef(e.signal):(0,Se.error)("Unsupported object: "+(0,Se.stringValue)(e)):e}function ZO(e){(0,Se.error)("Can not find data set: "+(0,Se.stringValue)(e))}function JO(e,t,n){if(e)return e.signal?n.signalRef(e.signal):((0,Se.isArray)(e)?eF:e.fields?nF:tF)(e,t,n);null==t.domainMin&&null==t.domainMax||(0,Se.error)("No scale domain defined for domainMin/domainMax to override.")}function eF(e,t,n){return e.map((function(e){return QO(e,n)}))}function tF(e,t,n){var r=n.getData(e.data);return r||ZO(e.data),YO(t.type)?r.valuesRef(n,e.field,iF(e.sort,!1)):XO(t.type)?r.domainRef(n,e.field):r.extentRef(n,e.field)}function nF(e,t,n){var r=e.data,i=e.fields.reduce((function(e,t){return t=(0,Se.isString)(t)?{data:r,field:t}:(0,Se.isArray)(t)||t.signal?function(e,t){var n="_:vega:_"+UO++,r=gO({});if((0,Se.isArray)(e))r.value={$ingest:e};else if(e.signal){var i="setdata("+(0,Se.stringValue)(n)+","+e.signal+")";r.params.input=t.signalRef(i)}return t.addDataPipeline(n,[r,RO({})]),{data:n,field:"data"}}(t,n):t,e.push(t),e}),[]);return(YO(t.type)?rF:XO(t.type)?aF:oF)(e,n,i)}function rF(e,t,n){var r,i,a,o;return r=n.map((function(e){var n=t.getData(e.data);return n||ZO(e.data),n.countsRef(t,e.field)})),i=t.add(hO({groupby:XN,ops:["sum"],fields:[t.fieldRef("count")],as:["count"],pulse:r})),a=t.add(gO({pulse:GN(i)})),o=t.add(BO({field:XN,sort:t.sortRef(iF(e.sort,!0)),pulse:GN(a)})),GN(o)}function iF(e,t){return e&&(e.field||e.op?e.field||"count"===e.op?t&&e.field?(0,Se.error)("Multiple domain scales can not sort by field."):t&&e.op&&"count"!==e.op&&(0,Se.error)("Multiple domain scales support op count only."):(0,Se.error)("No field provided for sort aggregate op: "+e.op):(0,Se.isObject)(e)?e.field="key":e={field:"key"}),e}function aF(e,t,n){var r=n.map((function(e){var n=t.getData(e.data);return n||ZO(e.data),n.domainRef(t,e.field)}));return GN(t.add(MO({values:r})))}function oF(e,t,n){var r=n.map((function(e){var n=t.getData(e.data);return n||ZO(e.data),n.extentRef(t,e.field)}));return GN(t.add(AO({extents:r})))}function sF(e,t,n){var r=e.range,i=t.config.range;if(r.signal)return t.signalRef(r.signal);if((0,Se.isString)(r)){if(i&&i.hasOwnProperty(r))return sF(e=(0,Se.extend)({},e,{range:i[r]}),t,n);"width"===r?r=[0,{signal:"width"}]:"height"===r?r=YO(e.type)?[0,{signal:"height"}]:[{signal:"height"},0]:(0,Se.error)("Unrecognized scale range value: "+(0,Se.stringValue)(r))}else{if(r.scheme)return n.scheme=QO(r.scheme,t),r.extent&&(n.schemeExtent=function(e,t){return e.signal?t.signalRef(e.signal):e.map((function(e){return QO(e,t)}))}(r.extent,t)),void(r.count&&(n.schemeCount=QO(r.count,t)));if(r.step)return void(n.rangeStep=QO(r.step,t));if(YO(e.type)&&!(0,Se.isArray)(r))return JO(r,e,t);(0,Se.isArray)(r)||(0,Se.error)("Unsupported range type: "+(0,Se.stringValue)(r))}return r.map((function(e){return QO(e,t)}))}function lF(e,t,n){return(0,Se.isArray)(e)?e.map((function(e){return lF(e,t,n)})):(0,Se.isObject)(e)?e.signal?n.signalRef(e.signal):"fit"===t?e:(0,Se.error)("Unsupported parameter object: "+(0,Se.stringValue)(e)):e}var uF="top",cF="left",fF="right",dF="bottom",hF="vertical",pF="index",mF="label",gF="offset",vF="perc",yF="perc2",bF="size",_F="value",xF="guide-label",wF="guide-title",kF="group-title",SF="symbol",CF="gradient",EF="discrete",AF=["size","shape","fill","stroke","strokeDash","opacity"],MF={name:1,interactive:1},DF=(0,Se.toSet)(["rule"]),TF=(0,Se.toSet)(["group","image","rect"]);function NF(e,t,n,r){var i=qN(e,t);return i.$fields.forEach((function(e){r[e]=1})),(0,Se.extend)(n,i.$params),i.$expr}function OF(e,t,n,r){return FF((0,Se.isObject)(e)?e:{datum:e},t,n,r)}function FF(e,t,n,r){var i,a,o;if(e.signal)i="datum",o=NF(e.signal,t,n,r);else if(e.group||e.parent){for(a=Math.max(1,e.level||1),i="item";a-- >0;)i+=".mark.group";e.parent?(o=e.parent,i+=".datum"):o=e.group}else e.datum?(i="datum",o=e.datum):(0,Se.error)("Invalid field reference: "+(0,Se.stringValue)(e));return e.signal||((0,Se.isString)(o)?(r[o]=1,o=(0,Se.splitAccessPath)(o).map(Se.stringValue).join("][")):o=FF(o,t,n,r)),i+"["+o+"]"}function LF(e,t,n,r){var i;if((0,Se.isString)(e))i=YD+e,n.hasOwnProperty(i)||(n[i]=t.scaleRef(e)),i=(0,Se.stringValue)(i);else{for(i in t.scales)n[YD+i]=t.scaleRef(i);i=(0,Se.stringValue)(YD)+"+"+(e.signal?"("+NF(e.signal,t,n,r)+")":OF(e,t,n,r))}return"_["+i+"]"}function PF(e,t,n,r){return(0,Se.isObject)(e)?"("+zF(0,e,t,n,r)+")":e}function zF(e,t,n,r,i){if(null!=t.gradient)return function(e,t,n,r){return"this.gradient("+LF(e.gradient,t,n,r)+","+(0,Se.stringValue)(e.start)+","+(0,Se.stringValue)(e.stop)+","+(0,Se.stringValue)(e.count)+")"}(t,n,r,i);var a=t.signal?NF(t.signal,n,r,i):t.color?function(e,t,n,r){function i(e,i,a,o){return"this."+e+"("+[zF(0,i,t,n,r),zF(0,a,t,n,r),zF(0,o,t,n,r)].join(",")+").toString()"}return e.c?i("hcl",e.h,e.c,e.l):e.h||e.s?i("hsl",e.h,e.s,e.l):e.l||e.a?i("lab",e.l,e.a,e.b):e.r||e.g||e.b?i("rgb",e.r,e.g,e.b):null}(t.color,n,r,i):null!=t.field?OF(t.field,n,r,i):void 0!==t.value?(0,Se.stringValue)(t.value):void 0;return null!=t.scale&&(a=function(e,t,n,r,i){var a,o,s,l=LF(e.scale,n,r,i);return null!=e.range?(o=l+".range()",t=0==(a=+e.range)?o+"[0]":"($="+o+","+(1===a?"$[$.length-1]":"$[0]+"+a+"*($[$.length-1]-$[0])")+")"):(void 0!==t&&(t=l+"("+t+")"),e.band&&(s=function(e,t){if(!(0,Se.isString)(e))return-1;var n=t.scaleType(e);return"band"===n||"point"===n?1:0}(e.scale,n))&&(a=(o=l+".bandwidth")+"()"+(1==(a=+e.band)?"":"*"+a),s<0&&(a="("+o+"?"+a+":0)"),t=(t?t+"+":"")+a,e.extra&&(t="(datum.extra?"+l+"(datum.extra.value):"+t+")")),null==t&&(t="0")),t}(t,a,n,r,i)),void 0===a&&(a=null),null!=t.exponent&&(a="Math.pow("+a+","+PF(t.exponent,n,r,i)+")"),null!=t.mult&&(a+="*"+PF(t.mult,n,r,i)),null!=t.offset&&(a+="+"+PF(t.offset,n,r,i)),t.round&&(a="Math.round("+a+")"),a}function RF(e,t,n){return e+"["+(0,Se.stringValue)(t)+"]="+n+";"}function IF(e,t,n,r,i){var a="";return t.forEach((function(e){var t=zF(0,e,n,r,i);a+=e.test?NF(e.test,n,r,i)+"?"+t+":":t})),":"===(0,Se.peek)(a)&&(a+="null"),RF("o",e,a)}function jF(e,t,n,r){var i,a,o={},s="var o=item,datum=o.datum,$;";for(i in e)a=e[i],(0,Se.isArray)(a)?s+=IF(i,a,r,n,o):s+=RF("o",i,zF(0,a,r,n,o));return s+=function(e,t){var n="";return DF[t]||(e.x2&&(e.x?(TF[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?(TF[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:s+="return 1;",$fields:Object.keys(o),$output:Object.keys(e)}}var BF="mark",UF="frame",qF="scope",WF="axis",HF="axis-domain",VF="axis-grid",GF="axis-label",YF="axis-tick",$F="axis-title",XF="legend",KF="legend-band",QF="legend-entry",ZF="legend-gradient",JF="legend-label",eL="legend-symbol",tL="legend-title",nL="title";function rL(e){return(0,Se.isObject)(e)?(0,Se.extend)({},e):{value:e}}function iL(e,t,n,r){return null!=n?((0,Se.isObject)(n)&&!(0,Se.isArray)(n)?e.update[t]=n:e[r||"enter"][t]={value:n},1):0}function aL(e,t,n){for(var r in t)n&&n.hasOwnProperty(r)||(e[r]=(0,Se.extend)(e[r]||{},t[r]));return e}function oL(e,t,n,r,i,a){var o,s;for(s in(a=a||{}).encoders={$encode:o={}},e=function(e,t,n,r,i){var a,o,s={};for(a in"legend"!=n&&0!==String(n).indexOf("axis")||(n=null),o=n===UF?i.group:n===BF?(0,Se.extend)({},i.mark,i[t]):null)lL(a,e)||("fill"===a||"stroke"===a)&&(lL("fill",e)||lL("stroke",e))||(s[a]=sL(o[a]));return(0,Se.array)(r).forEach((function(t){var n=i.style&&i.style[t];for(var r in n)lL(r,e)||(s[r]=sL(n[r]))})),(e=(0,Se.extend)({},e)).enter=(0,Se.extend)(s,e.enter),e}(e,t,n,r,i.config),e)o[s]=jF(e[s],t,a,i);return a}function sL(e){return e&&e.signal?{signal:e.signal}:{value:e}}function lL(e,t){return t&&(t.enter&&t.enter[e]||t.update&&t.update[e])}function uL(e,t,n,r,i,a,o){return{type:e,name:o?o.name:void 0,role:t,style:o&&o.style||n,key:r,from:i,interactive:!(!o||!o.interactive),encode:aL(a,o,MF)}}function cL(e,t,n){return nO(t[e],n[e])}function fL(e,t){return nO(e.direction,t)===hF}function dL(e,t){return nO(e.gradientLength,t.gradientLength||t.gradientWidth)}function hL(e,t){return nO(e.gradientThickness,t.gradientThickness||t.gradientHeight)}function pL(e,t){return nO(e.columns,nO(t.columns,+fL(e,t.symbolDirection)))}function mL(e,t){var n=t&&(t.update&&t.update[e]||t.enter&&t.enter[e]);return n&&n.signal?n:n?n.value:null}var gL="group",vL="rect",yL="rule",bL="symbol",_L="text";function xL(e,t,n,r){var i,a,o,s,l,u,c={value:0},f=fL(e,n.gradientDirection),d=hL(e,n),h=dL(e,n);return f?(o=[0,1],s=[0,0],l=d,u=h):(o=[0,0],s=[1,0],l=h,u=d),iL(i={enter:a={opacity:c,x:c,y:c,width:rL(l),height:rL(u)},update:(0,Se.extend)({},a,{opacity:{value:1},fill:{gradient:t,start:o,stop:s}}),exit:{opacity:c}},"stroke",cL("gradientStrokeColor",e,n)),iL(i,"strokeWidth",cL("gradientStrokeWidth",e,n)),iL(i,"opacity",cL("gradientOpacity",e,n),"update"),uL(vL,ZF,null,void 0,void 0,i,r)}function wL(e,t,n,r,i){var a,o,s,l,u,c,f={value:0},d=fL(e,n.gradientDirection),h=hL(e,n),p=dL(e,n),m="";return d?(s="y",u="y2",l="x",c="width",m="1-"):(s="x",u="x2",l="y",c="height"),(o={opacity:f,fill:{scale:t,field:_F}})[s]={signal:m+"datum."+vF,mult:p},o[l]=f,o[u]={signal:m+"datum."+yF,mult:p},o[c]=rL(h),iL(a={enter:o,update:(0,Se.extend)({},o,{opacity:{value:1}}),exit:{opacity:f}},"stroke",cL("gradientStrokeColor",e,n)),iL(a,"strokeWidth",cL("gradientStrokeWidth",e,n)),iL(a,"opacity",cL("gradientOpacity",e,n),"update"),uL(vL,KF,null,_F,i,a,r)}var kL="datum."+vF+'<=0?"left":datum.'+vF+'>=1?"right":"center"',SL="datum."+vF+'<=0?"bottom":datum.'+vF+'>=1?"top":"middle"';function CL(e,t,n,r){var i,a,o,s,l,u={value:0},c=fL(e,t.gradientDirection),f=rL(hL(e,t)),d=dL(e,t),h=cL("labelOverlap",e,t),p="";return iL(i={enter:a={opacity:u},update:o={opacity:{value:1},text:{field:mF}},exit:{opacity:u}},"fill",cL("labelColor",e,t)),iL(i,"font",cL("labelFont",e,t)),iL(i,"fontSize",cL("labelFontSize",e,t)),iL(i,"fontWeight",cL("labelFontWeight",e,t)),iL(i,"fillOpacity",cL("labelOpacity",e,t)),iL(i,"limit",nO(e.labelLimit,t.gradientLabelLimit)),c?(a.align={value:"left"},a.baseline=o.baseline={signal:SL},s="y",l="x",p="1-"):(a.align=o.align={signal:kL},a.baseline={value:"top"},s="x",l="y"),a[s]=o[s]={signal:p+"datum."+vF,mult:d},a[l]=o[l]=f,f.offset=nO(e.labelOffset,t.gradientLabelOffset)||0,e=uL(_L,JF,xF,_F,r,i,n),h&&(e.overlap={method:h,order:"datum."+pF}),e}function EL(e,t,n,r,i,a,o,s){return{type:gL,name:n,role:e,style:t,from:r,interactive:i||!1,encode:a,marks:o,layout:s}}var AL={value:0};function ML(e,t,n,r,i){var a,o,s,l,u,c,f,d=n.entries,h=!(!d||!d.interactive),p=d?d.name:void 0,m=cL("clipHeight",e,t),g=cL("symbolOffset",e,t),v={data:"value"},y={},b=i+"?datum."+gF+":datum."+bF,_=m?rL(m):{field:bF},x="datum."+pF,w="max(1,"+i+")";return _.mult=.5,y={enter:a={opacity:AL,x:{signal:b,mult:.5,offset:g},y:_},update:o={opacity:{value:1},x:a.x,y:a.y},exit:{opacity:AL}},e.fill||(iL(y,"fill",t.symbolBaseFillColor),iL(y,"stroke",t.symbolBaseStrokeColor)),iL(y,"shape",cL("symbolType",e,t)),iL(y,"size",cL("symbolSize",e,t)),iL(y,"strokeWidth",cL("symbolStrokeWidth",e,t)),iL(y,"fill",cL("symbolFillColor",e,t)),iL(y,"stroke",cL("symbolStrokeColor",e,t)),iL(y,"opacity",cL("symbolOpacity",e,t),"update"),AF.forEach((function(t){e[t]&&(o[t]=a[t]={scale:e[t],field:_F})})),l=uL(bL,eL,null,_F,v,y,n.symbols),m&&(l.clip=!0),(s=rL(g)).offset=cL("labelOffset",e,t),iL(y={enter:a={opacity:AL,x:{signal:b,offset:s},y:_},update:o={opacity:{value:1},text:{field:mF},x:a.x,y:a.y},exit:{opacity:AL}},"align",cL("labelAlign",e,t)),iL(y,"baseline",cL("labelBaseline",e,t)),iL(y,"fill",cL("labelColor",e,t)),iL(y,"font",cL("labelFont",e,t)),iL(y,"fontSize",cL("labelFontSize",e,t)),iL(y,"fontWeight",cL("labelFontWeight",e,t)),iL(y,"limit",cL("labelLimit",e,t)),iL(y,"fillOpacity",cL("labelOpacity",e,t)),u=uL(_L,JF,xF,_F,v,y,n.labels),y={enter:{noBound:{value:!0},width:AL,height:m?rL(m):AL,opacity:AL},exit:{opacity:AL},update:o={opacity:{value:1},row:{signal:null},column:{signal:null}}},fL(e,t.symbolDirection)?(c="ceil(item.mark.items.length/"+w+")",o.row.signal=x+"%"+c,o.column.signal="floor("+x+"/"+c+")",f={field:["row",x]}):(o.row.signal="floor("+x+"/"+w+")",o.column.signal=x+"%"+w,f={field:x}),o.column.signal=i+"?"+o.column.signal+":"+x,(e=EL(qF,null,p,r={facet:{data:r,name:"value",groupby:pF}},h,aL(y,d,MF),[l,u])).sort=f,e}function DL(e,t){var n;return(0,Se.isObject)(e)&&(e.signal?n=e.signal:e.path?n="pathShape("+TL(e.path)+")":e.sphere&&(n="geoShape("+TL(e.sphere)+', {type: "Sphere"})')),n?t.signalRef(n):!!e}function TL(e){return(0,Se.isObject)(e)&&e.signal?e.signal:(0,Se.stringValue)(e)}function NL(e){var t=e.role||"";return t.indexOf("axis")&&t.indexOf("legend")?e.type===gL?qF:t||BF:t}function OL(e){return{marktype:e.type,name:e.name||void 0,role:e.role||NL(e),zindex:+e.zindex||void 0}}function FL(e,t){return e&&e.signal?t.signalRef(e.signal):!1!==e}function LL(e,t){var n=ri(e.type);n||(0,Se.error)("Unrecognized transform type: "+(0,Se.stringValue)(e.type));var r=HN(n.type.toLowerCase(),null,PL(n,e,t));return e.signal&&t.addSignal(e.signal,t.proxy(r)),r.metadata=n.metadata||{},r}function PL(e,t,n){var r,i,a,o={};for(i=0,a=e.params.length;i1?{merge:a}:a[0]),null!=s&&(o&&(0,Se.error)("Signal encode and update are mutually exclusive."),o="encode(item(),"+(0,Se.stringValue)(s)+")"),r=(0,Se.isString)(o)?qN(o,t,fO):null!=o.expr?qN(o.expr,t,fO):null!=o.value?o.value:null!=o.signal?{$expr:"_.value",$params:{value:t.signalRef(o.signal)}}:(0,Se.error)("Invalid signal update specification."),i={target:n,update:r},e.force&&(i.options={force:!0}),l.forEach((function(e){t.addUpdate((0,Se.extend)(function(e,t){return{source:e.signal?t.signalRef(e.signal):e.scale?t.scaleRef(e.scale):aO(e,t)}}(e,t),i))}))}(e,t,n.id)}))}(e,t)})),(0,Se.array)(e.axes).forEach((function(e){!function(e,t){var n,r,i,a,o,s,l=function(e,t){var n=t.config,r=e.orient,i=r===uF||r===dF?n.axisX:n.axisY,a=n["axis"+r[0].toUpperCase()+r.slice(1)],o="band"===t.scaleType(e.scale)&&n.axisBand;return i||a||o?(0,Se.extend)({},n.axis,i,a,o):n.axis}(e,t),u=e.encode||{},c=u.axis||{},f=c.name||void 0,d=c.interactive,h=c.style;n={orient:e.orient,ticks:!!cL("ticks",e,l),labels:!!cL("labels",e,l),grid:!!cL("grid",e,l),domain:!!cL("domain",e,l),title:!!nO(e.title,!1)},r=GN(t.add(gO({},[n]))),c=aL({update:{range:{signal:'abs(span(range("'+e.scale+'")))'},offset:rL(nO(e.offset,0)),position:rL(nO(e.position,0)),titlePadding:rL(cL("titlePadding",e,l)),minExtent:rL(cL("minExtent",e,l)),maxExtent:rL(cL("maxExtent",e,l))}},u.axis,MF),i=GN(t.add(pO({scale:t.scaleRef(e.scale),extra:t.property(cL("tickExtra",e,l)),count:t.objectProperty(e.tickCount),values:t.objectProperty(e.values),formatSpecifier:t.property(e.format)}))),s=[],n.grid&&s.push(function(e,t,n,r){var i,a,o,s,l,u,c,f,d,h=e.orient,p=e.gridScale,m=h===cF||h===uF?1:-1,g=m*e.offset||0,v={value:0};return iL(i={enter:a={opacity:v},update:s={opacity:{value:1}},exit:o={opacity:v}},"stroke",cL("gridColor",e,t)),iL(i,"strokeDash",cL("gridDash",e,t)),iL(i,"strokeOpacity",cL("gridOpacity",e,t)),iL(i,"strokeWidth",cL("gridWidth",e,t)),l={scale:e.scale,field:_F,band:cL("bandPosition",e,t),round:cL("tickRound",e,t),extra:cL("tickExtra",e,t),offset:cL("tickOffset",e,t)},h===uF||h===dF?(u="x",c="y",d="height"):(u="y",c="x",d="width"),f=c+"2",s[u]=a[u]=o[u]=l,p?(a[c]={scale:p,range:0,mult:m,offset:g},s[f]=a[f]={scale:p,range:1,mult:m,offset:g}):(a[c]={value:g},s[f]=a[f]={signal:d,mult:m,offset:g}),uL(yL,VF,null,_F,r,i,n)}(e,l,u.grid,i)),n.ticks&&(a=cL("tickSize",e,l),s.push(function(e,t,n,r,i){var a,o,s,l,u,c,f=e.orient,d=f===cF||f===uF?-1:1,h={value:0};return iL(a={enter:o={opacity:h},update:l={opacity:{value:1}},exit:s={opacity:h}},"stroke",cL("tickColor",e,t)),iL(a,"strokeOpacity",cL("tickOpacity",e,t)),iL(a,"strokeWidth",cL("tickWidth",e,t)),(u=rL(i)).mult=d,c={scale:e.scale,field:_F,band:cL("bandPosition",e,t),round:cL("tickRound",e,t),extra:cL("tickExtra",e,t),offset:cL("tickOffset",e,t)},f===uF||f===dF?(l.y=o.y=h,l.y2=o.y2=u,l.x=o.x=s.x=c):(l.x=o.x=h,l.x2=o.x2=u,l.y=o.y=s.y=c),uL(yL,YF,null,_F,r,a,n)}(e,l,u.ticks,i,a))),n.labels&&(a=n.ticks?a:0,s.push(function(e,t,n,r,i){var a,o,s,l,u,c,f,d,h,p=e.orient,m=p===cF||p===uF?-1:1,g=p===uF||p===dF,v=e.scale,y=rO(cL("labelFlush",e,t)),b=rO(cL("labelFlushOffset",e,t)),_=0===y||!!y,x=cL("labelAlign",e,t),w=cL("labelBaseline",e,t),k={value:0};return(s=rL(i)).mult=m,s.offset=rL(cL("labelPadding",e,t)||0),s.offset.mult=m,l={scale:v,field:_F,band:.5,offset:cL("tickOffset",e,t)},g?(u=x||(_?nP(v,y,'"left"','"right"','"center"'):"center"),c=w||(p===uF?"bottom":"top"),f=!x):(u=x||(p===fF?"left":"right"),c=w||(_?nP(v,y,'"top"','"bottom"','"middle"'):"middle"),f=!w),f=f&&_&&b?nP(v,y,"-"+b,b,0):null,iL(a={enter:o={opacity:k,x:g?l:s,y:g?s:l},update:{opacity:{value:1},text:{field:mF},x:o.x,y:o.y},exit:{opacity:k,x:o.x,y:o.y}},g?"dx":"dy",f),iL(a,"align",u),iL(a,"baseline",c),iL(a,"angle",cL("labelAngle",e,t)),iL(a,"fill",cL("labelColor",e,t)),iL(a,"font",cL("labelFont",e,t)),iL(a,"fontSize",cL("labelFontSize",e,t)),iL(a,"fontWeight",cL("labelFontWeight",e,t)),iL(a,"limit",cL("labelLimit",e,t)),iL(a,"fillOpacity",cL("labelOpacity",e,t)),d=cL("labelBound",e,t),h=cL("labelOverlap",e,t),e=uL(_L,GF,xF,_F,r,a,n),(h||d)&&(e.overlap={method:h,order:"datum.index",bound:d?{scale:v,orient:p,tolerance:d}:null}),e}(e,l,u.labels,i,a))),n.domain&&s.push(function(e,t,n,r){var i,a,o,s,l,u,c=e.orient,f={value:0};return iL(i={enter:a={opacity:f},update:o={opacity:{value:1}},exit:{opacity:f}},"stroke",cL("domainColor",e,t)),iL(i,"strokeWidth",cL("domainWidth",e,t)),iL(i,"strokeOpacity",cL("domainOpacity",e,t)),c===uF||c===dF?(s="x",u="y"):(s="y",u="x"),l=s+"2",a[u]=f,o[s]=a[s]=tP(e,0),o[l]=a[l]=tP(e,1),uL(yL,HF,null,null,r,i,n)}(e,l,u.domain,r)),n.title&&s.push(function(e,t,n,r){var i,a,o,s,l=e.orient,u=l===cF||l===uF?-1:1,c=l===uF||l===dF,f={value:0};return i={enter:a={opacity:f},update:o={opacity:{value:1},text:rL(e.title)},exit:{opacity:f}},s={scale:e.scale,range:.5},c?(o.x=s,a.angle={value:0},a.baseline={value:l===uF?"bottom":"top"}):(o.y=s,a.angle={value:90*u},a.baseline={value:"bottom"}),iL(i,"align",cL("titleAlign",e,t)),iL(i,"angle",cL("titleAngle",e,t)),iL(i,"baseline",cL("titleBaseline",e,t)),iL(i,"fill",cL("titleColor",e,t)),iL(i,"font",cL("titleFont",e,t)),iL(i,"fontSize",cL("titleFontSize",e,t)),iL(i,"fontWeight",cL("titleFontWeight",e,t)),iL(i,"limit",cL("titleLimit",e,t)),iL(i,"fillOpacity",cL("titleOpacity",e,t)),!iL(i,"x",cL("titleX",e,t),"update")&&c&&!lL("x",n)&&(i.enter.auto={value:!0}),!iL(i,"y",cL("titleY",e,t),"update")&&!c&&!lL("y",n)&&(i.enter.auto={value:!0}),uL(_L,$F,wF,null,r,i,n)}(e,l,u.title,r)),o=EL(WF,h,f,r,d,c,s),e.zindex&&(o.zindex=e.zindex),XL(o,t)}(e,t)})),(0,Se.array)(e.marks).forEach((function(e){XL(e,t)})),(0,Se.array)(e.legends).forEach((function(e){!function(e,t){var n,r,i,a,o,s,l,u,c,f=t.config.legend,d=e.encode||{},h=d.legend||{},p=h.name||void 0,m=h.interactive,g=h.style,v=AF.reduce((function(t,n){return t||e[n]}),0);v||(0,Se.error)("Missing valid scale for legend."),o=function(e,t){var n=e.type||SF;return e.type||1!==function(e){return AF.reduce((function(t,n){return t+(e[n]?1:0)}),0)}(e)||!e.fill&&!e.stroke||(n=function(e){return VO.hasOwnProperty(e)}(t)?CF:$O(t)?EF:SF),n!==CF?n:$O(t)?EF:CF}(e,t.scaleType(v)),s={orient:cL("orient",e,f),title:null!=e.title,type:o},l=GN(t.add(gO(null,[s]))),h=aL(function(e,t){var n={enter:{},update:{}};return iL(n,"offset",cL("offset",e,t)),iL(n,"padding",cL("padding",e,t)),iL(n,"titlePadding",cL("titlePadding",e,t)),iL(n,"fill",cL("fillColor",e,t)),iL(n,"stroke",cL("strokeColor",e,t)),iL(n,"strokeWidth",cL("strokeWidth",e,t)),iL(n,"cornerRadius",cL("cornerRadius",e,t)),iL(n,"strokeDash",t.strokeDash),n}(e,f),h,MF),n={enter:{x:{value:0},y:{value:0}}},u=GN(t.add(SO(i={type:o,scale:t.scaleRef(v),count:t.objectProperty(e.tickCount),values:t.objectProperty(e.values),formatSpecifier:t.property(e.format)}))),o===CF?(a=[xL(e,v,f,d.gradient),CL(e,f,d.labels,u)],i.count=i.count||t.signalRef("max(2,2*floor(("+rO(dL(e,f))+")/100))")):o===EF?a=[wL(e,v,f,d.gradient,u),CL(e,f,d.labels,u)]:(r=function(e,t){return{align:cL("gridAlign",e,t),center:{row:!0,column:!1},columns:pL(e,t),padding:{row:cL("rowPadding",e,t),column:cL("columnPadding",e,t)}}}(e,f),a=[ML(e,f,d,u,rO(r.columns))],i.size=function(e,t,n){var r,i,a;return a=mL("strokeWidth",n[0].encode),i=e.size?'scale("'+e.size+'",datum)':mL("size",n[0].encode),r=function(e,t,n){return mL("fontSize",e)||function(e,t,n){var r=t.config.style[n];return r&&r.fontSize}(0,t,n)}(n[1].encode,t,xF),qN("max(ceil(sqrt("+rO(i)+")+"+rO(a)+"),"+rO(r)+")",t)}(e,t,a[0].marks)),a=[EL(QF,null,null,l,m,n,a,r)],s.title&&a.push(function(e,t,n,r){var i,a,o={value:0};return iL(i={enter:a={opacity:o,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},update:{opacity:{value:1},text:rL(e.title),x:a.x,y:a.y},exit:{opacity:o}},"align",cL("titleAlign",e,t)),iL(i,"baseline",cL("titleBaseline",e,t)),iL(i,"fill",cL("titleColor",e,t)),iL(i,"font",cL("titleFont",e,t)),iL(i,"fontSize",cL("titleFontSize",e,t)),iL(i,"fontWeight",cL("titleFontWeight",e,t)),iL(i,"limit",cL("titleLimit",e,t)),iL(i,"fillOpacity",cL("titleOpacity",e,t)),uL(_L,tL,wF,null,r,i,n)}(e,f,d.title,l)),c=EL(XF,g,p,l,m,h,a),e.zindex&&(c.zindex=e.zindex),XL(c,t)}(e,t)})),e.title&&function(e,t){e=(0,Se.isString)(e)?{text:e}:e;var n,r,i,a=t.config.title,o=(0,Se.extend)({},e.encode);n={orient:cL("orient",e,a)},r=GN(t.add(gO(null,[n]))),o.name=e.name,o.interactive=e.interactive,i=function(e,t,n,r){var i,a,o,s,l,u={value:0},c=e.text,f=cL("orient",e,t),d=cL("anchor",e,t),h=f===cF||f===uF?-1:1,p=f===uF||f===dF,m={group:p?"width":"height"};return s={field:m,mult:{signal:ZL}},l=h<0?u:p?{field:{group:"height"}}:{field:{group:"width"}},i={enter:a={opacity:u},update:o={opacity:{value:1},text:rL(c),anchor:rL(d),orient:rL(f),extent:{field:m},align:{signal:QL}},exit:{opacity:u}},p?(o.x=s,o.y=l,a.angle=u,a.baseline={value:f===uF?dF:uF}):(o.x=l,o.y=s,a.angle={value:90*h},a.baseline={value:dF}),iL(i,"align",cL("align",e,t),"update"),iL(i,"angle",cL("angle",e,t)),iL(i,"baseline",cL("baseline",e,t)),iL(i,"fill",cL("color",e,t)),iL(i,"font",cL("font",e,t)),iL(i,"fontSize",cL("fontSize",e,t)),iL(i,"fontWeight",cL("fontWeight",e,t)),iL(i,"frame",cL("frame",e,t)),iL(i,"limit",cL("limit",e,t)),iL(i,"offset",cL("offset",e,t)||0),uL(_L,nL,e.style||kF,null,r,i,n)}(e,a,o,r),e.zindex&&(i.zindex=e.zindex),XL(i,t)}(e.title,t),t.parseLambdas(),t}var iP=(0,Se.toSet)(["width","height","padding","autosize"]);function aP(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.background=null,this.eventConfig=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function oP(e){this.config=e.config,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 sP=aP.prototype=oP.prototype;function lP(e){return((0,Se.isArray)(e)?uP:cP)(e)}function uP(e){for(var t,n="[",r=0,i=e.length;r0?",":"")+((0,Se.isObject)(t)?t.signal||lP(t):(0,Se.stringValue)(t));return n+"]"}function cP(e){var t,n,r="{",i=0;for(t in e)n=e[t],r+=(++i>1?",":"")+(0,Se.stringValue)(t)+":"+((0,Se.isObject)(n)?n.signal||lP(n):(0,Se.stringValue)(n));return r+"}"}sP.fork=function(){return new oP(this)},sP.isSubscope=function(){return this._subid>0},sP.toRuntime=function(){return this.finish(),{background:this.background,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig}},sP.id=function(){return(this._subid?this._subid+":":0)+this._id++},sP.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},sP.proxy=function(e){var t=e instanceof WN?GN(e):e;return this.add(FO({value:t}))},sP.addStream=function(e){return this.streams.push(e),e.id=this.id(),e},sP.addUpdate=function(e){return this.updates.push(e),e},sP.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 r;e&&((r=e.data||(e.data={}))[t]||(r[t]=[])).push(n)}for(e in this.data)for(var r in n((t=this.data[e]).input,e,"input"),n(t.output,e,"output"),n(t.values,e,"values"),t.index)n(t.index[r],e,"index:"+r);return this},sP.pushState=function(e,t,n){this._encode.push(GN(this.add(RO({pulse:e})))),this._parent.push(t),this._lookup.push(n?GN(this.proxy(n)):null),this._markpath.push(-1)},sP.popState=function(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},sP.parent=function(){return(0,Se.peek)(this._parent)},sP.encode=function(){return(0,Se.peek)(this._encode)},sP.lookup=function(){return(0,Se.peek)(this._lookup)},sP.markpath=function(){var e=this._markpath;return++e[e.length-1]},sP.fieldRef=function(e,t){if((0,Se.isString)(e))return $N(e,t);e.signal||(0,Se.error)("Unsupported field reference: "+(0,Se.stringValue)(e));var n,r=e.signal,i=this.field[r];return i||(n={name:this.signalRef(r)},t&&(n.as=t),this.field[r]=i=GN(this.add(wO(n)))),i},sP.compareRef=function(e,t){function n(e){return eO(e)?(i=!0,r.signalRef(e.signal)):e}var r=this,i=!1,a=(0,Se.array)(e.field).map(n),o=(0,Se.array)(e.order).map(n);return t&&a.push(YN),i?GN(this.add(vO({fields:a,orders:o}))):KN(a,o)},sP.keyRef=function(e,t){var n=this.signals,r=!1;return e=(0,Se.array)(e).map((function(e){return eO(e)?(r=!0,GN(n[e.signal])):e})),r?GN(this.add(kO({fields:e,flat:t}))):function(e,t){var n={$key:e};return t&&(n.$flat=!0),n}(e,t)},sP.sortRef=function(e){if(!e)return e;var t=[QN(e.op,e.field),YN],n=e.order||"ascending";return n.signal?GN(this.add(vO({fields:t,orders:[n=this.signalRef(n.signal),n]}))):KN(t,[n,n])},sP.event=function(e,t){var n=e+":"+t;if(!this.events[n]){var r=this.id();this.streams.push({id:r,source:e,type:t}),this.events[n]=r}return this.events[n]},sP.addSignal=function(e,t){this.signals.hasOwnProperty(e)&&(0,Se.error)("Duplicate signal name: "+(0,Se.stringValue)(e));var n=t instanceof WN?t:this.add(VN(t));return this.signals[e]=n},sP.getSignal=function(e){return this.signals[e]||(0,Se.error)("Unrecognized signal name: "+(0,Se.stringValue)(e)),this.signals[e]},sP.signalRef=function(e){return this.signals[e]?GN(this.signals[e]):(this.lambdas.hasOwnProperty(e)||(this.lambdas[e]=this.add(VN(null))),GN(this.lambdas[e]))},sP.parseLambdas=function(){for(var e=Object.keys(this.lambdas),t=0,n=e.length;t=0;)if(r=i[a].type,n=i[a].handler,e===r&&(t===n||t===n.raw)){this._handler.off(r,n);break}return this},WP.addResizeListener=function(e){var t=this._resizeListeners;return t.indexOf(e)<0&&t.push(e),this},WP.removeResizeListener=function(e){var t=this._resizeListeners,n=t.indexOf(e);return n>=0&&t.splice(n,1),this},WP.addSignalListener=function(e,t){return GP(this,e,HP(this,e),t)},WP.removeSignalListener=function(e,t){return YP(this,HP(this,e),t)},WP.addDataListener=function(e,t){return GP(this,e,RA(this,e).values,t)},WP.removeDataListener=function(e,t){return YP(this,RA(this,e).values,t)},WP.preventDefault=function(e){return arguments.length?(this._preventDefault=e,this):this._preventDefault},WP.timer=function(e,t){this._timers.push(function(e,t,n){var r=new $S,i=t;return null==t?(r.restart(e,t,n),r):(t=+t,n=null==n?GS():+n,r.restart((function a(o){o+=i,r.restart(a,i+=t,n),e(o)}),t,n),r)}((function(t){e({timestamp:Date.now(),elapsed:t})}),t))},WP.events=function(e,t,n){var r,i=this,a=new Ge(n),o=function(n,r){e===qA&&function(e,t){var n=e._eventConfig.defaults,r=n&&n.prevent,i=n&&n.allow;return!1!==r&&!0!==i&&(!0===r||!1===i||(r?r[t]:i?!i[t]:e.preventDefault()))}(i,t)&&n.preventDefault();try{a.receive(function(e,t,n){var r,i,a=e._renderer.canvas();return a&&(i=UA(e),(r=Bc(t.changedTouches?t.changedTouches[0]:t,a))[0]-=i[0],r[1]-=i[1]),t.dataflow=e,t.vega=function(e,t,n){var r=t?"group"===t.mark.marktype?t:t.mark.group:null;function i(e){var n,i=r;if(e)for(n=t;n;n=n.mark.group)if(n.mark.name===e){i=n;break}return i&&i.mark&&i.mark.interactive?i:{}}function a(e){if(!e)return n;(0,Se.isString)(e)&&(e=i(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:(0,Se.constant)(e),item:(0,Se.constant)(t||{}),group:i,xy:a,x:function(e){return a(e)[0]},y:function(e){return a(e)[1]}}}(e,n,r),t.item=n,t}(i,n,r))}catch(e){i.error(e)}finally{i.run()}};if("timer"===e)i.timer(o,t);else if(e===qA)i.addEventListener(t,o,WA);else if("window"===e?"undefined"!=typeof window&&(r=[window]):"undefined"!=typeof document&&(r=document.querySelectorAll(e)),r){for(var s=0,l=r.length;s=0;)i[e].stop();for(e=a.length;--e>=0;)for(t=(n=a[e]).sources.length;--t>=0;)n.sources[t].removeEventListener(n.type,n.handler);return r&&r.call(this,this._handler,null,null,null),this},WP.hover=function(e,t){return t=[t||"update",(e=[e||"hover"])[0]],this.on(this.events("view","mouseover",HA),VA,GA(e)),this.on(this.events("view","mouseout",HA),VA,GA(t)),this},WP.data=function(e){return RA(this,e).values.value},WP.change=IA,WP.insert=function(e,t){return IA.call(this,e,ze().insert(t))},WP.remove=function(e,t){return IA.call(this,e,ze().remove(t))},WP.scale=function(e){var t=this._runtime.scales;return t.hasOwnProperty(e)||(0,Se.error)("Unrecognized scale or projection: "+e),t[e].value},WP.initialize=function(e,t){var n,r,i=this,a=i._renderType,o=zf(a);return e=i._el=e?aM(i,e):null,o||i.error("Unrecognized renderer type: "+a),n=o.handler||Xc,r=e?o.renderer:o.headless,i._renderer=r?rM(i,i._renderer,e,r):null,i._handler=function(e,t,n,r){var i=new r(e.loader(),iM(e,e.tooltip())).scene(e.scenegraph().root).initialize(n,UA(e),e);return t&&t.handlers().forEach((function(e){i.on(e.type,e.handler)})),i}(i,i._handler,e,n),i._redraw=!0,e&&(t=t?aM(i,t):e.appendChild(YA("div",{class:"vega-bindings"})),i._bind.forEach((function(e){e.param.element&&(e.element=aM(i,e.param.element))})),i._bind.forEach((function(e){!function(e,t,n){if(t){var r=n.param,i=n.state;i||(i=n.state={elements:null,active:!1,set:null,update:function(t){t!==e.signal(r.signal)&&(i.source=!0,e.signal(r.signal,t).run())}},r.debounce&&(i.update=(0,Se.debounce)(r.debounce,i.update))),function(e,t,n,r){var i=YA("div",{class:"vega-bind"});i.appendChild(YA("span",{class:"vega-bind-name"},n.name||n.signal)),t.appendChild(i);var a=QA;switch(n.input){case"checkbox":a=ZA;break;case"select":a=JA;break;case"radio":a=eM;break;case"range":a=tM}a(e,i,n,r)}(i,t,r,e.signal(r.signal)),i.active||(e.on(e._signals[r.signal],null,(function(){i.source?i.source=!1:i.set(e.signal(r.signal))})),i.active=!0)}}(i,e.element||t,e)}))),i},WP.toImageURL=function(e,t){return e!==Lf.Canvas&&e!==Lf.SVG&&e!==Lf.PNG?Promise.reject("Unrecognized image type: "+e):oM(this,e,t).then((function(t){return e===Lf.SVG?(n=t.svg(),r=new Blob([n],{type:"image/svg+xml"}),window.URL.createObjectURL(r)):t.canvas().toDataURL("image/png");var n,r}))},WP.toCanvas=function(e){return oM(this,Lf.Canvas,e).then((function(e){return e.canvas()}))},WP.toSVG=function(e){return oM(this,Lf.SVG,e).then((function(e){return e.svg()}))},WP.getState=function(e){return this._runtime.getState(e||{data:RP,signals:IP,recurse:!0})},WP.setState=function(e){var t=this;return t.runAfter((function(){t._trigger=!1,t._runtime.setState(e),t.run().runAfter((function(){t._trigger=!0}))})),this},(0,Se.extend)(ni,r,i,s,l,u,c,f,d,h);var $P=n(78405),XP=n(27920);const KP="#fff",QP={background:"#333",title:{color:KP,subtitleColor:KP},style:{"guide-label":{fill:KP},"guide-title":{fill:KP}},axis:{domainColor:KP,gridColor:"#888",tickColor:KP}},ZP="#4572a7",JP={background:"#fff",arc:{fill:ZP},area:{fill:ZP},line:{stroke:ZP,strokeWidth:2},path:{stroke:ZP},rect:{fill:ZP},shape:{stroke:ZP},symbol:{fill:ZP,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"]}},ez="#30a2da",tz="#cbcbcb",nz="#f0f0f0",rz="#333",iz={arc:{fill:ez},area:{fill:ez},axis:{domainColor:tz,grid:!0,gridColor:tz,gridWidth:1,labelColor:"#999",labelFontSize:10,titleColor:"#333",tickColor:tz,tickSize:10,titleFontSize:14,titlePadding:10,labelPadding:4},axisBand:{grid:!1},background:nz,group:{fill:nz},legend:{labelColor:rz,labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:rz,titleFontSize:14,titlePadding:10},line:{stroke:ez,strokeWidth:2},path:{stroke:ez,strokeWidth:.5},rect:{fill:ez},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:ez},bar:{binSpacing:2,fill:ez,stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},az="#000",oz={group:{fill:"#e5e5e5"},arc:{fill:az},area:{fill:az},line:{stroke:az},path:{stroke:az},rect:{fill:az},shape:{stroke:az},symbol:{fill:az,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"]}},sz="Benton Gothic, sans-serif",lz="#82c6df",uz="Benton Gothic Bold, sans-serif",cz="normal",fz={"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"]},dz={background:"#ffffff",title:{anchor:"start",color:"#000000",font:uz,fontSize:22,fontWeight:"normal"},arc:{fill:lz},area:{fill:lz},line:{stroke:lz,strokeWidth:2},path:{stroke:lz},rect:{fill:lz},shape:{stroke:lz},symbol:{fill:lz,size:30},axis:{labelFont:sz,labelFontSize:11.5,labelFontWeight:"normal",titleFont:uz,titleFontSize:13,titleFontWeight:cz},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:sz,labelFontSize:11.5,symbolType:"square",titleFont:uz,titleFontSize:13,titleFontWeight:cz},range:{category:fz["category-6"],diverging:fz["fireandice-6"],heatmap:fz["fire-7"],ordinal:fz["fire-7"],ramp:fz["fire-7"]}},hz="#ab5787",pz="#979797",mz={background:"#f9f9f9",arc:{fill:hz},area:{fill:hz},line:{stroke:hz},path:{stroke:hz},rect:{fill:hz},shape:{stroke:hz},symbol:{fill:hz,size:30},axis:{domainColor:pz,domainWidth:.5,gridWidth:.2,labelColor:pz,tickColor:pz,tickWidth:.2,titleColor:pz},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"]}},gz="#3e5c69",vz={background:"#fff",arc:{fill:gz},area:{fill:gz},line:{stroke:gz},path:{stroke:gz},rect:{fill:gz},shape:{stroke:gz},symbol:{fill:gz},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"]}},yz="#1696d2",bz="#000000",_z="Lato",xz="Lato",wz={"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"]},kz={background:"#FFFFFF",title:{anchor:"start",fontSize:18,font:_z},axisX:{domain:!0,domainColor:bz,domainWidth:1,grid:!1,labelFontSize:12,labelFont:xz,labelAngle:0,tickColor:bz,tickSize:5,titleFontSize:12,titlePadding:10,titleFont:_z},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:"#DEDDDD",gridWidth:1,labelFontSize:12,labelFont:xz,labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:_z,titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:xz,symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:_z,orient:"right",offset:10},view:{stroke:"transparent"},range:{category:wz["six-groups-cat-1"],diverging:wz["diverging-colors"],heatmap:wz["diverging-colors"],ordinal:wz["six-groups-seq"],ramp:wz["shades-blue"]},area:{fill:yz},rect:{fill:yz},line:{color:yz,stroke:yz,strokeWidth:5},trail:{color:yz,stroke:yz,strokeWidth:0,size:1},path:{stroke:yz,strokeWidth:.5},point:{filled:!0},text:{font:"Lato",color:yz,fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:yz,stroke:null}},arc:{fill:yz},shape:{stroke:yz},symbol:{fill:yz,size:30}},Sz="#3366CC",Cz="#ccc",Ez="Arial, sans-serif",Az={arc:{fill:Sz},area:{fill:Sz},path:{stroke:Sz},rect:{fill:Sz},shape:{stroke:Sz},symbol:{stroke:Sz},circle:{fill:Sz},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:Ez,fontSize:12},"guide-title":{font:Ez,fontSize:12},"group-title":{font:Ez,fontSize:12}},title:{font:Ez,fontSize:14,fontWeight:"bold",dy:-3,anchor:"start"},axis:{gridColor:Cz,tickColor:Cz,domain:!1,grid:!0},range:{category:["#4285F4","#DB4437","#F4B400","#0F9D58","#AB47BC","#00ACC1","#FF7043","#9E9D24","#5C6BC0","#F06292","#00796B","#C2185B"],heatmap:["#c6dafc","#5e97f6","#2a56c6"]}},Mz=e=>e*(1/3+1),Dz=Mz(9),Tz=Mz(10),Nz=Mz(12),Oz="Segoe UI",Fz="wf_standard-font, helvetica, arial, sans-serif",Lz="#252423",Pz="#605E5C",zz="transparent",Rz="#118DFF",Iz="#DEEFFF",jz=[Iz,Rz],Bz={view:{stroke:zz},background:zz,font:Oz,header:{titleFont:Fz,titleFontSize:Nz,titleColor:Lz,labelFont:Oz,labelFontSize:Tz,labelColor:Pz},axis:{ticks:!1,grid:!1,domain:!1,labelColor:Pz,labelFontSize:Dz,titleFont:Fz,titleColor:Lz,titleFontSize:Nz,titleFontWeight:"normal"},axisQuantitative:{tickCount:3,grid:!0,gridColor:"#C8C6C4",gridDash:[1,5],labelFlush:!1},axisBand:{tickExtra:!0},axisX:{labelPadding:5},axisY:{labelPadding:10},bar:{fill:Rz},line:{stroke:Rz,strokeWidth:3,strokeCap:"round",strokeJoin:"round"},text:{font:Oz,fontSize:Dz,fill:Pz},arc:{fill:Rz},area:{fill:Rz,line:!0,opacity:.6},path:{stroke:Rz},rect:{fill:Rz},point:{fill:Rz,filled:!0,size:75},shape:{stroke:Rz},symbol:{fill:Rz,strokeWidth:1.5,size:50},legend:{titleFont:Oz,titleFontWeight:"bold",titleColor:Pz,labelFont:Oz,labelFontSize:Tz,labelColor:Pz,symbolType:"circle",symbolSize:75},range:{category:[Rz,"#12239E","#E66C37","#6B007B","#E044A7","#744EC2","#D9B300","#D64550"],diverging:jz,heatmap:jz,ordinal:[Iz,"#c7e4ff","#b0d9ff","#9aceff","#83c3ff","#6cb9ff","#55aeff","#3fa3ff","#2898ff",Rz]}},Uz="2.10.0";var qz="vg-tooltip-element",Wz={offsetX:10,offsetY:10,id:qz,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:Hz,maxDepth:2};function Hz(e){return String(e).replace(/&/g,"&").replace(/e?"[Object]":t.indexOf(r)>=0?"[Circular]":(t.push(r),r)}}(t))}var Gz=function(){function e(e){this.options=g({},Wz,e);var t=this.options.id;if(this.call=this.tooltip_handler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){var n=document.createElement("style");n.setAttribute("id",this.options.styleId),n.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\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}\n#vg-tooltip-element.visible {\n visibility: visible;\n}\n#vg-tooltip-element h2 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 13px;\n}\n#vg-tooltip-element table {\n border-spacing: 0;\n}\n#vg-tooltip-element td {\n overflow: hidden;\n text-overflow: ellipsis;\n padding-top: 2px;\n padding-bottom: 2px;\n}\n#vg-tooltip-element td.key {\n color: #808080;\n max-width: 150px;\n text-align: right;\n padding-right: 4px;\n}\n#vg-tooltip-element td.value {\n display: block;\n max-width: 300px;\n max-height: 7em;\n text-align: left;\n}\n\n/* Dark and light color themes */\n#vg-tooltip-element.dark-theme {\n background-color: rgba(32, 32, 32, 0.9);\n border: 1px solid #f5f5f5;\n color: white;\n}\n#vg-tooltip-element.dark-theme td.key {\n color: #bfbfbf;\n}\n\n#vg-tooltip-element.light-theme {\n background-color: rgba(255, 255, 255, 0.95);\n border: 1px solid #d9d9d9;\n color: black;\n}\n#vg-tooltip-element.light-theme td.key {\n color: #808080;\n}".toString().replace(qz,e)}(t),document.head.childNodes.length>0?document.head.insertBefore(n,document.head.childNodes[0]):document.head.appendChild(n)}this.el=document.getElementById(t),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",t),this.el.classList.add("vg-tooltip"),document.body.appendChild(this.el))}return e.prototype.tooltip_handler=function(e,t,n,r){if(null!=r&&""!==r){this.el.innerHTML=function(e,t,n){if((0,Se.isArray)(e))return"["+e.map((function(e){return t((0,Se.isString)(e)?e:Vz(e,n))})).join(", ")+"]";if((0,Se.isObject)(e)){var r="",i=e,a=i.title,o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i");var s=Object.keys(o);if(s.length>0){r+="";for(var l=0,u=s;l"}r+="
'+t(c)+':'+t(f)+"
"}return r||"{}"}return t(e)}(r,Hz,this.options.maxDepth),this.el.classList.add("visible",this.options.theme+"-theme");var i=function(e,t,n,r){var i=e.clientX+n;i+t.width>window.innerWidth&&(i=+e.clientX-n-t.width);var a=e.clientY+r;return a+t.height>window.innerHeight&&(a=+e.clientY-r-t.height),{x:i,y:a}}(t,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY),a=i.x,o=i.y;this.el.setAttribute("style","top: "+o+"px; left: "+a+"px")}else this.el.classList.remove("visible",this.options.theme+"-theme")},e}();const Yz=".vega-embed {\n position: relative;\n display: inline-block;\n padding-right: 38px;\n}\n\n.vega-embed .vega-actions-wrapper {\n display: inline-flex;\n position: absolute;\n top: 0;\n right: 0;\n padding: 6px;\n z-index: 1000;\n\n opacity: 0.2;\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 transition: opacity 0.4s ease-in;\n}\n\n.vega-embed:hover .vega-actions-wrapper {\n transition: opacity 0.2s ease;\n opacity: 1;\n}\n\n.vega-embed .vega-actions {\n position: absolute;\n top: 0;\n right: 0;\n display: none;\n flex-direction: column;\n\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}\n\n.vega-embed .vega-actions-wrapper:hover {\n background: transparent;\n color: transparent;\n border: none;\n box-shadow: none;\n}\n\n.vega-embed .vega-actions-wrapper:hover .vega-actions {\n display: flex;\n}\n\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}\n\n.vega-embed .vega-actions a:hover {\n background-color: #f7f7f9;\n color: #1b1e23;\n}";function $z(e){for(var t=[],n=1;n
',a="
"+n+"",o=window.open("");o.document.write(i+e+a),o.document.title=Jz[r]+" JSON Source"}function iR(e,t,n){return void 0===n&&(n={}),r=this,i=void 0,o=function(){var r,i,a,o,s,l,u,c,f,d,h,p,v,y,b,_,x,w,k,S,C;return function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(95290),a=n(32530),o=n(31179),s=n(99273),l=n(79989),u=n(15058),c=n(22115);function f(e,t){return"top"===t||"bottom"===t?e<=45||315<=e?{value:"top"===t?"bottom":"top"}:135<=e&&e<=225?{value:"top"===t?"top":"bottom"}:{value:"middle"}:e<=45||315<=e||135<=e&&e<=225?{value:"middle"}:45<=e&&e<=135?{value:"left"===t?"top":"bottom"}:{value:"left"===t?"bottom":"top"}}function d(e,t,n){return void 0!==e.labelAngle?(e.labelAngle%360+360)%360:t===i.X&&l.contains([s.NOMINAL,s.ORDINAL],n.type)?270:void 0}function h(e,t){return e=(e%360+360)%360,"top"===t||"bottom"===t?e%180==0?"center":0{!function(e){"use strict";var t={},n=/[^\s\u00a0]/,r=e.Pos,i=e.cmpPos;function a(e){var t=e.search(n);return-1==t?0:t}function o(e,t){var n=e.getMode();return!1!==n.useInnerComments&&n.innerMode?e.getModeAt(t):n}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",(function(e){e||(e=t);for(var n=this,i=1/0,a=this.listSelections(),o=null,s=a.length-1;s>=0;s--){var l=a[s].from(),u=a[s].to();l.line>=i||(u.line>=i&&(u=r(i,0)),i=l.line,null==o?n.uncomment(l,u,e)?o="un":(n.lineComment(l,u,e),o="line"):"un"==o?n.uncomment(l,u,e):n.lineComment(l,u,e))}})),e.defineExtension("lineComment",(function(e,i,s){s||(s=t);var l,u,c=this,f=o(c,e),d=c.getLine(e.line);if(null!=d&&(l=e,u=d,!/\bstring\b/.test(c.getTokenTypeAt(r(l.line,0)))||/^[\'\"\`]/.test(u))){var h=s.lineComment||f.lineComment;if(h){var p=Math.min(0!=i.ch||i.line==e.line?i.line+1:i.line,c.lastLine()+1),m=null==s.padding?" ":s.padding,g=s.commentBlankLines||e.line==i.line;c.operation((function(){if(s.indent){for(var t=null,i=e.line;io.length)&&(t=o)}for(i=e.line;id||l.operation((function(){if(0!=s.fullLines){var t=n.test(l.getLine(d));l.replaceRange(h+f,r(d)),l.replaceRange(c+h,r(e.line,0));var o=s.blockCommentLead||u.blockCommentLead;if(null!=o)for(var p=e.line+1;p<=d;++p)(p!=d||t)&&l.replaceRange(o+h,r(p,0))}else{var m=0==i(l.getCursor("to"),a),g=!l.somethingSelected();l.replaceRange(f,a),m&&l.setSelection(g?a:l.getCursor("from"),a),l.replaceRange(c,e)}}))}}else(s.lineComment||u.lineComment)&&0!=s.fullLines&&l.lineComment(e,a,s)})),e.defineExtension("uncomment",(function(e,i,a){a||(a=t);var s,l=this,u=o(l,e),c=Math.min(0!=i.ch||i.line==e.line?i.line:i.line-1,l.lastLine()),f=Math.min(e.line,c),d=a.lineComment||u.lineComment,h=[],p=null==a.padding?" ":a.padding;e:if(d){for(var m=f;m<=c;++m){var g=l.getLine(m),v=g.indexOf(d);if(v>-1&&!/comment/.test(l.getTokenTypeAt(r(m,v+1)))&&(v=-1),-1==v&&n.test(g))break e;if(v>-1&&n.test(g.slice(0,v)))break e;h.push(g)}if(l.operation((function(){for(var e=f;e<=c;++e){var t=h[e-f],n=t.indexOf(d),i=n+d.length;n<0||(t.slice(i,i+p.length)==p&&(i+=p.length),s=!0,l.replaceRange("",r(e,n),r(e,i)))}})),s)return!0}var y=a.blockCommentStart||u.blockCommentStart,b=a.blockCommentEnd||u.blockCommentEnd;if(!y||!b)return!1;var _=a.blockCommentLead||u.blockCommentLead,x=l.getLine(f),w=x.indexOf(y);if(-1==w)return!1;var k=c==f?x:l.getLine(c),S=k.indexOf(b,c==f?w+y.length:0),C=r(f,w+1),E=r(c,S+1);if(-1==S||!/comment/.test(l.getTokenTypeAt(C))||!/comment/.test(l.getTokenTypeAt(E))||l.getRange(C,E,"\n").indexOf(b)>-1)return!1;var A=x.lastIndexOf(y,e.ch),M=-1==A?-1:x.slice(0,e.ch).indexOf(b,A+y.length);if(-1!=A&&-1!=M&&M+b.length!=e.ch)return!1;M=k.indexOf(b,i.ch);var D=k.slice(i.ch).lastIndexOf(y,M-i.ch);return A=-1==M||-1==D?-1:i.ch+D,(-1==M||-1==A||A==i.ch)&&(l.operation((function(){l.replaceRange("",r(c,S-(p&&k.slice(S-p.length,S)==p?p.length:0)),r(c,S+b.length));var e=w+y.length;if(p&&x.slice(e,e+p.length)==p&&(e+=p.length),l.replaceRange("",r(f,w),r(f,e)),_)for(var t=f+1;t<=c;++t){var i=l.getLine(t),a=i.indexOf(_);if(-1!=a&&!n.test(i.slice(0,a))){var o=a+_.length;p&&i.slice(o,o+p.length)==p&&(o+=p.length),l.replaceRange("",r(t,a),r(t,o))}}})),!0)}))}(n(15237))},58211:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(95290),a=n(79989),o=function(e){function t(t,n,r,i){var a=e.call(this,t)||this;return a.projection=n,a.fields=r,a.as=i,a}return r.__extends(t,e),t.prototype.clone=function(){return new t(null,this.projection,a.duplicate(this.fields),a.duplicate(this.as))},t.parseAll=function(e,n){return n.projectionName()?([[i.LONGITUDE,i.LATITUDE],[i.LONGITUDE2,i.LATITUDE2]].forEach((function(r){var a=r.map((function(e){return n.channelHasField(e)?n.fieldDef(e).field:void 0})),o=r[0]===i.LONGITUDE2?"2":"";(a[0]||a[1])&&(e=new t(e,n.projectionName(),a,[n.getName("x"+o),n.getName("y"+o)]))})),e):e},t.prototype.assemble=function(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}},t}(n(74686).DataFlowNode);t.GeoPointNode=o},60288:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(89081),o=n(98348),s=n(32530),l=n(75028),u=n(46681),c=n(79989),f=n(15058),d=n(26052),h=n(47880),p=n(98363),m=n(99519),g=n(91539),v=n(69895),y=n(95035),b=n(8674),_=n(48116),x={area:d.area,bar:h.bar,circle:g.circle,geoshape:p.geoshape,line:m.line,point:g.point,rect:v.rect,rule:y.rule,square:g.square,text:b.text,tick:_.tick,trail:m.trail};t.parseMarkGroup=function(e){return c.contains([l.LINE,l.AREA,l.TRAIL],e.mark)?function(e){var t=C(e.mark,e.encoding),n=S(e,{fromPrefix:t.length>0?w:""});return t.length>0?[{name:e.getName("pathgroup"),type:"group",from:{facet:{name:w+e.requestDataName(a.MAIN),data:e.requestDataName(a.MAIN),groupby:t}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:n}]:n}(e):S(e)};var w="faceted_path_";function k(e){var t=e.encoding,n=e.stack,r=e.mark,a=e.markDef,c=t.order;if(i.isArray(c)||!s.isValueDef(c)){if((i.isArray(c)||s.isFieldDef(c))&&!n)return f.sortParams(c,{expr:"datum"});if(l.isPathMark(r)){var d=t["horizontal"===a.orient?"y":"x"];if(s.isFieldDef(d)){var h=d.sort;return{field:u.isSortField(h)?s.vgField({aggregate:o.isAggregate(e.encoding)?h.op:void 0,field:h.field},{expr:"datum"}):s.vgField(d,{binSuffix:e.stack&&e.stack.impute?"mid":void 0,expr:"datum"}),order:"descending"}}}}}function S(e,t){void 0===t&&(t={fromPrefix:""});var n=e.mark,i=void 0!==e.markDef.clip?!!e.markDef.clip:function(e){var t=e.getScaleComponent("x"),n=e.getScaleComponent("y");return!!(t&&t.get("domainRaw")||n&&n.get("domainRaw"))}(e),o=f.getStyles(e.markDef),s=e.encoding.key,l=k(e),u=x[n].postEncodingTransform?x[n].postEncodingTransform(e):null;return[r.__assign({name:e.getName("marks"),type:x[n].vgMark},i?{clip:!0}:{},o?{style:o}:{},s?{key:{field:s.field}}:{},l?{sort:l}:{},{from:{data:t.fromPrefix+e.requestDataName(a.MAIN)},encode:{update:x[n].encodeEntry(e)}},u?{transform:u}:{})]}function C(e,t){return c.keys(t).reduce((function(n,r){switch(r){case"x":case"y":case"order":case"tooltip":case"href":case"x2":case"y2":case"latitude":case"longitude":case"latitude2":case"longitude2":case"text":case"shape":return n;case"detail":case"key":var a=t[r];return a&&(i.isArray(a)?a:[a]).forEach((function(e){e.aggregate||n.push(s.vgField(e,{}))})),n;case"size":if("trail"===e)return n;case"color":case"fill":case"stroke":case"opacity":var o=s.getFieldDef(t[r]);return o&&!o.aggregate&&n.push(s.vgField(o,{})),n;default:throw new Error("Bug: Channel "+r+" unimplemented for line mark")}}),[])}t.getSort=k,t.pathGroupingFields=C},62277:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(32530),a=n(96598),o=n(79989),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.formula=n,r}return r.__extends(t,e),t.prototype.clone=function(){return new t(null,o.duplicate(this.formula))},t.makeFromEncoding=function(e,n){var r=n.reduceFieldDef((function(e,t){if(t.timeUnit){var n=i.vgField(t);e[n]={as:n,timeUnit:t.timeUnit,field:t.field}}return e}),{});return 0===o.keys(r).length?null:new t(e,r)},t.makeFromTransform=function(e,n){var r;return new t(e,((r={})[n.field]={as:n.as,timeUnit:n.timeUnit,field:n.field},r))},t.prototype.merge=function(e){this.formula=r.__assign({},this.formula,e.formula),e.remove()},t.prototype.producedFields=function(){var e={};return o.vals(this.formula).forEach((function(t){e[t.as]=!0})),e},t.prototype.dependentFields=function(){var e={};return o.vals(this.formula).forEach((function(t){e[t.field]=!0})),e},t.prototype.assemble=function(){return o.vals(this.formula).map((function(e){return{type:"formula",as:e.as,expr:a.fieldExpr(e.timeUnit,e.field)}}))},t}(n(74686).DataFlowNode);t.TimeUnitNode=s},63286:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=r.__importStar(n(68171));function o(e){return i.isString(e)?{type:e}:e||{}}t.extractCompositionLayout=function(e){var t=e||{},n=t.align,r=void 0===n?void 0:n,i=t.center,a=void 0===i?void 0:i,o=t.bounds,s=void 0===o?void 0:o,l=t.spacing;return{align:r,bounds:s,center:a,spacing:void 0===l?void 0:l}},t.normalizeAutoSize=function(e,t,n){void 0===n&&(n=!0);var i=r.__assign({type:"pad"},o(t),o(e));return"fit"===i.type&&(n||(a.warn(a.message.FIT_NON_SINGLE),i.type="pad")),i};var s=["background","padding","datasets"];t.extractTopLevelProperties=function(e){return s.reduce((function(t,n){return e&&void 0!==e[n]&&(t[n]=e[n]),t}),{})}},63760:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(54814),o=n(19664),s=n(95290),l=n(89081),u=n(32530),c=r.__importStar(n(68171)),f=n(31179),d=n(46681),h=r.__importStar(n(79989)),p=n(5711),m=n(15058),g=n(77524),v=n(80449),y=n(7302),b=n(11964);function _(e,t){var n=e.getScaleComponent(t).get("type"),i=function(e,t,n,r){if("unaggregated"===e){var i=k(t,n),a=i.valid,o=i.reason;if(!a)return void c.warn(o)}else if(void 0===e&&r.useUnaggregatedDomain&&(a=k(t,n).valid))return"unaggregated";return e}(e.scaleDomain(t),e.fieldDef(t),n,e.config.scale);return i!==e.scaleDomain(t)&&(e.specifiedScales[t]=r.__assign({},e.specifiedScales[t],{domain:i})),"x"===t&&e.channelHasField("x2")?e.channelHasField("x")?x(n,i,e,"x").concat(x(n,i,e,"x2")):x(n,i,e,"x2"):"y"===t&&e.channelHasField("y2")?e.channelHasField("y")?x(n,i,e,"y").concat(x(n,i,e,"y2")):x(n,i,e,"y2"):x(n,i,e,t)}function x(e,t,n,r){var i=n.fieldDef(r);if(t&&"unaggregated"!==t&&!f.isSelectionDomain(t)){var a=i.type,c=i.timeUnit;return"temporal"===a||c?function(e,t,n){return e.map((function(e){return{signal:"{data: "+u.valueExpr(e,{timeUnit:n,type:t})+"}"}}))}(t,a,c):[t]}var p=n.stack;if(p&&r===p.fieldChannel)return"normalize"===p.offset?[[0,1]]:[{data:v=n.requestDataName(l.MAIN),field:n.vgField(r,{suffix:"start"})},{data:v,field:n.vgField(r,{suffix:"end"})}];var g=s.isScaleChannel(r)?w(n,r,e):void 0;if("unaggregated"===t){var v=n.requestDataName(l.MAIN),y=i.field;return[{data:v,field:u.vgField({field:y,aggregate:"min"})},{data:v,field:u.vgField({field:y,aggregate:"max"})}]}if(i.bin){if(f.isBinScale(e)){var b=n.getName(o.binToString(i.bin)+"_"+i.field+"_bins");return[{signal:"sequence("+b+".start, "+b+".stop + "+b+".step, "+b+".step)"}]}return f.hasDiscreteDomain(e)?[{data:h.isBoolean(g)?n.requestDataName(l.MAIN):n.requestDataName(l.RAW),field:n.vgField(r,m.binRequiresRange(i,r)?{binSuffix:"range"}:{}),sort:!0!==g&&d.isSortField(g)?g:{field:n.vgField(r,{}),op:"min"}}]:"x"===r||"y"===r?o.isBinParams(i.bin)&&i.bin.extent?[i.bin.extent]:[{data:v=n.requestDataName(l.MAIN),field:n.vgField(r,{})},{data:v,field:n.vgField(r,{binSuffix:"end"})}]:[{data:n.requestDataName(l.MAIN),field:n.vgField(r,{})}]}return g?[{data:h.isBoolean(g)?n.requestDataName(l.MAIN):n.requestDataName(l.RAW),field:n.vgField(r),sort:g}]:[{data:n.requestDataName(l.MAIN),field:n.vgField(r)}]}function w(e,t,n){if(f.hasDiscreteDomain(n)){var i=e.fieldDef(t),a=i.sort;return d.isSortArray(a)?{op:"min",field:g.sortArrayIndexField(i,t),order:"ascending"}:d.isSortField(a)?r.__assign({},a,a.field?{field:h.replacePathInField(a.field)}:{}):"descending"===a?{op:"min",field:e.vgField(t),order:"descending"}:!!h.contains(["ascending",void 0],a)||void 0}}function k(e,t){return e.aggregate?a.SHARED_DOMAIN_OP_INDEX[e.aggregate]?"quantitative"===e.type&&"log"===t?{valid:!1,reason:c.message.unaggregatedDomainWithLogScale(e)}:{valid:!0}:{valid:!1,reason:c.message.unaggregateDomainWithNonSharedDomainOp(e.aggregate)}:{valid:!1,reason:c.message.unaggregateDomainHasNoEffectForRawField(e)}}function S(e){var t=h.unique(e.map((function(e){return p.isDataRefDomain(e)?(e.sort,r.__rest(e,["sort"])):e})),h.hash),n=h.unique(e.map((function(e){if(p.isDataRefDomain(e)){var t=e.sort;return void 0===t||h.isBoolean(t)||("count"===t.op&&delete t.field,"ascending"===t.order&&delete t.order),t}})).filter((function(e){return void 0!==e})),h.hash);if(1===t.length){var i=e[0];if(p.isDataRefDomain(i)&&n.length>0){var a=n[0];return n.length>1&&(c.warn(c.message.MORE_THAN_ONE_SORT),a=!0),r.__assign({},i,{sort:a})}return i}var o=h.unique(n.map((function(e){return!0===e||"count"===e.op?e:(c.warn(c.message.domainSortDropped(e)),!0)})),h.hash),s=void 0;1===o.length?s=o[0]:o.length>1&&(c.warn(c.message.MORE_THAN_ONE_SORT),s=!0);var l=h.unique(e.map((function(e){return p.isDataRefDomain(e)?e.data:null})),(function(e){return e}));return 1===l.length&&null!==l[0]?i=r.__assign({data:l[0],fields:t.map((function(e){return e.field}))},s?{sort:s}:{}):r.__assign({fields:t},s?{sort:s}:{})}t.parseScaleDomain=function e(t){y.isUnitModel(t)?function(e){var t=e.specifiedScales,n=e.component.scales;h.keys(n).forEach((function(r){var i=t[r],a=i?i.domain:void 0,o=_(e,r),s=n[r];if(s.domains=o,f.isSelectionDomain(a)&&s.set("domainRaw",{signal:b.SELECTION_DOMAIN+h.hash(a)},!0),e.component.data.isFaceted){for(var l=e;!y.isFacetModel(l)&&l.parent;)l=l.parent;if("shared"===l.component.resolve.scale[r])for(var u=0,c=o;u{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(79989);t.AXIS_PARTS=["domain","grid","labels","ticks","title"],t.AXIS_PROPERTY_TYPE={grid:"grid",gridScale:"grid",domain:"main",labels:"main",labelFlush:"main",labelOverlap:"main",minExtent:"main",maxExtent:"main",offset:"main",ticks:"main",title:"main",values:"both",scale:"both",zindex:"both"};var a={orient:1,domain:1,format:1,grid:1,labelBound:1,labelFlush:1,labelPadding:1,labels:1,labelOverlap:1,maxExtent:1,minExtent:1,offset:1,position:1,tickCount:1,ticks:1,tickSize:1,title:1,titlePadding:1,values:1,zindex:1},o=r.__assign({},a,{encoding:1,labelAngle:1,titleMaxLength:1}),s=r.__assign({scale:1},a,{gridScale:1,encode:1});t.isAxisProperty=function(e){return!!o[e]},t.VG_AXIS_PROPERTIES=i.flagKeys(s),t.AXIS_PROPERTIES=i.flagKeys(o)},65393:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(90386),i=n(4976);function a(e){return void 0!==e.filter}t.isFilter=a,t.isLookup=function(e){return void 0!==e.lookup},t.isWindow=function(e){return void 0!==e.window},t.isCalculate=function(e){return void 0!==e.calculate},t.isBin=function(e){return!!e.bin},t.isTimeUnit=function(e){return void 0!==e.timeUnit},t.isAggregate=function(e){return void 0!==e.aggregate},t.isStack=function(e){return void 0!==e.stack},t.normalizeTransform=function(e){return e.map((function(e){return a(e)?{filter:r.normalizeLogicalOperand(e.filter,i.normalizePredicate)}:e}))}},67383:e=>{"use strict";e.exports=JSON.parse('{"name":"vega-lite","author":"Jeffrey Heer, Dominik Moritz, Kanit \\"Ham\\" Wongsuphasawat","version":"2.7.0","collaborators":["Kanit Wongsuphasawat (http://kanitw.yellowpigz.com)","Dominik Moritz (https://www.domoritz.de)","Jeffrey Heer (http://jheer.org)"],"homepage":"https://vega.github.io/vega-lite/","description":"Vega-Lite is a concise high-level language for interactive visualization.","main":"build/vega-lite.js","unpkg":"build/vega-lite.min.js","jsdelivr":"build/vega-lite.min.js","module":"build/src/index","types":"build/src/index.d.ts","bin":{"vl2png":"./bin/vl2png","vl2svg":"./bin/vl2svg","vl2vg":"./bin/vl2vg"},"directories":{"test":"test"},"scripts":{"prebuild":"mkdir -p build/src","build":"npm run build:only","build:only":"tsc && rollup -c","postbuild":"uglifyjs build/vega-lite.js -cm --source-map content=build/vega-lite.js.map,filename=build/vega-lite.min.js.map -o build/vega-lite.min.js && npm run schema","build:examples":"npm run data && TZ=America/Los_Angeles scripts/build-examples.sh","build:examples-full":"TZ=America/Los_Angeles scripts/build-examples.sh 1","build:example":"TZ=America/Los_Angeles scripts/build-example.sh","build:toc":"bundle exec jekyll build -q && scripts/generate-toc","build:site":"tsc -p site && webpack --config site/webpack.config.js","build:versions":"scripts/update-version.sh","check:examples":"scripts/check-examples.sh","check:schema":"scripts/check-schema.sh","clean":"rm -rf build && rm -f examples/compiled/*.png && find site/examples ! -name \'index.md\' -type f -delete","data":"rsync -r node_modules/vega-datasets/data/* data","deploy":"scripts/deploy.sh","deploy:gh":"scripts/deploy-gh.sh","deploy:schema":"scripts/deploy-schema.sh","preschema":"npm run prebuild","schema":"node --stack-size=1200 ./node_modules/.bin/ts-json-schema-generator --path tsconfig.json --type TopLevelSpec > build/vega-lite-schema.json && npm run renameschema && cp build/vega-lite-schema.json _data/","renameschema":"scripts/rename-schema.sh","presite":"npm run prebuild && npm run data && npm run build:site && npm run build:toc && npm run build:versions && scripts/create-example-pages","site":"bundle exec jekyll serve --incremental","lint":"tslint -p . -e \'package.json\'","test":"jest test/ && npm run lint && npm run schema && jest examples/ && npm run test:runtime","test:inspect":"node --inspect-brk ./node_modules/.bin/jest --runInBand test","test:runtime":"TZ=America/Los_Angeles TS_NODE_COMPILER_OPTIONS=\'{\\"module\\":\\"commonjs\\"}\' wdio wdio.conf.js","test:runtime:generate":"rm -Rf test-runtime/resources && VL_GENERATE_TESTS=true npm run test:runtime","watch:build":"npm run build:only && concurrently --kill-others -n Typescript,Rollup \'tsc -w\' \'rollup -c -w\'","watch:site":"concurrently --kill-others -n Typescript,Webpack \'tsc -p site --watch\' \'webpack --config site/webpack.config.js --mode development --watch\'","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":{"@types/chai":"^4.1.4","@types/d3":"^5.0.0","@types/highlight.js":"^9.12.3","@types/jest":"^23.1.1","@types/mkdirp":"^0.5.2","@types/node":"^9.0.0","@types/webdriverio":"^4.10.2","ajv":"^6.5.1","chai":"^4.1.2","cheerio":"^1.0.0-rc.2","chromedriver":"^2.40.0","codecov":"^3.0.2","concurrently":"^3.6.0","d3":"^5.5.0","highlight.js":"^9.12.0","jest":"^23.1.0","mkdirp":"^0.5.1","rollup":"^0.59.4","rollup-plugin-commonjs":"^9.1.3","rollup-plugin-json":"^3.0.0","rollup-plugin-node-resolve":"^3.3.0","rollup-plugin-sourcemaps":"^0.4.2","source-map-support":"^0.5.6","svg2png-many":"^0.0.7","ts-jest":"^22.4.6","ts-json-schema-generator":"^0.28.0","ts-node":"^6.1.1","tslint":"5.10.0","tslint-eslint-rules":"^5.3.1","typescript":"^2.9.2","uglify-js":"^3.4.1","vega":"^4.0.0","vega-datasets":"^1.19.0","vega-embed":"^3.16.0","vega-tooltip":"^0.11.0","wdio-chromedriver-service":"^0.1.3","wdio-dot-reporter":"0.0.9","wdio-mocha-framework":"^0.5.13","wdio-static-server-service":"^1.0.1","webdriverio":"^4.13.0","webpack":"^4.12.0","webpack-cli":"^3.0.8","yaml-front-matter":"^4.0.0"},"dependencies":{"@types/json-stable-stringify":"^1.0.32","json-stable-stringify":"^1.0.1","tslib":"^1.9.2","vega-event-selector":"^2.0.0","vega-typings":"^0.3.17","vega-util":"^1.10.0","yargs":"^11.0.0"},"peerDependencies":{"vega":"^3.0.0 || ^4.0.0"},"jest":{"transform":{"^.+\\\\.tsx?$":"ts-jest"},"testRegex":"(/__tests__/.*|(\\\\.|/)(test|spec))\\\\.(jsx?|tsx?)$","moduleFileExtensions":["ts","tsx","js","jsx","json","node"],"testPathIgnorePatterns":["node_modules","test-runtime","/build","_site","src"],"coverageDirectory":"./coverage/","collectCoverage":false}}')},67982:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(98348),o=n(98348),s=n(32530),l=r.__importStar(n(68171)),u=n(867);function c(e){return!!e.type}t.BOXPLOT="box-plot",t.isBoxPlotDef=c,t.BOXPLOT_STYLES=["boxWhisker","box","boxMid"],t.VL_ONLY_BOXPLOT_CONFIG_PROPERTY_INDEX={box:["size","color","extent"],boxWhisker:["color"],boxMid:["color"]};var f=["x","y","color","detail","opacity","size"];function d(e){return r.__assign({},e,{encoding:a.reduce(e.encoding,(function(e,n,r){return f.indexOf(r)>-1?e[r]=n:l.warn(l.message.incompatibleChannel(r,t.BOXPLOT)),e}),{})})}t.filterUnsupportedChannels=d,t.normalizeBoxPlot=function(e,n){var a,f,h,p,m=(e=d(e)).mark,g=(e.encoding,e.selection),v=(e.projection,r.__rest(e,["mark","encoding","selection","projection"])),y=void 0;i.isNumber(n.box.extent)&&(y=n.box.extent),c(m)&&m.extent&&"min-max"===m.extent&&(y=void 0);var b=function(e){var n=e.mark,i=e.encoding;if(e.projection,r.__rest(e,["mark","encoding","projection"]),s.isFieldDef(i.x)&&s.isContinuous(i.x)){if(s.isFieldDef(i.y)&&s.isContinuous(i.y)){if(void 0===i.x.aggregate&&i.y.aggregate===t.BOXPLOT)return"vertical";if(void 0===i.y.aggregate&&i.x.aggregate===t.BOXPLOT)return"horizontal";if(i.x.aggregate===t.BOXPLOT&&i.y.aggregate===t.BOXPLOT)throw new Error("Both x and y cannot have aggregate");return c(n)&&n.orient?n.orient:"vertical"}return"horizontal"}if(s.isFieldDef(i.y)&&s.isContinuous(i.y))return"vertical";throw new Error("Need a valid continuous axis for boxplots")}(e),_=function(e,n,i){var a=function(e,n){e.mark;var i,a,o=e.encoding;if(e.projection,r.__rest(e,["mark","encoding","projection"]),"vertical"===n?(a="y",i=o.y):(a="x",i=o.x),i&&i.aggregate){var s=i.aggregate,u=r.__rest(i,["aggregate"]);s!==t.BOXPLOT&&l.warn("Continuous axis should not have customized aggregation function "+s),i=u}return{continuousAxisChannelDef:i,continuousAxis:a}}(e,n),u=a.continuousAxisChannelDef,c=a.continuousAxis,f=e.encoding,d=void 0===i,h=[{op:"q1",field:u.field,as:"lower_box_"+u.field},{op:"q3",field:u.field,as:"upper_box_"+u.field},{op:"median",field:u.field,as:"mid_box_"+u.field}],p=[];h.push({op:"min",field:u.field,as:(d?"lower_whisker_":"min_")+u.field}),h.push({op:"max",field:u.field,as:(d?"upper_whisker_":"max_")+u.field}),d||(p=[{calculate:"datum.upper_box_"+u.field+" - datum.lower_box_"+u.field,as:"iqr_"+u.field},{calculate:"min(datum.upper_box_"+u.field+" + datum.iqr_"+u.field+" * "+i+", datum.max_"+u.field+")",as:"upper_whisker_"+u.field},{calculate:"max(datum.lower_box_"+u.field+" - datum.iqr_"+u.field+" * "+i+", datum.min_"+u.field+")",as:"lower_whisker_"+u.field}]);var m=[],g=[],v=[],y={};return o.forEach(f,(function(e,n){if(n!==c)if(s.isFieldDef(e)){if(e.aggregate&&e.aggregate!==t.BOXPLOT)h.push({op:e.aggregate,field:e.field,as:s.vgField(e)});else if(void 0===e.aggregate){var r=s.vgField(e),i=e.bin;if(i){var a=e.field;g.push({bin:i,field:a,as:r})}else if(e.timeUnit){var o=e.timeUnit;a=e.field,v.push({timeUnit:o,field:a,as:r})}m.push(r)}y[n]={field:s.vgField(e),type:e.type}}else y[n]=f[n]})),{transform:[].concat(g,v,[{aggregate:h,groupby:m}],p),continuousAxisChannelDef:u,continuousAxis:c,encodingWithoutContinuousAxis:y}}(e,b,y),x=_.transform,w=_.continuousAxisChannelDef,k=_.continuousAxis,S=_.encodingWithoutContinuousAxis,C=(S.color,S.size),E=r.__rest(S,["color","size"]),A=C?{size:C}:u.getMarkSpecificConfigMixins(n.box,"size"),M={};return w.scale&&(M.scale=w.scale),w.axis&&(M.axis=w.axis),r.__assign({},v,{transform:x,layer:[{mark:{type:"rule",style:"boxWhisker"},encoding:r.__assign((a={},a[k]=r.__assign({field:"lower_whisker_"+w.field,type:w.type},M),a[k+"2"]={field:"lower_box_"+w.field,type:w.type},a),E,u.getMarkSpecificConfigMixins(n.boxWhisker,"color"))},{mark:{type:"rule",style:"boxWhisker"},encoding:r.__assign((f={},f[k]={field:"upper_box_"+w.field,type:w.type},f[k+"2"]={field:"upper_whisker_"+w.field,type:w.type},f),E,u.getMarkSpecificConfigMixins(n.boxWhisker,"color"))},r.__assign({},g?{selection:g}:{},{mark:{type:"bar",style:"box"},encoding:r.__assign((h={},h[k]={field:"lower_box_"+w.field,type:w.type},h[k+"2"]={field:"upper_box_"+w.field,type:w.type},h),S,S.color?{}:u.getMarkSpecificConfigMixins(n.box,"color"),A)}),{mark:{type:"tick",style:"boxMid"},encoding:r.__assign((p={},p[k]={field:"mid_box_"+w.field,type:w.type},p),E,u.getMarkSpecificConfigMixins(n.boxMid,"color"),A)}]})}},68171:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(26372),a=n(79989),o=i.logger(i.Warn),s=o,l=function(){function e(){this.warns=[],this.infos=[],this.debugs=[]}return e.prototype.level=function(){return this},e.prototype.warn=function(){for(var e,t=[],n=0;n{!function(e){"use strict";function t(e){for(var t={},n=0;n*\/]/.test(n)?w(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?w("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?w(null,n):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=C),w("variable callee","variable")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),w("property","word")):w(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),w("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?w("variable-2","variable-definition"):w("variable-2","variable")):e.match(/^\w+-/)?w("meta","meta"):void 0}function S(e){return function(t,n){for(var r,i=!1;null!=(r=t.next());){if(r==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==r}return(r==e||!i&&")"!=e)&&(n.tokenize=null),w("string","string")}}function C(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=S(")"),w(null,"(")}function E(e,t,n){this.type=e,this.indent=t,this.prev=n}function A(e,t,n,r){return e.context=new E(n,t.indentation()+(!1===r?0:o),e.context),n}function M(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function D(e,t,n){return O[n.context.type](e,t,n)}function T(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return D(e,t,n)}function N(e){var t=e.current().toLowerCase();a=v.hasOwnProperty(t)?"atom":g.hasOwnProperty(t)?"keyword":"variable"}var O={top:function(e,t,n){if("{"==e)return A(n,t,"block");if("}"==e&&n.context.prev)return M(n);if(_&&/@component/i.test(e))return A(n,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return A(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return A(n,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return A(n,t,"at");if("hash"==e)a="builtin";else if("word"==e)a="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return A(n,t,"interpolation");if(":"==e)return"pseudo";if(y&&"("==e)return A(n,t,"parens")}return n.context.type},block:function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return d.hasOwnProperty(r)?(a="property","maybeprop"):h.hasOwnProperty(r)?(a=x?"string-2":"property","maybeprop"):y?(a=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(a+=" error","maybeprop")}return"meta"==e?"block":y||"hash"!=e&&"qualifier"!=e?O.top(e,t,n):(a="error","block")},maybeprop:function(e,t,n){return":"==e?A(n,t,"prop"):D(e,t,n)},prop:function(e,t,n){if(";"==e)return M(n);if("{"==e&&y)return A(n,t,"propBlock");if("}"==e||"{"==e)return T(e,t,n);if("("==e)return A(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t.current())){if("word"==e)N(t);else if("interpolation"==e)return A(n,t,"interpolation")}else a+=" error";return"prop"},propBlock:function(e,t,n){return"}"==e?M(n):"word"==e?(a="property","maybeprop"):n.context.type},parens:function(e,t,n){return"{"==e||"}"==e?T(e,t,n):")"==e?M(n):"("==e?A(n,t,"parens"):"interpolation"==e?A(n,t,"interpolation"):("word"==e&&N(t),"parens")},pseudo:function(e,t,n){return"meta"==e?"pseudo":"word"==e?(a="variable-3",n.context.type):D(e,t,n)},documentTypes:function(e,t,n){return"word"==e&&l.hasOwnProperty(t.current())?(a="tag",n.context.type):O.atBlock(e,t,n)},atBlock:function(e,t,n){if("("==e)return A(n,t,"atBlock_parens");if("}"==e||";"==e)return T(e,t,n);if("{"==e)return M(n)&&A(n,t,y?"block":"top");if("interpolation"==e)return A(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();a="only"==r||"not"==r||"and"==r||"or"==r?"keyword":u.hasOwnProperty(r)?"attribute":c.hasOwnProperty(r)?"property":f.hasOwnProperty(r)?"keyword":d.hasOwnProperty(r)?"property":h.hasOwnProperty(r)?x?"string-2":"property":v.hasOwnProperty(r)?"atom":g.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(e,t,n){return"}"==e?T(e,t,n):"{"==e?M(n)&&A(n,t,y?"block":"top",!1):("word"==e&&(a="error"),n.context.type)},atBlock_parens:function(e,t,n){return")"==e?M(n):"{"==e||"}"==e?T(e,t,n,2):O.atBlock(e,t,n)},restricted_atBlock_before:function(e,t,n){return"{"==e?A(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(a="variable","restricted_atBlock_before"):D(e,t,n)},restricted_atBlock:function(e,t,n){return"}"==e?(n.stateArg=null,M(n)):"word"==e?(a="@font-face"==n.stateArg&&!p.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!m.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,n){return"word"==e?(a="variable","keyframes"):"{"==e?A(n,t,"top"):D(e,t,n)},at:function(e,t,n){return";"==e?M(n):"{"==e||"}"==e?T(e,t,n):("word"==e?a="tag":"hash"==e&&(a="builtin"),"at")},interpolation:function(e,t,n){return"}"==e?M(n):"{"==e||";"==e?T(e,t,n):("word"==e?a="variable":"variable"!=e&&"("!=e&&")"!=e&&(a="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new E(r?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||k)(e,t);return n&&"object"==typeof n&&(i=n[1],n=n[0]),a=n,"comment"!=i&&(t.state=O[t.state](i,e,t)),a},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),i=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(i=Math.max(0,n.indent-o)):i=(n=n.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}}));var n=["domain","regexp","url","url-prefix"],r=t(n),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=t(i),o=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],s=t(o),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],u=t(l),c=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],f=t(c),d=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],h=t(d),p=t(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),m=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),g=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],v=t(g),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=t(y),_=n.concat(i).concat(o).concat(l).concat(c).concat(d).concat(g).concat(y);function x(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}e.registerHelper("hintWords","css",_),e.defineMIME("text/css",{documentTypes:r,mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:h,fontProperties:p,counterDescriptors:m,colorKeywords:v,valueKeywords:b,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=x,x(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:h,colorKeywords:v,valueKeywords:b,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=x,x(e,t)):["operator","operator"]},":":function(e){return!!e.match(/^\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:h,colorKeywords:v,valueKeywords:b,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=x,x(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:a,mediaFeatures:s,propertyKeywords:f,nonStandardPropertyKeywords:h,fontProperties:p,counterDescriptors:m,colorKeywords:v,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=x,x(e,t))}},name:"css",helperType:"gss"})}(n(15237))},68860:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(4976),a=n(79989),o=function(e){function t(t,n,r){var a=e.call(this,t)||this;return a.model=n,a.filter=r,a.expr=i.expression(a.model,a.filter,a),a}return r.__extends(t,e),t.prototype.clone=function(){return new t(null,this.model,a.duplicate(this.filter))},t.prototype.assemble=function(){return{type:"filter",expr:this.expr}},t}(n(74686).DataFlowNode);t.FilterNode=o},68889:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(54814),o=n(95290),s=n(98348),l=n(32530),u=r.__importStar(n(68171)),c=n(75028),f=n(31179),d=n(79989),h={zero:1,center:1,normalize:1};function p(e){return!!h[e]}t.isStackOffset=p,t.STACKABLE_MARKS=[c.BAR,c.AREA,c.RULE,c.POINT,c.CIRCLE,c.SQUARE,c.LINE,c.TEXT,c.TICK],t.STACK_BY_DEFAULT_MARKS=[c.BAR,c.AREA],t.stack=function(e,n,r){var h=c.isMarkDef(e)?e.type:e;if(!d.contains(t.STACKABLE_MARKS,h))return null;var m=function(e){var t=e.x,n=e.y;if(l.isFieldDef(t)&&l.isFieldDef(n))if("quantitative"===t.type&&"quantitative"===n.type){if(t.stack)return"x";if(n.stack)return"y";if(!!t.aggregate!=!!n.aggregate)return t.aggregate?"x":"y"}else{if("quantitative"===t.type)return"x";if("quantitative"===n.type)return"y"}else{if(l.isFieldDef(t)&&"quantitative"===t.type)return"x";if(l.isFieldDef(n)&&"quantitative"===n.type)return"y"}}(n);if(!m)return null;var g=n[m],v=l.isStringFieldDef(g)?l.vgField(g,{}):void 0,y="x"===m?"y":"x",b=n[y],_=l.isStringFieldDef(b)?l.vgField(b,{}):void 0,x=o.NONPOSITION_CHANNELS.reduce((function(e,t){if(s.channelHasField(n,t)){var r=n[t];(i.isArray(r)?r:[r]).forEach((function(n){var r=l.getFieldDef(n);if(!r.aggregate){var i=l.isStringFieldDef(r)?l.vgField(r,{}):void 0;(!i||i!==_&&i!==v)&&e.push({channel:t,fieldDef:r})}}))}return e}),[]);if(0===x.length)return null;var w;return(w=void 0!==g.stack?g.stack:d.contains(t.STACK_BY_DEFAULT_MARKS,h)&&void 0===r?"zero":r)&&p(w)?(g.scale&&g.scale.type&&g.scale.type!==f.ScaleType.LINEAR&&u.warn(u.message.cannotStackNonLinearScale(g.scale.type)),s.channelHasField(n,m===o.X?o.X2:o.Y2)?(void 0!==g.stack&&u.warn(u.message.cannotStackRangedMark(m)),null):(g.aggregate&&!d.contains(a.SUM_OPS,g.aggregate)&&u.warn(u.message.stackNonSummativeAggregate(g.aggregate)),{groupbyChannel:b?y:void 0,fieldChannel:m,impute:c.isPathMark(h),stackBy:x,offset:w})):null}},69086:e=>{var t,n,r,i=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function o(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,(function(e){var t=a[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function s(e,i){var a,l,u,c,f,d=t,h=i[e];switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(e)),"function"==typeof r&&(h=r.call(i,e,h)),typeof h){case"string":return o(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":return String(h);case"object":if(!h)return"null";if(t+=n,f=[],"[object Array]"===Object.prototype.toString.apply(h)){for(c=h.length,a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(95290),o=n(32530),s=r.__importStar(n(68171)),l=n(31179),u=n(46681),c=n(5711),f=n(63760),d=n(77524),h=function(e){function t(t,n,s,l){var c=e.call(this,t)||this;c.model=n,c.name=s,c.data=l;for(var f=0,h=[a.COLUMN,a.ROW];f{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(95290),a=n(32530),o=r.__importStar(n(68171)),s=n(79989),l=n(15058),u=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.dimensions=n,i.measures=r,i}return r.__extends(t,e),t.prototype.clone=function(){return new t(null,r.__assign({},this.dimensions),s.duplicate(this.measures))},t.makeFromEncoding=function(e,n){var r=!1;n.forEachFieldDef((function(e){e.aggregate&&(r=!0)}));var o={},u={};return r?(n.forEachFieldDef((function(e,t){var r=e.aggregate,s=e.field;r?"count"===r?(o["*"]=o["*"]||{},o["*"].count=a.vgField(e)):(o[s]=o[s]||{},o[s][r]=a.vgField(e),i.isScaleChannel(t)&&"unaggregated"===n.scaleDomain(t)&&(o[s].min=a.vgField({field:s,aggregate:"min"}),o[s].max=a.vgField({field:s,aggregate:"max"}))):function(e,t,n){n.bin?(e[a.vgField(n,{})]=!0,e[a.vgField(n,{binSuffix:"end"})]=!0,l.binRequiresRange(n,t)&&(e[a.vgField(n,{binSuffix:"range"})]=!0)):e[a.vgField(n)]=!0}(u,t,e)})),s.keys(u).length+s.keys(o).length===0?null:new t(e,u,o)):null},t.makeFromTransform=function(e,n){for(var r={},i={},o=0,l=n.aggregate;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(95290),a=n(32530),o=r.__importStar(n(68171)),s=n(75028),l=n(31179),u=r.__importStar(n(74439));function c(e){var t=e.encoding.x,n=e.encoding.x2,c=e.getScaleComponent(i.X),f=c?c.get("type"):void 0;if(a.isFieldDef(t)&&t.bin&&!n)return u.binnedPosition(t,"x",e.scaleName("x"),0,c.get("reverse"));if(a.isFieldDef(t)&&c&&l.hasDiscreteDomain(f)){if(f===l.ScaleType.BAND)return u.bandPosition(t,"x",e);throw new Error(o.message.scaleTypeNotWorkWithMark(s.RECT,f))}return r.__assign({},u.pointPosition("x",e,"zeroOrMax"),u.pointPosition2(e,"zeroOrMin","x2"))}function f(e){var t=e.encoding.y,n=e.encoding.y2,c=e.getScaleComponent(i.Y),f=c?c.get("type"):void 0;if(a.isFieldDef(t)&&t.bin&&!n)return u.binnedPosition(t,"y",e.scaleName("y"),0,c.get("reverse"));if(a.isFieldDef(t)&&c&&l.hasDiscreteDomain(f)){if(f===l.ScaleType.BAND)return u.bandPosition(t,"y",e);throw new Error(o.message.scaleTypeNotWorkWithMark(s.RECT,f))}return r.__assign({},u.pointPosition("y",e,"zeroOrMax"),u.pointPosition2(e,"zeroOrMin","y2"))}t.rect={vgMark:"rect",encodeEntry:function(e){return r.__assign({},u.baseEncodeEntry(e,{size:"ignore",orient:"ignore"}),c(e),f(e))}},t.x=c,t.y=f},70585:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(95290),a=r.__importStar(n(68171)),o=n(31179),s=r.__importStar(n(79989)),l=n(79989),u=n(7302),c=n(96159),f=n(76387);function d(e,t){u.isUnitModel(e)?function(e,t){var n=e.component.scales;l.keys(n).forEach((function(r){var i=e.specifiedScales[r],s=n[r],l=e.getScaleComponent(r),u=e.fieldDef(r),c=e.config,f=i[t],d=l.get("type"),p=o.scaleTypeSupportProperty(d,t),m=o.channelScalePropertyIncompatability(r,t);if(void 0!==f&&(p?m&&a.warn(m):a.warn(a.message.scalePropertyNotWorkWithScaleType(d,t,r))),p&&void 0===m)if(void 0!==f)s.copyKeyFromObject(t,i);else{var g=h(t,r,u,l.get("type"),l.get("padding"),l.get("paddingInner"),i.domain,e.markDef,c);void 0!==g&&s.set(t,g,!1)}}))}(e,t):p(e,t)}function h(e,t,n,r,i,a,o,s,l){var u=l.scale;switch(e){case"nice":return m(r,t,n);case"padding":return g(t,r,u,n,s,l.bar);case"paddingInner":return v(i,t,u);case"paddingOuter":return y(i,t,r,a,u);case"reverse":return b(r,n.sort);case"zero":return _(t,n,o,s)}return u[e]}function p(e,t){for(var n=e.component.scales,r=0,i=e.children;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(79989),a=n(74686),o=n(69151),s=n(30366),l=n(455),u=n(62277);function c(e){return function t(n){if(!(n instanceof l.SourceNode)){var r=n.parent;e(n)&&t(r)}}}t.iterateFromLeaves=c,t.moveParseUp=function(e){var t=e.parent;if(e instanceof s.ParseNode){if(t instanceof l.SourceNode)return!1;if(t.numChildren()>1)return!0;if(t instanceof s.ParseNode)t.merge(e);else{if(i.hasIntersection(t.producedFields(),e.dependentFields()))return!0;e.swapWithParent()}}return!0},t.removeUnusedSubtrees=function(e){return!(e instanceof a.OutputNode||e.numChildren()>0||e instanceof o.FacetNode||(e.remove(),0))},t.removeDuplicateTimeUnits=function(e){var t={};return c((function(e){if(e instanceof u.TimeUnitNode){var n=e.producedFields();i.keys(n).every((function(e){return!!t[e]}))?e.remove():t=r.__assign({},t,n)}return!0}))(e)}},73447:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(26372),i=n(75028),a=n(75028);t.DEFAULT_REQUIRED_CHANNEL_MAP={text:["text"],line:["x","y"],trail:["x","y"],area:["x","y"]},t.DEFAULT_SUPPORTED_CHANNEL_TYPE={bar:r.toSet(["row","column","x","y","size","color","fill","stroke","detail"]),line:r.toSet(["row","column","x","y","color","fill","stroke","color","detail"]),trail:r.toSet(["row","column","x","y","color","fill","stroke","color","detail","size"]),area:r.toSet(["row","column","x","y","color","fill","stroke","detail"]),tick:r.toSet(["row","column","x","y","color","fill","stroke","detail"]),circle:r.toSet(["row","column","x","y","color","fill","stroke","size","detail"]),square:r.toSet(["row","column","x","y","color","fill","stroke","size","detail"]),point:r.toSet(["row","column","x","y","color","fill","stroke","size","detail","shape"]),geoshape:r.toSet(["row","column","color","fill","stroke","detail","shape"]),text:r.toSet(["row","column","size","color","fill","stroke","text"])},t.getEncodingMappingError=function(e,n,r){void 0===n&&(n=t.DEFAULT_REQUIRED_CHANNEL_MAP),void 0===r&&(r=t.DEFAULT_SUPPORTED_CHANNEL_TYPE);var o=i.isMarkDef(e.mark)?e.mark.type:e.mark,s=e.encoding,l=n[o],u=r[o];for(var c in l)if(!(l[c]in s))return'Missing encoding channel "'+l[c]+'" for mark "'+o+'"';for(var f in s)if(!u[f])return'Encoding channel "'+f+'" is not supported by mark type "'+o+'"';return o!==a.BAR||s.x||s.y?null:"Missing both x and y for bar"}},73799:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=r.__importStar(n(68171)),a=n(76426),o=n(38406),s=n(36598),l=n(27588),u=function(e){function t(t,n,r,o,l){var u=e.call(this,t,n,r,l,o,t.resolve)||this;return u.type="concat",t.resolve&&t.resolve.axis&&("shared"===t.resolve.axis.x||"shared"===t.resolve.axis.y)&&i.warn(i.message.CONCAT_CANNOT_SHARE_AXIS),u.isVConcat=a.isVConcatSpec(t),u.children=(a.isVConcatSpec(t)?t.vconcat:t.hconcat).map((function(e,t){return s.buildModel(e,u,u.getName("concat_"+t),void 0,o,l,!1)})),u}return r.__extends(t,e),t.prototype.parseLayoutSize=function(){l.parseConcatLayoutSize(this)},t.prototype.parseAxisGroup=function(){return null},t.prototype.assembleDefaultLayout=function(){return r.__assign({},this.isVConcat?{columns:1}:{},{bounds:"full",align:"each"})},t}(o.BaseConcatModel);t.ConcatModel=u},74439:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(32530),o=r.__importStar(n(68171)),s=n(4976),l=n(31179),u=n(79989),c=n(5711),f=n(15058),d=n(11964),h=r.__importStar(n(38851));function p(e,t){var n,i;void 0===t&&(t={valueOnly:!1});var a=e.markDef,s=e.encoding,l=e.config,c=a.filled,d=a.type,h={fill:f.getMarkConfig("fill",a,l),stroke:f.getMarkConfig("stroke",a,l),color:f.getMarkConfig("color",a,l)},p=u.contains(["bar","point","circle","square","geoshape"],d)?"transparent":void 0,m={fill:a.fill||h.fill||p,stroke:a.stroke||h.stroke},v=c?"fill":"stroke",y=r.__assign({},m.fill?{fill:{value:m.fill}}:{},m.stroke?{stroke:{value:m.stroke}}:{});return s.fill||s.stroke?(a.color&&o.warn(o.message.droppingColor("property",{fill:"fill"in s,stroke:"stroke"in s})),r.__assign({},g("fill",e,{defaultValue:m.fill||p}),g("stroke",e,{defaultValue:m.stroke}))):s.color?r.__assign({},y,g("color",e,{vgChannel:v,defaultValue:a[v]||a.color||h[v]||h.color||(c?p:void 0)})):a.fill||a.stroke?(a.color&&o.warn(o.message.droppingColor("property",{fill:"fill"in a,stroke:"stroke"in a})),y):a.color?r.__assign({},y,((n={})[v]={value:a.color},n)):h.fill||h.stroke?y:h.color?r.__assign({},p?{fill:{value:"transparent"}}:{},((i={})[v]={value:h.color},i)):{}}function m(e){return e+" !== null && !isNaN("+e+")"}function g(e,t,n){void 0===n&&(n={});var r=n.defaultValue,i=n.vgChannel,a=n.defaultRef||(void 0!==r?{value:r}:void 0),o=t.encoding[e];return v(t,o,i||e,(function(n){return h.midPoint(e,n,t.scaleName(e),t.getScaleComponent(e),null,a)}))}function v(e,t,n,o){var l,u,c=t&&t.condition,f=o(t);if(c){var h=(i.isArray(c)?c:[c]).map((function(t){var n=o(t),i=a.isConditionalSelection(t)?d.selectionPredicate(e,t.selection):s.expression(e,t.test);return r.__assign({test:i},n)}));return(l={})[n]=h.concat(void 0!==f?[f]:[]),l}return void 0!==f?((u={})[n]=f,u):{}}function y(e){var t="tooltip",n=e.encoding[t];return i.isArray(n)?{tooltip:{signal:"{"+n.map((function(t){return'"'+(void 0!==t.title?t.title:a.vgField(t,{binSuffix:"range"}))+'": '+h.text(t,e.config).signal})).join(", ")+"}"}}:_(e,t,n)}function b(e,t){return void 0===t&&(t="text"),_(e,t,e.encoding[t])}function _(e,t,n){return v(e,n,t,(function(t){return h.text(t,e.config)}))}function x(e,t,n,i){var a,o=t.encoding,s=t.mark,l=t.stack,u=o[e],c=t.scaleName(e),f=t.getScaleComponent(e),d=h.getOffset(e,t.markDef),p=u||!o.latitude&&!o.longitude?r.__assign({},h.position(e,o[e],c,f,l,h.getDefaultRef(n,e,c,f,s)),d?{offset:d}:{}):{field:t.getName(e)};return(a={})[i||e]=p,a}t.color=p,t.baseEncodeEntry=function(e,t){return r.__assign({},function(e,t){return c.VG_MARK_CONFIGS.reduce((function(n,r){return void 0!==e[r]&&"ignore"!==t[r]&&(n[r]={value:e[r]}),n}),{})}(e.markDef,t),p(e),g("opacity",e),y(e),b(e,"href"))},t.valueIfDefined=function(e,t){var n;if(void 0!==t)return(n={})[e]={value:t},n},t.defined=function(e){if("filter"===e.config.invalidValues){var t=["x","y"].map((function(t){var n=e.getScaleComponent(t);if(n){var r=n.get("type");if(l.hasContinuousDomain(r))return e.vgField(t,{expr:"datum"})}})).filter((function(e){return!!e})).map(m);if(t.length>0)return{defined:{signal:t.join(" && ")}}}return{}},t.nonPosition=g,t.wrapCondition=v,t.tooltip=y,t.text=b,t.bandPosition=function(e,t,n){var i,s,l,u=n.scaleName(t),c="x"===t?"width":"height";if(n.encoding.size||void 0!==n.markDef.size)if(n.markDef.orient){var f=((i={})[t+"c"]=h.fieldRef(e,u,{},{band:.5}),i);if(a.getFieldDef(n.encoding.size))return r.__assign({},f,g("size",n,{vgChannel:c}));if(a.isValueDef(n.encoding.size))return r.__assign({},f,g("size",n,{vgChannel:c}));if(void 0!==n.markDef.size)return r.__assign({},f,((s={})[c]={value:n.markDef.size},s))}else o.warn(o.message.cannotApplySizeToNonOrientedMark(n.markDef.type));return(l={})[t]=h.fieldRef(e,u,{binSuffix:"range"}),l[c]=h.bandRef(u),l},t.centeredBandPosition=function(e,t,n,i){var a="x"===e?"xc":"yc",o="x"===e?"width":"height";return r.__assign({},x(e,t,n,a),g("size",t,{defaultRef:i,vgChannel:o}))},t.binnedPosition=function(e,t,n,r,i){return"x"===t?{x2:h.bin(e,n,"start",i?0:r),x:h.bin(e,n,"end",i?r:0)}:{y2:h.bin(e,n,"start",i?r:0),y:h.bin(e,n,"end",i?0:r)}},t.pointPosition=x,t.pointPosition2=function(e,t,n){var i,a=e.encoding,o=e.mark,s=e.stack,l="x2"===n?"x":"y",u=a[l],c=e.scaleName(l),f=e.getScaleComponent(l),d=h.getOffset(n,e.markDef),p=u||!a.latitude&&!a.longitude?r.__assign({},h.position2(n,u,a[n],c,f,s,h.getDefaultRef(t,l,c,f,o)),d?{offset:d}:{}):{field:e.getName(n)};return(i={})[n]=p,i}},74686:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=function(){function e(e,t){this.debugName=t,this._children=[],this._parent=null,e&&(this.parent=e)}return e.prototype.clone=function(){throw new Error("Cannot clone node")},e.prototype.producedFields=function(){return{}},e.prototype.dependentFields=function(){return{}},Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},set:function(e){this._parent=e,e.addChild(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),e.prototype.numChildren=function(){return this._children.length},e.prototype.addChild=function(e){this._children.push(e)},e.prototype.removeChild=function(e){this._children.splice(this._children.indexOf(e),1)},e.prototype.remove=function(){for(var e=0,t=this._children;e{!function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var n=t(["and","or","not","is"]),r=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in"],i=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];function a(e){return e.scopes[e.scopes.length-1]}e.registerHelper("hintWords","python",r.concat(i).concat(["exec","print"])),e.defineMode("python",(function(o,s){for(var l="error",u=s.delimiters||s.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,c=[s.singleOperators,s.doubleOperators,s.doubleDelimiters,s.tripleDelimiters,s.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],f=0;fr?w(t):i0&&k(e,t)&&(o+=" "+l),o}return x(e,t)}function x(e,t,r){if(e.eatSpace())return null;if(!r&&e.match(/^#.*/))return"comment";if(e.match(/^[0-9\.]/,!1)){var i=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(i=!0),e.match(/^[\d_]+\.\d*/)&&(i=!0),e.match(/^\.\d+/)&&(i=!0),i)return e.eat(/J/i),"number";var a=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(a=!0),e.match(/^0b[01_]+/i)&&(a=!0),e.match(/^0o[0-7_]+/i)&&(a=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),a=!0),e.match(/^0(?![\dx])/i)&&(a=!0),a)return e.eat(/L/i),"number"}if(e.match(v))return-1!==e.current().toLowerCase().indexOf("f")?(t.tokenize=function(e,t){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var n=1==e.length,r="string";function i(e){return function(t,n){var r=x(t,n,!0);return"punctuation"==r&&("{"==t.current()?n.tokenize=i(e+1):"}"==t.current()&&(n.tokenize=e>1?i(e-1):a)),r}}function a(a,o){for(;!a.eol();)if(a.eatWhile(/[^'"\{\}\\]/),a.eat("\\")){if(a.next(),n&&a.eol())return r}else{if(a.match(e))return o.tokenize=t,r;if(a.match("{{"))return r;if(a.match("{",!1))return o.tokenize=i(0),a.current()?r:o.tokenize(a,o);if(a.match("}}"))return r;if(a.match("}"))return l;a.eat(/['"]/)}if(n){if(s.singleLineStringErrors)return l;o.tokenize=t}return r}return a.isString=!0,a}(e.current(),t.tokenize),t.tokenize(e,t)):(t.tokenize=function(e,t){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var n=1==e.length,r="string";function i(i,a){for(;!i.eol();)if(i.eatWhile(/[^'"\\]/),i.eat("\\")){if(i.next(),n&&i.eol())return r}else{if(i.match(e))return a.tokenize=t,r;i.eat(/['"]/)}if(n){if(s.singleLineStringErrors)return l;a.tokenize=t}return r}return i.isString=!0,i}(e.current(),t.tokenize),t.tokenize(e,t));for(var o=0;o1&&a(t).offset>n;){if("py"!=a(t).type)return!0;t.scopes.pop()}return a(t).offset!=n}function S(e,t){e.sol()&&(t.beginningOfLine=!0,t.dedent=!1);var n=t.tokenize(e,t),r=e.current();if(t.beginningOfLine&&"@"==r)return e.match(g,!1)?"meta":m?"operator":l;if(/\S/.test(r)&&(t.beginningOfLine=!1),"variable"!=n&&"builtin"!=n||"meta"!=t.lastToken||(n="meta"),"pass"!=r&&"return"!=r||(t.dedent=!0),"lambda"==r&&(t.lambda=!0),":"==r&&!t.lambda&&"py"==a(t).type&&e.match(/^\s*(?:#|$)/,!1)&&w(t),1==r.length&&!/string|comment/.test(n)){var i="[({".indexOf(r);if(-1!=i&&function(e,t,n){var r=e.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:e.column()+1;t.scopes.push({offset:t.indent+d,type:n,align:r})}(e,t,"])}".slice(i,i+1)),-1!=(i="])}".indexOf(r))){if(a(t).type!=r)return l;t.indent=t.scopes.pop().offset-d}}return t.dedent&&e.eol()&&"py"==a(t).type&&t.scopes.length>1&&t.scopes.pop(),n}return{startState:function(e){return{tokenize:_,scopes:[{offset:e||0,type:"py",align:null}],indent:e||0,lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=t.errorToken;n&&(t.errorToken=!1);var r=S(e,t);return r&&"comment"!=r&&(t.lastToken="keyword"==r||"punctuation"==r?e.current():r),"punctuation"==r&&(r=null),e.eol()&&t.lambda&&(t.lambda=!1),n?r+" "+l:r},indent:function(t,n){if(t.tokenize!=_)return t.tokenize.isString?e.Pass:0;var r=a(t),i=r.type==n.charAt(0)||"py"==r.type&&!t.dedent&&/^(else:|elif |except |finally:)/.test(n);return null!=r.align?r.align-(i?1:0):r.offset-(i?d:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"}})),e.defineMIME("text/x-python","python");var o;e.defineMIME("text/x-cython",{name:"python",extra_keywords:(o="by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE",o.split(" "))})}(n(15237))},75028:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(26372),a=n(79989);!function(e){e.AREA="area",e.BAR="bar",e.LINE="line",e.POINT="point",e.RECT="rect",e.RULE="rule",e.TEXT="text",e.TICK="tick",e.TRAIL="trail",e.CIRCLE="circle",e.SQUARE="square",e.GEOSHAPE="geoshape"}(r=t.Mark||(t.Mark={})),t.AREA=r.AREA,t.BAR=r.BAR,t.LINE=r.LINE,t.POINT=r.POINT,t.TEXT=r.TEXT,t.TICK=r.TICK,t.TRAIL=r.TRAIL,t.RECT=r.RECT,t.RULE=r.RULE,t.GEOSHAPE=r.GEOSHAPE,t.CIRCLE=r.CIRCLE,t.SQUARE=r.SQUARE;var o={area:1,bar:1,line:1,point:1,text:1,tick:1,trail:1,rect:1,geoshape:1,rule:1,circle:1,square:1};function s(e){return e.type}t.isMark=function(e){return!!o[e]},t.isPathMark=function(e){return a.contains(["line","area","trail"],e)},t.PRIMITIVE_MARKS=a.flagKeys(o),t.isMarkDef=s;var l=i.toSet(t.PRIMITIVE_MARKS);t.isPrimitiveMark=function(e){return(s(e)?e.type:e)in l},t.STROKE_CONFIG=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit"],t.FILL_CONFIG=["fill","fillOpacity"],t.FILL_STROKE_CONFIG=[].concat(t.STROKE_CONFIG,t.FILL_CONFIG),t.VL_ONLY_MARK_CONFIG_PROPERTIES=["filled","color"],t.VL_ONLY_MARK_SPECIFIC_CONFIG_PROPERTY_INDEX={area:["line","point"],bar:["binSpacing","continuousBandSize","discreteBandSize"],line:["point"],text:["shortTimeLabels"],tick:["bandSize","thickness"]},t.defaultMarkConfig={color:"#4c78a8"},t.defaultBarConfig={binSpacing:1,continuousBandSize:5},t.defaultTickConfig={thickness:1}},75086:e=>{var t=/("(?:[^\\"]|\\.)*")|[:,\][}{]/g;function n(e,t,n){return t in e?e[t]:n}e.exports=function(e,r){r=r||{};var i=JSON.stringify([1],null,n(r,"indent",2)).slice(2,-3),a=n(r,"margins",!1),o=""===i?1/0:n(r,"maxLength",80);return function e(n,r,s){n&&"function"==typeof n.toJSON&&(n=n.toJSON());var l=JSON.stringify(n);if(void 0===l)return l;var u=o-r.length-s;if(l.length<=u){var c=function(e,n){var r=n?" ":"",i={"{":"{"+r,"[":"["+r,"}":r+"}","]":r+"]",",":", ",":":": "};return e.replace(t,(function(e,t){return t?e:i[e]}))}(l,a);if(c.length<=u)return c}if("object"==typeof n&&null!==n){var f,d=r+i,h=[],p=function(e,t){return t===e.length-1?0:1};if(Array.isArray(n)){for(var m=0;m0)return[f[0],i+h.join(",\n"+d),f[1]].join("\n"+r)}return l}(e,"",0)}},76387:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(95290),o=r.__importStar(n(68171)),s=n(31179),l=n(31179),u=r.__importStar(n(79989)),c=n(5711),f=n(7302),d=n(96159),h=n(70585);function p(e,n,r,i,a,l,u,c,f,h){for(var p=c||null===i.rangeStep,v=0,y=t.RANGE_PROPERTIES;v0?Math.min.apply(null,e):t.rangeStep?t.rangeStep:21}t.RANGE_PROPERTIES=["range","rangeStep","scheme"],t.parseScaleRange=function(e){f.isUnitModel(e)?function(e){var t=e.component.scales;a.SCALE_CHANNELS.forEach((function(n){var r=t[n];if(r){var a=e.getScaleComponent(n),s=e.specifiedScales[n],l=e.fieldDef(n),f="x"===n?"width":"y"===n?"height":void 0,d=f?!!e.component.layoutSize.get(f):void 0,h=a.get("type"),m=u.contains(["point","band"],h)||!!s.rangeStep;f&&e.fit&&!d&&m&&(o.warn(o.message.CANNOT_FIX_RANGE_STEP_WITH_FIT),d=!0);var g=function(e){var t=[],n=e.getScaleComponent("x"),r=n&&n.get("range");r&&c.isVgRangeStep(r)&&i.isNumber(r.step)&&t.push(r.step);var a=e.getScaleComponent("y"),o=a&&a.get("range");return o&&c.isVgRangeStep(o)&&i.isNumber(o.step)&&t.push(o.step),t}(e),v=p(n,h,l.type,s,e.config,r.get("zero"),e.mark,d,e.getName(f),g);r.setWithExplicit("range",v)}}))}(e):h.parseNonUnitScaleProperty(e,"range")},t.parseRangeForChannel=p,t.defaultRange=g},76426:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(95290),o=r.__importStar(n(19760)),s=r.__importStar(n(98348)),l=n(98348),u=r.__importStar(n(68171)),c=n(75028),f=n(68889),d=n(79989);function h(e){return void 0!==e.facet}function p(e){return!!e.mark}function m(e){return void 0!==e.layer}function g(e){return void 0!==e.repeat}function v(e){return y(e)||b(e)}function y(e){return void 0!==e.vconcat}function b(e){return void 0!==e.hconcat}function _(e){var t=e.parentEncoding,n=e.encoding;if(t&&n){var i=d.keys(t).reduce((function(e,t){return n[t]&&e.push(t),e}),[]);i.length>0&&u.warn(u.message.encodingOverridden(i))}var a=r.__assign({},t||{},n||{});return d.keys(a).length>0?a:void 0}function x(e){var t=e.parentProjection,n=e.projection;return t&&n&&u.warn(u.message.projectionOverridden({parentProjection:t,projection:n})),n||t}function w(e,t,n,i){var a=e.layer,o=e.encoding,s=e.projection,l=r.__rest(e,["layer","encoding","projection"]),u=_({parentEncoding:n,encoding:o}),c=x({parentProjection:i,projection:s});return r.__assign({},l,{layer:a.map((function(e){return m(e)?w(e,t,u,c):k(e,t,u,c)}))})}function k(e,t,n,s){var h=e.encoding,p=e.projection,m=c.isMarkDef(e.mark)?e.mark.type:e.mark;if(n||s){var g=x({parentProjection:s,projection:p}),v=_({parentEncoding:n,encoding:h});return k(r.__assign({},e,g?{projection:g}:{},v?{encoding:v}:{}),t)}return function(e){return c.isPrimitiveMark(e.mark)}(e)?l.isRanged(h)?function(e){var t=l.channelHasField(e.encoding,a.X),n=l.channelHasField(e.encoding,a.Y),r=l.channelHasField(e.encoding,a.X2),i=l.channelHasField(e.encoding,a.Y2);if(r&&!t||i&&!n){var o=d.duplicate(e);return r&&!t&&(o.encoding.x=o.encoding.x2,delete o.encoding.x2),i&&!n&&(o.encoding.y=o.encoding.y2,delete o.encoding.y2),o}return e}(e):"line"===m&&(h.x2||h.y2)?(u.warn(u.message.lineWithRange(!!h.x2,!!h.y2)),k(r.__assign({mark:"rule"},e),t,n,s)):c.isPathMark(m)?function(e,t){void 0===t&&(t={});var n,a=e.selection,o=e.projection,s=e.encoding,l=e.mark,u=r.__rest(e,["selection","projection","encoding","mark"]),h=c.isMarkDef(l)?l:{type:l},p=function(e,t,n){return"transparent"===e.point?{opacity:0}:e.point?i.isObject(e.point)?e.point:{}:void 0!==e.point?null:t.point||n.shape?i.isObject(t.point)?t.point:{}:null}(h,t[h.type],s),m="area"===h.type&&function(e,t){return e.line?!0===e.line?{}:e.line:void 0!==e.line?null:t.line?!0===t.line?{}:t.line:null}(h,t[h.type]);if(!p&&!m)return r.__assign({},e,{mark:S(h)});var g=[r.__assign({},a?{selection:a}:{},{mark:S(r.__assign({},h,"area"===h.type?{opacity:.7}:{})),encoding:d.omit(s,["shape"])})],v=f.stack(h,s,t?t.stack:void 0),y=s;if(v){var b=v.fieldChannel,_=v.offset;y=r.__assign({},s,((n={})[b]=r.__assign({},s[b],_?{stack:_}:{}),n))}return m&&g.push(r.__assign({},o?{projection:o}:{},{mark:r.__assign({type:"line"},d.pick(h,["clip","interpolate"]),m),encoding:y})),p&&g.push(r.__assign({},o?{projection:o}:{},{mark:r.__assign({type:"point",opacity:1,filled:!0},d.pick(h,["clip"]),p),encoding:y})),r.__assign({},u,{layer:g})}(e,t):e:o.normalize(e,t)}function S(e){e.point,e.line;var t=r.__rest(e,["point","line"]);return d.keys(t).length>1?t:t.type}function C(e,t){return t.forEach((function(t){var n=["field","type","value","timeUnit","bin","aggregate"].reduce((function(e,n){return void 0!==t[n]&&(e[n]=t[n]),e}),{}),r=d.hash(n);e[r]=e[r]||t})),e}function E(e,t){return void 0===t&&(t={}),m(e)?e.layer.forEach((function(e){p(e)?C(t,s.fieldDefs(e.encoding)):E(e,t)})):h(e)?(C(t,s.fieldDefs(e.facet)),E(e.spec,t)):g(e)?E(e.spec,t):v(e)?(y(e)?e.vconcat:e.hconcat).forEach((function(e){return E(e,t)})):C(t,s.fieldDefs(e.encoding)),t}t.isFacetSpec=h,t.isUnitSpec=p,t.isLayerSpec=m,t.isRepeatSpec=g,t.isConcatSpec=v,t.isVConcatSpec=y,t.isHConcatSpec=b,t.normalize=function e(t,n){if(h(t))return function(t,n){var i=t.spec,a=r.__rest(t,["spec"]);return r.__assign({},a,{spec:e(i,n)})}(t,n);if(m(t))return w(t,n);if(g(t))return function(t,n){var i=t.spec,a=r.__rest(t,["spec"]);return r.__assign({},a,{spec:e(i,n)})}(t,n);if(y(t))return function(t,n){var i=t.vconcat,a=r.__rest(t,["vconcat"]);return r.__assign({},a,{vconcat:i.map((function(t){return e(t,n)}))})}(t,n);if(b(t))return function(t,n){var i=t.hconcat,a=r.__rest(t,["hconcat"]);return r.__assign({},a,{hconcat:i.map((function(t){return e(t,n)}))})}(t,n);if(p(t)){var i=l.channelHasField(t.encoding,a.ROW),o=l.channelHasField(t.encoding,a.COLUMN);return i||o?function(e,t){var n=e.encoding,i=n.row,a=n.column,o=r.__rest(n,["row","column"]),s=e.mark,l=e.width,u=e.projection,c=e.height,f=e.selection,d=(e.encoding,r.__rest(e,["mark","width","projection","height","selection","encoding"]));return r.__assign({},d,{facet:r.__assign({},i?{row:i}:{},a?{column:a}:{}),spec:k(r.__assign({},u?{projection:u}:{},{mark:s},l?{width:l}:{},c?{height:c}:{},{encoding:o},f?{selection:f}:{}),t)})}(t,n):k(t,n)}throw new Error(u.message.INVALID_SPEC)},t.fieldDefs=function(e){return d.vals(E(e))},t.isStacked=function(e,t){return t=t||e.config,!!c.isPrimitiveMark(e.mark)&&null!==f.stack(e.mark,e.encoding,t?t.stack:void 0)}},76447:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209);t.extractTitleConfig=function(e){var t=e.anchor,n=e.offset,i=e.orient,a=e.color,o=r.__rest(e,["anchor","offset","orient","color"]);return{mark:r.__assign({},o,a?{fill:a}:{}),nonMark:r.__assign({},t?{anchor:t}:{},n?{offset:n}:{},i?{orient:i}:{})}}},77524:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(32530),a=n(4976),o=n(46681),s=n(79989),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r.transform=n,r}return r.__extends(t,e),t.prototype.clone=function(){return new t(null,s.duplicate(this.transform))},t.parseAllForSortIndex=function(e,n){return n.forEachFieldDef((function(n,r){if(i.isScaleFieldDef(n)&&o.isSortArray(n.sort)){var s=n.field,l=n.timeUnit,c=n.sort,f=c.map((function(e,t){return a.fieldFilterExpression({field:s,timeUnit:l,equal:e})+" ? "+t+" : "})).join("")+c.length;e=new t(e,{calculate:f,as:u(n,r)})}})),e},t.prototype.producedFields=function(){var e={};return e[this.transform.as]=!0,e},t.prototype.assemble=function(){return{type:"formula",expr:this.transform.calculate,as:this.transform.as}},t}(n(74686).DataFlowNode);function u(e,t,n){return i.vgField(e,{prefix:t,suffix:"sort_index",expr:n})}t.CalculateNode=l,t.sortArrayIndexField=u},78405:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=r.__importStar(n(54814));t.aggregate=i;var a=r.__importStar(n(65032));t.axis=a;var o=r.__importStar(n(19664));t.bin=o;var s=r.__importStar(n(95290));t.channel=s;var l=r.__importStar(n(19760));t.compositeMark=l;var u=n(48166);t.compile=u.compile;var c=r.__importStar(n(24007));t.config=c;var f=r.__importStar(n(89081));t.data=f;var d=r.__importStar(n(20032));t.datetime=d;var h=r.__importStar(n(98348));t.encoding=h;var p=r.__importStar(n(82706));t.facet=p;var m=r.__importStar(n(32530));t.fieldDef=m;var g=r.__importStar(n(41028));t.header=g;var v=r.__importStar(n(54116));t.legend=v;var y=r.__importStar(n(75028));t.mark=y;var b=r.__importStar(n(31179));t.scale=b;var _=r.__importStar(n(46681));t.sort=_;var x=r.__importStar(n(76426));t.spec=x;var w=r.__importStar(n(68889));t.stack=w;var k=r.__importStar(n(96598));t.timeUnit=k;var S=r.__importStar(n(65393));t.transform=S;var C=r.__importStar(n(99273));t.type=C;var E=r.__importStar(n(79989));t.util=E;var A=r.__importStar(n(73447));t.validate=A;var M=r.__importDefault(n(67383)).default.version;t.version=M},78540:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(95290),a=r.__importStar(n(68171)),o=n(31179),s=r.__importStar(n(79989));t.scaleType=function(e,t,n,r,l){var u=function(e,t,n){switch(t.type){case"nominal":case"ordinal":if(i.isColorChannel(e)||"discrete"===i.rangeType(e))return"shape"===e&&"ordinal"===t.type&&a.warn(a.message.discreteChannelCannotEncode(e,"ordinal")),"ordinal";if(s.contains(["x","y"],e)){if(s.contains(["rect","bar","rule"],n))return"band";if("bar"===n)return"band"}return"point";case"temporal":return i.isColorChannel(e)?"sequential":"discrete"===i.rangeType(e)?(a.warn(a.message.discreteChannelCannotEncode(e,"temporal")),"ordinal"):"time";case"quantitative":return i.isColorChannel(e)?t.bin?"bin-ordinal":"sequential":"discrete"===i.rangeType(e)?(a.warn(a.message.discreteChannelCannotEncode(e,"quantitative")),"ordinal"):t.bin&&"x"!==e&&"y"!==e?"bin-linear":"linear";case"latitude":case"longitude":case"geojson":return}throw new Error(a.message.invalidFieldType(t.type))}(t,n,r);return i.isScaleChannel(t)?void 0!==e?o.channelSupportScaleType(t,e)?o.scaleTypeSupportDataType(e,n.type,n.bin)?e:(a.warn(a.message.scaleTypeNotWorkWithFieldDef(e,u)),u):(a.warn(a.message.scaleTypeNotWorkWithChannel(t,e,u)),u):u:null}},78825:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(95290),a=n(32530),o=n(75028),s=n(31179),l=n(79989),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.fieldDefs=n,r}return r.__extends(t,e),t.prototype.clone=function(){return new t(null,r.__assign({},this.fieldDefs))},t.make=function(e,n){var r=n.config,a=n.mark;if("filter"!==r.invalidValues)return null;var u=n.reduceFieldDef((function(e,t,r){var l=i.isScaleChannel(r)&&n.getScaleComponent(r);if(l){var u=l.get("type");!s.hasContinuousDomain(u)||t.aggregate||o.isPathMark(a)||(e[t.field]=t)}return e}),{});return l.keys(u).length?new t(e,u):null},Object.defineProperty(t.prototype,"filter",{get:function(){return this.fieldDefs},enumerable:!0,configurable:!0}),t.prototype.assemble=function(){var e=this,t=l.keys(this.filter).reduce((function(t,n){var r=e.fieldDefs[n],i=a.vgField(r,{expr:"datum"});return null!==r&&(t.push(i+" !== null"),t.push("!isNaN("+i+")")),t}),[]);return t.length>0?{type:"filter",expr:t.join(" && ")}:null},t}(n(74686).DataFlowNode);t.FilterInvalidNode=u},79102:(e,t,n)=>{!function(e){"use strict";var t,n,r,i,a=";",o="AS",s=e.Pos,l=e.cmpPos;function u(e){return"[object Array]"==Object.prototype.toString.call(e)}function c(e){return"string"==typeof e?e:e.text}function f(e,t){return u(t)&&(t={columns:t}),t.text||(t.text=e),t}function d(e){return t[e.toUpperCase()]}function h(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function p(e,t){var n=e.length,r=c(t).substr(0,n);return e.toUpperCase()===r.toUpperCase()}function m(e,t,n,r){if(u(n))for(var i=0;i0)&&l(g,f[v])<=0){h={start:m,end:f[v]};break}m=f[v]}if(h.start){var b=n.getRange(h.start,h.end,!1);for(v=0;v=0;n--){var r=e[n];t[c(r).toUpperCase()]=f(c(r),r)}else if(e)for(var i in e)t[i.toUpperCase()]=f(i,e[i]);return t}(o&&o.tables);var l=o&&o.defaultTable,p=o&&o.disableKeywords;n=l&&d(l),r=function(t){var n=t.doc.modeOption;return"sql"===n&&(n="text/x-sql"),e.resolveMode(n).keywords}(a),i=function(t){var n=t.doc.modeOption;return"sql"===n&&(n="text/x-sql"),e.resolveMode(n).identifierQuote||"`"}(a),l&&!n&&(n=b(l,a)),(n=n||[]).columns&&(n=n.columns);var y,_,x,w=a.getCursor(),k=[],S=a.getTokenAt(w);if(S.end>w.ch&&(S.end=w.ch,S.string=S.string.slice(0,w.ch-S.start)),S.string.match(/^[.`"'\w@][\w$#]*$/g)?(x=S.string,y=S.start,_=S.end):(y=_=w.ch,x=""),"."==x.charAt(0)||x.charAt(0)==i)y=function(e,r,a,o){for(var l=!1,u=[],c=r.start,f=!0;f;)f="."==r.string.charAt(0),l=l||r.string.charAt(0)==i,c=r.start,u.unshift(g(r.string)),"."==(r=o.getTokenAt(s(e.line,r.start))).string&&(f=!0,r=o.getTokenAt(s(e.line,r.start)));var p=u.join(".");m(a,p,t,(function(e){return l?v(e):e})),m(a,p,n,(function(e){return l?v(e):e})),p=u.pop();var y=u.join("."),_=!1,x=y;if(!d(y)){var w=y;(y=b(y,o))!==w&&(_=!0)}var k=d(y);return k&&k.columns&&(k=k.columns),k&&m(a,p,k,(function(e){var t=y;return 1==_&&(t=x),"string"==typeof e?e=t+"."+e:(e=h(e)).text=t+"."+e.text,l?v(e):e})),c}(w,S,k,a);else{var C=function(e,t){return"object"==typeof e?e.className=t:e={text:e,className:t},e};m(k,x,n,(function(e){return C(e,"CodeMirror-hint-table CodeMirror-hint-default-table")})),m(k,x,t,(function(e){return C(e,"CodeMirror-hint-table")})),p||m(k,x,r,(function(e){return C(e.toUpperCase(),"CodeMirror-hint-keyword")}))}return{list:k,from:s(w.line,y),to:s(w.line,_)}}))}(n(15237),n(29532))},79989:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=r.__importDefault(n(25473)),a=n(26372),o=n(90386);function s(e,t){return e.indexOf(t)>-1}function l(e,t){return e.filter((function(e){return!s(t,e)}))}function u(e){for(var t=[],n=1;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(89081),a=r.__importStar(n(68171)),o=n(65393),s=n(79989),l=n(7302),u=n(11964),c=n(69687),f=n(89153),d=n(77524),h=n(74686),p=n(69151),m=n(68860),g=n(78825),v=n(30366),y=n(13995),b=n(58211),_=n(3297),x=n(95848),w=n(55320),k=n(455),S=n(89764),C=n(62277),E=n(51422);function A(e,t,n){var r=0;return t.transforms.forEach((function(i){if(o.isCalculate(i))e=new d.CalculateNode(e,i),n.set(i.as,"derived",!1);else if(o.isFilter(i))e=v.ParseNode.makeImplicitFromFilterTransform(e,i,n)||e,e=new m.FilterNode(e,t,i.filter);else if(o.isBin(i))for(var l=e=f.BinNode.makeFromTransform(e,i,t),h=0,p=s.keys(l.producedFields());h0&&(t=A(t,e,s)),t=v.ParseNode.makeImplicitFromEncoding(t,e,s)||t,l.isUnitModel(e)&&(t=y.GeoJSONNode.parseAll(t,e),t=b.GeoPointNode.parseAll(t,e)),(l.isUnitModel(e)||l.isFacetModel(e))&&(m||(t=f.BinNode.makeFromEncoding(t,e)||t),t=C.TimeUnitNode.makeFromEncoding(t,e)||t,t=d.CalculateNode.parseAllForSortIndex(t,e));var w=e.getName(i.RAW),M=new h.OutputNode(t,w,i.RAW,o);if(a[w]=M,t=M,l.isUnitModel(e)){var D=c.AggregateNode.makeFromEncoding(t,e);D&&(t=D,u.requiresSelectionId(e)&&(t=new _.IdentifierNode(t))),t=S.StackNode.makeFromEncoding(t,e)||t}l.isUnitModel(e)&&(t=g.FilterInvalidNode.make(t,e)||t);var T=e.getName(i.MAIN),N=new h.OutputNode(t,T,i.MAIN,o);a[T]=N,t=N;var O=null;if(l.isFacetModel(e)){var F=e.getName("facet");t=d.CalculateNode.parseAllForSortIndex(t,e),t=E.WindowTransformNode.makeFromFacet(t,e.facet)||t,O=new p.FacetNode(t,e,F,N.getSource()),a[F]=O,t=O}return r.__assign({},e.component.data,{outputNodes:a,outputNodeRefCounts:o,raw:M,main:N,facetRoot:O,ancestorParse:s})}},80330:(e,t,n)=>{!function(e){"use strict";e.defineMode("octave",(function(){function e(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var t=new RegExp("^[\\+\\-\\*/&|\\^~<>!@'\\\\]"),n=new RegExp("^[\\(\\[\\{\\},:=;\\.]"),r=new RegExp("^((==)|(~=)|(<=)|(>=)|(<<)|(>>)|(\\.[\\+\\-\\*/\\^\\\\]))"),i=new RegExp("^((!=)|(\\+=)|(\\-=)|(\\*=)|(/=)|(&=)|(\\|=)|(\\^=))"),a=new RegExp("^((>>=)|(<<=))"),o=new RegExp("^[\\]\\)]"),s=new RegExp("^[_A-Za-z¡-￿][_A-Za-z0-9¡-￿]*"),l=e(["error","eval","function","abs","acos","atan","asin","cos","cosh","exp","log","prod","sum","log10","max","min","sign","sin","sinh","sqrt","tan","reshape","break","zeros","default","margin","round","ones","rand","syn","ceil","floor","size","clear","zeros","eye","mean","std","cov","det","eig","inv","norm","rank","trace","expm","logm","sqrtm","linspace","plot","title","xlabel","ylabel","legend","text","grid","meshgrid","mesh","num2str","fft","ifft","arrayfun","cellfun","input","fliplr","flipud","ismember"]),u=e(["return","case","switch","else","elseif","end","endif","endfunction","if","otherwise","do","for","while","try","catch","classdef","properties","events","methods","global","persistent","endfor","endwhile","printf","sprintf","disp","until","continue","pkg"]);function c(e,t){return e.sol()||"'"!==e.peek()?(t.tokenize=d,d(e,t)):(e.next(),t.tokenize=d,"operator")}function f(e,t){return e.match(/^.*%}/)?(t.tokenize=d,"comment"):(e.skipToEnd(),"comment")}function d(h,p){if(h.eatSpace())return null;if(h.match("%{"))return p.tokenize=f,h.skipToEnd(),"comment";if(h.match(/^[%#]/))return h.skipToEnd(),"comment";if(h.match(/^[0-9\.+-]/,!1)){if(h.match(/^[+-]?0x[0-9a-fA-F]+[ij]?/))return h.tokenize=d,"number";if(h.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?[ij]?/))return"number";if(h.match(/^[+-]?\d+([EeDd][+-]?\d+)?[ij]?/))return"number"}if(h.match(e(["nan","NaN","inf","Inf"])))return"number";var m=h.match(/^"(?:[^"]|"")*("|$)/)||h.match(/^'(?:[^']|'')*('|$)/);return m?m[1]?"string":"string error":h.match(u)?"keyword":h.match(l)?"builtin":h.match(s)?"variable":h.match(t)||h.match(r)?"operator":h.match(n)||h.match(i)||h.match(a)?null:h.match(o)?(p.tokenize=c,null):(h.next(),"error")}return{startState:function(){return{tokenize:d}},token:function(e,t){var n=t.tokenize(e,t);return"number"!==n&&"variable"!==n||(t.tokenize=c),n},lineComment:"%",fold:"indent"}})),e.defineMIME("text/x-octave","octave")}(n(15237))},80449:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(89081),a=n(79989),o=n(69687),s=n(74686),l=n(69151),u=n(78825),c=r.__importStar(n(72398)),f=n(89764);function d(e){if(e instanceof l.FacetNode)if(1!==e.numChildren()||e.children[0]instanceof s.OutputNode){h(e.model.component.data.main);var n=a.flatten(e.children.map((i=e,function e(n){if(!(n instanceof l.FacetNode)){var r=n.clone();if(r instanceof s.OutputNode){var u=t.FACET_SCALE_PREFIX+r.getSource();r.setSource(u),i.model.component.data.outputNodes[u]=r}else(r instanceof o.AggregateNode||r instanceof f.StackNode)&&r.addDimensions(i.fields);return a.flatten(n.children.map(e)).forEach((function(e){return e.parent=r})),[r]}return a.flatten(n.children.map(e))})));n.forEach((function(t){return t.parent=e.model.component.data.main}))}else{var r=e.children[0];(r instanceof o.AggregateNode||r instanceof f.StackNode)&&r.addDimensions(e.fields),r.swapWithParent(),d(e)}else e.children.forEach(d);var i}function h(e){if(e instanceof s.OutputNode&&e.type===i.MAIN&&1===e.numChildren()){var t=e.children[0];t instanceof l.FacetNode||(t.swapWithParent(),h(e))}}function p(e){e instanceof u.FilterInvalidNode&&a.every(a.vals(e.filter),(function(e){return null===e}))&&e.remove(),e instanceof s.OutputNode&&!e.isRequired()&&e.remove(),e.children.forEach(p)}function m(e){var t=[];return e.forEach((function e(n){0===n.numChildren()?t.push(n):n.children.forEach(e)})),t}t.FACET_SCALE_PREFIX="scale_",t.optimizeDataflow=function(e){var t=a.vals(e.sources);t.forEach(p),m(t=t.filter((function(e){return e.numChildren()>0}))).forEach(c.iterateFromLeaves(c.removeUnusedSubtrees)),m(t=t.filter((function(e){return e.numChildren()>0}))).forEach(c.iterateFromLeaves(c.moveParseUp)),m(t).forEach(c.removeDuplicateTimeUnits),t.forEach(d),a.keys(e.sources).forEach((function(t){0===e.sources[t].numChildren()&&delete e.sources[t]}))}},81458:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(89081),a=n(79989),o=n(69687),s=n(89153),l=n(77524),u=n(74686),c=n(69151),f=n(68860),d=n(78825),h=n(30366),p=n(13995),m=n(58211),g=n(3297),v=n(55320),y=n(455),b=n(89764),_=n(62277),x=n(51422);function w(e){var t=0;return function n(a,w){if(a instanceof y.SourceNode&&(i.isUrlData(a.data)||(e.push(w),w={name:null,source:w.name,transform:[]})),a instanceof h.ParseNode&&(a.parent instanceof y.SourceNode&&!w.source?(w.format=r.__assign({},w.format||{},{parse:a.assembleFormatParse()}),w.transform=w.transform.concat(a.assembleTransforms(!0))):w.transform=w.transform.concat(a.assembleTransforms())),a instanceof c.FacetNode)return w.name||(w.name="data_"+t++),!w.source||w.transform.length>0?(e.push(w),a.data=w.name):a.data=w.source,void a.assemble().forEach((function(t){return e.push(t)}));switch((a instanceof f.FilterNode||a instanceof l.CalculateNode||a instanceof m.GeoPointNode||a instanceof p.GeoJSONNode||a instanceof o.AggregateNode||a instanceof v.LookupNode||a instanceof x.WindowTransformNode||a instanceof g.IdentifierNode)&&w.transform.push(a.assemble()),(a instanceof d.FilterInvalidNode||a instanceof s.BinNode||a instanceof _.TimeUnitNode||a instanceof b.StackNode)&&(w.transform=w.transform.concat(a.assemble())),a instanceof o.AggregateNode&&(w.name||(w.name="data_"+t++)),a instanceof u.OutputNode&&(w.source&&0===w.transform.length?a.setSource(w.source):a.parent instanceof u.OutputNode?a.setSource(w.name):(w.name||(w.name="data_"+t++),a.setSource(w.name),1===a.numChildren()&&(e.push(w),w={name:null,source:w.name,transform:[]}))),a.numChildren()){case 0:a instanceof u.OutputNode&&(!w.source||w.transform.length>0)&&e.push(w);break;case 1:n(a.children[0],w);break;default:w.name||(w.name="data_"+t++);var k=w.name;!w.source||w.transform.length>0?e.push(w):k=w.source,a.children.forEach((function(e){n(e,{name:null,source:k,transform:[]})}))}}}t.assembleFacetData=function(e){var t=[],n=w(t);return e.children.forEach((function(t){return n(t,{source:e.name,name:null,transform:[]})})),t},t.assembleRootData=function(e,t){var n=a.vals(e.sources),r=[],i=w(r),o=0;n.forEach((function(e){e.hasName()||(e.dataName="source_"+o++);var t=e.assemble();i(e,t)})),r.forEach((function(e){0===e.transform.length&&delete e.transform}));for(var s=0,l=0;l{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},84343:(e,t,n)=>{t.parse=n(55776),t.stringify=n(69086)},84847:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SELECTION_ID="_vgsid_",t.defaultConfig={single:{on:"click",fields:[t.SELECTION_ID],resolve:"global",empty:"all"},multi:{on:"click",fields:[t.SELECTION_ID],toggle:"event.shiftKey",resolve:"global",empty:"all"},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"}}},85004:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=r.__importStar(n(68171)),a=n(38406),o=n(36598),s=n(27588),l=function(e){function t(t,n,r,a,o){var s=e.call(this,t,n,r,o,a,t.resolve)||this;return s.type="repeat",t.resolve&&t.resolve.axis&&("shared"===t.resolve.axis.x||"shared"===t.resolve.axis.y)&&i.warn(i.message.REPEAT_CANNOT_SHARE_AXIS),s.repeat=t.repeat,s.children=s._initChildren(t,s.repeat,a,o),s}return r.__extends(t,e),t.prototype._initChildren=function(e,t,n,r){for(var i=[],a=t.row||[n?n.row:null],s=t.column||[n?n.column:null],l=0,u=a;l{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(79989),a=n(5711),o=n(7302);function s(e){return e.children.reduce((function(e,t){return e.concat(t.assembleProjections())}),l(e))}function l(e){var t=e.component.projection;if(!t||t.merged)return[];var n=t.combine(),o=n.name,s=r.__rest(n,["name"]),l={signal:"["+t.size.map((function(e){return e.signal})).join(", ")+"]"},u=t.data.reduce((function(t,n){var r=a.isVgSignalRef(n)?n.signal:"data('"+e.lookupDataSource(n)+"')";return i.contains(t,r)||t.push(r),t}),[]);if(u.length<=0)throw new Error("Projection's fit didn't find any data sources");return[r.__assign({name:o,size:l,fit:{signal:u.length>1?"["+u.join(", ")+"]":u[0]}},s)]}t.assembleProjections=function(e){return o.isLayerModel(e)||o.isConcatModel(e)||o.isRepeatModel(e)?s(e):l(e)},t.assembleProjectionsForModelAndChildren=s,t.assembleProjectionForModel=l},86985:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(79989),i=n(16182);t.assembleLegends=function(e){for(var t=e.component.legends,n={},a=0,o=r.keys(t);a{"use strict";function n(e){return!!e.url}function r(e){return!!e.values}Object.defineProperty(t,"__esModule",{value:!0}),t.isUrlData=n,t.isInlineData=r,t.isNamedData=function(e){return!!e.name&&!n(e)&&!r(e)},t.MAIN="main",t.RAW="raw"},89153:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(19664),o=n(32530),s=n(79989),l=n(15058),u=n(7302);function c(e,t){var n;n=function(e){return"as"in e}(e)?i.isString(e.as)?[e.as,e.as+"_end"]:[e.as[0],e.as[1]]:[o.vgField(e,{}),o.vgField(e,{binSuffix:"end"})];var s=o.normalizeBin(e.bin,void 0)||{},l=function(e,t){return a.binToString(e)+"_"+t}(s,e.field),u=function(e,t){return{signal:e.getName(t+"_bins"),extentSignal:e.getName(t+"_extent")}}(t,l),c=u.signal,f=u.extentSignal;return{key:l,binComponent:r.__assign({bin:s,field:e.field,as:n},c?{signal:c}:{},f?{extentSignal:f}:{})}}var f=function(e){function t(t,n){var r=e.call(this,t)||this;return r.bins=n,r}return r.__extends(t,e),t.prototype.clone=function(){return new t(null,s.duplicate(this.bins))},t.makeFromEncoding=function(e,n){var i=n.reduceFieldDef((function(e,t,i){if(t.bin){var a=c(t,n),s=a.key,f=a.binComponent;e[s]=r.__assign({},f,e[s],function(e,t,n,r){if(l.binRequiresRange(t,n)){var i=u.isUnitModel(e)&&(e.axis(n)||e.legend(n))||{},a=o.vgField(t,{expr:"datum"}),s=o.vgField(t,{expr:"datum",binSuffix:"end"});return{formulaAs:o.vgField(t,{binSuffix:"range"}),formula:l.binFormatExpression(a,s,i.format,r)}}return{}}(n,t,i,n.config))}return e}),{});return 0===s.keys(i).length?null:new t(e,i)},t.makeFromTransform=function(e,n,r){var i,a=c(n,r),o=a.key,s=a.binComponent;return new t(e,((i={})[o]=s,i))},t.prototype.merge=function(e){this.bins=r.__assign({},this.bins,e.bins),e.remove()},t.prototype.producedFields=function(){var e={};return s.vals(this.bins).forEach((function(t){t.as.forEach((function(t){return e[t]=!0}))})),e},t.prototype.dependentFields=function(){var e={};return s.vals(this.bins).forEach((function(t){e[t.field]=!0})),e},t.prototype.assemble=function(){return s.flatten(s.vals(this.bins).map((function(e){var t=[],n=r.__assign({type:"bin",field:e.field,as:e.as,signal:e.signal},e.bin);return!e.bin.extent&&e.extentSignal&&(t.push({type:"extent",field:e.field,signal:e.extentSignal}),n.extent={signal:e.extentSignal}),t.push(n),e.formula&&t.push({type:"formula",expr:e.formula,as:e.formulaAs}),t})))},t}(n(74686).DataFlowNode);t.BinNode=f},89302:(e,t)=>{var n;t=e.exports=Y,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var r=256,i=Number.MAX_SAFE_INTEGER||9007199254740991,a=t.re=[],o=t.src=[],s=0,l=s++;o[l]="0|[1-9]\\d*";var u=s++;o[u]="[0-9]+";var c=s++;o[c]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var f=s++;o[f]="("+o[l]+")\\.("+o[l]+")\\.("+o[l]+")";var d=s++;o[d]="("+o[u]+")\\.("+o[u]+")\\.("+o[u]+")";var h=s++;o[h]="(?:"+o[l]+"|"+o[c]+")";var p=s++;o[p]="(?:"+o[u]+"|"+o[c]+")";var m=s++;o[m]="(?:-("+o[h]+"(?:\\."+o[h]+")*))";var g=s++;o[g]="(?:-?("+o[p]+"(?:\\."+o[p]+")*))";var v=s++;o[v]="[0-9A-Za-z-]+";var y=s++;o[y]="(?:\\+("+o[v]+"(?:\\."+o[v]+")*))";var b=s++,_="v?"+o[f]+o[m]+"?"+o[y]+"?";o[b]="^"+_+"$";var x="[v=\\s]*"+o[d]+o[g]+"?"+o[y]+"?",w=s++;o[w]="^"+x+"$";var k=s++;o[k]="((?:<|>)?=?)";var S=s++;o[S]=o[u]+"|x|X|\\*";var C=s++;o[C]=o[l]+"|x|X|\\*";var E=s++;o[E]="[v=\\s]*("+o[C]+")(?:\\.("+o[C]+")(?:\\.("+o[C]+")(?:"+o[m]+")?"+o[y]+"?)?)?";var A=s++;o[A]="[v=\\s]*("+o[S]+")(?:\\.("+o[S]+")(?:\\.("+o[S]+")(?:"+o[g]+")?"+o[y]+"?)?)?";var M=s++;o[M]="^"+o[k]+"\\s*"+o[E]+"$";var D=s++;o[D]="^"+o[k]+"\\s*"+o[A]+"$";var T=s++;o[T]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var N=s++;o[N]="(?:~>?)";var O=s++;o[O]="(\\s*)"+o[N]+"\\s+",a[O]=new RegExp(o[O],"g");var F=s++;o[F]="^"+o[N]+o[E]+"$";var L=s++;o[L]="^"+o[N]+o[A]+"$";var P=s++;o[P]="(?:\\^)";var z=s++;o[z]="(\\s*)"+o[P]+"\\s+",a[z]=new RegExp(o[z],"g");var R=s++;o[R]="^"+o[P]+o[E]+"$";var I=s++;o[I]="^"+o[P]+o[A]+"$";var j=s++;o[j]="^"+o[k]+"\\s*("+x+")$|^$";var B=s++;o[B]="^"+o[k]+"\\s*("+_+")$|^$";var U=s++;o[U]="(\\s*)"+o[k]+"\\s*("+x+"|"+o[E]+")",a[U]=new RegExp(o[U],"g");var q=s++;o[q]="^\\s*("+o[E]+")\\s+-\\s+("+o[E]+")\\s*$";var W=s++;o[W]="^\\s*("+o[A]+")\\s+-\\s+("+o[A]+")\\s*$";var H=s++;o[H]="(<|>)?=?\\s*\\*";for(var V=0;V<35;V++)n(V,o[V]),a[V]||(a[V]=new RegExp(o[V]));function G(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof Y)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?a[w]:a[b]).test(e))return null;try{return new Y(e,t)}catch(e){return null}}function Y(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof Y){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>r)throw new TypeError("version is longer than "+r+" characters");if(!(this instanceof Y))return new Y(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?a[w]:a[b]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[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: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new Y(e,n).inc(t,r).version}catch(e){return null}},t.diff=function(e,t){if(J(e,t))return null;var n=G(e),r=G(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var a="prerelease"}for(var o in n)if(("major"===o||"minor"===o||"patch"===o)&&n[o]!==r[o])return i+o;return a},t.compareIdentifiers=X;var $=/^[0-9]+$/;function X(e,t){var n=$.test(e),r=$.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e0}function Z(e,t,n){return K(e,t,n)<0}function J(e,t,n){return 0===K(e,t,n)}function ee(e,t,n){return 0!==K(e,t,n)}function te(e,t,n){return K(e,t,n)>=0}function ne(e,t,n){return K(e,t,n)<=0}function re(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return J(e,n,r);case"!=":return ee(e,n,r);case">":return Q(e,n,r);case">=":return te(e,n,r);case"<":return Z(e,n,r);case"<=":return ne(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function ie(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ie){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ie))return new ie(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ae?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return X(t,e)},t.major=function(e,t){return new Y(e,t).major},t.minor=function(e,t){return new Y(e,t).minor},t.patch=function(e,t){return new Y(e,t).patch},t.compare=K,t.compareLoose=function(e,t){return K(e,t,!0)},t.rcompare=function(e,t,n){return K(t,e,n)},t.sort=function(e,n){return e.sort((function(e,r){return t.compare(e,r,n)}))},t.rsort=function(e,n){return e.sort((function(e,r){return t.rcompare(e,r,n)}))},t.gt=Q,t.lt=Z,t.eq=J,t.neq=ee,t.gte=te,t.lte=ne,t.cmp=re,t.Comparator=ie;var ae={};function oe(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof oe)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new oe(e.raw,t);if(e instanceof ie)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function le(e,t,n,r,i,a,o,s,l,u,c,f,d){return((t=se(n)?"":se(r)?">="+n+".0.0":se(i)?">="+n+"."+r+".0":">="+t)+" "+(s=se(l)?"":se(u)?"<"+(+l+1)+".0.0":se(c)?"<"+l+"."+(+u+1)+".0":f?"<="+l+"."+u+"."+c+"-"+f:"<="+s)).trim()}function ue(e,t,r){for(var i=0;i0){var a=e[i].semver;if(a.major===t.major&&a.minor===t.minor&&a.patch===t.patch)return!0}return!1}return!0}function ce(e,t,n){try{t=new oe(t,n)}catch(e){return!1}return t.test(e)}function fe(e,t,n,r){var i,a,o,s,l;switch(e=new Y(e,r),t=new oe(t,r),n){case">":i=Q,a=ne,o=Z,s=">",l=">=";break;case"<":i=Z,a=te,o=Q,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ce(e,t,r))return!1;for(var u=0;u=0.0.0")),f=f||e,d=d||e,i(e.semver,f.semver,r)?f=e:o(e.semver,d.semver,r)&&(d=e)})),f.operator===s||f.operator===l)return!1;if((!d.operator||d.operator===s)&&a(e,d.semver))return!1;if(d.operator===l&&o(e,d.semver))return!1}return!0}ie.prototype.parse=function(e){var t=this.options.loose?a[j]:a[B],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new Y(n[2],this.options.loose):this.semver=ae},ie.prototype.toString=function(){return this.value},ie.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===ae||("string"==typeof e&&(e=new Y(e,this.options)),re(e,this.operator,this.semver,this.options))},ie.prototype.intersects=function(e,t){if(!(e instanceof ie))throw new TypeError("a Comparator is required");var n;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new oe(e.value,t),ce(this.value,n,t);if(""===e.operator)return n=new oe(this.value,t),ce(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=re(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),l=re(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||a&&o||s||l},t.Range=oe,oe.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?a[W]:a[q];e=e.replace(r,le),n("hyphen replace",e),e=e.replace(a[U],"$1$2$3"),n("comparator trim",e,a[U]),e=(e=(e=e.replace(a[O],"$1~")).replace(a[z],"$1^")).split(/\s+/).join(" ");var i=t?a[j]:a[B],o=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?a[I]:a[R];return e.replace(r,(function(t,r,i,a,o){var s;return n("caret",e,t,r,i,a,o),se(r)?s="":se(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":se(a)?s="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":o?(n("replaceCaret pr",o),s="0"===r?"0"===i?">="+r+"."+i+"."+a+"-"+o+" <"+r+"."+i+"."+(+a+1):">="+r+"."+i+"."+a+"-"+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+a+"-"+o+" <"+(+r+1)+".0.0"):(n("no pr"),s="0"===r?"0"===i?">="+r+"."+i+"."+a+" <"+r+"."+i+"."+(+a+1):">="+r+"."+i+"."+a+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+a+" <"+(+r+1)+".0.0"),n("caret return",s),s}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?a[L]:a[F];return e.replace(r,(function(t,r,i,a,o){var s;return n("tilde",e,t,r,i,a,o),se(r)?s="":se(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":se(a)?s=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":o?(n("replaceTilde pr",o),s=">="+r+"."+i+"."+a+"-"+o+" <"+r+"."+(+i+1)+".0"):s=">="+r+"."+i+"."+a+" <"+r+"."+(+i+1)+".0",n("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?a[D]:a[M];return e.replace(r,(function(t,r,i,a,o,s){n("xRange",e,t,r,i,a,o,s);var l=se(i),u=l||se(a),c=u||se(o);return"="===r&&c&&(r=""),l?t=">"===r||"<"===r?"<0.0.0":"*":r&&c?(u&&(a=0),o=0,">"===r?(r=">=",u?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===r&&(r="<",u?i=+i+1:a=+a+1),t=r+i+"."+a+"."+o):u?t=">="+i+".0.0 <"+(+i+1)+".0.0":c&&(t=">="+i+"."+a+".0 <"+i+"."+(+a+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(a[H],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(o=o.filter((function(e){return!!e.match(i)}))),o.map((function(e){return new ie(e,this.options)}),this)},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new oe(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new Y(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!Q(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return n&&e.test(n)?n:null},t.validRange=function(e,t){try{return new oe(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,n){return fe(e,t,"<",n)},t.gtr=function(e,t,n){return fe(e,t,">",n)},t.outside=fe,t.prerelease=function(e,t){var n=G(e,t);return n&&n.prerelease.length?n.prerelease:null},t.intersects=function(e,t,n){return e=new oe(e,n),t=new oe(t,n),e.intersects(t)},t.coerce=function(e){if(e instanceof Y)return e;if("string"!=typeof e)return null;var t=e.match(a[T]);return null==t?null:G(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},89764:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(32530),o=n(79989),s=n(15058),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r._stack=n,r}return r.__extends(t,e),t.prototype.clone=function(){return new t(null,o.duplicate(this._stack))},t.makeFromTransform=function(e,n){var r=n.stack,a=n.groupby,o=n.as,s=n.offset,l=void 0===s?"zero":s,u=[],c=[];if(void 0!==n.sort)for(var f=0,d=n.sort;f1}(o)?o:i.isString(o)?[o,o+"_end"]:[n.stack+"_start",n.stack+"_end"],new t(e,{stackField:r,groupby:a,offset:l,sort:m,facetby:[],as:p})},t.makeFromEncoding=function(e,n){var r,o=n.stack;if(!o)return null;o.groupbyChannel&&(r=n.fieldDef(o.groupbyChannel));var l,u=function(e){return e.stack.stackBy.reduce((function(e,t){var n=t.fieldDef,r=a.vgField(n);return r&&e.push(r),e}),[])}(n),c=n.encoding.order;l=i.isArray(c)||a.isFieldDef(c)?s.sortParams(c):u.reduce((function(e,t){return e.field.push(t),e.order.push("descending"),e}),{field:[],order:[]});var f=n.vgField(o.fieldChannel);return new t(e,{dimensionFieldDef:r,stackField:f,facetby:[],stackby:u,sort:l,offset:o.offset,impute:o.impute,as:[f+"_start",f+"_end"]})},Object.defineProperty(t.prototype,"stack",{get:function(){return this._stack},enumerable:!0,configurable:!0}),t.prototype.addDimensions=function(e){this._stack.facetby=this._stack.facetby.concat(e)},t.prototype.dependentFields=function(){var e={};e[this._stack.stackField]=!0,this.getGroupbyFields().forEach((function(t){return e[t]=!0})),this._stack.facetby.forEach((function(t){return e[t]=!0}));var t=this._stack.sort.field;return i.isArray(t)?t.forEach((function(t){return e[t]=!0})):e[t]=!0,e},t.prototype.producedFields=function(){return this._stack.as.reduce((function(e,t){return e[t]=!0,e}),{})},t.prototype.getGroupbyFields=function(){var e=this._stack,t=e.dimensionFieldDef,n=e.impute,r=e.groupby;return t?t.bin?n?[a.vgField(t,{binSuffix:"mid"})]:[a.vgField(t,{}),a.vgField(t,{binSuffix:"end"})]:[a.vgField(t)]:r||[]},t.prototype.assemble=function(){var e=[],t=this._stack,n=t.facetby,r=t.dimensionFieldDef,i=t.stackField,o=t.stackby,s=t.sort,l=t.offset,u=t.impute,c=t.as;if(u&&r){var f=r?a.vgField(r,{binSuffix:"mid"}):void 0;r.bin&&e.push({type:"formula",expr:"("+a.vgField(r,{expr:"datum"})+"+"+a.vgField(r,{expr:"datum",binSuffix:"end"})+")/2",as:f}),e.push({type:"impute",field:i,groupby:o,key:f,method:"value",value:0})}return e.push({type:"stack",groupby:this.getGroupbyFields().concat(n),field:i,sort:s,as:c,offset:l}),e},t}(n(74686).DataFlowNode);t.StackNode=l},90386:(e,t)=>{"use strict";function n(e){return!!e.or}function r(e){return!!e.and}function i(e){return!!e.not}Object.defineProperty(t,"__esModule",{value:!0}),t.isLogicalOr=n,t.isLogicalAnd=r,t.isLogicalNot=i,t.forEachLeaf=function e(t,a){if(i(t))e(t.not,a);else if(r(t))for(var o=0,s=t.and;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(95290),a=r.__importStar(n(68171)),o=n(79989),s=n(7302);t.defaultScaleResolve=function(e,t){if(s.isLayerModel(t)||s.isFacetModel(t))return"shared";if(s.isConcatModel(t)||s.isRepeatModel(t))return o.contains(i.POSITION_SCALE_CHANNELS,e)?"independent":"shared";throw new Error("invalid model type for resolve")},t.parseGuideResolve=function(e,t){var n=e.scale[t],r=o.contains(i.POSITION_SCALE_CHANNELS,t)?"axis":"legend";return"independent"===n?("shared"===e[r][t]&&a.warn(a.message.independentScaleMeansIndependentGuide(t)),"independent"):e[r][t]||"shared"}},91539:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(15058),a=r.__importStar(n(74439)),o=r.__importStar(n(38851));function s(e,t){var n=e.config,i=e.width,s=e.height;return r.__assign({},a.baseEncodeEntry(e,{size:"include",orient:"ignore"}),a.pointPosition("x",e,o.mid(i)),a.pointPosition("y",e,o.mid(s)),a.nonPosition("size",e),l(e,n,t))}function l(e,t,n){return n?{shape:{value:n}}:a.nonPosition("shape",e,{defaultValue:i.getMarkConfig("shape",e.markDef,t)})}t.shapeMixins=l,t.point={vgMark:"symbol",encodeEntry:function(e){return s(e)}},t.circle={vgMark:"symbol",encodeEntry:function(e){return s(e,"circle")}},t.square={vgMark:"symbol",encodeEntry:function(e){return s(e,"square")}}},92649:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(95290),a=r.__importStar(n(98348)),o=n(98348),s=n(32530),l=n(75028),u=n(68889),c=n(79989),f=n(32134),d=n(80219),h=n(6871),p=n(27588),m=n(55823),g=n(60288),v=n(7302),y=n(3715),b=n(11964),_=function(e){function t(t,n,i,a,s,c,f){void 0===a&&(a={});var d=e.call(this,t,n,i,c,s,void 0)||this;d.fit=f,d.type="unit",d.specifiedScales={},d.specifiedAxes={},d.specifiedLegends={},d.specifiedProjection={},d.selection={},d.children=[],d.initSize(r.__assign({},a,t.width?{width:t.width}:{},t.height?{height:t.height}:{}));var h=l.isMarkDef(t.mark)?t.mark.type:t.mark,p=d.encoding=o.normalizeEncoding(y.replaceRepeaterInEncoding(t.encoding||{},s),h);return d.markDef=m.normalizeMarkDef(t.mark,p,c),d.stack=u.stack(h,p,d.config.stack),d.specifiedScales=d.initScales(h,p),d.specifiedAxes=d.initAxes(p),d.specifiedLegends=d.initLegend(p),d.specifiedProjection=t.projection,d.selection=t.selection,d}return r.__extends(t,e),Object.defineProperty(t.prototype,"hasProjection",{get:function(){var e=this.encoding,t=this.mark===l.GEOSHAPE,n=e&&i.GEOPOSITION_CHANNELS.some((function(t){return s.isFieldDef(e[t])}));return t||n},enumerable:!0,configurable:!0}),t.prototype.scaleDomain=function(e){var t=this.specifiedScales[e];return t?t.domain:void 0},t.prototype.axis=function(e){return this.specifiedAxes[e]},t.prototype.legend=function(e){return this.specifiedLegends[e]},t.prototype.initScales=function(e,t){return i.SCALE_CHANNELS.reduce((function(e,n){var r,i,a=t[n];return s.isFieldDef(a)?(r=a,i=a.scale):s.hasConditionalFieldDef(a)?(r=a.condition,i=a.condition.scale):"x"===n?r=s.getFieldDef(t.x2):"y"===n&&(r=s.getFieldDef(t.y2)),r&&(e[n]=i||{}),e}),{})},t.prototype.initAxes=function(e){return[i.X,i.Y].reduce((function(t,n){var a=e[n];if(s.isFieldDef(a)||n===i.X&&s.isFieldDef(e.x2)||n===i.Y&&s.isFieldDef(e.y2)){var o=s.isFieldDef(a)?a.axis:null;null!==o&&!1!==o&&(t[n]=r.__assign({},o))}return t}),{})},t.prototype.initLegend=function(e){return i.NONPOSITION_SCALE_CHANNELS.reduce((function(t,n){var i=e[n];if(i){var a=s.isFieldDef(i)?i.legend:s.hasConditionalFieldDef(i)?i.condition.legend:null;null!==a&&!1!==a&&(t[n]=r.__assign({},a))}return t}),{})},t.prototype.parseData=function(){this.component.data=d.parseData(this)},t.prototype.parseLayoutSize=function(){p.parseUnitLayoutSize(this)},t.prototype.parseSelection=function(){this.component.selection=b.parseUnitSelection(this,this.selection)},t.prototype.parseMarkGroup=function(){this.component.mark=g.parseMarkGroup(this)},t.prototype.parseAxisAndHeader=function(){this.component.axes=f.parseUnitAxis(this)},t.prototype.assembleSelectionTopLevelSignals=function(e){return b.assembleTopLevelSignals(this,e)},t.prototype.assembleSelectionSignals=function(){return b.assembleUnitSelectionSignals(this,[])},t.prototype.assembleSelectionData=function(e){return b.assembleUnitSelectionData(this,e)},t.prototype.assembleLayout=function(){return null},t.prototype.assembleLayoutSignals=function(){return h.assembleLayoutSignals(this)},t.prototype.assembleMarks=function(){var e=this.component.mark||[];return this.parent&&v.isLayerModel(this.parent)||(e=b.assembleUnitSelectionMarks(this,e)),e.map(this.correctDataNames)},t.prototype.assembleLayoutSize=function(){return{width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height")}},t.prototype.getMapping=function(){return this.encoding},t.prototype.toSpec=function(e,t){var n,r=c.duplicate(this.encoding);return n={mark:this.markDef,encoding:r},e||(n.config=c.duplicate(this.config)),t||(n.data=c.duplicate(this.data)),n},Object.defineProperty(t.prototype,"mark",{get:function(){return this.markDef.type},enumerable:!0,configurable:!0}),t.prototype.channelHasField=function(e){return a.channelHasField(this.encoding,e)},t.prototype.fieldDef=function(e){var t=this.encoding[e];return s.getFieldDef(t)},t}(v.ModelWithField);t.UnitModel=_},94169:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=r.__importDefault(n(96053)),a=r.__importDefault(n(95992)),o=r.__importDefault(n(26483)),s=r.__importDefault(n(42155)),l=r.__importDefault(n(32632)),u=r.__importDefault(n(1628)),c=r.__importDefault(n(5767)),f={project:o.default,toggle:l.default,scales:s.default,translate:u.default,zoom:c.default,inputs:i.default,nearest:a.default};t.forEachTransform=function(e,t){for(var n in f)f[n].has(e)&&t(f[n])}},95035:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=r.__importStar(n(74439)),a=r.__importStar(n(38851));t.rule={vgMark:"rule",encodeEntry:function(e){e.config;var t=e.markDef,n=e.width,o=e.height,s=t.orient;return e.encoding.x||e.encoding.y||e.encoding.latitude||e.encoding.longitude?r.__assign({},i.baseEncodeEntry(e,{size:"ignore",orient:"ignore"}),i.pointPosition("x",e,"horizontal"===s?"zeroOrMin":a.mid(n)),i.pointPosition("y",e,"vertical"===s?"zeroOrMin":a.mid(o)),"vertical"!==s?i.pointPosition2(e,"zeroOrMax","x2"):{},"horizontal"!==s?i.pointPosition2(e,"zeroOrMax","y2"):{},i.nonPosition("size",e,{vgChannel:"strokeWidth",defaultValue:t.size})):{}}}},95290:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(3209),a=n(79989);!function(e){e.ROW="row",e.COLUMN="column",e.X="x",e.Y="y",e.X2="x2",e.Y2="y2",e.LATITUDE="latitude",e.LONGITUDE="longitude",e.LATITUDE2="latitude2",e.LONGITUDE2="longitude2",e.COLOR="color",e.FILL="fill",e.STROKE="stroke",e.SHAPE="shape",e.SIZE="size",e.OPACITY="opacity",e.TEXT="text",e.ORDER="order",e.DETAIL="detail",e.KEY="key",e.TOOLTIP="tooltip",e.HREF="href"}(r=t.Channel||(t.Channel={})),t.X=r.X,t.Y=r.Y,t.X2=r.X2,t.Y2=r.Y2,t.LATITUDE=r.LATITUDE,t.LATITUDE2=r.LATITUDE2,t.LONGITUDE=r.LONGITUDE,t.LONGITUDE2=r.LONGITUDE2,t.ROW=r.ROW,t.COLUMN=r.COLUMN,t.SHAPE=r.SHAPE,t.SIZE=r.SIZE,t.COLOR=r.COLOR,t.FILL=r.FILL,t.STROKE=r.STROKE,t.TEXT=r.TEXT,t.DETAIL=r.DETAIL,t.KEY=r.KEY,t.ORDER=r.ORDER,t.OPACITY=r.OPACITY,t.TOOLTIP=r.TOOLTIP,t.HREF=r.HREF,t.GEOPOSITION_CHANNEL_INDEX={longitude:1,longitude2:1,latitude:1,latitude2:1},t.GEOPOSITION_CHANNELS=a.flagKeys(t.GEOPOSITION_CHANNEL_INDEX);var o=i.__assign({x:1,y:1,x2:1,y2:1},t.GEOPOSITION_CHANNEL_INDEX,{color:1,fill:1,stroke:1,opacity:1,size:1,shape:1,order:1,text:1,detail:1,key:1,tooltip:1,href:1});t.isColorChannel=function(e){return"color"===e||"fill"===e||"stroke"===e};var s=i.__assign({},o,{row:1,column:1});t.CHANNELS=a.flagKeys(s),s.order,s.detail;var l=i.__rest(s,["order","detail"]);t.SINGLE_DEF_CHANNELS=a.flagKeys(l),t.isChannel=function(e){return!!s[e]},t.UNIT_CHANNELS=a.flagKeys(o),o.x,o.y,o.x2,o.y2,o.latitude,o.longitude,o.latitude2,o.longitude2;var u=i.__rest(o,["x","y","x2","y2","latitude","longitude","latitude2","longitude2"]);t.NONPOSITION_CHANNELS=a.flagKeys(u);var c={x:1,y:1};t.POSITION_SCALE_CHANNELS=a.flagKeys(c),u.text,u.tooltip,u.href,u.detail,u.key,u.order;var f=i.__rest(u,["text","tooltip","href","detail","key","order"]);t.NONPOSITION_SCALE_CHANNELS=a.flagKeys(f);var d=i.__assign({},c,f);function h(e){switch(e){case t.COLOR:case t.FILL:case t.STROKE:case t.DETAIL:case t.KEY:case t.TOOLTIP:case t.HREF:case t.ORDER:case t.OPACITY:case t.ROW:case t.COLUMN:return{point:!0,tick:!0,rule:!0,circle:!0,square:!0,bar:!0,rect:!0,line:!0,trail:!0,area:!0,text:!0,geoshape:!0};case t.X:case t.Y:case t.LATITUDE:case t.LONGITUDE:return{point:!0,tick:!0,rule:!0,circle:!0,square:!0,bar:!0,rect:!0,line:!0,trail:!0,area:!0,text:!0};case t.X2:case t.Y2:case t.LATITUDE2:case t.LONGITUDE2:return{rule:!0,bar:!0,rect:!0,area:!0};case t.SIZE:return{point:!0,tick:!0,rule:!0,circle:!0,square:!0,bar:!0,text:!0,line:!0,trail:!0};case t.SHAPE:return{point:!0,geoshape:!0};case t.TEXT:return{text:!0}}}t.SCALE_CHANNELS=a.flagKeys(d),t.isScaleChannel=function(e){return!!d[e]},t.supportMark=function(e,t){return t in h(e)},t.getSupportedMark=h,t.rangeType=function(e){switch(e){case t.X:case t.Y:case t.SIZE:case t.OPACITY:case t.X2:case t.Y2:return"continuous";case t.ROW:case t.COLUMN:case t.SHAPE:case t.TEXT:case t.TOOLTIP:case t.HREF:return"discrete";case t.COLOR:case t.FILL:case t.STROKE:return"flexible";case t.LATITUDE:case t.LONGITUDE:case t.LATITUDE2:case t.LONGITUDE2:case t.DETAIL:case t.KEY:case t.ORDER:return}throw new Error("rangeType not implemented for "+e)}},95312:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(26372),i=n(40387),a=n(11964),o={predicate:"vlSingle",scaleDomain:"vlSingleDomain",signals:i.signals,topLevelSignals:function(e,t,n){var i=n.filter((function(e){return e.name===t.name})),o="data("+r.stringValue(t.name+a.STORE)+")",s=o+"[0].values";return i.length?n:n.concat({name:t.name,update:o+".length && {"+t.project.map((function(e,t){return e.field+": "+s+"["+t+"]"})).join(", ")+"}"})},modifyExpr:function(e,t){return t.name+a.TUPLE+", "+("global"===t.resolve?"true":"{unit: "+a.unitName(e)+"}")}};t.default=o},95848:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=function(e){function t(t,n,r){void 0===t&&(t={}),void 0===n&&(n={}),void 0===r&&(r=!1);var i=e.call(this,t,n)||this;return i.explicit=t,i.implicit=n,i.parseNothing=r,i}return r.__extends(t,e),t.prototype.clone=function(){var t=e.prototype.clone.call(this);return t.parseNothing=this.parseNothing,t},t}(n(96159).Split);t.AncestorParse=i},95992:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209).__importStar(n(68171)),i=n(75028),a=n(11964),o="voronoi",s={has:function(e){return"interval"!==e.type&&e.nearest},marks:function(e,t,n){var s=a.positionalProjections(t),l=s.x,u=s.y,c=e.mark;if(i.isPathMark(c))return r.warn(r.message.nearestNotSupportForContinuous(c)),n;var f={name:e.getName(o),type:"path",from:{data:e.getName("marks")},encode:{enter:{fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0}}},transform:[{type:"voronoi",x:{expr:l||!l&&!u?"datum.datum.x || 0":"0"},y:{expr:u||!l&&!u?"datum.datum.y || 0":"0"},size:[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]}]},d=0,h=!1;return n.forEach((function(t,n){var r=t.name||"";r===e.component.mark[0].name?d=n:r.indexOf(o)>=0&&(h=!0)})),h||n.splice(d+1,0,f),n}};t.default=s},96042:(e,t)=>{"use strict";t.Cw=function(e){return function(e){var t,r="",i=e.length;for(t=2;t>2],r+=n[(3&e[t-2])<<4|e[t-1]>>4],r+=n[(15&e[t-1])<<2|e[t]>>6],r+=n[63&e[t]];return t===i+1&&(r+=n[e[t-2]>>2],r+=n[(3&e[t-2])<<4],r+="=="),t===i&&(r+=n[e[t-2]>>2],r+=n[(3&e[t-2])<<4|e[t-1]>>4],r+=n[(15&e[t-1])<<2],r+="="),r}((arguments.length>1&&void 0!==arguments[1]?arguments[1]:new TextEncoder).encode(e))};var n=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"]},96053:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(79989),o=n(11964),s=r.__importDefault(n(95992)),l={has:function(e){return"single"===e.type&&"global"===e.resolve&&e.bind&&"scales"!==e.bind},topLevelSignals:function(e,t,n){var r=t.name,i=t.project,o=t.bind,l=s.default.has(t)?"(item().isVoronoi ? datum.datum : datum)":"datum";return i.forEach((function(e){var i=a.varName(r+"_"+e.field);n.filter((function(e){return e.name===i})).length||n.unshift({name:i,value:"",on:[{events:t.events,update:"datum && item().mark.marktype !== 'group' ? "+a.accessPathWithDatum(e.field,l)+" : null"}],bind:o[e.field]||o[e.channel]||o})})),n},signals:function(e,t,n){var r=t.name,s=t.project,l=n.filter((function(e){return e.name===r+o.TUPLE}))[0],u=s.map((function(e){return i.stringValue(e.field)})).join(", "),c=s.map((function(e){return a.varName(r+"_"+e.field)}));return c.length&&(l.update=c.join(" && ")+" ? {fields: ["+u+"], values: ["+c.join(", ")+"]} : null"),delete l.value,delete l.on,n}};t.default=l},96159:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=r.__importStar(n(68171)),a=n(79989),o=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.explicit=e,this.implicit=t}return e.prototype.clone=function(){return new e(a.duplicate(this.explicit),a.duplicate(this.implicit))},e.prototype.combine=function(){return r.__assign({},this.explicit,this.implicit)},e.prototype.get=function(e){return void 0!==this.explicit[e]?this.explicit[e]:this.implicit[e]},e.prototype.getWithExplicit=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}},e.prototype.setWithExplicit=function(e,t){void 0!==t.value&&this.set(e,t.value,t.explicit)},e.prototype.set=function(e,t,n){return delete this[n?"implicit":"explicit"][e],this[n?"explicit":"implicit"][e]=t,this},e.prototype.copyKeyFromSplit=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)},e.prototype.copyKeyFromObject=function(e,t){void 0!==t[e]&&this.set(e,t[e],!0)},e.prototype.copyAll=function(e){for(var t=0,n=a.keys(e.combine());t0?t:a<0?n:s(t,n,r,i)}},t.defaultTieBreaker=s,t.mergeValuesWithExplicit=function(e,t,n,r,i){return void 0===i&&(i=s),void 0===e||void 0===e.value?t:e.explicit&&!t.explicit?e:t.explicit&&!e.explicit?t:a.stringify(e.value)===a.stringify(t.value)?e:i(e,t,n,r)}},96598:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(3209),a=n(20032),o=i.__importStar(n(68171)),s=n(79989);!function(e){e.YEAR="year",e.MONTH="month",e.DAY="day",e.DATE="date",e.HOURS="hours",e.MINUTES="minutes",e.SECONDS="seconds",e.MILLISECONDS="milliseconds",e.YEARMONTH="yearmonth",e.YEARMONTHDATE="yearmonthdate",e.YEARMONTHDATEHOURS="yearmonthdatehours",e.YEARMONTHDATEHOURSMINUTES="yearmonthdatehoursminutes",e.YEARMONTHDATEHOURSMINUTESSECONDS="yearmonthdatehoursminutesseconds",e.MONTHDATE="monthdate",e.HOURSMINUTES="hoursminutes",e.HOURSMINUTESSECONDS="hoursminutesseconds",e.MINUTESSECONDS="minutesseconds",e.SECONDSMILLISECONDS="secondsmilliseconds",e.QUARTER="quarter",e.YEARQUARTER="yearquarter",e.QUARTERMONTH="quartermonth",e.YEARQUARTERMONTH="yearquartermonth",e.UTCYEAR="utcyear",e.UTCMONTH="utcmonth",e.UTCDAY="utcday",e.UTCDATE="utcdate",e.UTCHOURS="utchours",e.UTCMINUTES="utcminutes",e.UTCSECONDS="utcseconds",e.UTCMILLISECONDS="utcmilliseconds",e.UTCYEARMONTH="utcyearmonth",e.UTCYEARMONTHDATE="utcyearmonthdate",e.UTCYEARMONTHDATEHOURS="utcyearmonthdatehours",e.UTCYEARMONTHDATEHOURSMINUTES="utcyearmonthdatehoursminutes",e.UTCYEARMONTHDATEHOURSMINUTESSECONDS="utcyearmonthdatehoursminutesseconds",e.UTCMONTHDATE="utcmonthdate",e.UTCHOURSMINUTES="utchoursminutes",e.UTCHOURSMINUTESSECONDS="utchoursminutesseconds",e.UTCMINUTESSECONDS="utcminutesseconds",e.UTCSECONDSMILLISECONDS="utcsecondsmilliseconds",e.UTCQUARTER="utcquarter",e.UTCYEARQUARTER="utcyearquarter",e.UTCQUARTERMONTH="utcquartermonth",e.UTCYEARQUARTERMONTH="utcyearquartermonth"}(r=t.TimeUnit||(t.TimeUnit={}));var l={year:1,quarter:1,month:1,day:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1};t.TIMEUNIT_PARTS=s.flagKeys(l),t.isLocalSingleTimeUnit=function(e){return!!l[e]};var u={utcyear:1,utcquarter:1,utcmonth:1,utcday:1,utcdate:1,utchours:1,utcminutes:1,utcseconds:1,utcmilliseconds:1};t.isUtcSingleTimeUnit=function(e){return!!u[e]};var c={utcyearquarter:1,utcyearquartermonth:1,utcyearmonth:1,utcyearmonthdate:1,utcyearmonthdatehours:1,utcyearmonthdatehoursminutes:1,utcyearmonthdatehoursminutesseconds:1,utcquartermonth:1,utcmonthdate:1,utchoursminutes:1,utchoursminutesseconds:1,utcminutesseconds:1,utcsecondsmilliseconds:1},f=i.__assign({},u,c);function d(e){return!!f[e]}t.isUTCTimeUnit=d,t.getLocalTimeUnit=function(e){return e.substr(3)};var h=i.__assign({},l,u,{yearquarter:1,yearquartermonth:1,yearmonth:1,yearmonthdate:1,yearmonthdatehours:1,yearmonthdatehoursminutes:1,yearmonthdatehoursminutesseconds:1,quartermonth:1,monthdate:1,hoursminutes:1,hoursminutesseconds:1,minutesseconds:1,secondsmilliseconds:1},c);t.TIMEUNITS=s.flagKeys(h),t.isTimeUnit=function(e){return!!h[e]};var p={year:"setFullYear",month:"setMonth",date:"setDate",hours:"setHours",minutes:"setMinutes",seconds:"setSeconds",milliseconds:"setMilliseconds",quarter:null,day:null};function m(e,t){var n=p[e];return{setDateMethod:t?"setUTC"+n.substr(3):n,getDateMethod:"get"+(t?"UTC":"")+n.substr(3)}}function g(e,t){var n=e.indexOf(t);return n>-1&&(t!==r.SECONDS||0===n||"i"!==e.charAt(n-1))}t.convert=function(e,n){for(var i=d(e),a=i?new Date(Date.UTC(0,0,1,0,0,0,0)):new Date(0,0,1,0,0,0,0),o=0,s=t.TIMEUNIT_PARTS;o0&&u.push(a.join(" ")),l.length>0&&u.push(l.join(":")),u.length>0&&(o&&(o+=" + ' ' + "),o+=i?"utcFormat("+t+", '"+u.join(" ")+"')":"timeFormat("+t+", '"+u.join(" ")+"')"),o||void 0}},t.normalizeTimeUnit=function(e){return"day"!==e&&e.indexOf("day")>=0?(o.warn(o.message.dayReplacedWithDate(e)),e.replace("day","date")):e}},97923:(e,t,n)=>{!function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=e.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(e){return e&&e.bracketRegex||/[(){}[\]]/}function a(e,t,a){var s=e.getLineHandle(t.line),l=t.ch-1,u=a&&a.afterCursor;null==u&&(u=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=i(a),f=!u&&l>=0&&c.test(s.text.charAt(l))&&r[s.text.charAt(l)]||c.test(s.text.charAt(l+1))&&r[s.text.charAt(++l)];if(!f)return null;var d=">"==f.charAt(1)?1:-1;if(a&&a.strict&&d>0!=(l==t.ch))return null;var h=e.getTokenTypeAt(n(t.line,l+1)),p=o(e,n(t.line,l+(d>0?1:0)),d,h,a);return null==p?null:{from:n(t.line,l),to:p&&p.pos,match:p&&p.ch==f.charAt(0),forward:d>0}}function o(e,t,a,o,s){for(var l=s&&s.maxScanLineLength||1e4,u=s&&s.maxScanLines||1e3,c=[],f=i(s),d=a>0?Math.min(t.line+u,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-u),h=t.line;h!=d;h+=a){var p=e.getLine(h);if(p){var m=a>0?0:p.length-1,g=a>0?p.length:-1;if(!(p.length>l))for(h==t.line&&(m=t.ch-(a<0?1:0));m!=g;m+=a){var v=p.charAt(m);if(f.test(v)&&(void 0===o||(e.getTokenTypeAt(n(h,m+1))||"")==(o||""))){var y=r[v];if(y&&">"==y.charAt(1)==a>0)c.push(v);else{if(!c.length)return{pos:n(h,m),ch:v};c.pop()}}}}}return h-a!=(a>0?e.lastLine():e.firstLine())&&null}function s(e,r,i){for(var o=e.state.matchBrackets.maxHighlightLineLength||1e3,s=i&&i.highlightNonMatching,l=[],u=e.listSelections(),c=0;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(95290),a=n(89081),o=n(15176),s=n(99273),l=n(79989),u=n(7302),c=n(51494);t.parseProjection=function e(t){u.isUnitModel(t)?t.component.projection=function(e){var t=e.specifiedProjection,n=e.config;if(e.hasProjection){var o=[];return[[i.LONGITUDE,i.LATITUDE],[i.LONGITUDE2,i.LATITUDE2]].forEach((function(t){(e.channelHasField(t[0])||e.channelHasField(t[1]))&&o.push({signal:e.getName("geojson_"+o.length)})})),e.channelHasField(i.SHAPE)&&e.fieldDef(i.SHAPE).type===s.GEOJSON&&o.push({signal:e.getName("geojson_"+o.length)}),0===o.length&&o.push(e.requestDataName(a.MAIN)),new c.ProjectionComponent(e.projectionName(!0),r.__assign({},n.projection||{},t||{}),[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")],o)}}(t):t.component.projection=function(t){if(0!==t.children.length){var n,r=l.every(t.children,(function(t){e(t);var r=t.component.projection;if(r){if(n){var i=function(e,t){var n=l.every(o.PROJECTION_PROPERTIES,(function(n){return!e.explicit.hasOwnProperty(n)&&!t.explicit.hasOwnProperty(n)||!(!e.explicit.hasOwnProperty(n)||!t.explicit.hasOwnProperty(n)||l.stringify(e.get(n))!==l.stringify(t.get(n)))}));if(l.stringify(e.size)===l.stringify(t.size)){if(n)return e;if(l.stringify(e.explicit)===l.stringify({}))return t;if(l.stringify(t.explicit)===l.stringify({}))return e}return null}(n,r);return i&&(n=i),!!i}return n=r,!0}return!0}));if(n&&r){var i=t.projectionName(!0),a=new c.ProjectionComponent(i,n.specifiedProjection,n.size,l.duplicate(n.data));return t.children.forEach((function(e){e.component.projection&&(a.data=a.data.concat(e.component.projection.data),e.renameProjection(e.component.projection.get("name"),i),e.component.projection.merged=!0)})),a}}}(t)}},98348:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(95290),o=n(32530),s=r.__importStar(n(68171)),l=n(99273),u=n(79989);function c(e,t){var n=e&&e[t];return!!n&&(i.isArray(n)?u.some(n,(function(e){return!!e.field})):o.isFieldDef(n)||o.hasConditionalFieldDef(n))}t.channelHasField=c,t.isAggregate=function(e){return u.some(a.CHANNELS,(function(t){if(c(e,t)){var n=e[t];if(i.isArray(n))return u.some(n,(function(e){return!!e.aggregate}));var r=o.getFieldDef(n);return r&&!!r.aggregate}return!1}))},t.normalizeEncoding=function(e,t){return u.keys(e).reduce((function(n,c){var f;if(!a.isChannel(c))return s.warn(s.message.invalidEncodingChannel(c)),n;if(!a.supportMark(c,t))return s.warn(s.message.incompatibleChannel(c,t)),n;if("size"===c&&"line"===t&&(h=o.getFieldDef(e[c]))&&h.aggregate)return s.warn(s.message.LINE_WITH_VARYING_SIZE),n;if("color"===c&&("fill"in e||"stroke"in e))return s.warn(s.message.droppingColor("encoding",{fill:"fill"in e,stroke:"stroke"in e})),n;var d=e[c];if("detail"===c||"order"===c&&!i.isArray(d)&&!o.isValueDef(d)||"tooltip"===c&&i.isArray(d))d&&(n[c]=(i.isArray(d)?d:[d]).reduce((function(e,t){return o.isFieldDef(t)?e.push(o.normalizeFieldDef(t,c)):s.warn(s.message.emptyFieldDef(t,c)),e}),[]));else{var h;if((h=o.getFieldDef(e[c]))&&u.contains([l.Type.LATITUDE,l.Type.LONGITUDE],h.type)){var p=c,m=(n[p],r.__rest(n,["symbol"==typeof p?p:p+""])),g="x"===c?"longitude":"y"===c?"latitude":"x2"===c?"longitude2":"y2"===c?"latitude2":void 0;return s.warn(s.message.latLongDeprecated(c,h.type,g)),r.__assign({},m,((f={})[g]=r.__assign({},o.normalize(h,c),{type:"quantitative"}),f))}if(!o.isFieldDef(d)&&!o.isValueDef(d)&&!o.isConditionalDef(d))return s.warn(s.message.emptyFieldDef(d,c)),n;n[c]=o.normalize(d,c)}return n}),{})},t.isRanged=function(e){return e&&(!!e.x&&!!e.x2||!!e.y&&!!e.y2)},t.fieldDefs=function(e){var t=[];return a.CHANNELS.forEach((function(n){if(c(e,n)){var r=e[n];(i.isArray(r)?r:[r]).forEach((function(e){o.isFieldDef(e)?t.push(e):o.hasConditionalFieldDef(e)&&t.push(e.condition)}))}})),t},t.forEach=function(e,t,n){if(e)for(var r=function(r){i.isArray(e[r])?e[r].forEach((function(e){t.call(n,e,r)})):t.call(n,e[r],r)},a=0,o=u.keys(e);a{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=r.__importStar(n(74439)),a=n(32530),o=n(99273);t.geoshape={vgMark:"shape",encodeEntry:function(e){return r.__assign({},i.baseEncodeEntry(e,{size:"ignore",orient:"ignore"}))},postEncodingTransform:function(e){var t=e.encoding.shape;return[r.__assign({type:"geoshape",projection:e.projectionName()},t&&a.isFieldDef(t)&&t.type===o.GEOJSON?{field:a.vgField(t,{expr:"datum"})}:{})]}}},98469:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=n(26372),a=n(32530),o=n(41028),s=n(46681),l=n(79989),u=n(15058),c=n(77524);function f(e){return(90+(e=(e%360+360)%360))%180==0?{}:e<90||2700?{encode:{update:_}}:{})}var x=a.axes,w=x&&x.length>0;if(c||w){var k="row"===t?"height":"width";return r.__assign({name:e.getName(t+"_"+n),type:"group",role:t+"-"+n},i.facetFieldDef?{from:{data:e.getName(t+"_domain")},sort:d(h,t)}:{},c?{title:c}:{},a.sizeSignal?{encode:{update:(s={},s[k]=a.sizeSignal,s)}}:{},w?{axes:x}:{})}}return null}function p(e,t,n,r){for(var i={},a=0,o=n;a{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.QUANTITATIVE="quantitative",e.ORDINAL="ordinal",e.TEMPORAL="temporal",e.NOMINAL="nominal",e.LATITUDE="latitude",e.LONGITUDE="longitude",e.GEOJSON="geojson"}(n=t.Type||(t.Type={})),t.TYPE_INDEX={quantitative:1,ordinal:1,temporal:1,nominal:1,latitude:1,longitude:1,geojson:1},t.isType=function(e){return!!t.TYPE_INDEX[e]},t.QUANTITATIVE=n.QUANTITATIVE,t.ORDINAL=n.ORDINAL,t.TEMPORAL=n.TEMPORAL,t.NOMINAL=n.NOMINAL,t.GEOJSON=n.GEOJSON,t.getFullName=function(e){if(e)switch(e=e.toLowerCase()){case"q":case t.QUANTITATIVE:return"quantitative";case"t":case t.TEMPORAL:return"temporal";case"o":case t.ORDINAL:return"ordinal";case"n":case t.NOMINAL:return"nominal";case n.LATITUDE:return"latitude";case n.LONGITUDE:return"longitude";case t.GEOJSON:return"geojson"}}},99519:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3209),i=r.__importStar(n(74439)),a=r.__importStar(n(38851));t.line={vgMark:"line",encodeEntry:function(e){var t=e.width,n=e.height;return r.__assign({},i.baseEncodeEntry(e,{size:"ignore",orient:"ignore"}),i.pointPosition("x",e,a.mid(t)),i.pointPosition("y",e,a.mid(n)),i.nonPosition("size",e,{vgChannel:"strokeWidth"}),i.defined(e))}},t.trail={vgMark:"trail",encodeEntry:function(e){var t=e.width,n=e.height;return r.__assign({},i.baseEncodeEntry(e,{size:"include",orient:"ignore"}),i.pointPosition("x",e,a.mid(t)),i.pointPosition("y",e,a.mid(n)),i.nonPosition("size",e),i.defined(e))}}}}]); //# sourceMappingURL=428.50a233546d6911ae.js.map