@malloydata/render 0.0.206-dev241031191500 → 0.0.206

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1468,7 +1468,7 @@ ${E}`,y)}}else{if(m.urls)for(const E of m.urls)try{if(E.startsWith("internal://"
1468
1468
  `;var TKe=kt("<div><div class=malloy-tooltip>");const Yie="malloy-tooltip-style";function RKe(t){const[e,n]=_i([0,0]),r=i=>{t.show&&n([i.clientX,i.clientY])};return document.addEventListener("mousemove",r),X2(()=>{document.removeEventListener("mousemove",r)}),Px(()=>{if(!document.getElementById(Yie)){const i=document.createElement("style");i.id=Yie,i.textContent=CKe,document.head.appendChild(i)}}),st(Wo,{get when(){return t.show},get children(){return st(v0e,{get children(){var i=TKe(),s=i.firstChild;return xt(s,()=>t.children),fr(o=>vc(i,`position: fixed; top: ${e()[1]}px; left: ${e()[0]}px; width: 0px; height: 0px; pointer-events: none;`,o)),i}})}})}var OKe=kt("<div><div class=malloy-tooltip--header></div><div class=malloy-tooltip--grid>"),DKe=kt("<div class=malloy-tooltip--title>"),wKe=kt("<div class=malloy-tooltip--entry-color><div class=malloy-tooltip--color-circle>"),NKe=kt("<div class=malloy-tooltip--list-item-row><div class=malloy-tooltip--entry-label></div><div class=malloy-tooltip--entry-value>"),FKe=kt("<div class=malloy-tooltip--block-row><div class=malloy-tooltip--block-label></div><div class=malloy-tooltip--block-value>"),LKe=kt("<div class=malloy-tooltip--grid-row>");function IKe(t){const[e,n]=_i(!1),r=()=>t.data.entries.reduce((s,o)=>({highlight:s.highlight||o.highlight,color:s.color||!!o.color}),{highlight:!1,color:!1});let i;return no(()=>{t.data,n(!1),i&&cancelAnimationFrame(i),i=requestAnimationFrame(()=>{n(!0)})}),st(Wo,{get when(){return e()},get children(){var s=OKe(),o=s.firstChild,u=o.nextSibling;return xt(o,st(Si,{get each(){return t.data.title},children:a=>(()=>{var l=DKe();return xt(l,a),l})()})),xt(u,st(Si,{get each(){return t.data.entries},children:({label:a,value:l,highlight:c,color:f,ignoreHighlightState:x=!1,entryType:d})=>(()=>{var p=LKe();return xt(p,st(Wo,{get when(){return r().color},get children(){var g=wKe(),m=g.firstChild;return f!=null?m.style.setProperty("background",f):m.style.removeProperty("background"),g}}),null),xt(p,st(vB,{get children(){return[st(Uy,{when:d==="list-item",get children(){var g=NKe(),m=g.firstChild,y=m.nextSibling;return xt(m,a),xt(y,()=>typeof l=="function"?l():l),g}}),st(Uy,{when:d==="block",get children(){var g=FKe(),m=g.firstChild,y=m.nextSibling;return xt(m,a),xt(y,()=>typeof l=="function"?l():l),g}})]}}),null),fr(()=>p.classList.toggle("malloy-tooltip--entry-fade",!!(r().highlight&&!c&&!x))),p})()})),s}})}const K5=Symbol("store-raw"),h2=Symbol("store-node"),cl=Symbol("store-has"),Kie=Symbol("store-self");function Xie(t){let e=t[Go];if(!e&&(Object.defineProperty(t,Go,{value:e=new Proxy(t,kKe)}),!Array.isArray(t))){const n=Object.keys(t),r=Object.getOwnPropertyDescriptors(t);for(let i=0,s=n.length;i<s;i++){const o=n[i];r[o].get&&Object.defineProperty(t,o,{enumerable:r[o].enumerable,get:r[o].get.bind(e)})}}return e}function Yu(t){let e;return t!=null&&typeof t=="object"&&(t[Go]||!(e=Object.getPrototypeOf(t))||e===Object.prototype||Array.isArray(t))}function gx(t,e=new Set){let n,r,i,s;if(n=t!=null&&t[K5])return n;if(!Yu(t)||e.has(t))return t;if(Array.isArray(t)){Object.isFrozen(t)?t=t.slice(0):e.add(t);for(let o=0,u=t.length;o<u;o++)i=t[o],(r=gx(i,e))!==i&&(t[o]=r)}else{Object.isFrozen(t)?t=Object.assign({},t):e.add(t);const o=Object.keys(t),u=Object.getOwnPropertyDescriptors(t);for(let a=0,l=o.length;a<l;a++)s=o[a],!u[s].get&&(i=t[s],(r=gx(i,e))!==i&&(t[s]=r))}return t}function X5(t,e){let n=t[e];return n||Object.defineProperty(t,e,{value:n=Object.create(null)}),n}function J3(t,e,n){if(t[e])return t[e];const[r,i]=_i(n,{equals:!1,internal:!0});return r.$=i,t[e]=r}function $Ke(t,e){const n=Reflect.getOwnPropertyDescriptor(t,e);return!n||n.get||!n.configurable||e===Go||e===h2||(delete n.value,delete n.writable,n.get=()=>t[Go][e]),n}function Jie(t){NT()&&J3(X5(t,h2),Kie)()}function BKe(t){return Jie(t),Reflect.ownKeys(t)}const kKe={get(t,e,n){if(e===K5)return t;if(e===Go)return n;if(e===DT)return Jie(t),n;const r=X5(t,h2),i=r[e];let s=i?i():t[e];if(e===h2||e===cl||e==="__proto__")return s;if(!i){const o=Object.getOwnPropertyDescriptor(t,e);NT()&&(typeof s!="function"||t.hasOwnProperty(e))&&!(o&&o.get)&&(s=J3(r,e,s)())}return Yu(s)?Xie(s):s},has(t,e){return e===K5||e===Go||e===DT||e===h2||e===cl||e==="__proto__"?!0:(NT()&&J3(X5(t,cl),e)(),e in t)},set(){return!0},deleteProperty(){return!0},ownKeys:BKe,getOwnPropertyDescriptor:$Ke};function Ui(t,e,n,r=!1){if(!r&&t[e]===n)return;const i=t[e],s=t.length;n===void 0?(delete t[e],t[cl]&&t[cl][e]&&i!==void 0&&t[cl][e].$()):(t[e]=n,t[cl]&&t[cl][e]&&i===void 0&&t[cl][e].$());let o=X5(t,h2),u;if((u=J3(o,e,i))&&u.$(()=>n),Array.isArray(t)&&t.length!==s){for(let a=t.length;a<s;a++)(u=o[a])&&u.$();(u=J3(o,"length",s))&&u.$(t.length)}(u=o[Kie])&&u.$()}function Zie(t,e){const n=Object.keys(e);for(let r=0;r<n.length;r+=1){const i=n[r];Ui(t,i,e[i])}}function PKe(t,e){if(typeof e=="function"&&(e=e(t)),e=gx(e),Array.isArray(e)){if(t===e)return;let n=0,r=e.length;for(;n<r;n++){const i=e[n];t[n]!==i&&Ui(t,n,i)}Ui(t,"length",r)}else Zie(t,e)}function Z3(t,e,n=[]){let r,i=t;if(e.length>1){r=e.shift();const o=typeof r,u=Array.isArray(t);if(Array.isArray(r)){for(let a=0;a<r.length;a++)Z3(t,[r[a]].concat(e),n);return}else if(u&&o==="function"){for(let a=0;a<t.length;a++)r(t[a],a)&&Z3(t,[a].concat(e),n);return}else if(u&&o==="object"){const{from:a=0,to:l=t.length-1,by:c=1}=r;for(let f=a;f<=l;f+=c)Z3(t,[f].concat(e),n);return}else if(e.length>1){Z3(t[r],e,[r].concat(n));return}i=t[r],n=[r].concat(n)}let s=e[0];typeof s=="function"&&(s=s(i,n),s===i)||r===void 0&&s==null||(s=gx(s),r===void 0||Yu(i)&&Yu(s)&&!Array.isArray(s)?Zie(i,s):Ui(t,r,s))}function J5(...[t,e]){const n=gx(t||{}),r=Array.isArray(n),i=Xie(n);function s(...o){s0e(()=>{r&&o.length===1?PKe(n,o[0]):Z3(n,o)})}return[i,s]}const jL=Symbol("store-root");function p2(t,e,n,r,i){const s=e[n];if(t===s)return;const o=Array.isArray(t);if(n!==jL&&(!Yu(t)||!Yu(s)||o!==Array.isArray(s)||i&&t[i]!==s[i])){Ui(e,n,t);return}if(o){if(t.length&&s.length&&(!r||i&&t[0]&&t[0][i]!=null)){let l,c,f,x,d,p,g,m;for(f=0,x=Math.min(s.length,t.length);f<x&&(s[f]===t[f]||i&&s[f]&&t[f]&&s[f][i]===t[f][i]);f++)p2(t[f],s,f,r,i);const y=new Array(t.length),E=new Map;for(x=s.length-1,d=t.length-1;x>=f&&d>=f&&(s[x]===t[d]||i&&s[f]&&t[f]&&s[x][i]===t[d][i]);x--,d--)y[d]=s[x];if(f>d||f>x){for(c=f;c<=d;c++)Ui(s,c,t[c]);for(;c<t.length;c++)Ui(s,c,y[c]),p2(t[c],s,c,r,i);s.length>t.length&&Ui(s,"length",t.length);return}for(g=new Array(d+1),c=d;c>=f;c--)p=t[c],m=i&&p?p[i]:p,l=E.get(m),g[c]=l===void 0?-1:l,E.set(m,c);for(l=f;l<=x;l++)p=s[l],m=i&&p?p[i]:p,c=E.get(m),c!==void 0&&c!==-1&&(y[c]=s[l],c=g[c],E.set(m,c));for(c=f;c<t.length;c++)c in y?(Ui(s,c,y[c]),p2(t[c],s,c,r,i)):Ui(s,c,t[c])}else for(let l=0,c=t.length;l<c;l++)p2(t[l],s,l,r,i);s.length>t.length&&Ui(s,"length",t.length);return}const u=Object.keys(t);for(let l=0,c=u.length;l<c;l++)p2(t[u[l]],s,u[l],r,i);const a=Object.keys(s);for(let l=0,c=a.length;l<c;l++)t[a[l]]===void 0&&Ui(s,a[l],void 0)}function MKe(t,e={}){const{merge:n,key:r="id"}=e,i=gx(t);return s=>{if(!Yu(s)||!Yu(i))return i;const o=p2(i,{[jL]:s},jL,n,r);return o===void 0?s:o}}const Z5=new WeakMap,ese={get(t,e){if(e===K5)return t;const n=t[e];let r;return Yu(n)?Z5.get(n)||(Z5.set(n,r=new Proxy(n,ese)),r):n},set(t,e,n){return Ui(t,e,gx(n)),!0},deleteProperty(t,e){return Ui(t,e,void 0,!0),!0}};function tse(t){return e=>{if(Yu(e)){let n;(n=Z5.get(e))||Z5.set(e,n=new Proxy(e,ese)),t(n)}return e}}const nse=FT(),mx=()=>{const t=LT(nse);if(!t)throw Error("useResultContext must be used within a ResultContext.Provider");return t};function jKe(){const[t,e]=J5({brushes:[]}),n=(a,l)=>(l??t).brushes.find(f=>f.sourceId===a),r=[];let i=!1;const s=a=>{r.push(...a),i||(requestAnimationFrame(()=>{u(r),r.length=0,i=!1}),i=!0)},o=(a,l)=>JSON.stringify(a)===JSON.stringify(l),u=a=>{e(tse(l=>{a.forEach(c=>{if(c.type==="add"){const f=n(c.value.sourceId,l);f?o(f,c.value)||Object.assign(f,c.value):l.brushes.push(c.value)}else if(c.type==="remove"){const f=l.brushes.findIndex(x=>x.sourceId===c.sourceId);f!==-1&&l.brushes.splice(f,1)}})}))};return{store:t,applyBrushOps:s}}function UKe(){return mx().store}var qKe=kt("<div style=width:fit-content;height:fit-content;>");function zKe(t){const{field:e,data:n}=t,r=t.metadata.field(e).vegaChartProps,i=t.metadata.field(e).runtime;if(!i)throw new Error("Charts must have a runtime defined in their metadata");const s=n;for(let v=0;v<s.length;v++)s[v].__malloyDataRecord=n[v].__malloyDataRecord;let o=[];r.mapMalloyDataToChartData&&(o=r.mapMalloyDataToChartData(e,s));const u=e.allFields.filter(v=>v.isAtomicField()&&(v.isDate()||v.isTimestamp()));s.forEach(v=>{u.forEach(_=>{const S=v[_.name];(typeof S=="number"||typeof S=="string")&&(v[_.name]=X3(new Date(S),_.isDate(),_.timeframe))})});const[a,l]=_i(null),c=()=>{var v;return(v=a())==null?void 0:v.view};no(()=>{const v=c();v&&(v.data("values",o),v.runAsync())});const[f,x]=_i(null);let d=null;const p=v=>{d&&clearTimeout(d),v!==null?x(v):d=setTimeout(()=>x(null),0)},g=(v,_)=>{if(c()&&_&&r.getTooltipData){const S=r.getTooltipData(_,c());p(S)}else p(null)},m=UKe(),y=new Map,E=v=>{const _=Object.prototype.hasOwnProperty.call(v,"debounce");y.has(v.sourceId)&&(clearTimeout(y.get(v.sourceId)),y.delete(v.sourceId));let S="always";typeof v.debounce=="object"&&v.debounce.strategy&&(S=v.debounce.strategy);let b=100;typeof v.debounce=="number"?b=v.debounce:typeof v.debounce=="object"&&typeof v.debounce.time=="number"&&(b=v.debounce.time),!v.data?_?y.set(v.sourceId,setTimeout(()=>{m.applyBrushOps([{type:"remove",sourceId:v.sourceId}])},b)):m.applyBrushOps([{type:"remove",sourceId:v.sourceId}]):_&&S==="always"?y.set(v.sourceId,setTimeout(()=>{m.applyBrushOps([{type:"add",sourceId:v.sourceId,value:v.data}])},b)):m.applyBrushOps([{type:"add",sourceId:v.sourceId,value:v.data}])};let A=[];return no(()=>{var v;(v=a())==null||v.onSignal("brushOut",(_,S)=>{A=S,S.forEach(b=>{E(b)})})}),no(()=>{var S;const v=t.field.allFields.map(b=>b.isAtomicField()?b.referenceId:null),_=m.store.brushes.filter(b=>v.includes(b.fieldRefId));(S=a())==null||S.setSignalAndRun("brushIn",JSON.parse(JSON.stringify(_)))}),(()=>{var v=qKe();return v.addEventListener("mouseleave",()=>{x(null),m.applyBrushOps(A.filter(_=>{var S;return((S=_.data)==null?void 0:S.type)!=="measure-range"}).map(_=>({type:"remove",sourceId:_.sourceId})))}),xt(v,st(SKe,{get width(){return r.plotWidth},get height(){return r.plotHeight},onMouseOver:g,onViewInterface:l,get explore(){return t.field},runtime:i}),null),xt(v,st(RKe,{get show(){return!!f()},get children(){return st(IKe,{get data(){return f()}})}}),null),v})()}function rse(t){return t.tagParse().tag.has("hidden")}const ise={xs:28,sm:64,md:128,lg:256,xl:384,"2xl":512};function sse(t,e=0,n=0,r=0){let i={};return t.allFields.forEach(s=>{if(!rse(s))if(!s.isExploreField())i[Bs(s)]={abs:[e,e],rel:[n,n],depth:r},e++,n++;else{const[o,u,a]=sse(s,e,0,r+1);i={...i,...o},i[Bs(s)]={abs:[e,u-1],rel:[n,n+a-1],depth:r},e=u,n+=a}}),[i,e,n]}function HKe(t,e){const[n]=sse(e),r=Math.max(...Object.values(n).map(s=>s.abs[1]))+1;n[Bs(e)]={abs:[0,r-1],rel:[0,r-1],depth:-1};const i={fields:{},fieldHeaderRangeMap:n,fieldLayout(s){return this.fields[Bs(s)]},totalHeaderSize:r,maxDepth:0};for(const[s,o]of Object.entries(t.fields)){if(!(s in n))continue;const u=o.field,a={metadata:o,width:null,height:null,absoluteColumnRange:n[s].abs,relativeColumnRange:n[s].rel,depth:n[s].depth};i.maxDepth=Math.max(i.maxDepth,a.depth);const{tag:l}=u.tagParse(),c=l.tag("column"),f=c==null?void 0:c.text("width"),x=c==null?void 0:c.numeric("width");f&&ise[f]?a.width=ise[f]:x&&(a.width=x),c!=null&&c.numeric("height")&&(a.height=c.numeric("height")),i.fields[s]=a}return i}const ose=FT(),g2=()=>LT(ose);function QKe(){return J5({headerSizes:{},columnWidths:{}})}function m2(t,e,n){let r=n.initialDeps??[],i;return()=>{var s,o,u,a;let l;n.key&&((s=n.debug)!=null&&s.call(n))&&(l=Date.now());const c=t();if(!(c.length!==r.length||c.some((d,p)=>r[p]!==d)))return i;r=c;let x;if(n.key&&((o=n.debug)!=null&&o.call(n))&&(x=Date.now()),i=e(...c),n.key&&((u=n.debug)!=null&&u.call(n))){const d=Math.round((Date.now()-l)*100)/100,p=Math.round((Date.now()-x)*100)/100,g=p/16,m=(y,E)=>{for(y=String(y);y.length<E;)y=" "+y;return y};console.info(`%c⏱ ${m(p,5)} /${m(d,5)} ms`,`
1469
1469
  font-size: .6rem;
1470
1470
  font-weight: bold;
1471
- color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(a=n==null?void 0:n.onChange)==null||a.call(n,i),i}}function UL(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const GKe=(t,e)=>Math.abs(t-e)<1,WKe=(t,e,n)=>{let r;return function(...i){t.clearTimeout(r),r=t.setTimeout(()=>e.apply(this,i),n)}};var y2={};const VKe=t=>t,YKe=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),r=[];for(let i=e;i<=n;i++)r.push(i);return r},KKe=(t,e)=>{const n=t.scrollElement;if(!n)return;const r=t.targetWindow;if(!r)return;const i=o=>{const{width:u,height:a}=o;e({width:Math.round(u),height:Math.round(a)})};if(i(n.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const s=new r.ResizeObserver(o=>{const u=o[0];if(u!=null&&u.borderBoxSize){const a=u.borderBoxSize[0];if(a){i({width:a.inlineSize,height:a.blockSize});return}}i(n.getBoundingClientRect())});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},use={passive:!0},XKe=typeof window>"u"?!0:"onscrollend"in window,JKe=(t,e)=>{const n=t.scrollElement;if(!n)return;const r=t.targetWindow;if(!r)return;let i=0;const s=XKe?()=>{}:WKe(r,()=>{e(i,!1)},t.options.isScrollingResetDelay),o=l=>()=>{const{horizontal:c,isRtl:f}=t.options;i=c?n.scrollLeft*(f&&-1||1):n.scrollTop,s(),e(i,l)},u=o(!0),a=o(!1);return a(),n.addEventListener("scroll",u,use),n.addEventListener("scrollend",a,use),()=>{n.removeEventListener("scroll",u),n.removeEventListener("scrollend",a)}},ZKe=(t,e,n)=>{if(e!=null&&e.borderBoxSize){const r=e.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(t.getBoundingClientRect()[n.options.horizontal?"width":"height"])},eXe=(t,{adjustments:e=0,behavior:n},r)=>{var i,s;const o=t+e;(s=(i=r.scrollElement)==null?void 0:i.scrollTo)==null||s.call(i,{[r.options.horizontal?"left":"top"]:o,behavior:n})};class tXe{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(s=>{this._measureElement(s.target,s)})}));return{disconnect:()=>{var i;return(i=r())==null?void 0:i.disconnect()},observe:i=>{var s;return(s=r())==null?void 0:s.observe(i,{box:"border-box"})},unobserve:i=>{var s;return(s=r())==null?void 0:s.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,i])=>{typeof i>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:VKe,rangeExtractor:YKe,onChange:()=>{},measureElement:ZKe,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,...n}},this.notify=n=>{var r,i;(i=(r=this.options).onChange)==null||i.call(r,this,n)},this.maybeNotify=m2(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:y2.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=s,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const i=new Map,s=new Map;for(let o=r-1;o>=0;o--){const u=n[o];if(i.has(u.lane))continue;const a=s.get(u.lane);if(a==null||u.end>a.end?s.set(u.lane,u):u.end<a.end&&i.set(u.lane,!0),i.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((o,u)=>o.end===u.end?o.index-u.index:o.end-u.end)[0]:void 0},this.getMeasurementOptions=m2(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,r,i,s,o)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:i,getItemKey:s,enabled:o}),{key:!1}),this.getMeasurements=m2(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:i,getItemKey:s,enabled:o},u)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const a=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const l=this.measurementsCache.slice(0,a);for(let c=a;c<n;c++){const f=s(c),x=this.options.lanes===1?l[c-1]:this.getFurthestMeasurement(l,c),d=x?x.end+this.options.gap:r+i,p=u.get(f),g=typeof p=="number"?p:this.options.estimateSize(c),m=d+g,y=x?x.lane:c%this.options.lanes;l[c]={index:c,start:d,size:g,end:m,key:f,lane:y}}return this.measurementsCache=l,l},{key:y2.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=m2(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(n,r,i)=>this.range=n.length>0&&r>0?nXe({measurements:n,outerSize:r,scrollOffset:i}):null,{key:y2.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=m2(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(n,r,i,s)=>r===null?[]:n({startIndex:r.startIndex,endIndex:r.endIndex,overscan:i,count:s}),{key:y2.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,i=n.getAttribute(r);return i?parseInt(i,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const i=this.indexFromElement(n),s=this.measurementsCache[i];if(!s)return;const o=s.key,u=this.elementsCache.get(o);u!==n&&(u&&this.observer.unobserve(u),this.observer.observe(n),this.elementsCache.set(o,n)),n.isConnected&&this.resizeItem(i,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const i=this.measurementsCache[n];if(!i)return;const s=this.itemSizeCache.get(i.key)??i.size,o=r-s;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,o,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&(y2.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",o),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,r)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((r,i)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=m2(()=>[this.getIndexes(),this.getMeasurements()],(n,r)=>{const i=[];for(let s=0,o=n.length;s<o;s++){const u=n[s],a=r[u];i.push(a)}return i},{key:y2.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return UL(r[ase(0,r.length-1,i=>UL(r[i]).start,n)])},this.getOffsetForAlignment=(n,r)=>{const i=this.getSize(),s=this.getScrollOffset();r==="auto"&&(n<=s?r="start":n>=s+i?r="end":r="start"),r==="start"?n=n:r==="end"?n=n-i:r==="center"&&(n=n-i/2);const o=this.options.horizontal?"scrollWidth":"scrollHeight",a=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[o]:this.scrollElement[o]:0)-i;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const s=this.getSize(),o=this.getScrollOffset();if(r==="auto")if(i.end>=o+s-this.options.scrollPaddingEnd)r="end";else if(i.start<=o+this.options.scrollPaddingStart)r="start";else return[o,r];const u=r==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(u,r),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:r="start",behavior:i}={})=>{this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:r="auto",behavior:i}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const s=this.getOffsetForIndex(n,r);if(!s)return;const[o,u]=s;this._scrollToOffset(o,{adjustments:void 0,behavior:i}),i!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const[l]=UL(this.getOffsetForIndex(n,u));GKe(l,this.getScrollOffset())||this.scrollToIndex(n,{align:u,behavior:i})}else this.scrollToIndex(n,{align:u,behavior:i})}))},this.scrollBy=(n,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let i;return r.length===0?i=this.options.paddingStart:i=this.options.lanes===1?((n=r[r.length-1])==null?void 0:n.end)??0:Math.max(...r.slice(-this.options.lanes).map(s=>s.end)),i-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(n,{adjustments:r,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const ase=(t,e,n,r)=>{for(;t<=e;){const i=(t+e)/2|0,s=n(i);if(s<r)t=i+1;else if(s>r)e=i-1;else return i}return t>0?t-1:0};function nXe({measurements:t,outerSize:e,scrollOffset:n}){const r=t.length-1,s=ase(0,r,u=>t[u].start,n);let o=s;for(;o<r&&t[o].end<n+e;)o++;return{startIndex:s,endIndex:o}}function rXe(t){const e=Ac(t),n=new tXe(e),[r,i]=J5(n.getVirtualItems()),[s,o]=_i(n.getTotalSize()),u={get(l,c){switch(c){case"getVirtualItems":return()=>r;case"getTotalSize":return()=>s();default:return Reflect.get(l,c)}}},a=new Proxy(n,u);return a.setOptions(e),Px(()=>{const l=a._didMount();a._willUpdate(),X2(l)}),i0e(()=>{a.setOptions(Ac(e,t,{onChange:(l,c)=>{var f;l._willUpdate(),i(MKe(l.getVirtualItems(),{key:"index"})),o(l.getTotalSize()),(f=t.onChange)==null||f.call(t,l,c)}})),a.measure()}),a}function lse(t){return rXe(Ac({observeElementRect:KKe,observeElementOffset:JKe,scrollToFn:eXe},t))}var iXe=kt("<div class=cell-content>"),sXe=kt('<div class="column-cell th">'),oXe=kt('<div class="column-cell td">'),uXe=kt("<div style=position:sticky;left:0px;height:0px;visibility:hidden;>"),aXe=kt("<div style=position:sticky;top:0px;left:0px;height:0px;visibility:hidden;>"),lXe=kt("<div class=pinned-header-row>"),cXe=kt("<div class=table-row><div class=table-row>"),qL=kt("<div class=table-row>"),fXe=kt('<div class="table-row limit-row table-gutter-left table-gutter-right">Limiting nested table to <!> records'),xXe=kt("<div class=malloy-table>"),dXe=kt("<div class=pinned-header-subrow>");const hXe=navigator.userAgent.toLowerCase().indexOf("chrome")>=0,cse=t=>{const e=()=>{const i=g2().layout,s=t.field.tagParse().tag.tag("column"),o=i.fieldLayout(t.field).width,u=i.fieldLayout(t.field).height,a={};return t.isHeader||(o&&(a.width=`${o}px`,a["min-width"]=`${o}px`,a["max-width"]=`${o}px;`),u&&(a.height=`${u}px`),(s==null?void 0:s.text("word_break"))==="break_all"&&(a["word-break"]="break-all")),a},n=iB(),r=i=>{n.onClick&&n.onClick({field:t.field,displayValue:t.isHeader?t.rawValue:typeof t.value!="function"?t.value:null,value:typeof t.rawValue!="function"?t.rawValue:null,fieldPath:t.field.fieldPath,isHeader:!!t.isHeader,event:i,type:"table-cell"})};return(()=>{var i=iXe();return bB(i,"click",n.onClick?r:void 0),xt(i,()=>t.value),fr(s=>{var o=!!t.isHeader,u=!!t.hideStartGutter,a=!!t.hideEndGutter,l=!!t.tableGutterLeft,c=!!t.tableGutterRight,f=!!t.isChart,x=e(),d=typeof t.value=="string"?t.value:"";return o!==s.e&&i.classList.toggle("header",s.e=o),u!==s.t&&i.classList.toggle("hide-start-gutter",s.t=u),a!==s.a&&i.classList.toggle("hide-end-gutter",s.a=a),l!==s.o&&i.classList.toggle("table-gutter-left",s.o=l),c!==s.i&&i.classList.toggle("table-gutter-right",s.i=c),f!==s.n&&i.classList.toggle("chart",s.n=f),s.s=vc(i,x,s.s),d!==s.h&&Vo(i,"title",s.h=d),s},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),i})()},fse=t=>{const{layout:e}=g2(),n=mx(),r=Xg(t.field),i=Xg(t.field.parentExplore),s=!t.field.parentExplore.isExploreField(),o=r&&(i||s),u=Kg(t.field),a=Kg(t.field.parentExplore),l=u&&(a||s),c=e.fieldLayout(t.field),f=t.isPinned?c.absoluteColumnRange:c.relativeColumnRange,x=c.depth>0&&Xg(t.field)||c.metadata.renderAs==="table",d=c.depth>0&&Kg(t.field)||c.depth===0&&c.metadata.renderAs==="table";return(()=>{var p=sXe();return xt(p,st(cse,{get field(){return t.field},get value(){return t.field.name.replace(/_/g,"_​")},hideStartGutter:o,hideEndGutter:l,tableGutterLeft:x,tableGutterRight:d,isHeader:!0,get rawValue(){return t.field.name}})),fr(g=>{var m=t.isPinned?n.getFieldKey(t.field):void 0,y=!!(t.field.isAtomicField()&&t.field.isNumber()),E=!!t.isPinned,A=`${f[0]+1} / span ${D7(f)}`,v=t.isPinned?void 0:`var(--malloy-render--table-header-height-${c.depth})`;return m!==g.e&&Vo(p,"data-pinned-header",g.e=m),y!==g.t&&p.classList.toggle("numeric",g.t=y),E!==g.a&&p.classList.toggle("pinned-header",g.a=E),A!==g.o&&((g.o=A)!=null?p.style.setProperty("grid-column",A):p.style.removeProperty("grid-column")),v!==g.i&&((g.i=v)!=null?p.style.setProperty("height",v):p.style.removeProperty("height")),g},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),p})()},xse=t=>{let e="",n="";({renderValue:e,renderAs:n}=Bx({field:t.field,dataColumn:t.row.cell(t.field),resultMetadata:mx(),tag:t.field.tagParse().tag,customProps:{table:{rowLimit:100}}}));const i=g2().layout.fieldLayout(t.field),s=i.relativeColumnRange,o={"grid-column":`${s[0]+1} / span ${D7(s)}`,height:"fit-content"};n==="table"?(o.display="grid",o.grid="auto / subgrid"):hXe&&t.field.isAtomicField()&&(o.position="sticky",o.top=`var(--malloy-render--table-header-cumulative-height-${i.depth})`);const u=i.depth>0&&Xg(t.field),a=i.depth>0&&Kg(t.field);return(()=>{var l=oXe();return xt(l,st(vB,{get children(){return[st(Uy,{when:n==="table",children:e}),st(Uy,{when:!0,get children(){return st(cse,{get field(){return t.field},value:e,get hideStartGutter(){return Xg(t.field)},get hideEndGutter(){return Kg(t.field)},tableGutterLeft:u,tableGutterRight:a,get rawValue(){return t.row.cell(t.field).value},isChart:n==="chart"})}})]}})),fr(c=>{var f=!!(t.field.isAtomicField()&&t.field.isNumber()),x=o;return f!==c.e&&l.classList.toggle("numeric",c.e=f),c.t=vc(l,x,c.t),c},{e:void 0,t:void 0}),l})()},pXe=t=>{var pe;const e=Ac({rowLimit:1/0},t),n=g2(),r=mx(),i=n.root&&((pe=e.data.field.tagParse().tag.tag("table"))==null?void 0:pe.text("size"))==="fill",s=Wn(()=>Object.entries(n.layout.fieldHeaderRangeMap).sort((V,te)=>V[1].depth<te[1].depth?-1:V[1].depth>te[1].depth?1:V[1].abs[0]<te[1].abs[0]?-1:V[1].abs[0]>te[1].abs[0]?1:0).filter(([V,te])=>te.depth>=0&&gT(r.fields[V].field.parentExplore)==="table").map(([V,te])=>({fieldKey:V,field:r.fields[V].field,...te}))),o=Wn(()=>Math.max(...s().map(ae=>ae.depth))),u=Wn(()=>Object.entries(n.layout.fieldHeaderRangeMap).filter(([V])=>!r.fields[V].field.isExplore())),a=()=>{const ae=n.layout.fieldLayout(e.data.field).relativeColumnRange,V={"--table-row-span":D7(ae)};if(n.root){let te=0;Object.entries(n.headerSizeStore[0]).sort(([he],[D])=>parseInt(he)-parseInt(D)).forEach(([he,D])=>{V[`--malloy-render--table-header-height-${he}`]=`${D}px`,te+=D,V[`--malloy-render--table-header-cumulative-height-${he}`]=`${te}px`}),V["--total-header-size"]=n.layout.totalHeaderSize;const se=u().map(([he])=>{const D=n.store.columnWidths[he];return i?D?D+"px":"auto":`minmax(${D?D+"px":"auto"}, max-content)`}).join(" ");V["grid-template-columns"]=se}return V},[l,c]=_i(!1),f=Wn(()=>{const ae=[];let V=0;for(const te of e.data){if(V>=e.rowLimit){c(!0);break}ae.push(te),V++}return ae}),x=()=>e.data.field.allFields.filter(ae=>!rse(ae)),d=()=>s().reduce((V,te)=>((V[te.depth]||(V[te.depth]=[])).push(te),V),[]);let p,g;const[m,y]=_i(!1),[E,A]=_i(!1),v=()=>m()&&!E();Px(()=>{p&&g&&(new IntersectionObserver(([te])=>{y(te.intersectionRatio<1)},{threshold:[1]}).observe(p),new IntersectionObserver(([te])=>{A(te.intersectionRatio<1)},{threshold:[1]}).observe(g))});const _=[];Px(()=>{if(n.root){const[ae,V]=n.headerSizeStore,te=new ResizeObserver(se=>{const he=se.reduce((D,O)=>{const N=O.target.getAttribute("data-depth"),P=O.contentRect.height;return typeof N=="string"&&ae[N]!==P&&(D[N]=P),D},{});Object.entries(he).length>0&&V(D=>({...D,...he}))});_.forEach(se=>{te.observe(se)})}});let S;e.scrollEl&&(S=e.scrollEl);let b;const[C,R]=_i(28),L=n.root&&!e.disableVirtualization;L&&(b=lse({count:f().length,getScrollElement:()=>S,estimateSize:()=>C()}));const $=b==null?void 0:b.getVirtualItems();let U,z=!1;const ee=()=>{z=!0,setTimeout(()=>{z=!1},2e3)};function G(){const ae=U.querySelectorAll("[data-pinned-header]"),V=[];ae.forEach(te=>{const se=te.getAttribute("data-pinned-header"),he=te.clientWidth,D=n.store.columnWidths[se];(typeof D>"u"||he>D)&&V.push([se,he])}),V.length>0&&n.setStore("columnWidths",tse(te=>{V.forEach(([se,he])=>te[se]=he)}))}Px(()=>{U&&(new ResizeObserver(()=>{z&&G()}).observe(U),requestAnimationFrame(()=>G()))}),Px(()=>{if(n.root){let ae=null;new ResizeObserver(te=>{const[se]=te;!z&&ae!==null&&ae!==se.contentRect.width&&n.setStore(he=>({...he,columnWidths:{}})),ae=se.contentRect.width}).observe(S)}});const fe=()=>({"margin-bottom":`calc(-1 * (var(--malloy-render--table-header-cumulative-height-${o()}) - var(--malloy-render--table-header-height-0)))`});return(()=>{var ae=xXe();return ae.addEventListener("scroll",ee),Yo(V=>{e.scrollEl||(S=V)},ae),ae.classList.toggle("full-width",!!i),xt(ae,st(Wo,{get when(){return n.root},get children(){return[(()=>{var V=uXe(),te=p;return typeof te=="function"?Yo(te,V):p=V,V})(),(()=>{var V=aXe(),te=g;return typeof te=="function"?Yo(te,V):g=V,V})(),(()=>{var V=lXe(),te=U;return typeof te=="function"?Yo(te,V):U=V,xt(V,st(Si,{get each(){return d()},children:(se,he)=>(()=>{var D=dXe();return Yo(O=>_[he()]=O,D),xt(D,st(Si,{each:se,children:O=>st(fse,{get field(){return O.field},isPinned:!0})})),fr(()=>Vo(D,"data-depth",he())),D})()})),fr(se=>vc(V,fe(),se)),V})()]}}),null),xt(ae,st(Wo,{when:L,get children(){var V=cXe(),te=V.firstChild;return V.style.setProperty("width","100%"),V.style.setProperty("position","relative"),te.style.setProperty("height","fit-content"),te.style.setProperty("width","100%"),xt(te,st(Si,{each:$,children:se=>(()=>{var he=qL();return Yo(D=>queueMicrotask(()=>{b.measureElement(D),se.index===0&&R(D.clientHeight)}),he),xt(he,st(Wo,{get when(){return se.index>=0},get children(){return st(Si,{get each(){return x()},children:D=>st(xse,{field:D,get row(){return f()[se.index]}})})}})),fr(()=>Vo(he,"data-index",se.index)),he})()})),fr(se=>{var O;var he=b.getTotalSize()+"px",D=`${((O=$[0])==null?void 0:O.start)??0}px`;return he!==se.e&&((se.e=he)!=null?V.style.setProperty("height",he):V.style.removeProperty("height")),D!==se.t&&((se.t=D)!=null?te.style.setProperty("padding-top",D):te.style.removeProperty("padding-top")),se},{e:void 0,t:void 0}),V}}),null),xt(ae,st(Wo,{when:!L,get children(){return[st(Wo,{get when(){return!n.root},get children(){var V=qL();return xt(V,st(Si,{get each(){return x()},children:te=>st(fse,{field:te})})),V}}),st(Si,{get each(){return f()},children:V=>(()=>{var te=qL();return xt(te,st(Si,{get each(){return x()},children:se=>st(xse,{field:se,row:V})})),te})()}),st(Wo,{get when(){return l()},get children(){var V=fXe(),te=V.firstChild,se=te.nextSibling;return se.nextSibling,xt(V,()=>e.rowLimit,se),V}})]}}),null),fr(V=>{var te=!!n.root,se=!!v(),he=n.root?"table-container":"",D=a();return te!==V.e&&ae.classList.toggle("root",V.e=te),se!==V.t&&ae.classList.toggle("pinned",V.t=se),he!==V.a&&Vo(ae,"part",V.a=he),V.o=vc(ae,D,V.o),V},{e:void 0,t:void 0,a:void 0,o:void 0}),ae})()},gXe=t=>{const e=mx(),n=!!g2(),r=Wn(()=>{if(n)return{...g2(),root:!1};const[i,s]=QKe();return{root:!0,layout:HKe(e,t.data.field),store:i,setStore:s,headerSizeStore:J5({})}});return st(ose.Provider,{get value(){return r()},get children(){return st(pXe,t)}})};SB(["click"]);var mXe=kt('<div class=malloy-list style="text-wrap:wrap;line-height:calc(var(--malloy-render--table-row-height) * 5 / 7 - 1px);">'),yXe=kt("<span>");function EXe(t){if(t.dataColumn.isNull())return"∅";const e=t.tag.tag("list"),n=t.tag.tag("list_detail");if(!e&&!n)throw new Error("Missing tag for List renderer");if(!t.field.isExplore())throw new Error("List renderer: Field must be ExploreField");if(!t.dataColumn.isArray())throw new Error("List renderer: DataColumn must be DataArray");const r=t.field.allFields.filter(u=>{const{tag:a}=u.tagParse();return!a.has("hidden")})[0],i=!!n,s=t.field.allFields.filter(u=>{const{tag:a}=u.tagParse();return!a.has("hidden")})[1],o=[];for(const u of t.dataColumn)o.push(u);return(()=>{var u=mXe();return xt(u,st(Si,{each:o,children:(a,l)=>(()=>{var c=yXe();return xt(c,()=>Bx({field:r,dataColumn:a.cell(r),resultMetadata:t.resultMetadata,tag:r.tagParse().tag}).renderValue,null),xt(c,()=>i&&s&&"("+Bx({field:s,dataColumn:a.cell(s),resultMetadata:t.resultMetadata,tag:s.tagParse().tag}).renderValue+")",null),xt(c,()=>l()<o.length-1&&", ",null),c})()})),u})()}var AXe=kt("<img>");function vXe(t){const e=t.tag.tag("image");if(!e)throw new Error("Missing tag for Image renderer");if(!t.field.isAtomicField())throw new Error("Image renderer: Field must be AtomicField");if(!t.dataColumn.isString())throw new Error("Image renderer: DataColumn must be DataString");const n=e.text("width"),r=e.text("height"),i={};n&&(i.width=n),r&&(i.height=r);let s;const o=e.tag("alt");o&&(s=AW({tag:o,data:t.dataColumn})??o.text());let u;return t.dataColumn.isNull()||(u=t.dataColumn.value),(()=>{var a=AXe();return vc(a,i),Vo(a,"src",u),Vo(a,"alt",s),a})()}var _Xe=kt("<div class=dashboard-item><div class=dashboard-item-title></div><div class=dashboard-item-value>"),SXe=kt("<div class=malloy-dashboard><div><div>"),bXe=kt("<div class=dashboard-row><div class=dashboard-row-header><div class=dashboard-row-header-dimension-list></div><div class=dashboard-row-header-separator>"),CXe=kt("<div class=dashboard-dimension-wrapper><div class=dashboard-dimension-name></div><div class=dashboard-dimension-value>"),TXe=kt("<div class=dashboard-row-body>");function RXe(t){const e=Bx({field:t.field,dataColumn:t.row.cell(t.field),tag:t.field.tagParse().tag,resultMetadata:t.resultMetadata,customProps:{table:{disableVirtualization:t.maxTableHeight}}}),n=iB(),r=s=>{n.onClick&&n.onClick({field:t.field,displayValue:typeof e.renderValue!="function"?e.renderValue:null,value:t.row.cell(t.field).value,fieldPath:t.field.fieldPath,isHeader:!1,event:s,type:"dashboard-item"})},i={};return e.renderAs==="table"&&t.maxTableHeight&&(i["max-height"]=`${t.maxTableHeight}px`),(()=>{var s=_Xe(),o=s.firstChild,u=o.nextSibling;return bB(s,"click",n.onClick?r:void 0),xt(o,()=>t.field.name),vc(u,i),xt(u,()=>e.renderValue),fr(()=>u.classList.toggle("dashboard-item-value-measure",!!t.isMeasure)),s})()}function OXe(t){const e=()=>t.data.field,n=e().tagParse().tag.tag("dashboard");let r=361;const i=n==null?void 0:n.tag("table","max_height");(i==null?void 0:i.text())==="none"?r=null:i!=null&&i.numeric()&&(r=i.numeric());const s=()=>e().allFields.filter(d=>!d.tagParse().tag.has("hidden")&&d.isAtomicField()&&d.sourceWasDimension()),o=()=>{const d=[],p=[];for(const g of e().allFields)g.tagParse().tag.has("hidden")||(g.isAtomicField()&&g.sourceWasMeasureLike()?d.push(g):(!g.isAtomicField()||!g.sourceWasDimension())&&p.push(g));return[...d,...p]},u=()=>{const d=[[]];for(const p of o()){const{tag:g}=p.tagParse();g.has("break")&&d.push([]),d.at(-1).push(p)}return d},a=Wn(()=>{const d=[];for(const p of t.data)d.push(p);return d});let l;t.scrollEl&&(l=t.scrollEl);const c=lse({count:a().length,getScrollElement:()=>l,estimateSize:()=>192}),f=c.getVirtualItems(),x=mx();return(()=>{var d=SXe(),p=d.firstChild,g=p.firstChild;return Yo(m=>{t.scrollEl||(l=m)},d),p.style.setProperty("width","100%"),p.style.setProperty("position","relative"),g.style.setProperty("height","fit-content"),g.style.setProperty("width","100%"),xt(g,st(Si,{each:f,children:m=>(()=>{var y=bXe(),E=y.firstChild,A=E.firstChild;return Yo(v=>queueMicrotask(()=>c.measureElement(v)),y),xt(A,st(Si,{get each(){return s()},children:v=>(()=>{var _=CXe(),S=_.firstChild,b=S.nextSibling;return xt(S,()=>v.name),xt(b,()=>Bx({field:v,dataColumn:a()[m.index].cell(v),tag:v.tagParse().tag,resultMetadata:x}).renderValue),_})()})),xt(y,st(Si,{get each(){return u()},children:v=>(()=>{var _=TXe();return xt(_,st(Si,{each:v,children:S=>st(RXe,{field:S,get row(){return a()[m.index]},resultMetadata:x,get isMeasure(){return Wn(()=>!!S.isAtomicField())()&&S.sourceWasMeasureLike()},maxTableHeight:r})})),_})()}),null),fr(()=>Vo(y,"data-index",m.index)),y})()})),fr(m=>{var A;var y=c.getTotalSize()+"px",E=`${((A=f[0])==null?void 0:A.start)??0}px`;return y!==m.e&&((m.e=y)!=null?p.style.setProperty("height",y):p.style.removeProperty("height")),E!==m.t&&((m.t=E)!=null?g.style.setProperty("padding-top",E):g.style.removeProperty("padding-top")),m},{e:void 0,t:void 0}),d})()}SB(["click"]),Array.prototype.flat||Object.defineProperty(Array.prototype,"flat",{configurable:!0,value:function t(){var e=isNaN(arguments[0])?1:Number(arguments[0]);return e?Array.prototype.reduce.call(this,function(n,r){return Array.isArray(r)?n.push.apply(n,t.call(r,e-1)):n.push(r),n},[]):Array.prototype.slice.call(this)},writable:!0}),Array.prototype.flatMap||Object.defineProperty(Array.prototype,"flatMap",{configurable:!0,value:function(t){return Array.prototype.map.apply(this,arguments).flat()},writable:!0});var dse={exports:{}};(function(t){var e=function(){function n(x,d){return d!=null&&x instanceof d}var r;try{r=Map}catch{r=function(){}}var i;try{i=Set}catch{i=function(){}}var s;try{s=Promise}catch{s=function(){}}function o(x,d,p,g,m){typeof d=="object"&&(p=d.depth,g=d.prototype,m=d.includeNonEnumerable,d=d.circular);var y=[],E=[],A=typeof Buffer<"u";typeof d>"u"&&(d=!0),typeof p>"u"&&(p=1/0);function v(_,S){if(_===null)return null;if(S===0)return _;var b,C;if(typeof _!="object")return _;if(n(_,r))b=new r;else if(n(_,i))b=new i;else if(n(_,s))b=new s(function(pe,ae){_.then(function(V){pe(v(V,S-1))},function(V){ae(v(V,S-1))})});else if(o.__isArray(_))b=[];else if(o.__isRegExp(_))b=new RegExp(_.source,f(_)),_.lastIndex&&(b.lastIndex=_.lastIndex);else if(o.__isDate(_))b=new Date(_.getTime());else{if(A&&Buffer.isBuffer(_))return Buffer.allocUnsafe?b=Buffer.allocUnsafe(_.length):b=new Buffer(_.length),_.copy(b),b;n(_,Error)?b=Object.create(_):typeof g>"u"?(C=Object.getPrototypeOf(_),b=Object.create(C)):(b=Object.create(g),C=g)}if(d){var R=y.indexOf(_);if(R!=-1)return E[R];y.push(_),E.push(b)}n(_,r)&&_.forEach(function(pe,ae){var V=v(ae,S-1),te=v(pe,S-1);b.set(V,te)}),n(_,i)&&_.forEach(function(pe){var ae=v(pe,S-1);b.add(ae)});for(var L in _){var $;C&&($=Object.getOwnPropertyDescriptor(C,L)),!($&&$.set==null)&&(b[L]=v(_[L],S-1))}if(Object.getOwnPropertySymbols)for(var U=Object.getOwnPropertySymbols(_),L=0;L<U.length;L++){var z=U[L],ee=Object.getOwnPropertyDescriptor(_,z);ee&&!ee.enumerable&&!m||(b[z]=v(_[z],S-1),ee.enumerable||Object.defineProperty(b,z,{enumerable:!1}))}if(m)for(var G=Object.getOwnPropertyNames(_),L=0;L<G.length;L++){var fe=G[L],ee=Object.getOwnPropertyDescriptor(_,fe);ee&&ee.enumerable||(b[fe]=v(_[fe],S-1),Object.defineProperty(b,fe,{enumerable:!1}))}return b}return v(x,p)}o.clonePrototype=function(d){if(d===null)return null;var p=function(){};return p.prototype=d,new p};function u(x){return Object.prototype.toString.call(x)}o.__objToStr=u;function a(x){return typeof x=="object"&&u(x)==="[object Date]"}o.__isDate=a;function l(x){return typeof x=="object"&&u(x)==="[object Array]"}o.__isArray=l;function c(x){return typeof x=="object"&&u(x)==="[object RegExp]"}o.__isRegExp=c;function f(x){var d="";return x.global&&(d+="g"),x.ignoreCase&&(d+="i"),x.multiline&&(d+="m"),d}return o.__getRegExpFlags=f,o}();t.exports&&(t.exports=e)})(dse);var DXe=dse.exports;const wXe=zy(DXe);var NXe=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,s;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;i--!==0;){var o=s[i];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n};const FXe=zy(NXe);var LXe=function(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});var n=typeof e.cycles=="boolean"?e.cycles:!1,r=e.cmp&&function(s){return function(o){return function(u,a){var l={key:u,value:o[u]},c={key:a,value:o[a]};return s(l,c)}}}(e.cmp),i=[];return function s(o){if(o&&o.toJSON&&typeof o.toJSON=="function"&&(o=o.toJSON()),o!==void 0){if(typeof o=="number")return isFinite(o)?""+o:"null";if(typeof o!="object")return JSON.stringify(o);var u,a;if(Array.isArray(o)){for(a="[",u=0;u<o.length;u++)u&&(a+=","),a+=s(o[u])||"null";return a+"]"}if(o===null)return"null";if(i.indexOf(o)!==-1){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var l=i.push(o)-1,c=Object.keys(o).sort(r&&r(o));for(a="",u=0;u<c.length;u++){var f=c[u],x=s(o[f]);x&&(a&&(a+=","),a+=JSON.stringify(f)+":"+x)}return i.splice(l,1),"{"+a+"}"}}(t)};const zL=zy(LXe);function HL(t){return!!t.or}function QL(t){return!!t.and}function GL(t){return!!t.not}function eC(t,e){if(GL(t))eC(t.not,e);else if(QL(t))for(const n of t.and)eC(n,e);else if(HL(t))for(const n of t.or)eC(n,e);else e(t)}function E2(t,e){return GL(t)?{not:E2(t.not,e)}:QL(t)?{and:t.and.map(n=>E2(n,e))}:HL(t)?{or:t.or.map(n=>E2(n,e))}:e(t)}const fl=FXe,ct=wXe;function IXe(t){throw new Error(t)}function ey(t,e){const n={};for(const r of e)Ze(t,r)&&(n[r]=t[r]);return n}function Ys(t,e){const n=Object.assign({},t);for(const r of e)delete n[r];return n}Set.prototype.toJSON=function(){return`Set(${[...this].map(t=>zL(t)).join(",")})`};const on=zL;function Rt(t){if(rn(t))return t;const e=ze(t)?t:zL(t);if(e.length<250)return e;let n=0;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);n=(n<<5)-n+i,n=n&n}return n}function hse(t){return t===!1||t===null}function Ot(t,e){return t.includes(e)}function A2(t,e){let n=0;for(const[r,i]of t.entries())if(e(i,r,n++))return!0;return!1}function pse(t,e){let n=0;for(const[r,i]of t.entries())if(!e(i,r,n++))return!1;return!0}function $Xe(t,...e){for(const n of e)BXe(t,n??{});return t}function BXe(t,e){for(const n of Re(e))BS(t,n,e[n],!0)}function xl(t,e){const n=[],r={};let i;for(const s of t)i=e(s),!(i in r)&&(r[i]=1,n.push(s));return n}function kXe(t,e){if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}function gse(t,e){for(const n of t)if(e.has(n))return!0;return!1}function mse(t){const e=new Set;for(const n of t){const i=ka(n).map((o,u)=>u===0?o:`[${o}]`),s=i.map((o,u)=>i.slice(0,u+1).join(""));for(const o of s)e.add(o)}return e}function yse(t,e){return t===void 0||e===void 0?!0:gse(mse(t),mse(e))}function Kt(t){return Re(t).length===0}const Re=Object.keys,mi=Object.values,yx=Object.entries;function tC(t){return t===!0||t===!1}function yn(t){const e=t.replace(/\W/g,"_");return(t.match(/^\d+/)?"_":"")+e}function nC(t,e){return GL(t)?`!(${nC(t.not,e)})`:QL(t)?`(${t.and.map(n=>nC(n,e)).join(") && (")})`:HL(t)?`(${t.or.map(n=>nC(n,e)).join(") || (")})`:e(t)}function WL(t,e){if(e.length===0)return!0;const n=e.shift();return n in t&&WL(t[n],e)&&delete t[n],Kt(t)}function rC(t){return t.charAt(0).toUpperCase()+t.substr(1)}function Ese(t,e="datum"){const n=ka(t),r=[];for(let i=1;i<=n.length;i++){const s=`[${n.slice(0,i).map(Fe).join("][")}]`;r.push(`${e}${s}`)}return r.join(" && ")}function PXe(t,e="datum"){return`${e}[${Fe(ka(t).join("."))}]`}function MXe(t){return t.replace(/(\[|\]|\.|'|")/g,"\\$1")}function ko(t){return`${ka(t).map(MXe).join("\\.")}`}function v2(t,e,n){return t.replace(new RegExp(e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),n)}function Ase(t){return`${ka(t).join(".")}`}function ty(t){return t?ka(t).length:0}function Qn(...t){for(const e of t)if(e!==void 0)return e}let jXe=42;function UXe(t){const e=++jXe;return t?String(t)+e:e}function qXe(t){return zXe(t)?t:`__${t}`}function zXe(t){return t.startsWith("__")}function iC(t){if(t!==void 0)return(t%360+360)%360}function VL(t){return rn(t)?!0:!isNaN(t)&&!isNaN(parseFloat(t))}var ny=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const dl="row",hl="column",sC="facet",En="x",ur="y",Po="x2",Ku="y2",Y0="xOffset",_2="yOffset",Xu="radius",pl="radius2",Mo="theta",gl="theta2",Ju="latitude",Zu="longitude",jo="latitude2",Ks="longitude2",qi="color",ea="fill",ta="stroke",zi="shape",ml="size",Ex="angle",yl="opacity",K0="fillOpacity",X0="strokeOpacity",J0="strokeWidth",Z0="strokeDash",ry="text",iy="order",sy="detail",oC="key",Ax="tooltip",uC="href",aC="url",lC="description",HXe={x:1,y:1,x2:1,y2:1},vse={theta:1,theta2:1,radius:1,radius2:1};function _se(t){return t in vse}const YL={longitude:1,longitude2:1,latitude:1,latitude2:1};function QXe(t){switch(t){case Ju:return"y";case jo:return"y2";case Zu:return"x";case Ks:return"x2"}}function GXe(t){return t in YL}const WXe=Re(YL),KL=Object.assign(Object.assign(Object.assign(Object.assign({},HXe),vse),YL),{xOffset:1,yOffset:1,color:1,fill:1,stroke:1,opacity:1,fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeDash:1,size:1,angle:1,shape:1,order:1,text:1,detail:1,key:1,tooltip:1,href:1,url:1,description:1});function S2(t){return t===qi||t===ea||t===ta}const Sse={row:1,column:1,facet:1},Xs=Re(Sse),XL=Object.assign(Object.assign({},KL),Sse),VXe=Re(XL),YXe=ny(XL,["order","detail","tooltip"]),KXe=ny(YXe,["row","column","facet"]);function XXe(t){return!!KXe[t]}function bse(t){return!!XL[t]}const JXe=[Po,Ku,jo,Ks,gl,pl];function Cse(t){return vx(t)!==t}function vx(t){switch(t){case Po:return En;case Ku:return ur;case jo:return Ju;case Ks:return Zu;case gl:return Mo;case pl:return Xu}return t}function ec(t){if(_se(t))switch(t){case Mo:return"startAngle";case gl:return"endAngle";case Xu:return"outerRadius";case pl:return"innerRadius"}return t}function El(t){switch(t){case En:return Po;case ur:return Ku;case Ju:return jo;case Zu:return Ks;case Mo:return gl;case Xu:return pl}}function Hi(t){switch(t){case En:case Po:return"width";case ur:case Ku:return"height"}}function ZXe(t){switch(t){case En:return"xOffset";case ur:return"yOffset";case Po:return"x2Offset";case Ku:return"y2Offset";case Mo:return"thetaOffset";case Xu:return"radiusOffset";case gl:return"theta2Offset";case pl:return"radius2Offset"}}function Tse(t){switch(t){case En:return"xOffset";case ur:return"yOffset"}}function Rse(t){switch(t){case"xOffset":return"x";case"yOffset":return"y"}}const eJe=Re(KL),JL=ny(KL,["x","y","x2","y2","xOffset","yOffset","latitude","longitude","latitude2","longitude2","theta","theta2","radius","radius2"]),tJe=Re(JL),ZL={x:1,y:1},na=Re(ZL);function Sr(t){return t in ZL}const eI={theta:1,radius:1},nJe=Re(eI);function cC(t){return t==="width"?En:ur}const Ose={xOffset:1,yOffset:1};function b2(t){return t in Ose}const Dse=ny(JL,["text","tooltip","href","url","description","detail","key","order"]),rJe=Re(Dse);function iJe(t){return!!JL[t]}function sJe(t){switch(t){case qi:case ea:case ta:case ml:case zi:case yl:case J0:case Z0:return!0;case K0:case X0:case Ex:return!1}}const wse=Object.assign(Object.assign(Object.assign(Object.assign({},ZL),eI),Ose),Dse),fC=Re(wse);function tc(t){return!!wse[t]}function oJe(t,e){return aJe(t)[e]}const Nse={arc:"always",area:"always",bar:"always",circle:"always",geoshape:"always",image:"always",line:"always",rule:"always",point:"always",rect:"always",square:"always",trail:"always",text:"always",tick:"always"},uJe=ny(Nse,["geoshape"]);function aJe(t){switch(t){case qi:case ea:case ta:case lC:case sy:case oC:case Ax:case uC:case iy:case yl:case K0:case X0:case J0:case sC:case dl:case hl:return Nse;case En:case ur:case Y0:case _2:case Ju:case Zu:return uJe;case Po:case Ku:case jo:case Ks:return{area:"always",bar:"always",image:"always",rect:"always",rule:"always",circle:"binned",point:"binned",square:"binned",tick:"binned",line:"binned",trail:"binned"};case ml:return{point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",text:"always",line:"always",trail:"always"};case Z0:return{line:"always",point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",geoshape:"always"};case zi:return{point:"always",geoshape:"always"};case ry:return{text:"always"};case Ex:return{point:"always",square:"always",text:"always"};case aC:return{image:"always"};case Mo:return{text:"always",arc:"always"};case Xu:return{text:"always",arc:"always"};case gl:case pl:return{arc:"always"}}}function tI(t){switch(t){case En:case ur:case Mo:case Xu:case Y0:case _2:case ml:case Ex:case J0:case yl:case K0:case X0:case Po:case Ku:case gl:case pl:return;case sC:case dl:case hl:case zi:case Z0:case ry:case Ax:case uC:case aC:case lC:return"discrete";case qi:case ea:case ta:return"flexible";case Ju:case Zu:case jo:case Ks:case sy:case oC:case iy:return}}const lJe={argmax:1,argmin:1,average:1,count:1,distinct:1,product: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},cJe={count:1,min:1,max:1};function Al(t){return!!t&&!!t.argmin}function nc(t){return!!t&&!!t.argmax}function nI(t){return ze(t)&&!!lJe[t]}const fJe=new Set(["count","valid","missing","distinct"]);function Fse(t){return ze(t)&&fJe.has(t)}function xJe(t){return ze(t)&&Ot(["min","max"],t)}const dJe=new Set(["count","sum","distinct","valid","missing"]),hJe=new Set(["mean","average","median","q1","q3","min","max"]);function Lse(t){return yh(t)&&(t=wC(t,void 0)),"bin"+Re(t).map(e=>xC(t[e])?yn(`_${e}_${yx(t[e])}`):yn(`_${e}_${t[e]}`)).join("")}function en(t){return t===!0||_x(t)&&!t.binned}function yi(t){return t==="binned"||_x(t)&&t.binned===!0}function _x(t){return Qe(t)}function xC(t){return t==null?void 0:t.param}function Ise(t){switch(t){case dl:case hl:case ml:case qi:case ea:case ta:case J0:case yl:case K0:case X0:case zi:return 6;case Z0:return 4;default:return 10}}function oy(t){return t&&!!t.expr}function Qi(t){const e=Re(t||{}),n={};for(const r of e)n[r]=Es(t[r]);return n}var pJe=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function $se(t){const{anchor:e,frame:n,offset:r,orient:i,angle:s,limit:o,color:u,subtitleColor:a,subtitleFont:l,subtitleFontSize:c,subtitleFontStyle:f,subtitleFontWeight:x,subtitleLineHeight:d,subtitlePadding:p}=t,g=pJe(t,["anchor","frame","offset","orient","angle","limit","color","subtitleColor","subtitleFont","subtitleFontSize","subtitleFontStyle","subtitleFontWeight","subtitleLineHeight","subtitlePadding"]),m=Object.assign(Object.assign({},g),u?{fill:u}:{}),y=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e?{anchor:e}:{}),n?{frame:n}:{}),r?{offset:r}:{}),i?{orient:i}:{}),s!==void 0?{angle:s}:{}),o!==void 0?{limit:o}:{}),E=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a?{subtitleColor:a}:{}),l?{subtitleFont:l}:{}),c?{subtitleFontSize:c}:{}),f?{subtitleFontStyle:f}:{}),x?{subtitleFontWeight:x}:{}),d?{subtitleLineHeight:d}:{}),p?{subtitlePadding:p}:{}),A=ey(t,["align","baseline","dx","dy","limit"]);return{titleMarkConfig:m,subtitleMarkConfig:A,nonMarkTitleProperties:y,subtitle:E}}function rc(t){return ze(t)||be(t)&&ze(t[0])}function Ye(t){return t&&!!t.signal}function ic(t){return!!t.step}function gJe(t){return be(t)?!1:"fields"in t&&!("data"in t)}function mJe(t){return be(t)?!1:"fields"in t&&"data"in t}function vl(t){return be(t)?!1:"field"in t&&"data"in t}const yJe=Re({aria:1,description:1,ariaRole:1,ariaRoleDescription:1,blend:1,opacity:1,fill:1,fillOpacity:1,stroke:1,strokeCap:1,strokeWidth:1,strokeOpacity:1,strokeDash:1,strokeDashOffset:1,strokeJoin:1,strokeOffset:1,strokeMiterLimit:1,startAngle:1,endAngle:1,padAngle:1,innerRadius:1,outerRadius: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,lineBreak:1,lineHeight:1,cursor:1,href:1,tooltip:1,cornerRadius:1,cornerRadiusTopLeft:1,cornerRadiusTopRight:1,cornerRadiusBottomLeft:1,cornerRadiusBottomRight:1,aspect:1,width:1,height:1,url:1,smooth:1}),EJe={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},rI=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"];var iI=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Bse(t){const e=be(t.condition)?t.condition.map(kse):kse(t.condition);return Object.assign(Object.assign({},Es(t)),{condition:e})}function Es(t){if(oy(t)){const{expr:e}=t,n=iI(t,["expr"]);return Object.assign({signal:e},n)}return t}function kse(t){if(oy(t)){const{expr:e}=t,n=iI(t,["expr"]);return Object.assign({signal:e},n)}return t}function un(t){if(oy(t)){const{expr:e}=t,n=iI(t,["expr"]);return Object.assign({signal:e},n)}return Ye(t)?t:t!==void 0?{value:t}:void 0}function AJe(t){return Ye(t)?t.signal:Fe(t)}function Pse(t){return Ye(t)?t.signal:Fe(t.value)}function _l(t){return Ye(t)?t.signal:t==null?null:Fe(t)}function vJe(t,e,n){for(const r of n){const i=Sx(r,e.markDef,e.config);i!==void 0&&(t[r]=un(i))}return t}function Mse(t){var e;return[].concat(t.type,(e=t.style)!==null&&e!==void 0?e:[])}function jt(t,e,n,r={}){const{vgChannel:i,ignoreVgConfig:s}=r;return i&&e[i]!==void 0?e[i]:e[t]!==void 0?e[t]:s&&(!i||i===t)?void 0:Sx(t,e,n,r)}function Sx(t,e,n,{vgChannel:r}={}){return Qn(r?dC(t,e,n.style):void 0,dC(t,e,n.style),r?n[e.type][r]:void 0,n[e.type][t],r?n.mark[r]:n.mark[t])}function dC(t,e,n){return jse(t,Mse(e),n)}function jse(t,e,n){e=qe(e);let r;for(const i of e){const s=n[i];s&&s[t]!==void 0&&(r=s[t])}return r}function Use(t,e){return qe(t).reduce((n,r)=>{var i;return n.field.push(Ie(r,e)),n.order.push((i=r.sort)!==null&&i!==void 0?i:"ascending"),n},{field:[],order:[]})}function qse(t,e){const n=[...t];return e.forEach(r=>{for(const i of n)if(fl(i,r))return;n.push(r)}),n}function zse(t,e){return fl(t,e)||!e?t:t?[...qe(t),...qe(e)].join(", "):e}function Hse(t,e){const n=t.value,r=e.value;if(n==null||r===null)return{explicit:t.explicit,value:null};if((rc(n)||Ye(n))&&(rc(r)||Ye(r)))return{explicit:t.explicit,value:zse(n,r)};if(rc(n)||Ye(n))return{explicit:t.explicit,value:n};if(rc(r)||Ye(r))return{explicit:t.explicit,value:r};if(!rc(n)&&!Ye(n)&&!rc(r)&&!Ye(r))return{explicit:t.explicit,value:qse(n,r)};throw new Error("It should never reach here")}function sI(t){return`Invalid specification ${on(t)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}const _Je='Autosize "fit" only works for single views and layered views.';function Qse(t){return`${t=="width"?"Width":"Height"} "container" only works for single views and layered views.`}function Gse(t){const e=t=="width"?"Width":"Height",n=t=="width"?"x":"y";return`${e} "container" only works well with autosize "fit" or "fit-${n}".`}function Wse(t){return t?`Dropping "fit-${t}" because spec has discrete ${Hi(t)}.`:'Dropping "fit" because spec has discrete size.'}function oI(t){return`Unknown field for ${t}. Cannot calculate view size.`}function Vse(t){return`Cannot project a selection on encoding channel "${t}", which has no field.`}function SJe(t,e){return`Cannot project a selection on encoding channel "${t}" as it uses an aggregate function ("${e}").`}function bJe(t){return`The "nearest" transform is not supported for ${t} marks.`}function Yse(t){return`Selection not supported for ${t} yet.`}function CJe(t){return`Cannot find a selection named "${t}".`}const TJe="Scale bindings are currently only supported for scales with unbinned, continuous domains.",RJe="Legend bindings are only supported for selections over an individual field or encoding channel.";function OJe(t){return`Lookups can only be performed on selection parameters. "${t}" is a variable parameter.`}function DJe(t){return`Cannot define and lookup the "${t}" selection in the same view. Try moving the lookup into a second, layered view?`}const wJe="The same selection must be used to override scale domains in a layered view.",NJe='Interval selections should be initialized using "x" and/or "y" keys.';function FJe(t){return`Unknown repeated value "${t}".`}function Kse(t){return`The "columns" property cannot be used when "${t}" has nested row/column.`}const LJe="Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415).";function IJe(t){return`Unrecognized parse "${t}".`}function Xse(t,e,n){return`An ancestor parsed field "${t}" as ${n} but a child wants to parse the field as ${e}.`}const $Je="Attempt to add the same child twice.";function BJe(t){return`Ignoring an invalid transform: ${on(t)}.`}const kJe='If "from.fields" is not specified, "as" has to be a string that specifies the key to be used for the data from the secondary source.';function Jse(t){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${t} are dropped.`}function PJe(t){const{parentProjection:e,projection:n}=t;return`Layer's shared projection ${on(e)} is overridden by a child projection ${on(n)}.`}const MJe="Arc marks uses theta channel rather than angle, replacing angle with theta.";function jJe(t){return`${t}Offset dropped because ${t} is continuous`}function UJe(t){return`There is no ${t} encoding. Replacing ${t}Offset encoding as ${t}.`}function qJe(t,e,n){return`Channel ${t} is a ${e}. Converted to {value: ${on(n)}}.`}function Zse(t){return`Invalid field type "${t}".`}function zJe(t,e){return`Invalid field type "${t}" for aggregate: "${e}", using "quantitative" instead.`}function HJe(t){return`Invalid aggregation operator "${t}".`}function eoe(t,e){const{fill:n,stroke:r}=e;return`Dropping color ${t} as the plot also has ${n&&r?"fill and stroke":n?"fill":"stroke"}.`}function QJe(t){return`Position range does not support relative band size for ${t}.`}function uI(t,e){return`Dropping ${on(t)} from channel "${e}" since it does not contain any data field, datum, value, or signal.`}const GJe="Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.";function hC(t,e,n){return`${t} dropped as it is incompatible with "${e}".`}function WJe(t){return`${t} encoding has no scale, so specified scale is ignored.`}function VJe(t){return`${t}-encoding is dropped as ${t} is not a valid encoding channel.`}function YJe(t){return`${t} encoding should be discrete (ordinal / nominal / binned).`}function KJe(t){return`${t} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function XJe(t){return`Facet encoding dropped as ${t.join(" and ")} ${t.length>1?"are":"is"} also specified.`}function aI(t,e){return`Using discrete channel "${t}" to encode "${e}" field can be misleading as it does not encode ${e==="ordinal"?"order":"magnitude"}.`}function JJe(t){return`The ${t} for range marks cannot be an expression`}function ZJe(t,e){return`Line mark is for continuous lines and thus cannot be used with ${t&&e?"x2 and y2":t?"x2":"y2"}. We will use the rule mark (line segments) instead.`}function eZe(t,e){return`Specified orient "${t}" overridden with "${e}".`}function tZe(t){return`Cannot use the scale property "${t}" with non-color channel.`}function nZe(t){return`Cannot use the relative band size with ${t} scale.`}function rZe(t){return`Using unaggregated domain with raw field has no effect (${on(t)}).`}function iZe(t){return`Unaggregated domain not applicable for "${t}" since it produces values outside the origin domain of the source data.`}function sZe(t){return`Unaggregated domain is currently unsupported for log scale (${on(t)}).`}function oZe(t){return`Cannot apply size to non-oriented mark "${t}".`}function uZe(t,e,n){return`Channel "${t}" does not work with "${e}" scale. We are using "${n}" scale instead.`}function aZe(t,e){return`FieldDef does not work with "${t}" scale. We are using "${e}" scale instead.`}function toe(t,e,n){return`${n}-scale's "${e}" is dropped as it does not work with ${t} scale.`}function noe(t){return`The step for "${t}" is dropped because the ${t==="width"?"x":"y"} is continuous.`}function lZe(t,e,n,r){return`Conflicting ${e.toString()} property "${t.toString()}" (${on(n)} and ${on(r)}). Using ${on(n)}.`}function cZe(t,e,n,r){return`Conflicting ${e.toString()} property "${t.toString()}" (${on(n)} and ${on(r)}). Using the union of the two domains.`}function fZe(t){return`Setting the scale to be independent for "${t}" means we also have to set the guide (axis or legend) to be independent.`}function xZe(t){return`Dropping sort property ${on(t)} as unioned domains only support boolean or op "count", "min", and "max".`}const roe="Domains that should be unioned has conflicting sort properties. Sort will be set to true.",dZe="Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect.",hZe="Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect.",pZe="Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.";function gZe(t){return`Cannot stack "${t}" if there is already "${t}2".`}function mZe(t){return`Cannot stack non-linear scale (${t}).`}function yZe(t){return`Stacking is applied even though the aggregate function is non-summative ("${t}").`}function pC(t,e){return`Invalid ${t}: ${on(e)}.`}function EZe(t){return`Dropping day from datetime ${on(t)} as day cannot be combined with other units.`}function AZe(t,e){return`${e?"extent ":""}${e&&t?"and ":""}${t?"center ":""}${e&&t?"are ":"is "}not needed when data are aggregated.`}function vZe(t,e,n){return`${t} is not usually used with ${e} for ${n}.`}function _Ze(t,e){return`Continuous axis should not have customized aggregation function ${t}; ${e} already agregates the axis.`}function ioe(t){return`1D error band does not support ${t}.`}function soe(t){return`Channel ${t} is required for "binned" bin.`}function SZe(t){return`Channel ${t} should not be used with "binned" bin.`}function bZe(t){return`Domain for ${t} is required for threshold scale.`}const ooe=DW(OW);let C2=ooe;function CZe(t){return C2=t,C2}function TZe(){return C2=ooe,C2}function Oe(...t){C2.warn(...t)}function RZe(...t){C2.debug(...t)}function bx(t){if(t&&Qe(t)){for(const e of cI)if(e in t)return!0}return!1}const uoe=["january","february","march","april","may","june","july","august","september","october","november","december"],OZe=uoe.map(t=>t.substr(0,3)),aoe=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],DZe=aoe.map(t=>t.substr(0,3));function wZe(t){if(VL(t)&&(t=+t),rn(t))return t>4&&Oe(pC("quarter",t)),t-1;throw new Error(pC("quarter",t))}function NZe(t){if(VL(t)&&(t=+t),rn(t))return t-1;{const e=t.toLowerCase(),n=uoe.indexOf(e);if(n!==-1)return n;const r=e.substr(0,3),i=OZe.indexOf(r);if(i!==-1)return i;throw new Error(pC("month",t))}}function FZe(t){if(VL(t)&&(t=+t),rn(t))return t%7;{const e=t.toLowerCase(),n=aoe.indexOf(e);if(n!==-1)return n;const r=e.substr(0,3),i=DZe.indexOf(r);if(i!==-1)return i;throw new Error(pC("day",t))}}function lI(t,e){const n=[];if(e&&t.day!==void 0&&Re(t).length>1&&(Oe(EZe(t)),t=ct(t),delete t.day),t.year!==void 0?n.push(t.year):n.push(2012),t.month!==void 0){const r=e?NZe(t.month):t.month;n.push(r)}else if(t.quarter!==void 0){const r=e?wZe(t.quarter):t.quarter;n.push(rn(r)?r*3:`${r}*3`)}else n.push(0);if(t.date!==void 0)n.push(t.date);else if(t.day!==void 0){const r=e?FZe(t.day):t.day;n.push(rn(r)?r+1:`${r}+1`)}else n.push(1);for(const r of["hours","minutes","seconds","milliseconds"]){const i=t[r];n.push(typeof i>"u"?0:i)}return n}function uy(t){const n=lI(t,!0).join(", ");return t.utc?`utc(${n})`:`datetime(${n})`}function LZe(t){const n=lI(t,!1).join(", ");return t.utc?`utc(${n})`:`datetime(${n})`}function IZe(t){const e=lI(t,!0);return t.utc?+new Date(Date.UTC(...e)):+new Date(...e)}var $Ze=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const loe={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},cI=Re(loe);function BZe(t){return!!loe[t]}function fI(t){return t.startsWith("utc")}function kZe(t){return t.substr(3)}const PZe={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function xI(t){return cI.filter(e=>coe(t,e))}function coe(t,e){const n=t.indexOf(e);return!(n<0||n>0&&e==="seconds"&&t.charAt(n-1)==="i"||t.length>n+3&&e==="day"&&t.charAt(n+3)==="o"||n>0&&e==="year"&&t.charAt(n-1)==="f")}function MZe(t,e,{end:n}={end:!1}){const r=Ese(e),i=fI(t)?"utc":"";function s(a){return a==="quarter"?`(${i}quarter(${r})-1)`:`${i}${a}(${r})`}let o;const u={};for(const a of cI)coe(t,a)&&(u[a]=s(a),o=a);return n&&(u[o]+="+1"),LZe(u)}function foe(t){if(!t)return;const e=xI(t);return`timeUnitSpecifier(${on(e)}, ${on(PZe)})`}function jZe(t,e,n){if(!t)return;const r=foe(t);return`${n||fI(t)?"utc":"time"}Format(${e}, ${r})`}function Ei(t){if(!t)return;let e;return ze(t)?e={unit:t}:Qe(t)&&(e=Object.assign(Object.assign({},t),t.unit?{unit:t.unit}:{})),fI(e.unit)&&(e.utc=!0,e.unit=kZe(e.unit)),e}function UZe(t){const e=Ei(t),{utc:n}=e,r=$Ze(e,["utc"]);return r.unit?(n?"utc":"")+Re(r).map(i=>yn(`${i==="unit"?"":`_${i}_`}${r[i]}`)).join(""):(n?"utc":"")+"timeunit"+Re(r).map(i=>yn(`_${i}_${r[i]}`)).join("")}function qZe(t){return t==null?void 0:t.param}function dI(t){return t&&!!t.field&&t.equal!==void 0}function hI(t){return t&&!!t.field&&t.lt!==void 0}function pI(t){return t&&!!t.field&&t.lte!==void 0}function gI(t){return t&&!!t.field&&t.gt!==void 0}function mI(t){return t&&!!t.field&&t.gte!==void 0}function yI(t){if(t!=null&&t.field){if(be(t.range)&&t.range.length===2)return!0;if(Ye(t.range))return!0}return!1}function EI(t){return t&&!!t.field&&(be(t.oneOf)||be(t.in))}function zZe(t){return t&&!!t.field&&t.valid!==void 0}function xoe(t){return EI(t)||dI(t)||yI(t)||hI(t)||gI(t)||pI(t)||mI(t)}function ra(t,e){return NC(t,{timeUnit:e,wrapTime:!0})}function HZe(t,e){return t.map(n=>ra(n,e))}function doe(t,e=!0){var n;const{field:r}=t,i=(n=Ei(t.timeUnit))===null||n===void 0?void 0:n.unit,s=i?`time(${MZe(i,r)})`:Ie(t,{expr:"datum"});if(dI(t))return`${s}===${ra(t.equal,i)}`;if(hI(t)){const o=t.lt;return`${s}<${ra(o,i)}`}else if(gI(t)){const o=t.gt;return`${s}>${ra(o,i)}`}else if(pI(t)){const o=t.lte;return`${s}<=${ra(o,i)}`}else if(mI(t)){const o=t.gte;return`${s}>=${ra(o,i)}`}else{if(EI(t))return`indexof([${HZe(t.oneOf,i).join(",")}], ${s}) !== -1`;if(zZe(t))return AI(s,t.valid);if(yI(t)){const{range:o}=t,u=Ye(o)?{signal:`${o.signal}[0]`}:o[0],a=Ye(o)?{signal:`${o.signal}[1]`}:o[1];if(u!==null&&a!==null&&e)return"inrange("+s+", ["+ra(u,i)+", "+ra(a,i)+"])";const l=[];return u!==null&&l.push(`${s} >= ${ra(u,i)}`),a!==null&&l.push(`${s} <= ${ra(a,i)}`),l.length>0?l.join(" && "):"true"}}throw new Error(`Invalid field predicate: ${on(t)}`)}function AI(t,e=!0){return e?`isValid(${t}) && isFinite(+${t})`:`!isValid(${t}) || !isFinite(+${t})`}function QZe(t){var e;return xoe(t)&&t.timeUnit?Object.assign(Object.assign({},t),{timeUnit:(e=Ei(t.timeUnit))===null||e===void 0?void 0:e.unit}):t}const ay={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"};function GZe(t){return t==="quantitative"||t==="temporal"}function hoe(t){return t==="ordinal"||t==="nominal"}const Cx=ay.quantitative,vI=ay.ordinal,T2=ay.temporal,_I=ay.nominal,R2=ay.geojson;function WZe(t){if(t)switch(t=t.toLowerCase(),t){case"q":case Cx:return"quantitative";case"t":case T2:return"temporal";case"o":case vI:return"ordinal";case"n":case _I:return"nominal";case R2:return"geojson"}}var VZe=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Gi={LINEAR:"linear",LOG:"log",POW:"pow",SQRT:"sqrt",SYMLOG:"symlog",IDENTITY:"identity",SEQUENTIAL:"sequential",TIME:"time",UTC:"utc",QUANTILE:"quantile",QUANTIZE:"quantize",THRESHOLD:"threshold",BIN_ORDINAL:"bin-ordinal",ORDINAL:"ordinal",POINT:"point",BAND:"band"},SI={linear:"numeric",log:"numeric",pow:"numeric",sqrt:"numeric",symlog:"numeric",identity:"numeric",sequential:"numeric",time:"time",utc:"time",ordinal:"ordinal","bin-ordinal":"bin-ordinal",point:"ordinal-position",band:"ordinal-position",quantile:"discretizing",quantize:"discretizing",threshold:"discretizing"};function YZe(t,e){const n=SI[t],r=SI[e];return n===r||n==="ordinal-position"&&r==="time"||r==="ordinal-position"&&n==="time"}const KZe={linear:0,log:1,pow:1,sqrt:1,symlog:1,identity:1,sequential:1,time:0,utc:0,point:10,band:11,ordinal:0,"bin-ordinal":0,quantile:0,quantize:0,threshold:0};function poe(t){return KZe[t]}const goe=new Set(["linear","log","pow","sqrt","symlog"]),moe=new Set([...goe,"time","utc"]);function yoe(t){return goe.has(t)}const Eoe=new Set(["quantile","quantize","threshold"]),XZe=new Set([...moe,...Eoe,"sequential","identity"]),JZe=new Set(["ordinal","bin-ordinal","point","band"]);function ar(t){return JZe.has(t)}function As(t){return XZe.has(t)}function Uo(t){return moe.has(t)}function O2(t){return Eoe.has(t)}const ZZe={pointPadding:.5,barBandPaddingInner:.1,rectBandPaddingInner:0,bandWithNestedOffsetPaddingInner:.2,bandWithNestedOffsetPaddingOuter:.2,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:9,minStrokeWidth:1,maxStrokeWidth:4,quantileCount:4,quantizeCount:4};function eet(t){return!ze(t)&&!!t.name}function Aoe(t){return t==null?void 0:t.param}function tet(t){return t&&t.unionWith}function net(t){return Qe(t)&&"field"in t}const ret=VZe({type:1,domain:1,domainMax:1,domainMin:1,domainMid:1,align:1,range:1,rangeMax:1,rangeMin:1,scheme:1,bins:1,reverse:1,round:1,clamp:1,nice:1,base:1,exponent:1,constant:1,interpolate:1,zero:1,padding:1,paddingInner:1,paddingOuter:1},["type","domain","range","rangeMax","rangeMin","scheme"]),iet=Re(ret);function bI(t,e){switch(e){case"type":case"domain":case"reverse":case"range":return!0;case"scheme":case"interpolate":return!["point","band","identity"].includes(t);case"bins":return!["point","band","identity","ordinal"].includes(t);case"round":return Uo(t)||t==="band"||t==="point";case"padding":case"rangeMin":case"rangeMax":return Uo(t)||["point","band"].includes(t);case"paddingOuter":case"align":return["point","band"].includes(t);case"paddingInner":return t==="band";case"domainMax":case"domainMid":case"domainMin":case"clamp":return Uo(t);case"nice":return Uo(t)||t==="quantize"||t==="threshold";case"exponent":return t==="pow";case"base":return t==="log";case"constant":return t==="symlog";case"zero":return As(t)&&!Ot(["log","time","utc","threshold","quantile"],t)}}function voe(t,e){switch(e){case"interpolate":case"scheme":case"domainMid":return S2(t)?void 0:tZe(t);case"align":case"type":case"bins":case"domain":case"domainMax":case"domainMin":case"range":case"base":case"exponent":case"constant":case"nice":case"padding":case"paddingInner":case"paddingOuter":case"rangeMax":case"rangeMin":case"reverse":case"round":case"clamp":case"zero":return}}function set(t,e){return Ot([vI,_I],e)?t===void 0||ar(t):e===T2?Ot([Gi.TIME,Gi.UTC,void 0],t):e===Cx?yoe(t)||O2(t)||t===void 0:!0}function oet(t,e,n=!1){if(!tc(t))return!1;switch(t){case En:case ur:case Y0:case _2:case Mo:case Xu:return Uo(e)||e==="band"?!0:e==="point"?!n:!1;case ml:case J0:case yl:case K0:case X0:case Ex:return Uo(e)||O2(e)||Ot(["band","point","ordinal"],e);case qi:case ea:case ta:return e!=="band";case Z0:case zi:return e==="ordinal"||O2(e)}}const Ai={arc:"arc",area:"area",bar:"bar",image:"image",line:"line",point:"point",rect:"rect",rule:"rule",text:"text",tick:"tick",trail:"trail",circle:"circle",square:"square",geoshape:"geoshape"},_oe=Ai.arc,gC=Ai.area,mC=Ai.bar,uet=Ai.image,yC=Ai.line,EC=Ai.point,aet=Ai.rect,AC=Ai.rule,Soe=Ai.text,CI=Ai.tick,cet=Ai.trail,TI=Ai.circle,RI=Ai.square,boe=Ai.geoshape;function sc(t){return["line","area","trail"].includes(t)}function Coe(t){return["rect","bar","image","arc"].includes(t)}const fet=new Set(Re(Ai));function ia(t){return t.type}const xet=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit"],det=["fill","fillOpacity"],het=[...xet,...det],Toe=Re({color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBandSize:1,timeUnitBandPosition:1}),pet={area:["line","point"],bar:["binSpacing","continuousBandSize","discreteBandSize"],rect:["binSpacing","continuousBandSize","discreteBandSize"],line:["point"],tick:["bandSize","thickness"]},get={color:"#4c78a8",invalid:"filter",timeUnitBandSize:1},Roe=Re({mark:1,arc:1,area:1,bar:1,circle:1,image:1,line:1,point:1,rect:1,rule:1,square:1,text:1,tick:1,trail:1,geoshape:1});function D2(t){return t&&t.band!=null}const met={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]},Ooe=5,yet={binSpacing:1,continuousBandSize:Ooe,timeUnitBandPosition:.5},Eet={binSpacing:0,continuousBandSize:Ooe,timeUnitBandPosition:.5},Aet={thickness:1};function vet(t){return ia(t)?t.type:t}function OI(t){const{channel:e,channelDef:n,markDef:r,scale:i,config:s}=t,o=wI(t);return Le(n)&&!Fse(n.aggregate)&&i&&Uo(i.get("type"))?_et({fieldDef:n,channel:e,markDef:r,ref:o,config:s}):o}function _et({fieldDef:t,channel:e,markDef:n,ref:r,config:i}){return sc(n.type)?r:jt("invalid",n,i)===null?[bet(t,e),r]:r}function bet(t,e){const n=DI(t,!0),i=vx(e)==="y"?{field:{group:"height"}}:{value:0};return Object.assign({test:n},i)}function DI(t,e=!0){return AI(ze(t)?t:Ie(t,{expr:"datum"}),!e)}function Cet(t){const{datum:e}=t;return bx(e)?uy(e):`${on(e)}`}function Tx(t,e,n,r){const i={};if(e&&(i.scale=e),oa(t)){const{datum:s}=t;bx(s)?i.signal=uy(s):Ye(s)?i.signal=s.signal:oy(s)?i.signal=s.expr:i.value=s}else i.field=Ie(t,n);if(r){const{offset:s,band:o}=r;s&&(i.offset=s),o&&(i.band=o)}return i}function vC({scaleName:t,fieldOrDatumDef:e,fieldOrDatumDef2:n,offset:r,startSuffix:i,bandPosition:s=.5}){const o=0<s&&s<1?"datum":void 0,u=Ie(e,{expr:o,suffix:i}),a=n!==void 0?Ie(n,{expr:o}):Ie(e,{suffix:"end",expr:o}),l={};if(s===0||s===1){l.scale=t;const c=s===0?u:a;l.field=c}else{const c=Ye(s)?`${s.signal} * ${u} + (1-${s.signal}) * ${a}`:`${s} * ${u} + ${1-s} * ${a}`;l.signal=`scale("${t}", ${c})`}return r&&(l.offset=r),l}function wI({channel:t,channelDef:e,channel2Def:n,markDef:r,config:i,scaleName:s,scale:o,stack:u,offset:a,defaultRef:l,bandPosition:c}){var f;if(e){if(ut(e)){const x=o==null?void 0:o.get("type");if(Js(e)){c??(c=joe({fieldDef:e,fieldDef2:n,markDef:r,config:i}));const{bin:d,timeUnit:p,type:g}=e;if(en(d)||c&&p&&g===T2)return u!=null&&u.impute?Tx(e,s,{binSuffix:"mid"},{offset:a}):c&&!ar(x)?vC({scaleName:s,fieldOrDatumDef:e,bandPosition:c,offset:a}):Tx(e,s,xy(e,t)?{binSuffix:"range"}:{},{offset:a});if(yi(d)){if(Le(n))return vC({scaleName:s,fieldOrDatumDef:e,fieldOrDatumDef2:n,bandPosition:c,offset:a});Oe(soe(t===En?Po:Ku))}}return Tx(e,s,ar(x)?{binSuffix:"range"}:{},{offset:a,band:x==="band"?(f=c??e.bandPosition)!==null&&f!==void 0?f:.5:void 0})}else if(qo(e)){const x=e.value,d=a?{offset:a}:{};return Object.assign(Object.assign({},ly(t,x)),d)}}return dt(l)&&(l=l()),l&&Object.assign(Object.assign({},l),a?{offset:a}:{})}function ly(t,e){return Ot(["x","x2"],t)&&e==="width"?{field:{group:"width"}}:Ot(["y","y2"],t)&&e==="height"?{field:{group:"height"}}:un(e)}function Rx(t){return t&&t!=="number"&&t!=="time"}function Doe(t,e,n){return`${t}(${e}${n?`, ${on(n)}`:""})`}const Tet=" – ";function NI({fieldOrDatumDef:t,format:e,formatType:n,expr:r,normalizeStack:i,config:s}){var o,u;if(Rx(n))return FI({fieldOrDatumDef:t,format:e,formatType:n,expr:r,config:s});const a=woe(t,r,i);if(F2(t)){const l=Oet(a,Le(t)?(o=Ei(t.timeUnit))===null||o===void 0?void 0:o.unit:void 0,e,s.timeFormat,Ox(t)&&((u=t.scale)===null||u===void 0?void 0:u.type)===Gi.UTC);return l?{signal:l}:void 0}if(e=Loe(BI(t),e,s),Le(t)&&en(t.bin)){const l=Ie(t,{expr:r,binSuffix:"end"});return{signal:_C(a,l,e,n,s)}}else return e||BI(t)==="quantitative"?{signal:`${Ioe(a,e)}`}:{signal:`isValid(${a}) ? ${a} : ""+${a}`}}function woe(t,e,n){return Le(t)?n?`${Ie(t,{expr:e,suffix:"end"})}-${Ie(t,{expr:e,suffix:"start"})}`:Ie(t,{expr:e}):Cet(t)}function FI({fieldOrDatumDef:t,format:e,formatType:n,expr:r,normalizeStack:i,config:s,field:o}){if(o??(o=woe(t,r,i)),Le(t)&&en(t.bin)){const u=Ie(t,{expr:r,binSuffix:"end"});return{signal:_C(o,u,e,n,s)}}return{signal:Doe(n,o,e)}}function Noe(t,e,n,r,i,s){var o;if(!Rx(r)){if(F2(t)){const u=Le(t)?(o=Ei(t.timeUnit))===null||o===void 0?void 0:o.unit:void 0;return Ret(n,u,i,s)}return Loe(e,n,i)}}function Foe(t,e,n){if(t&&(Ye(t)||t==="number"||t==="time"))return t;if(F2(e)&&n!=="time"&&n!=="utc")return"time"}function Loe(t,e,n){if(ze(e))return e;if(t===Cx)return n.numberFormat}function Ret(t,e,n,r){return t||(e?{signal:foe(e)}:r?void 0:n.timeFormat)}function Ioe(t,e){return`format(${t}, "${e||""}")`}function $oe(t,e,n,r){var i;return Rx(n)?Doe(n,t,e):Ioe(t,(i=ze(e)?e:void 0)!==null&&i!==void 0?i:r.numberFormat)}function _C(t,e,n,r,i){const s=$oe(t,n,r,i),o=$oe(e,n,r,i);return`${AI(t,!1)} ? "null" : ${s} + "${Tet}" + ${o}`}function Oet(t,e,n,r,i){return!e||n?(n=ze(n)?n:r,`${i?"utc":"time"}Format(${t}, '${n}')`):jZe(e,t,i)}const SC="min",Det={x:1,y:1,color:1,fill:1,stroke:1,strokeWidth:1,size:1,shape:1,fillOpacity:1,strokeOpacity:1,opacity:1,text:1};function Boe(t){return t in Det}function koe(t){return!!t&&!!t.encoding}function sa(t){return!!t&&(t.op==="count"||!!t.field)}function Poe(t){return!!t&&be(t)}function cy(t){return"row"in t||"column"in t}function LI(t){return!!t&&"header"in t}function bC(t){return"facet"in t}var II=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function wet(t){return t.param}function Net(t){return t&&!ze(t)&&"repeat"in t}function Moe(t){const{field:e,timeUnit:n,bin:r,aggregate:i}=t;return Object.assign(Object.assign(Object.assign(Object.assign({},n?{timeUnit:n}:{}),r?{bin:r}:{}),i?{aggregate:i}:{}),{field:e})}function $I(t){return"sort"in t}function joe({fieldDef:t,fieldDef2:e,markDef:n,config:r}){if(ut(t)&&t.bandPosition!==void 0)return t.bandPosition;if(Le(t)){const{timeUnit:i,bin:s}=t;if(i&&!e)return Coe(n.type)?0:Sx("timeUnitBandPosition",n,r);if(en(s))return .5}}function Uoe({channel:t,fieldDef:e,fieldDef2:n,markDef:r,config:i,scaleType:s,useVlSizeChannel:o}){var u,a,l;const c=Hi(t),f=jt(o?"size":c,r,i,{vgChannel:c});if(f!==void 0)return f;if(Le(e)){const{timeUnit:x,bin:d}=e;if(x&&!n)return{band:Sx("timeUnitBandSize",r,i)};if(en(d)&&!ar(s))return{band:1}}if(Coe(r.type))return s?ar(s)?((u=i[r.type])===null||u===void 0?void 0:u.discreteBandSize)||{band:1}:(a=i[r.type])===null||a===void 0?void 0:a.continuousBandSize:(l=i[r.type])===null||l===void 0?void 0:l.discreteBandSize}function qoe(t,e,n,r){return en(t.bin)||t.timeUnit&&Js(t)&&t.type==="temporal"?joe({fieldDef:t,fieldDef2:e,markDef:n,config:r})!==void 0:!1}function CC(t){return t&&"condition"in t}function TC(t){const e=t&&t.condition;return!!e&&!be(e)&&Le(e)}function fy(t){const e=t&&t.condition;return!!e&&!be(e)&&ut(e)}function Fet(t){const e=t&&t.condition;return!!e&&(be(e)||qo(e))}function Le(t){return t&&(!!t.field||t.aggregate==="count")}function BI(t){return t&&t.type}function oa(t){return t&&"datum"in t}function ua(t){return Js(t)&&!RC(t)||kI(t)}function kI(t){return oa(t)&&rn(t.datum)}function ut(t){return Le(t)||oa(t)}function Js(t){return t&&("field"in t||t.aggregate==="count")&&"type"in t}function qo(t){return t&&"value"in t&&"value"in t}function Ox(t){return t&&("scale"in t||"sort"in t)}function PI(t){return t&&("axis"in t||"stack"in t||"impute"in t)}function zoe(t){return t&&"legend"in t}function Hoe(t){return t&&("format"in t||"formatType"in t)}function Let(t){return Ys(t,["legend","axis","header","scale"])}function Iet(t){return"op"in t}function Ie(t,e={}){var n,r,i;let s=t.field;const o=e.prefix;let u=e.suffix,a="";if(Bet(t))s=qXe("count");else{let l;if(!e.nofn)if(Iet(t))l=t.op;else{const{bin:c,aggregate:f,timeUnit:x}=t;en(c)?(l=Lse(c),u=((n=e.binSuffix)!==null&&n!==void 0?n:"")+((r=e.suffix)!==null&&r!==void 0?r:"")):f?nc(f)?(a=`["${s}"]`,s=`argmax_${f.argmax}`):Al(f)?(a=`["${s}"]`,s=`argmin_${f.argmin}`):l=String(f):x&&(l=UZe(x),u=(!["range","mid"].includes(e.binSuffix)&&e.binSuffix||"")+((i=e.suffix)!==null&&i!==void 0?i:""))}l&&(s=s?`${l}_${s}`:l)}return u&&(s=`${s}_${u}`),o&&(s=`${o}_${s}`),e.forAs?Ase(s):e.expr?PXe(s,e.expr)+a:ko(s)+a}function RC(t){switch(t.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return Le(t)&&!!t.bin;case"temporal":return!1}throw new Error(Zse(t.type))}function $et(t){var e;return Ox(t)&&O2((e=t.scale)===null||e===void 0?void 0:e.type)}function Bet(t){return t.aggregate==="count"}function ket(t,e){var n;const{field:r,bin:i,timeUnit:s,aggregate:o}=t;if(o==="count")return e.countTitle;if(en(i))return`${r} (binned)`;if(s){const u=(n=Ei(s))===null||n===void 0?void 0:n.unit;if(u)return`${r} (${xI(u).join("-")})`}else if(o)return nc(o)?`${r} for max ${o.argmax}`:Al(o)?`${r} for min ${o.argmin}`:`${rC(o)} of ${r}`;return r}function Pet(t){const{aggregate:e,bin:n,timeUnit:r,field:i}=t;if(nc(e))return`${i} for argmax(${e.argmax})`;if(Al(e))return`${i} for argmin(${e.argmin})`;const s=Ei(r),o=e||(s==null?void 0:s.unit)||(s==null?void 0:s.maxbins)&&"timeunit"||en(n)&&"bin";return o?`${o.toUpperCase()}(${i})`:i}const Qoe=(t,e)=>{switch(e.fieldTitle){case"plain":return t.field;case"functional":return Pet(t);default:return ket(t,e)}};let Goe=Qoe;function Woe(t){Goe=t}function Met(){Woe(Qoe)}function w2(t,e,{allowDisabling:n,includeDefault:r=!0}){var i,s;const o=(i=MI(t))===null||i===void 0?void 0:i.title;if(!Le(t))return o??t.title;const u=t,a=r?jI(u,e):void 0;return n?Qn(o,u.title,a):(s=o??u.title)!==null&&s!==void 0?s:a}function MI(t){if(PI(t)&&t.axis)return t.axis;if(zoe(t)&&t.legend)return t.legend;if(LI(t)&&t.header)return t.header}function jI(t,e){return Goe(t,e)}function OC(t){var e;if(Hoe(t)){const{format:n,formatType:r}=t;return{format:n,formatType:r}}else{const n=(e=MI(t))!==null&&e!==void 0?e:{},{format:r,formatType:i}=n;return{format:r,formatType:i}}}function jet(t,e){var n;switch(e){case"latitude":case"longitude":return"quantitative";case"row":case"column":case"facet":case"shape":case"strokeDash":return"nominal";case"order":return"ordinal"}if($I(t)&&be(t.sort))return"ordinal";const{aggregate:r,bin:i,timeUnit:s}=t;if(s)return"temporal";if(i||r&&!nc(r)&&!Al(r))return"quantitative";if(Ox(t)&&(!((n=t.scale)===null||n===void 0)&&n.type))switch(SI[t.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}function aa(t){if(Le(t))return t;if(TC(t))return t.condition}function Gn(t){if(ut(t))return t;if(fy(t))return t.condition}function Voe(t,e,n,r={}){if(ze(t)||rn(t)||yh(t)){const i=ze(t)?"string":rn(t)?"number":"boolean";return Oe(qJe(e,i,t)),{value:t}}return ut(t)?DC(t,e,n,r):fy(t)?Object.assign(Object.assign({},t),{condition:DC(t.condition,e,n,r)}):t}function DC(t,e,n,r){if(Hoe(t)){const{format:i,formatType:s}=t,o=II(t,["format","formatType"]);if(Rx(s)&&!n.customFormatTypes)return Oe(Jse(e)),DC(o,e,n,r)}else{const i=PI(t)?"axis":zoe(t)?"legend":LI(t)?"header":null;if(i&&t[i]){const s=t[i],{format:o,formatType:u}=s,a=II(s,["format","formatType"]);if(Rx(u)&&!n.customFormatTypes)return Oe(Jse(e)),DC(Object.assign(Object.assign({},t),{[i]:a}),e,n,r)}}return Le(t)?UI(t,e,r):Uet(t)}function Uet(t){let e=t.type;if(e)return t;const{datum:n}=t;return e=rn(n)?"quantitative":ze(n)?"nominal":bx(n)?"temporal":void 0,Object.assign(Object.assign({},t),{type:e})}function UI(t,e,{compositeMark:n=!1}={}){const{aggregate:r,timeUnit:i,bin:s,field:o}=t,u=Object.assign({},t);if(!n&&r&&!nI(r)&&!nc(r)&&!Al(r)&&(Oe(HJe(r)),delete u.aggregate),i&&(u.timeUnit=Ei(i)),o&&(u.field=`${o}`),en(s)&&(u.bin=wC(s,e)),yi(s)&&!Sr(e)&&Oe(SZe(e)),Js(u)){const{type:a}=u,l=WZe(a);a!==l&&(u.type=l),a!=="quantitative"&&Fse(r)&&(Oe(zJe(a,r)),u.type="quantitative")}else if(!Cse(e)){const a=jet(u,e);u.type=a}if(Js(u)){const{compatible:a,warning:l}=qet(u,e)||{};a===!1&&Oe(l)}if($I(u)&&ze(u.sort)){const{sort:a}=u;if(Boe(a))return Object.assign(Object.assign({},u),{sort:{encoding:a}});const l=a.substr(1);if(a.charAt(0)==="-"&&Boe(l))return Object.assign(Object.assign({},u),{sort:{encoding:l,order:"descending"}})}if(LI(u)){const{header:a}=u;if(a){const{orient:l}=a,c=II(a,["orient"]);if(l)return Object.assign(Object.assign({},u),{header:Object.assign(Object.assign({},c),{labelOrient:a.labelOrient||l,titleOrient:a.titleOrient||l})})}}return u}function wC(t,e){return yh(t)?{maxbins:Ise(e)}:t==="binned"?{binned:!0}:!t.maxbins&&!t.step?Object.assign(Object.assign({},t),{maxbins:Ise(e)}):t}const N2={compatible:!0};function qet(t,e){const n=t.type;if(n==="geojson"&&e!=="shape")return{compatible:!1,warning:`Channel ${e} should not be used with a geojson data.`};switch(e){case dl:case hl:case sC:return RC(t)?N2:{compatible:!1,warning:YJe(e)};case En:case ur:case Y0:case _2:case qi:case ea:case ta:case ry:case sy:case oC:case Ax:case uC:case aC:case Ex:case Mo:case Xu:case lC:return N2;case Zu:case Ks:case Ju:case jo:return n!==Cx?{compatible:!1,warning:`Channel ${e} should be used with a quantitative field only, not ${t.type} field.`}:N2;case yl:case K0:case X0:case J0:case ml:case gl:case pl:case Po:case Ku:return n==="nominal"&&!t.sort?{compatible:!1,warning:`Channel ${e} should not be used with an unsorted discrete field.`}:N2;case zi:case Z0:return!RC(t)&&!$et(t)?{compatible:!1,warning:KJe(e)}:N2;case iy:return t.type==="nominal"&&!("sort"in t)?{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}:N2}}function F2(t){const{formatType:e}=OC(t);return e==="time"||!e&&zet(t)}function zet(t){return t&&(t.type==="temporal"||Le(t)&&!!t.timeUnit)}function NC(t,{timeUnit:e,type:n,wrapTime:r,undefinedIfExprNotRequired:i}){var s;const o=e&&((s=Ei(e))===null||s===void 0?void 0:s.unit);let u=o||n==="temporal",a;return oy(t)?a=t.expr:Ye(t)?a=t.signal:bx(t)?(u=!0,a=uy(t)):(ze(t)||rn(t))&&u&&(a=`datetime(${on(t)})`,BZe(o)&&(rn(t)&&t<1e4||ze(t)&&isNaN(Date.parse(t)))&&(a=uy({[o]:t}))),a?r&&u?`time(${a})`:a:i?void 0:on(t)}function Yoe(t,e){const{type:n}=t;return e.map(r=>{const i=NC(r,{timeUnit:Le(t)?t.timeUnit:void 0,type:n,undefinedIfExprNotRequired:!0});return i!==void 0?{signal:i}:r})}function xy(t,e){return en(t.bin)?tc(e)&&["ordinal","nominal"].includes(t.type):(console.warn("Only call this method for binned field defs."),!1)}const Koe={labelAlign:{part:"labels",vgProp:"align"},labelBaseline:{part:"labels",vgProp:"baseline"},labelColor:{part:"labels",vgProp:"fill"},labelFont:{part:"labels",vgProp:"font"},labelFontSize:{part:"labels",vgProp:"fontSize"},labelFontStyle:{part:"labels",vgProp:"fontStyle"},labelFontWeight:{part:"labels",vgProp:"fontWeight"},labelOpacity:{part:"labels",vgProp:"opacity"},labelOffset:null,labelPadding:null,gridColor:{part:"grid",vgProp:"stroke"},gridDash:{part:"grid",vgProp:"strokeDash"},gridDashOffset:{part:"grid",vgProp:"strokeDashOffset"},gridOpacity:{part:"grid",vgProp:"opacity"},gridWidth:{part:"grid",vgProp:"strokeWidth"},tickColor:{part:"ticks",vgProp:"stroke"},tickDash:{part:"ticks",vgProp:"strokeDash"},tickDashOffset:{part:"ticks",vgProp:"strokeDashOffset"},tickOpacity:{part:"ticks",vgProp:"opacity"},tickSize:null,tickWidth:{part:"ticks",vgProp:"strokeWidth"}};function dy(t){return t&&t.condition}const Xoe=["domain","grid","labels","ticks","title"],Het={grid:"grid",gridCap:"grid",gridColor:"grid",gridDash:"grid",gridDashOffset:"grid",gridOpacity:"grid",gridScale:"grid",gridWidth:"grid",orient:"main",bandPosition:"both",aria:"main",description:"main",domain:"main",domainCap:"main",domainColor:"main",domainDash:"main",domainDashOffset:"main",domainOpacity:"main",domainWidth:"main",format:"main",formatType:"main",labelAlign:"main",labelAngle:"main",labelBaseline:"main",labelBound:"main",labelColor:"main",labelFlush:"main",labelFlushOffset:"main",labelFont:"main",labelFontSize:"main",labelFontStyle:"main",labelFontWeight:"main",labelLimit:"main",labelLineHeight:"main",labelOffset:"main",labelOpacity:"main",labelOverlap:"main",labelPadding:"main",labels:"main",labelSeparation:"main",maxExtent:"main",minExtent:"main",offset:"both",position:"main",tickCap:"main",tickColor:"main",tickDash:"main",tickDashOffset:"main",tickMinStep:"both",tickOffset:"both",tickOpacity:"main",tickRound:"both",ticks:"main",tickSize:"main",tickWidth:"both",title:"main",titleAlign:"main",titleAnchor:"main",titleAngle:"main",titleBaseline:"main",titleColor:"main",titleFont:"main",titleFontSize:"main",titleFontStyle:"main",titleFontWeight:"main",titleLimit:"main",titleLineHeight:"main",titleOpacity:"main",titlePadding:"main",titleX:"main",titleY:"main",encode:"both",scale:"both",tickBand:"both",tickCount:"both",tickExtra:"both",translate:"both",values:"both",zindex:"both"},Joe={orient:1,aria:1,bandPosition:1,description:1,domain:1,domainCap:1,domainColor:1,domainDash:1,domainDashOffset:1,domainOpacity:1,domainWidth:1,format:1,formatType:1,grid:1,gridCap:1,gridColor:1,gridDash:1,gridDashOffset:1,gridOpacity:1,gridWidth:1,labelAlign:1,labelAngle:1,labelBaseline:1,labelBound:1,labelColor:1,labelFlush:1,labelFlushOffset:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelLineHeight:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labels:1,labelSeparation:1,maxExtent:1,minExtent:1,offset:1,position:1,tickBand:1,tickCap:1,tickColor:1,tickCount:1,tickDash:1,tickDashOffset:1,tickExtra:1,tickMinStep:1,tickOffset:1,tickOpacity:1,tickRound:1,ticks:1,tickSize:1,tickWidth:1,title:1,titleAlign:1,titleAnchor:1,titleAngle:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titlePadding:1,titleX:1,titleY:1,translate:1,values:1,zindex:1},Qet=Object.assign(Object.assign({},Joe),{style:1,labelExpr:1,encoding:1});function Zoe(t){return!!Qet[t]}const eue=Re({axis:1,axisBand:1,axisBottom:1,axisDiscrete:1,axisLeft:1,axisPoint:1,axisQuantitative:1,axisRight:1,axisTemporal:1,axisTop:1,axisX:1,axisXBand:1,axisXDiscrete:1,axisXPoint:1,axisXQuantitative:1,axisXTemporal:1,axisY:1,axisYBand:1,axisYDiscrete:1,axisYPoint:1,axisYQuantitative:1,axisYTemporal:1});function Sl(t){return"mark"in t}class FC{constructor(e,n){this.name=e,this.run=n}hasMatchingType(e){return Sl(e)?vet(e.mark)===this.name:!1}}var Get=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Dx(t,e){const n=t&&t[e];return n?be(n)?A2(n,r=>!!r.field):Le(n)||TC(n):!1}function tue(t,e){const n=t&&t[e];return n?be(n)?A2(n,r=>!!r.field):Le(n)||oa(n)||fy(n):!1}function qI(t,e){if(Sr(e)){const n=t[e];if((Le(n)||oa(n))&&hoe(n.type)){const r=Tse(e);return tue(t,r)}}return!1}function zI(t){return A2(VXe,e=>{if(Dx(t,e)){const n=t[e];if(be(n))return A2(n,r=>!!r.aggregate);{const r=aa(n);return r&&!!r.aggregate}}return!1})}function nue(t,e){const n=[],r=[],i=[],s=[],o={};return HI(t,(u,a)=>{if(Le(u)){const{field:l,aggregate:c,bin:f,timeUnit:x}=u,d=Get(u,["field","aggregate","bin","timeUnit"]);if(c||x||f){const p=MI(u),g=p==null?void 0:p.title;let m=Ie(u,{forAs:!0});const y=Object.assign(Object.assign(Object.assign({},g?[]:{title:w2(u,e,{allowDisabling:!0})}),d),{field:m});if(c){let E;if(nc(c)?(E="argmax",m=Ie({op:"argmax",field:c.argmax},{forAs:!0}),y.field=`${m}.${l}`):Al(c)?(E="argmin",m=Ie({op:"argmin",field:c.argmin},{forAs:!0}),y.field=`${m}.${l}`):c!=="boxplot"&&c!=="errorbar"&&c!=="errorband"&&(E=c),E){const A={op:E,as:m};l&&(A.field=l),s.push(A)}}else if(n.push(m),Js(u)&&en(f)){if(r.push({bin:f,field:l,as:m}),n.push(Ie(u,{binSuffix:"end"})),xy(u,a)&&n.push(Ie(u,{binSuffix:"range"})),Sr(a)){const E={field:`${m}_end`};o[`${a}2`]=E}y.bin="binned",Cse(a)||(y.type=Cx)}else if(x){i.push({timeUnit:x,field:l,as:m});const E=Js(u)&&u.type!==T2&&"time";E&&(a===ry||a===Ax?y.formatType=E:iJe(a)?y.legend=Object.assign({formatType:E},y.legend):Sr(a)&&(y.axis=Object.assign({formatType:E},y.axis)))}o[a]=y}else n.push(l),o[a]=t[a]}else o[a]=t[a]}),{bins:r,timeUnits:i,aggregate:s,groupby:n,encoding:o}}function Wet(t,e,n){const r=oJe(e,n);if(r){if(r==="binned"){const i=t[e===Po?En:ur];return!!(Le(i)&&Le(t[e])&&yi(i.bin))}}else return!1;return!0}function Vet(t,e,n,r){const i={};for(const s of Re(t))bse(s)||Oe(VJe(s));for(let s of eJe){if(!t[s])continue;const o=t[s];if(b2(s)){const u=Rse(s),a=i[u];if(Le(a)){if(GZe(a.type)&&Le(o)){Oe(jJe(u));continue}}else s=u,Oe(UJe(u))}if(s==="angle"&&e==="arc"&&!t.theta&&(Oe(MJe),s=Mo),!Wet(t,s,e)){Oe(hC(s,e));continue}if(s===ml&&e==="line"){const u=aa(t[s]);if(u!=null&&u.aggregate){Oe(GJe);continue}}if(s===qi&&(n?"fill"in t:"stroke"in t)){Oe(eoe("encoding",{fill:"fill"in t,stroke:"stroke"in t}));continue}if(s===sy||s===iy&&!be(o)&&!qo(o)||s===Ax&&be(o))o&&(i[s]=qe(o).reduce((u,a)=>(Le(a)?u.push(UI(a,s)):Oe(uI(a,s)),u),[]));else{if(s===Ax&&o===null)i[s]=null;else if(!Le(o)&&!oa(o)&&!qo(o)&&!CC(o)&&!Ye(o)){Oe(uI(o,s));continue}i[s]=Voe(o,s,r)}}return i}function LC(t,e){const n={};for(const r of Re(t)){const i=Voe(t[r],r,e,{compositeMark:!0});n[r]=i}return n}function Yet(t){const e=[];for(const n of Re(t))if(Dx(t,n)){const r=t[n],i=qe(r);for(const s of i)Le(s)?e.push(s):TC(s)&&e.push(s.condition)}return e}function HI(t,e,n){if(t)for(const r of Re(t)){const i=t[r];if(be(i))for(const s of i)e.call(n,s,r);else e.call(n,i,r)}}function Ket(t,e,n,r){return t?Re(t).reduce((i,s)=>{const o=t[s];return be(o)?o.reduce((u,a)=>e.call(r,u,a,s),i):e.call(r,i,o,s)},n):n}function rue(t,e){return Re(e).reduce((n,r)=>{switch(r){case En:case ur:case uC:case lC:case aC:case Po:case Ku:case Y0:case _2:case Mo:case gl:case Xu:case pl:case Ju:case Zu:case jo:case Ks:case ry:case zi:case Ex:case Ax:return n;case iy:if(t==="line"||t==="trail")return n;case sy:case oC:{const i=e[r];if(be(i)||Le(i))for(const s of qe(i))s.aggregate||n.push(Ie(s,{}));return n}case ml:if(t==="trail")return n;case qi:case ea:case ta:case yl:case K0:case X0:case Z0:case J0:{const i=aa(e[r]);return i&&!i.aggregate&&n.push(Ie(i,{})),n}}},[])}var iue=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Xet(t){const{tooltip:e}=t,n=iue(t,["tooltip"]);if(!e)return{filteredEncoding:n};let r,i;if(be(e)){for(const s of e)s.aggregate?(r||(r=[]),r.push(s)):(i||(i=[]),i.push(s));r&&(n.tooltip=r)}else e.aggregate?n.tooltip=e:i=e;return be(i)&&i.length===1&&(i=i[0]),{customTooltipWithoutAggregatedField:i,filteredEncoding:n}}function QI(t,e,n,r=!0){if("tooltip"in n)return{tooltip:n.tooltip};const i=t.map(({fieldPrefix:o,titlePrefix:u})=>{const a=r?` of ${GI(e)}`:"";return{field:o+e.field,type:e.type,title:Ye(u)?{signal:`${u}"${escape(a)}"`}:u+a}}),s=Yet(n).map(Let);return{tooltip:[...i,...xl(s,Rt)]}}function GI(t){const{title:e,field:n}=t;return Qn(e,n)}function WI(t,e,n,r,i){const{scale:s,axis:o}=n;return({partName:u,mark:a,positionPrefix:l,endPositionPrefix:c=void 0,extraEncoding:f={}})=>{const x=GI(n);return sue(t,u,i,{mark:a,encoding:Object.assign(Object.assign(Object.assign({[e]:Object.assign(Object.assign(Object.assign({field:`${l}_${n.field}`,type:n.type},x!==void 0?{title:x}:{}),s!==void 0?{scale:s}:{}),o!==void 0?{axis:o}:{})},ze(c)?{[`${e}2`]:{field:`${c}_${n.field}`}}:{}),r),f)})}}function sue(t,e,n,r){const{clip:i,color:s,opacity:o}=t,u=t.type;return t[e]||t[e]===void 0&&n[e]?[Object.assign(Object.assign({},r),{mark:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n[e]),i?{clip:i}:{}),s?{color:s}:{}),o?{opacity:o}:{}),ia(r.mark)?r.mark:{type:r.mark}),{style:`${u}-${e}`}),yh(t[e])?{}:t[e])})]:[]}function oue(t,e,n){const{encoding:r}=t,i=e==="vertical"?"y":"x",s=r[i],o=r[`${i}2`],u=r[`${i}Error`],a=r[`${i}Error2`];return{continuousAxisChannelDef:IC(s,n),continuousAxisChannelDef2:IC(o,n),continuousAxisChannelDefError:IC(u,n),continuousAxisChannelDefError2:IC(a,n),continuousAxis:i}}function IC(t,e){if(t!=null&&t.aggregate){const{aggregate:n}=t,r=iue(t,["aggregate"]);return n!==e&&Oe(_Ze(n,e)),r}else return t}function uue(t,e){const{mark:n,encoding:r}=t,{x:i,y:s}=r;if(ia(n)&&n.orient)return n.orient;if(ua(i)){if(ua(s)){const o=Le(i)&&i.aggregate,u=Le(s)&&s.aggregate;if(!o&&u===e)return"vertical";if(!u&&o===e)return"horizontal";if(o===e&&u===e)throw new Error("Both x and y cannot have aggregate");return F2(s)&&!F2(i)?"horizontal":"vertical"}return"horizontal"}else{if(ua(s))return"vertical";throw new Error(`Need a valid continuous axis for ${e}s`)}}var $C=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const BC="boxplot",Jet=["box","median","outliers","rule","ticks"],Zet=new FC(BC,lue);function aue(t){return rn(t)?"tukey":t}function lue(t,{config:e}){var n,r;t=Object.assign(Object.assign({},t),{encoding:LC(t.encoding,e)});const{mark:i,encoding:s,params:o,projection:u}=t,a=$C(t,["mark","encoding","params","projection"]),l=ia(i)?i:{type:i};o&&Oe(Yse("boxplot"));const c=(n=l.extent)!==null&&n!==void 0?n:e.boxplot.extent,f=jt("size",l,e),x=aue(c),{bins:d,timeUnits:p,transform:g,continuousAxisChannelDef:m,continuousAxis:y,groupby:E,aggregate:A,encodingWithoutContinuousAxis:v,ticksOrient:_,boxOrient:S,customTooltipWithoutAggregatedField:b}=ett(t,c,e),{color:C,size:R}=v,L=$C(v,["color","size"]),$=Z=>WI(l,y,m,Z,e.boxplot),U=$(L),z=$(v),ee=$(Object.assign(Object.assign({},L),R?{size:R}:{})),G=QI([{fieldPrefix:x==="min-max"?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:x==="min-max"?"lower_whisker_":"min_",titlePrefix:"Min"}],m,v),fe={type:"tick",color:"black",opacity:1,orient:_,invalid:null,aria:!1},pe=x==="min-max"?G:QI([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],m,v),ae=[...U({partName:"rule",mark:{type:"rule",invalid:null,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:pe}),...U({partName:"rule",mark:{type:"rule",invalid:null,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:pe}),...U({partName:"ticks",mark:fe,positionPrefix:"lower_whisker",extraEncoding:pe}),...U({partName:"ticks",mark:fe,positionPrefix:"upper_whisker",extraEncoding:pe})],V=[...x!=="tukey"?ae:[],...z({partName:"box",mark:Object.assign(Object.assign({type:"bar"},f?{size:f}:{}),{orient:S,invalid:null,ariaRoleDescription:"box"}),positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:G}),...ee({partName:"median",mark:Object.assign(Object.assign(Object.assign({type:"tick",invalid:null},Qe(e.boxplot.median)&&e.boxplot.median.color?{color:e.boxplot.median.color}:{}),f?{size:f}:{}),{orient:_,aria:!1}),positionPrefix:"mid_box",extraEncoding:G})];if(x==="min-max")return Object.assign(Object.assign({},a),{transform:((r=a.transform)!==null&&r!==void 0?r:[]).concat(g),layer:V});const te=`datum["lower_box_${m.field}"]`,se=`datum["upper_box_${m.field}"]`,he=`(${se} - ${te})`,D=`${te} - ${c} * ${he}`,O=`${se} + ${c} * ${he}`,N=`datum["${m.field}"]`,P={joinaggregate:cue(m.field),groupby:E},W={transform:[{filter:`(${D} <= ${N}) && (${N} <= ${O})`},{aggregate:[{op:"min",field:m.field,as:`lower_whisker_${m.field}`},{op:"max",field:m.field,as:`upper_whisker_${m.field}`},{op:"min",field:`lower_box_${m.field}`,as:`lower_box_${m.field}`},{op:"max",field:`upper_box_${m.field}`,as:`upper_box_${m.field}`},...A],groupby:E}],layer:ae},H=$C(L,["tooltip"]),{scale:w,axis:B}=m,k=GI(m),Q=Ys(B,["title"]),I=sue(l,"outliers",e.boxplot,{transform:[{filter:`(${N} < ${D}) || (${N} > ${O})`}],mark:"point",encoding:Object.assign(Object.assign(Object.assign({[y]:Object.assign(Object.assign(Object.assign({field:m.field,type:m.type},k!==void 0?{title:k}:{}),w!==void 0?{scale:w}:{}),Kt(Q)?{}:{axis:Q})},H),C?{color:C}:{}),b?{tooltip:b}:{})})[0];let q;const M=[...d,...p,P];return I?q={transform:M,layer:[I,W]}:(q=W,q.transform.unshift(...M)),Object.assign(Object.assign({},a),{layer:[q,{transform:g,layer:V}]})}function cue(t){return[{op:"q1",field:t,as:`lower_box_${t}`},{op:"q3",field:t,as:`upper_box_${t}`}]}function ett(t,e,n){const r=uue(t,BC),{continuousAxisChannelDef:i,continuousAxis:s}=oue(t,r,BC),o=i.field,u=aue(e),a=[...cue(o),{op:"median",field:o,as:`mid_box_${o}`},{op:"min",field:o,as:(u==="min-max"?"lower_whisker_":"min_")+o},{op:"max",field:o,as:(u==="min-max"?"upper_whisker_":"max_")+o}],l=u==="min-max"||u==="tukey"?[]:[{calculate:`datum["upper_box_${o}"] - datum["lower_box_${o}"]`,as:`iqr_${o}`},{calculate:`min(datum["upper_box_${o}"] + datum["iqr_${o}"] * ${e}, datum["max_${o}"])`,as:`upper_whisker_${o}`},{calculate:`max(datum["lower_box_${o}"] - datum["iqr_${o}"] * ${e}, datum["min_${o}"])`,as:`lower_whisker_${o}`}],c=t.encoding,f=s;c[f];const x=$C(c,[typeof f=="symbol"?f:f+""]),{customTooltipWithoutAggregatedField:d,filteredEncoding:p}=Xet(x),{bins:g,timeUnits:m,aggregate:y,groupby:E,encoding:A}=nue(p,n),v=r==="vertical"?"horizontal":"vertical",_=r,S=[...g,...m,{aggregate:[...y,...a],groupby:E},...l];return{bins:g,timeUnits:m,transform:S,groupby:E,aggregate:y,continuousAxisChannelDef:i,continuousAxis:s,encodingWithoutContinuousAxis:A,ticksOrient:v,boxOrient:_,customTooltipWithoutAggregatedField:d}}var fue=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const VI="errorbar",ttt=["ticks","rule"],ntt=new FC(VI,xue);function xue(t,{config:e}){t=Object.assign(Object.assign({},t),{encoding:LC(t.encoding,e)});const{transform:n,continuousAxisChannelDef:r,continuousAxis:i,encodingWithoutContinuousAxis:s,ticksOrient:o,markDef:u,outerSpec:a,tooltipEncoding:l}=due(t,VI,e);delete s.size;const c=WI(u,i,r,s,e.errorbar),f=u.thickness,x=u.size,d=Object.assign(Object.assign({type:"tick",orient:o,aria:!1},f!==void 0?{thickness:f}:{}),x!==void 0?{size:x}:{}),p=[...c({partName:"ticks",mark:d,positionPrefix:"lower",extraEncoding:l}),...c({partName:"ticks",mark:d,positionPrefix:"upper",extraEncoding:l}),...c({partName:"rule",mark:Object.assign({type:"rule",ariaRoleDescription:"errorbar"},f!==void 0?{size:f}:{}),positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:l})];return Object.assign(Object.assign(Object.assign({},a),{transform:n}),p.length>1?{layer:p}:Object.assign({},p[0]))}function rtt(t,e){const{encoding:n}=t;if(itt(n))return{orient:uue(t,e),inputType:"raw"};const r=stt(n),i=ott(n),s=n.x,o=n.y;if(r){if(i)throw new Error(`${e} cannot be both type aggregated-upper-lower and aggregated-error`);const u=n.x2,a=n.y2;if(ut(u)&&ut(a))throw new Error(`${e} cannot have both x2 and y2`);if(ut(u)){if(ua(s))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${e}`)}else if(ut(a)){if(ua(o))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${e}`)}throw new Error("No ranged axis")}else{const u=n.xError,a=n.xError2,l=n.yError,c=n.yError2;if(ut(a)&&!ut(u))throw new Error(`${e} cannot have xError2 without xError`);if(ut(c)&&!ut(l))throw new Error(`${e} cannot have yError2 without yError`);if(ut(u)&&ut(l))throw new Error(`${e} cannot have both xError and yError with both are quantiative`);if(ut(u)){if(ua(s))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}else if(ut(l)){if(ua(o))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}function itt(t){return(ut(t.x)||ut(t.y))&&!ut(t.x2)&&!ut(t.y2)&&!ut(t.xError)&&!ut(t.xError2)&&!ut(t.yError)&&!ut(t.yError2)}function stt(t){return ut(t.x2)||ut(t.y2)}function ott(t){return ut(t.xError)||ut(t.xError2)||ut(t.yError)||ut(t.yError2)}function due(t,e,n){var r;const{mark:i,encoding:s,params:o,projection:u}=t,a=fue(t,["mark","encoding","params","projection"]),l=ia(i)?i:{type:i};o&&Oe(Yse(e));const{orient:c,inputType:f}=rtt(t,e),{continuousAxisChannelDef:x,continuousAxisChannelDef2:d,continuousAxisChannelDefError:p,continuousAxisChannelDefError2:g,continuousAxis:m}=oue(t,c,e),{errorBarSpecificAggregate:y,postAggregateCalculates:E,tooltipSummary:A,tooltipTitleWithFieldName:v}=utt(l,x,d,p,g,f,e,n),_=s,S=m;_[S];const b=m==="x"?"x2":"y2";_[b];const C=m==="x"?"xError":"yError";_[C];const R=m==="x"?"xError2":"yError2";_[R];const L=fue(_,[typeof S=="symbol"?S:S+"",typeof b=="symbol"?b:b+"",typeof C=="symbol"?C:C+"",typeof R=="symbol"?R:R+""]),{bins:$,timeUnits:U,aggregate:z,groupby:ee,encoding:G}=nue(L,n),fe=[...z,...y],pe=f!=="raw"?[]:ee,ae=QI(A,x,G,v);return{transform:[...(r=a.transform)!==null&&r!==void 0?r:[],...$,...U,...fe.length===0?[]:[{aggregate:fe,groupby:pe}],...E],groupby:pe,continuousAxisChannelDef:x,continuousAxis:m,encodingWithoutContinuousAxis:G,ticksOrient:c==="vertical"?"horizontal":"vertical",markDef:l,outerSpec:a,tooltipEncoding:ae}}function utt(t,e,n,r,i,s,o,u){let a=[],l=[];const c=e.field;let f,x=!1;if(s==="raw"){const d=t.center?t.center:t.extent?t.extent==="iqr"?"median":"mean":u.errorbar.center,p=t.extent?t.extent:d==="mean"?"stderr":"iqr";if(d==="median"!=(p==="iqr")&&Oe(vZe(d,p,o)),p==="stderr"||p==="stdev")a=[{op:p,field:c,as:`extent_${c}`},{op:d,field:c,as:`center_${c}`}],l=[{calculate:`datum["center_${c}"] + datum["extent_${c}"]`,as:`upper_${c}`},{calculate:`datum["center_${c}"] - datum["extent_${c}"]`,as:`lower_${c}`}],f=[{fieldPrefix:"center_",titlePrefix:rC(d)},{fieldPrefix:"upper_",titlePrefix:hue(d,p,"+")},{fieldPrefix:"lower_",titlePrefix:hue(d,p,"-")}],x=!0;else{let g,m,y;p==="ci"?(g="mean",m="ci0",y="ci1"):(g="median",m="q1",y="q3"),a=[{op:m,field:c,as:`lower_${c}`},{op:y,field:c,as:`upper_${c}`},{op:g,field:c,as:`center_${c}`}],f=[{fieldPrefix:"upper_",titlePrefix:w2({field:c,aggregate:y,type:"quantitative"},u,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:w2({field:c,aggregate:m,type:"quantitative"},u,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:w2({field:c,aggregate:g,type:"quantitative"},u,{allowDisabling:!1})}]}}else{(t.center||t.extent)&&Oe(AZe(t.center,t.extent)),s==="aggregated-upper-lower"?(f=[],l=[{calculate:`datum["${n.field}"]`,as:`upper_${c}`},{calculate:`datum["${c}"]`,as:`lower_${c}`}]):s==="aggregated-error"&&(f=[{fieldPrefix:"",titlePrefix:c}],l=[{calculate:`datum["${c}"] + datum["${r.field}"]`,as:`upper_${c}`}],i?l.push({calculate:`datum["${c}"] + datum["${i.field}"]`,as:`lower_${c}`}):l.push({calculate:`datum["${c}"] - datum["${r.field}"]`,as:`lower_${c}`}));for(const d of l)f.push({fieldPrefix:d.as.substring(0,6),titlePrefix:v2(v2(d.calculate,'datum["',""),'"]',"")})}return{postAggregateCalculates:l,errorBarSpecificAggregate:a,tooltipSummary:f,tooltipTitleWithFieldName:x}}function hue(t,e,n){return`${rC(t)} ${n} ${e}`}const YI="errorband",att=["band","borders"],ltt=new FC(YI,pue);function pue(t,{config:e}){t=Object.assign(Object.assign({},t),{encoding:LC(t.encoding,e)});const{transform:n,continuousAxisChannelDef:r,continuousAxis:i,encodingWithoutContinuousAxis:s,markDef:o,outerSpec:u,tooltipEncoding:a}=due(t,YI,e),l=o,c=WI(l,i,r,s,e.errorband),f=t.encoding.x!==void 0&&t.encoding.y!==void 0;let x={type:f?"area":"rect"},d={type:f?"line":"rule"};const p=Object.assign(Object.assign({},l.interpolate?{interpolate:l.interpolate}:{}),l.tension&&l.interpolate?{tension:l.tension}:{});return f?(x=Object.assign(Object.assign(Object.assign({},x),p),{ariaRoleDescription:"errorband"}),d=Object.assign(Object.assign(Object.assign({},d),p),{aria:!1})):l.interpolate?Oe(ioe("interpolate")):l.tension&&Oe(ioe("tension")),Object.assign(Object.assign({},u),{transform:n,layer:[...c({partName:"band",mark:x,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:a}),...c({partName:"borders",mark:d,positionPrefix:"lower",extraEncoding:a}),...c({partName:"borders",mark:d,positionPrefix:"upper",extraEncoding:a})]})}const gue={};function KI(t,e,n){const r=new FC(t,e);gue[t]={normalizer:r,parts:n}}function ctt(){return Re(gue)}KI(BC,lue,Jet),KI(VI,xue,ttt),KI(YI,pue,att);const ftt=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],mue={titleAlign:"align",titleAnchor:"anchor",titleAngle:"angle",titleBaseline:"baseline",titleColor:"color",titleFont:"font",titleFontSize:"fontSize",titleFontStyle:"fontStyle",titleFontWeight:"fontWeight",titleLimit:"limit",titleLineHeight:"lineHeight",titleOrient:"orient",titlePadding:"offset"},yue={labelAlign:"align",labelAnchor:"anchor",labelAngle:"angle",labelBaseline:"baseline",labelColor:"color",labelFont:"font",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelLimit:"limit",labelLineHeight:"lineHeight",labelOrient:"orient",labelPadding:"offset"},xtt=Re(mue),dtt=Re(yue),Eue=Re({header:1,headerRow:1,headerColumn:1,headerFacet:1}),Aue=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],htt={gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},ptt={aria:1,clipHeight:1,columnPadding:1,columns:1,cornerRadius:1,description:1,direction:1,fillColor:1,format:1,formatType:1,gradientLength:1,gradientOpacity:1,gradientStrokeColor:1,gradientStrokeWidth:1,gradientThickness:1,gridAlign:1,labelAlign:1,labelBaseline:1,labelColor:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labelSeparation:1,legendX:1,legendY:1,offset:1,orient:1,padding:1,rowPadding:1,strokeColor:1,symbolDash:1,symbolDashOffset:1,symbolFillColor:1,symbolLimit:1,symbolOffset:1,symbolOpacity:1,symbolSize:1,symbolStrokeColor:1,symbolStrokeWidth:1,symbolType:1,tickCount:1,tickMinStep:1,title:1,titleAlign:1,titleAnchor:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titleOrient:1,titlePadding:1,type:1,values:1,zindex:1},hy="_vgsid_",gtt={point:{on:"click",fields:[hy],toggle:"event.shiftKey",resolve:"global",clear:"dblclick"},interval:{on:"[mousedown, window:mouseup] > window:mousemove!",encodings:["x","y"],translate:"[mousedown, window:mouseup] > window:mousemove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}};function XI(t){return!!t&&(t==="legend"||!!t.legend)}function JI(t){return XI(t)&&Qe(t)}function ZI(t){return!!t.select}var mtt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function vue(t){const e=[];for(const n of t||[]){if(ZI(n))continue;const{expr:r,bind:i}=n,s=mtt(n,["expr","bind"]);if(i&&r){const o=Object.assign(Object.assign({},s),{bind:i,init:r});e.push(o)}else{const o=Object.assign(Object.assign(Object.assign({},s),r?{update:r}:{}),i?{bind:i}:{});e.push(o)}}return e}function ytt(t){return kC(t)||t$(t)||e$(t)}function e$(t){return"concat"in t}function kC(t){return"vconcat"in t}function t$(t){return"hconcat"in t}function _ue({step:t,offsetIsDiscrete:e}){var n;return e?(n=t.for)!==null&&n!==void 0?n:"offset":"position"}function la(t){return Qe(t)&&t.step!==void 0}function Sue(t){return t.view||t.width||t.height}const bue=20,Ett=Re({align:1,bounds:1,center:1,columns:1,spacing:1});function Att(t,e,n){var r,i;const s=n[e],o={},{spacing:u,columns:a}=s;u!==void 0&&(o.spacing=u),a!==void 0&&(bC(t)&&!cy(t.facet)||e$(t))&&(o.columns=a),kC(t)&&(o.columns=1);for(const l of Ett)if(t[l]!==void 0)if(l==="spacing"){const c=t[l];o[l]=rn(c)?c:{row:(r=c.row)!==null&&r!==void 0?r:u,column:(i=c.column)!==null&&i!==void 0?i:u}}else o[l]=t[l];return o}var vtt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function n$(t,e){var n;return(n=t[e])!==null&&n!==void 0?n:t[e==="width"?"continuousWidth":"continuousHeight"]}function PC(t,e){const n=MC(t,e);return la(n)?n.step:Cue}function MC(t,e){var n;const r=(n=t[e])!==null&&n!==void 0?n:t[e==="width"?"discreteWidth":"discreteHeight"];return Qn(r,{step:t.step})}const Cue=20,_tt={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:{continuousWidth:200,continuousHeight:200,step:Cue},mark:get,arc:{},area:{},bar:yet,circle:{},geoshape:{},image:{},line:{},point:{},rect:Eet,rule:{color:"black"},square:{},text:{color:"black"},tick:Aet,trail:{},boxplot:{size:14,extent:1.5,box:{},median:{color:"white"},outliers:{},rule:{},ticks:null},errorbar:{center:"mean",rule:!0,ticks:!1},errorband:{band:{opacity:.3},borders:!1},scale:ZZe,projection:{},legend:htt,header:{titlePadding:10,labelPadding:10},headerColumn:{},headerRow:{},headerFacet:{},selection:gtt,style:{},title:{},facet:{spacing:bue},concat:{spacing:bue}},bl=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],Tue={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},Rue={blue:bl[0],orange:bl[1],red:bl[2],teal:bl[3],green:bl[4],yellow:bl[5],purple:bl[6],pink:bl[7],brown:bl[8],gray0:"#000",gray1:"#111",gray2:"#222",gray3:"#333",gray4:"#444",gray5:"#555",gray6:"#666",gray7:"#777",gray8:"#888",gray9:"#999",gray10:"#aaa",gray11:"#bbb",gray12:"#ccc",gray13:"#ddd",gray14:"#eee",gray15:"#fff"};function Stt(t={}){return{signals:[{name:"color",value:Qe(t)?Object.assign(Object.assign({},Rue),t):Rue}],mark:{color:{signal:"color.blue"}},rule:{color:{signal:"color.gray0"}},text:{color:{signal:"color.gray0"}},style:{"guide-label":{fill:{signal:"color.gray0"}},"guide-title":{fill:{signal:"color.gray0"}},"group-title":{fill:{signal:"color.gray0"}},"group-subtitle":{fill:{signal:"color.gray0"}},cell:{stroke:{signal:"color.gray8"}}},axis:{domainColor:{signal:"color.gray13"},gridColor:{signal:"color.gray8"},tickColor:{signal:"color.gray13"}},range:{category:[{signal:"color.blue"},{signal:"color.orange"},{signal:"color.red"},{signal:"color.teal"},{signal:"color.green"},{signal:"color.yellow"},{signal:"color.purple"},{signal:"color.pink"},{signal:"color.brown"},{signal:"color.grey8"}]}}}function btt(t){return{signals:[{name:"fontSize",value:Qe(t)?Object.assign(Object.assign({},Tue),t):Tue}],text:{fontSize:{signal:"fontSize.text"}},style:{"guide-label":{fontSize:{signal:"fontSize.guideLabel"}},"guide-title":{fontSize:{signal:"fontSize.guideTitle"}},"group-title":{fontSize:{signal:"fontSize.groupTitle"}},"group-subtitle":{fontSize:{signal:"fontSize.groupSubtitle"}}}}}function Ctt(t){return{text:{font:t},style:{"guide-label":{font:t},"guide-title":{font:t},"group-title":{font:t},"group-subtitle":{font:t}}}}function Oue(t){const e=Re(t||{}),n={};for(const r of e){const i=t[r];n[r]=dy(i)?Bse(i):Es(i)}return n}function Ttt(t){const e=Re(t),n={};for(const r of e)n[r]=Oue(t[r]);return n}const Rtt=[...Roe,...eue,...Eue,"background","padding","legend","lineBreak","scale","style","title","view"];function Due(t={}){const{color:e,font:n,fontSize:r,selection:i}=t,s=vtt(t,["color","font","fontSize","selection"]),o=I7({},ct(_tt),n?Ctt(n):{},e?Stt(e):{},r?btt(r):{},s||{});i&&BS(o,"selection",i,!0);const u=Ys(o,Rtt);for(const a of["background","lineBreak","padding"])o[a]&&(u[a]=Es(o[a]));for(const a of Roe)o[a]&&(u[a]=Qi(o[a]));for(const a of eue)o[a]&&(u[a]=Oue(o[a]));for(const a of Eue)o[a]&&(u[a]=Qi(o[a]));return o.legend&&(u.legend=Qi(o.legend)),o.scale&&(u.scale=Qi(o.scale)),o.style&&(u.style=Ttt(o.style)),o.title&&(u.title=Qi(o.title)),o.view&&(u.view=Qi(o.view)),u}const Ott=new Set(["view",...fet]),Dtt=["color","fontSize","background","padding","facet","concat","numberFormat","timeFormat","countTitle","header","axisQuantitative","axisTemporal","axisDiscrete","axisPoint","axisXBand","axisXPoint","axisXDiscrete","axisXQuantitative","axisXTemporal","axisYBand","axisYPoint","axisYDiscrete","axisYQuantitative","axisYTemporal","scale","selection","overlay"],wtt=Object.assign({view:["continuousWidth","continuousHeight","discreteWidth","discreteHeight","step"]},pet);function Ntt(t){t=ct(t);for(const e of Dtt)delete t[e];if(t.axis)for(const e in t.axis)dy(t.axis[e])&&delete t.axis[e];if(t.legend)for(const e of ftt)delete t.legend[e];if(t.mark){for(const e of Toe)delete t.mark[e];t.mark.tooltip&&Qe(t.mark.tooltip)&&delete t.mark.tooltip}t.params&&(t.signals=(t.signals||[]).concat(vue(t.params)),delete t.params);for(const e of Ott){for(const r of Toe)delete t[e][r];const n=wtt[e];if(n)for(const r of n)delete t[e][r];Ltt(t,e)}for(const e of ctt())delete t[e];Ftt(t);for(const e in t)Qe(t[e])&&Kt(t[e])&&delete t[e];return Kt(t)?void 0:t}function Ftt(t){const{titleMarkConfig:e,subtitleMarkConfig:n,subtitle:r}=$se(t.title);Kt(e)||(t.style["group-title"]=Object.assign(Object.assign({},t.style["group-title"]),e)),Kt(n)||(t.style["group-subtitle"]=Object.assign(Object.assign({},t.style["group-subtitle"]),n)),Kt(r)?delete t.title:t.title=r}function Ltt(t,e,n,r){const i=t[e];e==="view"&&(n="cell");const s=Object.assign(Object.assign({},i),t.style[n??e]);Kt(s)||(t.style[n??e]=s),delete t[e]}function jC(t){return"layer"in t}function Itt(t){return"repeat"in t}function $tt(t){return!be(t.repeat)&&t.repeat.layer}var Btt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};class r${map(e,n){return bC(e)?this.mapFacet(e,n):Itt(e)?this.mapRepeat(e,n):t$(e)?this.mapHConcat(e,n):kC(e)?this.mapVConcat(e,n):e$(e)?this.mapConcat(e,n):this.mapLayerOrUnit(e,n)}mapLayerOrUnit(e,n){if(jC(e))return this.mapLayer(e,n);if(Sl(e))return this.mapUnit(e,n);throw new Error(sI(e))}mapLayer(e,n){return Object.assign(Object.assign({},e),{layer:e.layer.map(r=>this.mapLayerOrUnit(r,n))})}mapHConcat(e,n){return Object.assign(Object.assign({},e),{hconcat:e.hconcat.map(r=>this.map(r,n))})}mapVConcat(e,n){return Object.assign(Object.assign({},e),{vconcat:e.vconcat.map(r=>this.map(r,n))})}mapConcat(e,n){const{concat:r}=e,i=Btt(e,["concat"]);return Object.assign(Object.assign({},i),{concat:r.map(s=>this.map(s,n))})}mapFacet(e,n){return Object.assign(Object.assign({},e),{spec:this.map(e.spec,n)})}mapRepeat(e,n){return Object.assign(Object.assign({},e),{spec:this.map(e.spec,n)})}}const ktt={zero:1,center:1,normalize:1};function Ptt(t){return t in ktt}const Mtt=new Set([_oe,mC,gC,AC,EC,TI,RI,yC,Soe,CI]),jtt=new Set([mC,gC,_oe]);function L2(t){return Le(t)&&BI(t)==="quantitative"&&!t.bin}function wue(t,e){var n,r;const i=e==="x"?"y":"radius",s=t[e],o=t[i];if(Le(s)&&Le(o))if(L2(s)&&L2(o)){if(s.stack)return e;if(o.stack)return i;const u=Le(s)&&!!s.aggregate,a=Le(o)&&!!o.aggregate;if(u!==a)return u?e:i;{const l=(n=s.scale)===null||n===void 0?void 0:n.type,c=(r=o.scale)===null||r===void 0?void 0:r.type;if(l&&l!=="linear")return i;if(c&&c!=="linear")return e}}else{if(L2(s))return e;if(L2(o))return i}else{if(L2(s))return e;if(L2(o))return i}}function Utt(t){switch(t){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}function Nue(t,e,n={}){var r,i;const s=ia(t)?t.type:t;if(!Mtt.has(s))return null;const o=wue(e,"x")||wue(e,"theta");if(!o)return null;const u=e[o],a=Le(u)?Ie(u,{}):void 0,l=Utt(o),c=[],f=new Set;if(e[l]){const p=e[l],g=Le(p)?Ie(p,{}):void 0;g&&g!==a&&(c.push(l),f.add(g));const m=l==="x"?"xOffset":"yOffset",y=e[m],E=Le(y)?Ie(y,{}):void 0;E&&E!==a&&(c.push(m),f.add(E))}const x=tJe.reduce((p,g)=>{if(g!=="tooltip"&&Dx(e,g)){const m=e[g];for(const y of qe(m)){const E=aa(y);if(E.aggregate)continue;const A=Ie(E,{});(!A||!f.has(A))&&p.push({channel:g,fieldDef:E})}}return p},[]);let d;if(u.stack!==void 0?yh(u.stack)?d=u.stack?"zero":null:d=u.stack:jtt.has(s)&&(d="zero"),!d||!Ptt(d)||zI(e)&&x.length===0)return null;if(!((r=u==null?void 0:u.scale)===null||r===void 0)&&r.type&&((i=u==null?void 0:u.scale)===null||i===void 0?void 0:i.type)!==Gi.LINEAR){if(n.disallowNonLinearStack)return null;Oe(mZe(u.scale.type))}return ut(e[El(o)])?(u.stack!==void 0&&Oe(gZe(o)),null):(Le(u)&&u.aggregate&&!dJe.has(u.aggregate)&&Oe(yZe(u.aggregate)),{groupbyChannels:c,groupbyFields:f,fieldChannel:o,impute:u.impute===null?!1:sc(s),stackBy:x,offset:d})}var Fue=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function qtt(t){const e=Fue(t,["point","line"]);return Re(e).length>1?e:e.type}function ztt(t){for(const e of["line","area","rule","trail"])t[e]&&(t=Object.assign(Object.assign({},t),{[e]:Ys(t[e],["point","line"])}));return t}function i$(t,e={},n){return t.point==="transparent"?{opacity:0}:t.point?Qe(t.point)?t.point:{}:t.point!==void 0?null:e.point||n.shape?Qe(e.point)?e.point:{}:void 0}function Lue(t,e={}){return t.line?t.line===!0?{}:t.line:t.line!==void 0?null:e.line?e.line===!0?{}:e.line:void 0}class Htt{constructor(){this.name="path-overlay"}hasMatchingType(e,n){if(Sl(e)){const{mark:r,encoding:i}=e,s=ia(r)?r:{type:r};switch(s.type){case"line":case"rule":case"trail":return!!i$(s,n[s.type],i);case"area":return!!i$(s,n[s.type],i)||!!Lue(s,n[s.type])}}return!1}run(e,n,r){const{config:i}=n,{params:s,projection:o,mark:u,encoding:a}=e,l=Fue(e,["params","projection","mark","encoding"]),c=LC(a,i),f=ia(u)?u:{type:u},x=i$(f,i[f.type],c),d=f.type==="area"&&Lue(f,i[f.type]),p=[Object.assign(Object.assign({},s?{params:s}:{}),{mark:qtt(Object.assign(Object.assign({},f.type==="area"&&f.opacity===void 0&&f.fillOpacity===void 0?{opacity:.7}:{}),f)),encoding:Ys(c,["shape"])})],g=Nue(f,c);let m=c;if(g){const{fieldChannel:y,offset:E}=g;m=Object.assign(Object.assign({},c),{[y]:Object.assign(Object.assign({},c[y]),E?{stack:E}:{})})}return d&&p.push(Object.assign(Object.assign({},o?{projection:o}:{}),{mark:Object.assign(Object.assign({type:"line"},ey(f,["clip","interpolate","tension","tooltip"])),d),encoding:m})),x&&p.push(Object.assign(Object.assign({},o?{projection:o}:{}),{mark:Object.assign(Object.assign({type:"point",opacity:1,filled:!0},ey(f,["clip","tooltip"])),x),encoding:m})),r(Object.assign(Object.assign({},l),{layer:p}),Object.assign(Object.assign({},n),{config:ztt(i)}))}}var Qtt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Gtt(t,e){return e?cy(t)?kue(t,e):Iue(t,e):t}function s$(t,e){return e?kue(t,e):t}function o$(t,e,n){const r=e[t];if(Net(r)){if(r.repeat in n)return Object.assign(Object.assign({},e),{[t]:n[r.repeat]});Oe(FJe(r.repeat));return}return e}function Iue(t,e){if(t=o$("field",t,e),t!==void 0){if(t===null)return null;if($I(t)&&sa(t.sort)){const n=o$("field",t.sort,e);t=Object.assign(Object.assign({},t),n?{sort:n}:{})}return t}}function $ue(t,e){if(Le(t))return Iue(t,e);{const n=o$("datum",t,e);return n!==t&&!n.type&&(n.type="nominal"),n}}function Bue(t,e){if(ut(t)){const n=$ue(t,e);if(n)return n;if(CC(t))return{condition:t.condition}}else{if(fy(t)){const n=$ue(t.condition,e);return n?Object.assign(Object.assign({},t),{condition:n}):Qtt(t,["condition"])}return t}}function kue(t,e){const n={};for(const r in t)if(Ze(t,r)){const i=t[r];if(be(i))n[r]=i.map(s=>Bue(s,e)).filter(s=>s);else{const s=Bue(i,e);s!==void 0&&(n[r]=s)}}return n}class Wtt{constructor(){this.name="RuleForRangedLine"}hasMatchingType(e){if(Sl(e)){const{encoding:n,mark:r}=e;if(r==="line"||ia(r)&&r.type==="line")for(const i of JXe){const s=vx(i),o=n[s];if(n[i]&&(Le(o)&&!yi(o.bin)||oa(o)))return!0}}return!1}run(e,n,r){const{encoding:i,mark:s}=e;return Oe(ZJe(!!i.x2,!!i.y2)),r(Object.assign(Object.assign({},e),{mark:Qe(s)?Object.assign(Object.assign({},s),{type:"rule"}):"rule"}),n)}}var oc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};class Vtt extends r${constructor(){super(...arguments),this.nonFacetUnitNormalizers=[Zet,ntt,ltt,new Htt,new Wtt]}map(e,n){if(Sl(e)){const r=Dx(e.encoding,dl),i=Dx(e.encoding,hl),s=Dx(e.encoding,sC);if(r||i||s)return this.mapFacetedUnit(e,n)}return super.map(e,n)}mapUnit(e,n){const{parentEncoding:r,parentProjection:i}=n,s=s$(e.encoding,n.repeater),o=Object.assign(Object.assign({},e),s?{encoding:s}:{});if(r||i)return this.mapUnitWithParentEncodingOrProjection(o,n);const u=this.mapLayerOrUnit.bind(this);for(const a of this.nonFacetUnitNormalizers)if(a.hasMatchingType(o,n.config))return a.run(o,n,u);return o}mapRepeat(e,n){return $tt(e)?this.mapLayerRepeat(e,n):this.mapNonLayerRepeat(e,n)}mapLayerRepeat(e,n){const{repeat:r,spec:i}=e,s=oc(e,["repeat","spec"]),{row:o,column:u,layer:a}=r,{repeater:l={},repeaterPrefix:c=""}=n;return o||u?this.mapRepeat(Object.assign(Object.assign({},e),{repeat:Object.assign(Object.assign({},o?{row:o}:{}),u?{column:u}:{}),spec:{repeat:{layer:a},spec:i}}),n):Object.assign(Object.assign({},s),{layer:a.map(f=>{const x=Object.assign(Object.assign({},l),{layer:f}),d=`${(i.name||"")+c}child__layer_${yn(f)}`,p=this.mapLayerOrUnit(i,Object.assign(Object.assign({},n),{repeater:x,repeaterPrefix:d}));return p.name=d,p})})}mapNonLayerRepeat(e,n){var r;const{repeat:i,spec:s,data:o}=e,u=oc(e,["repeat","spec","data"]);!be(i)&&e.columns&&(e=Ys(e,["columns"]),Oe(Kse("repeat")));const a=[],{repeater:l={},repeaterPrefix:c=""}=n,f=!be(i)&&i.row||[l?l.row:null],x=!be(i)&&i.column||[l?l.column:null],d=be(i)&&i||[l?l.repeat:null];for(const g of d)for(const m of f)for(const y of x){const E={repeat:g,row:m,column:y,layer:l.layer},A=(s.name||"")+c+"child__"+(be(i)?`${yn(g)}`:(i.row?`row_${yn(m)}`:"")+(i.column?`column_${yn(y)}`:"")),v=this.map(s,Object.assign(Object.assign({},n),{repeater:E,repeaterPrefix:A}));v.name=A,a.push(Ys(v,["data"]))}const p=be(i)?e.columns:i.column?i.column.length:1;return Object.assign(Object.assign({data:(r=s.data)!==null&&r!==void 0?r:o,align:"all"},u),{columns:p,concat:a})}mapFacet(e,n){const{facet:r}=e;return cy(r)&&e.columns&&(e=Ys(e,["columns"]),Oe(Kse("facet"))),super.mapFacet(e,n)}mapUnitWithParentEncodingOrProjection(e,n){const{encoding:r,projection:i}=e,{parentEncoding:s,parentProjection:o,config:u}=n,a=Mue({parentProjection:o,projection:i}),l=Pue({parentEncoding:s,encoding:s$(r,n.repeater)});return this.mapUnit(Object.assign(Object.assign(Object.assign({},e),a?{projection:a}:{}),l?{encoding:l}:{}),{config:u})}mapFacetedUnit(e,n){const r=e.encoding,{row:i,column:s,facet:o}=r,u=oc(r,["row","column","facet"]),{mark:a,width:l,projection:c,height:f,view:x,params:d,encoding:p}=e,g=oc(e,["mark","width","projection","height","view","params","encoding"]),{facetMapping:m,layout:y}=this.getFacetMappingAndLayout({row:i,column:s,facet:o},n),E=s$(u,n.repeater);return this.mapFacet(Object.assign(Object.assign(Object.assign({},g),y),{facet:m,spec:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},l?{width:l}:{}),f?{height:f}:{}),x?{view:x}:{}),c?{projection:c}:{}),{mark:a,encoding:E}),d?{params:d}:{})}),n)}getFacetMappingAndLayout(e,n){var r;const{row:i,column:s,facet:o}=e;if(i||s){o&&Oe(XJe([...i?[dl]:[],...s?[hl]:[]]));const u={},a={};for(const l of[dl,hl]){const c=e[l];if(c){const f=oc(c,["align","center","spacing","columns"]);u[l]=f;for(const x of["align","center","spacing"])c[x]!==void 0&&((r=a[x])!==null&&r!==void 0||(a[x]={}),a[x][l]=c[x])}}return{facetMapping:u,layout:a}}else{const{align:u,center:a,spacing:l,columns:c}=o,f=oc(o,["align","center","spacing","columns"]);return{facetMapping:Gtt(f,n.repeater),layout:Object.assign(Object.assign(Object.assign(Object.assign({},u?{align:u}:{}),a?{center:a}:{}),l?{spacing:l}:{}),c?{columns:c}:{})}}}mapLayer(e,n){var{parentEncoding:r,parentProjection:i}=n,s=oc(n,["parentEncoding","parentProjection"]);const{encoding:o,projection:u}=e,a=oc(e,["encoding","projection"]),l=Object.assign(Object.assign({},s),{parentEncoding:Pue({parentEncoding:r,encoding:o,layer:!0}),parentProjection:Mue({parentProjection:i,projection:u})});return super.mapLayer(a,l)}}function Pue({parentEncoding:t,encoding:e={},layer:n}){let r={};if(t){const i=new Set([...Re(t),...Re(e)]);for(const s of i){const o=e[s],u=t[s];if(ut(o)){const a=Object.assign(Object.assign({},u),o);r[s]=a}else fy(o)?r[s]=Object.assign(Object.assign({},o),{condition:Object.assign(Object.assign({},u),o.condition)}):o||o===null?r[s]=o:(n||qo(u)||Ye(u)||ut(u)||be(u))&&(r[s]=u)}}else r=e;return!r||Kt(r)?void 0:r}function Mue(t){const{parentProjection:e,projection:n}=t;return e&&n&&Oe(PJe({parentProjection:e,projection:n})),n??e}function u$(t){return"filter"in t}function Ytt(t){return(t==null?void 0:t.stop)!==void 0}function jue(t){return"lookup"in t}function Ktt(t){return"data"in t}function Xtt(t){return"param"in t}function Jtt(t){return"pivot"in t}function Ztt(t){return"density"in t}function ent(t){return"quantile"in t}function tnt(t){return"regression"in t}function nnt(t){return"loess"in t}function rnt(t){return"sample"in t}function int(t){return"window"in t}function snt(t){return"joinaggregate"in t}function ont(t){return"flatten"in t}function unt(t){return"calculate"in t}function Uue(t){return"bin"in t}function ant(t){return"impute"in t}function lnt(t){return"timeUnit"in t}function cnt(t){return"aggregate"in t}function fnt(t){return"stack"in t}function xnt(t){return"fold"in t}function dnt(t){return t.map(e=>u$(e)?{filter:E2(e.filter,QZe)}:e)}var uc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};class hnt extends r${map(e,n){var r,i;return(r=n.emptySelections)!==null&&r!==void 0||(n.emptySelections={}),(i=n.selectionPredicates)!==null&&i!==void 0||(n.selectionPredicates={}),e=que(e,n),super.map(e,n)}mapLayerOrUnit(e,n){if(e=que(e,n),e.encoding){const r={};for(const[i,s]of yx(e.encoding))r[i]=zue(s,n);e=Object.assign(Object.assign({},e),{encoding:r})}return super.mapLayerOrUnit(e,n)}mapUnit(e,n){const r=e,{selection:i}=r,s=uc(r,["selection"]);return i?Object.assign(Object.assign({},s),{params:yx(i).map(([o,u])=>{var a;const l=u,{init:c,bind:f,empty:x}=l,d=uc(l,["init","bind","empty"]);d.type==="single"?(d.type="point",d.toggle=!1):d.type==="multi"&&(d.type="point"),n.emptySelections[o]=x!=="none";for(const p of mi((a=n.selectionPredicates[o])!==null&&a!==void 0?a:{}))p.empty=x!=="none";return{name:o,value:c,select:d,bind:f}})}):e}}function que(t,e){const{transform:n}=t,r=uc(t,["transform"]);if(n){const i=n.map(s=>{if(u$(s))return{filter:a$(s,e)};if(Uue(s)&&_x(s.bin))return Object.assign(Object.assign({},s),{bin:Hue(s.bin)});if(jue(s)){const o=s.from,{selection:u}=o,a=uc(o,["selection"]);return u?Object.assign(Object.assign({},s),{from:Object.assign({param:u},a)}):s}return s});return Object.assign(Object.assign({},r),{transform:i})}return t}function zue(t,e){var n,r;const i=ct(t);if(Le(i)&&_x(i.bin)&&(i.bin=Hue(i.bin)),Ox(i)&&(!((r=(n=i.scale)===null||n===void 0?void 0:n.domain)===null||r===void 0)&&r.selection)){const s=i.scale.domain,{selection:o}=s,u=uc(s,["selection"]);i.scale.domain=Object.assign(Object.assign({},u),o?{param:o}:{})}if(CC(i))if(be(i.condition))i.condition=i.condition.map(s=>{const{selection:o,param:u,test:a}=s,l=uc(s,["selection","param","test"]);return u?s:Object.assign(Object.assign({},l),{test:a$(s,e)})});else{const s=zue(i.condition,e),{selection:o,param:u,test:a}=s,l=uc(s,["selection","param","test"]);i.condition=u?i.condition:Object.assign(Object.assign({},l),{test:a$(i.condition,e)})}return i}function Hue(t){const e=t.extent;if(e!=null&&e.selection){const{selection:n}=e,r=uc(e,["selection"]);return Object.assign(Object.assign({},t),{extent:Object.assign(Object.assign({},r),{param:n})})}return t}function a$(t,e){const n=r=>E2(r,i=>{var s,o,u;const a=(s=e.emptySelections[i])!==null&&s!==void 0?s:!0,l={param:i,empty:a};return(o=(u=e.selectionPredicates)[i])!==null&&o!==void 0||(u[i]=[]),e.selectionPredicates[i].push(l),l});return t.selection?n(t.selection):E2(t.test||t.filter,r=>r.selection?n(r.selection):r)}class l$ extends r${map(e,n){var r;const i=(r=n.selections)!==null&&r!==void 0?r:[];if(e.params&&!Sl(e)){const s=[];for(const o of e.params)ZI(o)?i.push(o):s.push(o);e.params=s}return n.selections=i,super.map(e,Que(e,n))}mapUnit(e,n){var r;const i=n.selections;if(!i||!i.length)return e;const s=((r=n.path)!==null&&r!==void 0?r:[]).concat(e.name),o=[];for(const u of i)if(!u.views||!u.views.length)o.push(u);else for(const a of u.views)(ze(a)&&(a===e.name||s.indexOf(a)>=0)||be(a)&&a.map(l=>s.indexOf(l)).every((l,c,f)=>l!==-1&&(c===0||l>f[c-1])))&&o.push(u);return o.length&&(e.params=o),e}}for(const t of["mapFacet","mapRepeat","mapHConcat","mapVConcat","mapLayer"]){const e=l$.prototype[t];l$.prototype[t]=function(n,r){return e.call(this,n,Que(n,r))}}function Que(t,e){var n;return t.name?Object.assign(Object.assign({},e),{path:((n=e.path)!==null&&n!==void 0?n:[]).concat(t.name)}):e}function pnt(t,e){e===void 0&&(e=Due(t.config));const n=Ent(t,e),{width:r,height:i}=t,s=Ant(n,{width:r,height:i,autosize:t.autosize},e);return Object.assign(Object.assign({},n),s?{autosize:s}:{})}const gnt=new Vtt,mnt=new hnt,ynt=new l$;function Ent(t,e={}){const n={config:e};return ynt.map(gnt.map(mnt.map(t,n),n),n)}function Gue(t){return ze(t)?{type:t}:t??{}}function Ant(t,e,n){let{width:r,height:i}=e;const s=Sl(t)||jC(t),o={};s?r=="container"&&i=="container"?(o.type="fit",o.contains="padding"):r=="container"?(o.type="fit-x",o.contains="padding"):i=="container"&&(o.type="fit-y",o.contains="padding"):(r=="container"&&(Oe(Qse("width")),r=void 0),i=="container"&&(Oe(Qse("height")),i=void 0));const u=Object.assign(Object.assign(Object.assign({type:"pad"},o),n?Gue(n.autosize):{}),Gue(t.autosize));if(u.type==="fit"&&!s&&(Oe(_Je),u.type="pad"),r=="container"&&!(u.type=="fit"||u.type=="fit-x")&&Oe(Gse("width")),i=="container"&&!(u.type=="fit"||u.type=="fit-y")&&Oe(Gse("height")),!fl(u,{type:"pad"}))return u}function vnt(t){return t==="fit"||t==="fit-x"||t==="fit-y"}function _nt(t){return t?`fit-${cC(t)}`:"fit"}const Snt=["background","padding"];function Wue(t,e){const n={};for(const r of Snt)t&&t[r]!==void 0&&(n[r]=Es(t[r]));return e&&(n.params=t.params),n}class Cl{constructor(e={},n={}){this.explicit=e,this.implicit=n}clone(){return new Cl(ct(this.explicit),ct(this.implicit))}combine(){return Object.assign(Object.assign({},this.explicit),this.implicit)}get(e){return Qn(this.explicit[e],this.implicit[e])}getWithExplicit(e){return this.explicit[e]!==void 0?{explicit:!0,value:this.explicit[e]}:this.implicit[e]!==void 0?{explicit:!1,value:this.implicit[e]}:{explicit:!1,value:void 0}}setWithExplicit(e,{value:n,explicit:r}){n!==void 0&&this.set(e,n,r)}set(e,n,r){return delete this[r?"implicit":"explicit"][e],this[r?"explicit":"implicit"][e]=n,this}copyKeyFromSplit(e,{explicit:n,implicit:r}){n[e]!==void 0?this.set(e,n[e],!0):r[e]!==void 0&&this.set(e,r[e],!1)}copyKeyFromObject(e,n){n[e]!==void 0&&this.set(e,n[e],!0)}copyAll(e){for(const n of Re(e.combine())){const r=e.getWithExplicit(n);this.setWithExplicit(n,r)}}}function ca(t){return{explicit:!0,value:t}}function vs(t){return{explicit:!1,value:t}}function Vue(t){return(e,n,r,i)=>{const s=t(e.value,n.value);return s>0?e:s<0?n:UC(e,n,r,i)}}function UC(t,e,n,r){return t.explicit&&e.explicit&&Oe(lZe(n,r,t.value,e.value)),t}function ac(t,e,n,r,i=UC){return t===void 0||t.value===void 0?e:t.explicit&&!e.explicit?t:e.explicit&&!t.explicit?e:fl(t.value,e.value)?t:i(t,e,n,r)}class bnt extends Cl{constructor(e={},n={},r=!1){super(e,n),this.explicit=e,this.implicit=n,this.parseNothing=r}clone(){const e=super.clone();return e.parseNothing=this.parseNothing,e}}function I2(t){return"url"in t}function py(t){return"values"in t}function Yue(t){return"name"in t&&!I2(t)&&!py(t)&&!lc(t)}function lc(t){return t&&(Kue(t)||Xue(t)||c$(t))}function Kue(t){return"sequence"in t}function Xue(t){return"sphere"in t}function c$(t){return"graticule"in t}var tn;(function(t){t[t.Raw=0]="Raw",t[t.Main=1]="Main",t[t.Row=2]="Row",t[t.Column=3]="Column",t[t.Lookup=4]="Lookup"})(tn||(tn={}));var Cnt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function $2(t,e=!0,n=Zr){if(be(t)){const r=t.map(i=>$2(i,e,n));return e?`[${r.join(", ")}]`:r}else if(bx(t))return n(e?uy(t):IZe(t));return e?n(on(t)):t}function Tnt(t,e){var n;for(const r of mi((n=t.component.selection)!==null&&n!==void 0?n:{})){const i=r.name;let s=`${i}${xc}, ${r.resolve==="global"?"true":`{unit: ${P2(t)}}`}`;for(const o of GC)o.defined(r)&&(o.signals&&(e=o.signals(t,r,e)),o.modifyExpr&&(s=o.modifyExpr(t,r,s)));e.push({name:i+srt,on:[{events:{signal:r.name+xc},update:`modify(${Fe(r.name+wx)}, ${s})`}]})}return f$(e)}function Rnt(t,e){if(t.component.selection&&Re(t.component.selection).length){const n=Fe(t.getName("cell"));e.unshift({name:"facet",value:{},on:[{events:cx("mousemove","scope"),update:`isTuple(facet) ? facet : group(${n}).datum`}]})}return f$(e)}function Ont(t,e){var n;let r=!1;for(const i of mi((n=t.component.selection)!==null&&n!==void 0?n:{})){const s=i.name,o=Fe(s+wx);if(e.filter(a=>a.name===s).length===0){const a=i.resolve==="global"?"union":i.resolve,l=i.type==="point"?", true, true)":")";e.push({name:i.name,update:`${Aae}(${o}, ${Fe(a)}${l}`})}r=!0;for(const a of GC)a.defined(i)&&a.topLevelSignals&&(e=a.topLevelSignals(t,i,e))}return r&&e.filter(s=>s.name==="unit").length===0&&e.unshift({name:"unit",value:{},on:[{events:"mousemove",update:"isTuple(group()) ? group() : unit"}]}),f$(e)}function Dnt(t,e){var n;const r=[...e];for(const i of mi((n=t.component.selection)!==null&&n!==void 0?n:{})){const s={name:i.name+wx};if(i.init){const u=i.project.items.map(a=>Cnt(a,["signals"]));s.values=i.init.map(a=>({unit:P2(t,{escape:!1}),fields:u,values:$2(a,!1)}))}r.filter(u=>u.name===i.name+wx).length||r.push(s)}return r}function Jue(t,e){var n;for(const r of mi((n=t.component.selection)!==null&&n!==void 0?n:{}))for(const i of GC)i.defined(r)&&i.marks&&(e=i.marks(t,r,e));return e}function wnt(t,e){for(const n of t.children)$n(n)&&(e=Jue(n,e));return e}function Nnt(t,e,n,r){const i=Cae(t,e.param,e);return{signal:As(n.get("type"))&&be(r)&&r[0]>r[1]?`isValid(${i}) && reverse(${i})`:i}}function f$(t){return t.map(e=>(e.on&&!e.on.length&&delete e.on,e))}class Ht{constructor(e,n){this.debugName=n,this._children=[],this._parent=null,e&&(this.parent=e)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(e){this._parent=e,e&&e.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(e,n){if(this._children.includes(e)){Oe($Je);return}n!==void 0?this._children.splice(n,0,e):this._children.push(e)}removeChild(e){const n=this._children.indexOf(e);return this._children.splice(n,1),n}remove(){let e=this._parent.removeChild(this);for(const n of this._children)n._parent=this._parent,this._parent.addChild(n,e++)}insertAsParentOf(e){const n=e.parent;n.removeChild(this),this.parent=n,e.parent=this}swapWithParent(){const e=this._parent,n=e.parent;for(const r of this._children)r.parent=e;this._children=[],e.removeChild(this),e.parent.removeChild(e),this.parent=n,e.parent=this}}class vi extends Ht{constructor(e,n,r,i){super(e,n),this.type=r,this.refCounts=i,this._source=this._name=n,this.refCounts&&!(this._name in this.refCounts)&&(this.refCounts[this._name]=0)}clone(){const e=new this.constructor;return e.debugName=`clone_${this.debugName}`,e._source=this._source,e._name=`clone_${this._name}`,e.type=this.type,e.refCounts=this.refCounts,e.refCounts[e._name]=0,e}dependentFields(){return new Set}producedFields(){return new Set}hash(){return this._hash===void 0&&(this._hash=`Output ${UXe()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(e){this._source=e}}var Zue=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};class fa extends Ht{constructor(e,n){super(e),this.formula=n}clone(){return new fa(null,ct(this.formula))}static makeFromEncoding(e,n){const r=n.reduceFieldDef((i,s)=>{const{field:o,timeUnit:u}=s;if(u){const a=Ie(s,{forAs:!0});i[Rt({as:a,field:o,timeUnit:u})]={as:a,field:o,timeUnit:u}}return i},{});return Kt(r)?null:new fa(e,r)}static makeFromTransform(e,n){const r=Object.assign({},n),{timeUnit:i}=r,s=Zue(r,["timeUnit"]),o=Ei(i),u=Object.assign(Object.assign({},s),{timeUnit:o});return new fa(e,{[Rt(u)]:u})}merge(e){this.formula=Object.assign({},this.formula);for(const n in e.formula)this.formula[n]||(this.formula[n]=e.formula[n]);for(const n of e.children)e.removeChild(n),n.parent=this;e.remove()}removeFormulas(e){const n={};for(const[r,i]of yx(this.formula))e.has(i.as)||(n[r]=i);this.formula=n}producedFields(){return new Set(mi(this.formula).map(e=>e.as))}dependentFields(){return new Set(mi(this.formula).map(e=>e.field))}hash(){return`TimeUnit ${Rt(this.formula)}`}assemble(){const e=[];for(const n of mi(this.formula)){const{field:r,as:i,timeUnit:s}=n,o=Ei(s),{unit:u,utc:a}=o,l=Zue(o,["unit","utc"]);e.push(Object.assign(Object.assign(Object.assign(Object.assign({field:ko(r),type:"timeunit"},u?{units:xI(u)}:{}),a?{timezone:"utc"}:{}),l),{as:[i,`${i}_end`]}))}return e}}var Fnt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const gy="_tuple_fields";class Lnt{constructor(...e){this.items=e,this.hasChannel={},this.hasField={}}}const Int={defined:()=>!0,parse:(t,e,n)=>{var r;const i=e.name,s=(r=e.project)!==null&&r!==void 0?r:e.project=new Lnt,o={},u={},a=new Set,l=(g,m)=>{const y=m==="visual"?g.channel:g.field;let E=yn(`${i}_${y}`);for(let A=1;a.has(E);A++)E=yn(`${i}_${y}_${A}`);return a.add(E),{[m]:E}},c=e.type,f=t.config.selection[c],x=n.value!==void 0?qe(n.value):null;let{fields:d,encodings:p}=Qe(n.select)?n.select:{};if(!d&&!p&&x){for(const g of x)if(Qe(g))for(const m of Re(g))XXe(m)?(p||(p=[])).push(m):c==="interval"?(Oe(NJe),p=f.encodings):(d||(d=[])).push(m)}!d&&!p&&(p=f.encodings,"fields"in f&&(d=f.fields));for(const g of p??[]){const m=t.fieldDef(g);if(m){let y=m.field;if(m.aggregate){Oe(SJe(g,m.aggregate));continue}else if(!y){Oe(Vse(g));continue}if(m.timeUnit){y=t.vgField(g);const E={timeUnit:m.timeUnit,as:y,field:m.field};u[Rt(E)]=E}if(!o[y]){let E="E";if(c==="interval"){const v=t.getScaleComponent(g).get("type");As(v)&&(E="R")}else m.bin&&(E="R-RE");const A={field:y,channel:g,type:E};A.signals=Object.assign(Object.assign({},l(A,"data")),l(A,"visual")),s.items.push(o[y]=A),s.hasField[y]=s.hasChannel[g]=o[y]}}else Oe(Vse(g))}for(const g of d??[]){if(s.hasField[g])continue;const m={type:"E",field:g};m.signals=Object.assign({},l(m,"data")),s.items.push(m),s.hasField[g]=m}x&&(e.init=x.map(g=>s.items.map(m=>Qe(g)?g[m.channel]!==void 0?g[m.channel]:g[m.field]:g))),Kt(u)||(s.timeUnit=new fa(null,u))},signals:(t,e,n)=>{const r=e.name+gy;return n.filter(s=>s.name===r).length>0?n:n.concat({name:r,value:e.project.items.map(s=>{const o=Fnt(s,["signals","hasLegend"]);return o.field=ko(o.field),o})})}},cc={defined:t=>t.type==="interval"&&t.resolve==="global"&&t.bind&&t.bind==="scales",parse:(t,e)=>{const n=e.scales=[];for(const r of e.project.items){const i=r.channel;if(!tc(i))continue;const s=t.getScaleComponent(i),o=s?s.get("type"):void 0;if(!s||!As(o)){Oe(TJe);continue}s.set("selectionExtent",{param:e.name,field:r.field},!0),n.push(r)}},topLevelSignals:(t,e,n)=>{const r=e.scales.filter(o=>n.filter(u=>u.name===o.signals.data).length===0);if(!t.parent||d$(t)||r.length===0)return n;const i=n.filter(o=>o.name===e.name)[0];let s=i.update;if(s.indexOf(Aae)>=0)i.update=`{${r.map(o=>`${Fe(ko(o.field))}: ${o.signals.data}`).join(", ")}}`;else{for(const o of r){const u=`${Fe(ko(o.field))}: ${o.signals.data}`;s.includes(u)||(s=`${s.substring(0,s.length-1)}, ${u}}`)}i.update=s}return n.concat(r.map(o=>({name:o.signals.data})))},signals:(t,e,n)=>{if(t.parent&&!d$(t))for(const r of e.scales){const i=n.filter(s=>s.name===r.signals.data)[0];i.push="outer",delete i.value,delete i.update}return n}};function x$(t,e){return`domain(${Fe(t.scaleName(e))})`}function d$(t){var e;return t.parent&&Q2(t.parent)&&((e=!t.parent.parent)!==null&&e!==void 0?e:d$(t.parent.parent))}var $nt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const B2="_brush",h$="_scale_trigger",Bnt={defined:t=>t.type==="interval",signals:(t,e,n)=>{const r=e.name,i=r+gy,s=cc.defined(e),o=e.init?e.init[0]:null,u=[],a=[];if(e.translate&&!s){const c=`!event.item || event.item.mark.name !== ${Fe(r+B2)}`;eae(e,(f,x)=>{var d,p;const g=qe((d=(p=x.between[0]).filter)!==null&&d!==void 0?d:p.filter=[]);return g.includes(c)||g.push(c),f})}e.project.items.forEach((c,f)=>{const x=c.channel;if(x!==En&&x!==ur){Oe("Interval selections only support x and y encoding channels.");return}const d=o?o[f]:null,p=knt(t,e,c,d),g=c.signals.data,m=c.signals.visual,y=Fe(t.scaleName(x)),E=t.getScaleComponent(x).get("type"),A=As(E)?"+":"";n.push(...p),u.push(g),a.push({scaleName:t.scaleName(x),expr:`(!isArray(${g}) || (${A}invert(${y}, ${m})[0] === ${A}${g}[0] && ${A}invert(${y}, ${m})[1] === ${A}${g}[1]))`})}),!s&&a.length&&n.push({name:r+h$,value:{},on:[{events:a.map(c=>({scale:c.scaleName})),update:`${a.map(c=>c.expr).join(" && ")} ? ${r+h$} : {}`}]});const l=`unit: ${P2(t)}, fields: ${i}, values`;return n.concat(Object.assign(Object.assign({name:r+xc},o?{init:`{${l}: ${$2(o)}}`}:{}),u.length?{on:[{events:[{signal:u.join(" || ")}],update:`${u.join(" && ")} ? {${l}: [${u}]} : null`}]}:{}))},marks:(t,e,n)=>{const r=e.name,{x:i,y:s}=e.project.hasChannel,o=i==null?void 0:i.signals.visual,u=s==null?void 0:s.signals.visual,a=`data(${Fe(e.name+wx)})`;if(cc.defined(e)||!i&&!s)return n;const l={x:i!==void 0?{signal:`${o}[0]`}:{value:0},y:s!==void 0?{signal:`${u}[0]`}:{value:0},x2:i!==void 0?{signal:`${o}[1]`}:{field:{group:"width"}},y2:s!==void 0?{signal:`${u}[1]`}:{field:{group:"height"}}};if(e.resolve==="global")for(const m of Re(l))l[m]=[Object.assign({test:`${a}.length && ${a}[0].unit === ${P2(t)}`},l[m]),{value:0}];const c=e.mark,{fill:f,fillOpacity:x,cursor:d}=c,p=$nt(c,["fill","fillOpacity","cursor"]),g=Re(p).reduce((m,y)=>(m[y]=[{test:[i!==void 0&&`${o}[0] !== ${o}[1]`,s!==void 0&&`${u}[0] !== ${u}[1]`].filter(E=>E).join(" && "),value:p[y]},{value:null}],m),{});return[{name:`${r+B2}_bg`,type:"rect",clip:!0,encode:{enter:{fill:{value:f},fillOpacity:{value:x}},update:l}},...n,{name:r+B2,type:"rect",clip:!0,encode:{enter:Object.assign(Object.assign({},d?{cursor:{value:d}}:{}),{fill:{value:"transparent"}}),update:Object.assign(Object.assign({},l),g)}}]}};function knt(t,e,n,r){const i=n.channel,s=n.signals.visual,o=n.signals.data,u=cc.defined(e),a=Fe(t.scaleName(i)),l=t.getScaleComponent(i),c=l?l.get("type"):void 0,f=g=>`scale(${a}, ${g})`,x=t.getSizeSignalRef(i===En?"width":"height").signal,d=`${i}(unit)`,p=eae(e,(g,m)=>[...g,{events:m.between[0],update:`[${d}, ${d}]`},{events:m,update:`[${s}[0], clamp(${d}, 0, ${x})]`}]);return p.push({events:{signal:e.name+h$},update:As(c)?`[${f(`${o}[0]`)}, ${f(`${o}[1]`)}]`:"[0, 0]"}),u?[{name:o,on:[]}]:[Object.assign(Object.assign({name:s},r?{init:$2(r,!0,f)}:{value:[]}),{on:p}),Object.assign(Object.assign({name:o},r?{init:$2(r)}:{}),{on:[{events:{signal:s},update:`${s}[0] === ${s}[1] ? null : invert(${a}, ${s})`}]})]}function eae(t,e){return t.events.reduce((n,r)=>r.between?e(n,r):(Oe(`${r} is not an ordered event stream for interval selections.`),n),[])}const Pnt={defined:t=>t.type==="point",signals:(t,e,n)=>{var r;const i=e.name,s=i+gy,o=e.project,u="(item().isVoronoi ? datum.datum : datum)",a=o.items.map(d=>{const p=t.fieldDef(d.channel);return p!=null&&p.bin?`[${u}[${Fe(t.vgField(d.channel,{}))}], ${u}[${Fe(t.vgField(d.channel,{binSuffix:"end"}))}]]`:`${u}[${Fe(d.field)}]`}).join(", "),l=`unit: ${P2(t)}, fields: ${s}, values`,c=e.events,f=mi((r=t.component.selection)!==null&&r!==void 0?r:{}).reduce((d,p)=>p.type==="interval"?d.concat(p.name+B2):d,[]).map(d=>`indexof(item().mark.name, '${d}') < 0`).join(" && "),x=`datum && item().mark.marktype !== 'group'${f?` && ${f}`:""}`;return n.concat([{name:i+xc,on:c?[{events:c,update:`${x} ? {${l}: [${a}]} : null`,force:!0}]:[]}])}};function k2(t,e,n,r){const i=CC(e)&&e.condition,s=r(e);if(i){const u=qe(i).map(a=>{const l=r(a);if(wet(a)){const{param:c,empty:f}=a,x=bae(t,{param:c,empty:f});return Object.assign({test:x},l)}else{const c=WC(t,a.test);return Object.assign({test:c},l)}});return{[n]:[...u,...s!==void 0?[s]:[]]}}else return s!==void 0?{[n]:s}:{}}function p$(t,e="text"){const n=t.encoding[e];return k2(t,n,e,r=>qC(r,t.config))}function qC(t,e,n="datum"){if(t){if(qo(t))return un(t.value);if(ut(t)){const{format:r,formatType:i}=OC(t);return NI({fieldOrDatumDef:t,format:r,formatType:i,expr:n,config:e})}}}function tae(t,e={}){const{encoding:n,markDef:r,config:i,stack:s}=t,o=n.tooltip;if(be(o))return{tooltip:rae({tooltip:o},s,i,e)};{const u=e.reactiveGeom?"datum.datum":"datum";return k2(t,o,"tooltip",a=>{const l=qC(a,i,u);if(l)return l;if(a===null)return;let c=jt("tooltip",r,i);if(c===!0&&(c={content:"encoding"}),ze(c))return{value:c};if(Qe(c))return Ye(c)?c:c.content==="encoding"?rae(n,s,i,e):{signal:u}})}}function nae(t,e,n,{reactiveGeom:r}={}){const i={},s=r?"datum.datum":"datum",o=[];function u(l,c){const f=vx(c),x=Js(l)?l:Object.assign(Object.assign({},l),{type:t[f].type}),d=x.title||jI(x,n),p=qe(d).join(", ");let g;if(Sr(c)){const m=c==="x"?"x2":"y2",y=aa(t[m]);if(yi(x.bin)&&y){const E=Ie(x,{expr:s}),A=Ie(y,{expr:s}),{format:v,formatType:_}=OC(x);g=_C(E,A,v,_,n),i[m]=!0}else if(e&&e.fieldChannel===c&&e.offset==="normalize"){const{format:E,formatType:A}=OC(x);g=NI({fieldOrDatumDef:x,format:E,formatType:A,expr:s,config:n,normalizeStack:!0}).signal}}g??(g=qC(x,n,s).signal),o.push({channel:c,key:p,value:g})}HI(t,(l,c)=>{Le(l)?u(l,c):TC(l)&&u(l.condition,c)});const a={};for(const{channel:l,key:c,value:f}of o)!i[l]&&!a[c]&&(a[c]=f);return a}function rae(t,e,n,{reactiveGeom:r}={}){const i=nae(t,e,n,{reactiveGeom:r}),s=yx(i).map(([o,u])=>`"${o}": ${u}`);return s.length>0?{signal:`{${s.join(", ")}}`}:void 0}function Mnt(t){const{markDef:e,config:n}=t,r=jt("aria",e,n);return r===!1?{}:Object.assign(Object.assign(Object.assign({},r?{aria:r}:{}),jnt(t)),Unt(t))}function jnt(t){const{mark:e,markDef:n,config:r}=t;if(r.aria===!1)return{};const i=jt("ariaRoleDescription",n,r);return i!=null?{ariaRoleDescription:{value:i}}:e in EJe?{}:{ariaRoleDescription:{value:e}}}function Unt(t){const{encoding:e,markDef:n,config:r,stack:i}=t,s=e.description;if(s)return k2(t,s,"description",a=>qC(a,t.config));const o=jt("description",n,r);if(o!=null)return{description:un(o)};if(r.aria===!1)return{};const u=nae(e,i,r);if(!Kt(u))return{description:{signal:yx(u).map(([a,l],c)=>`"${c>0?"; ":""}${a}: " + (${l})`).join(" + ")}}}function lr(t,e,n={}){const{markDef:r,encoding:i,config:s}=e,{vgChannel:o}=n;let{defaultRef:u,defaultValue:a}=n;u===void 0&&(a??(a=jt(t,r,s,{vgChannel:o,ignoreVgConfig:!0})),a!==void 0&&(u=un(a)));const l=i[t];return k2(e,l,o??t,c=>wI({channel:t,channelDef:c,markDef:r,config:s,scaleName:e.scaleName(t),scale:e.getScaleComponent(t),stack:null,defaultRef:u}))}function iae(t,e={filled:void 0}){var n,r,i,s;const{markDef:o,encoding:u,config:a}=t,{type:l}=o,c=(n=e.filled)!==null&&n!==void 0?n:jt("filled",o,a),f=Ot(["bar","point","circle","square","geoshape"],l)?"transparent":void 0,x=(i=(r=jt(c===!0?"color":void 0,o,a,{vgChannel:"fill"}))!==null&&r!==void 0?r:a.mark[c===!0&&"color"])!==null&&i!==void 0?i:f,d=(s=jt(c===!1?"color":void 0,o,a,{vgChannel:"stroke"}))!==null&&s!==void 0?s:a.mark[c===!1&&"color"],p=c?"fill":"stroke",g=Object.assign(Object.assign({},x?{fill:un(x)}:{}),d?{stroke:un(d)}:{});return o.color&&(c?o.fill:o.stroke)&&Oe(eoe("property",{fill:"fill"in o,stroke:"stroke"in o})),Object.assign(Object.assign(Object.assign(Object.assign({},g),lr("color",t,{vgChannel:p,defaultValue:c?x:d})),lr("fill",t,{defaultValue:u.fill?x:void 0})),lr("stroke",t,{defaultValue:u.stroke?d:void 0}))}function qnt(t){const{encoding:e,mark:n}=t,r=e.order;return!sc(n)&&qo(r)?k2(t,r,"zindex",i=>un(i.value)):{}}function my({channel:t,markDef:e,encoding:n={},model:r,bandPosition:i}){const s=`${t}Offset`,o=e[s],u=n[s];if((s==="xOffset"||s==="yOffset")&&u)return{offsetType:"encoding",offset:wI({channel:s,channelDef:u,markDef:e,config:r==null?void 0:r.config,scaleName:r.scaleName(s),scale:r.getScaleComponent(s),stack:null,defaultRef:un(o),bandPosition:i})};const a=e[s];return a?{offsetType:"visual",offset:a}:{}}function Qr(t,e,{defaultPos:n,vgChannel:r}){const{encoding:i,markDef:s,config:o,stack:u}=e,a=i[t],l=i[El(t)],c=e.scaleName(t),f=e.getScaleComponent(t),{offset:x,offsetType:d}=my({channel:t,markDef:s,encoding:i,model:e,bandPosition:.5}),p=g$({model:e,defaultPos:n,channel:t,scaleName:c,scale:f}),g=!a&&Sr(t)&&(i.latitude||i.longitude)?{field:e.getName(t)}:znt({channel:t,channelDef:a,channel2Def:l,markDef:s,config:o,scaleName:c,scale:f,stack:u,offset:x,defaultRef:p,bandPosition:d==="encoding"?0:void 0});return g?{[r||t]:g}:void 0}function znt(t){const{channel:e,channelDef:n,scaleName:r,stack:i,offset:s,markDef:o}=t;if(ut(n)&&i&&e===i.fieldChannel){if(Le(n)){let u=n.bandPosition;if(u===void 0&&o.type==="text"&&(e==="radius"||e==="theta")&&(u=.5),u!==void 0)return vC({scaleName:r,fieldOrDatumDef:n,startSuffix:"start",bandPosition:u,offset:s})}return Tx(n,r,{suffix:"end"},{offset:s})}return OI(t)}function g$({model:t,defaultPos:e,channel:n,scaleName:r,scale:i}){const{markDef:s,config:o}=t;return()=>{const u=vx(n),a=ec(n),l=jt(n,s,o,{vgChannel:a});if(l!==void 0)return ly(n,l);switch(e){case"zeroOrMin":case"zeroOrMax":if(r){const c=i.get("type");if(!Ot([Gi.LOG,Gi.TIME,Gi.UTC],c)){if(i.domainDefinitelyIncludesZero())return{scale:r,value:0}}}if(e==="zeroOrMin")return u==="y"?{field:{group:"height"}}:{value:0};switch(u){case"radius":return{signal:`min(${t.width.signal},${t.height.signal})/2`};case"theta":return{signal:"2*PI"};case"x":return{field:{group:"width"}};case"y":return{value:0}}break;case"mid":{const c=t[Hi(n)];return Object.assign(Object.assign({},c),{mult:.5})}}}}const Hnt={left:"x",center:"xc",right:"x2"},Qnt={top:"y",middle:"yc",bottom:"y2"};function sae(t,e,n,r="middle"){if(t==="radius"||t==="theta")return ec(t);const i=t==="x"?"align":"baseline",s=jt(i,e,n);let o;return Ye(s)?(Oe(JJe(i)),o=void 0):o=s,t==="x"?Hnt[o||(r==="top"?"left":"center")]:Qnt[o||r]}function zC(t,e,{defaultPos:n,defaultPos2:r,range:i}){return i?oae(t,e,{defaultPos:n,defaultPos2:r}):Qr(t,e,{defaultPos:n})}function oae(t,e,{defaultPos:n,defaultPos2:r}){const{markDef:i,config:s}=e,o=El(t),u=Hi(t),a=Gnt(e,r,o),l=a[u]?sae(t,i,s):ec(t);return Object.assign(Object.assign({},Qr(t,e,{defaultPos:n,vgChannel:l})),a)}function Gnt(t,e,n){const{encoding:r,mark:i,markDef:s,stack:o,config:u}=t,a=vx(n),l=Hi(n),c=ec(n),f=r[a],x=t.scaleName(a),d=t.getScaleComponent(a),{offset:p}=n in r||n in s?my({channel:n,markDef:s,encoding:r,model:t}):my({channel:a,markDef:s,encoding:r,model:t});if(!f&&(n==="x2"||n==="y2")&&(r.latitude||r.longitude)){const m=Hi(n),y=t.markDef[m];return y!=null?{[m]:{value:y}}:{[c]:{field:t.getName(n)}}}const g=Wnt({channel:n,channelDef:f,channel2Def:r[n],markDef:s,config:u,scaleName:x,scale:d,stack:o,offset:p,defaultRef:void 0});return g!==void 0?{[c]:g}:HC(n,s)||HC(n,{[n]:dC(n,s,u.style),[l]:dC(l,s,u.style)})||HC(n,u[i])||HC(n,u.mark)||{[c]:g$({model:t,defaultPos:e,channel:n,scaleName:x,scale:d})()}}function Wnt({channel:t,channelDef:e,channel2Def:n,markDef:r,config:i,scaleName:s,scale:o,stack:u,offset:a,defaultRef:l}){return ut(e)&&u&&t.charAt(0)===u.fieldChannel.charAt(0)?Tx(e,s,{suffix:"start"},{offset:a}):OI({channel:t,channelDef:n,scaleName:s,scale:o,stack:u,markDef:r,config:i,offset:a,defaultRef:l})}function HC(t,e){const n=Hi(t),r=ec(t);if(e[r]!==void 0)return{[r]:ly(t,e[r])};if(e[t]!==void 0)return{[r]:ly(t,e[t])};if(e[n]){const i=e[n];if(D2(i))Oe(QJe(n));else return{[n]:ly(t,i)}}}function fc(t,e){var n,r;const{config:i,encoding:s,markDef:o}=t,u=o.type,a=El(e),l=Hi(e),c=s[e],f=s[a],x=t.getScaleComponent(e),d=x?x.get("type"):void 0,p=o.orient,g=(r=(n=s[l])!==null&&n!==void 0?n:s.size)!==null&&r!==void 0?r:jt("size",o,i,{vgChannel:l}),m=u==="bar"&&(e==="x"?p==="vertical":p==="horizontal");return Le(c)&&(en(c.bin)||yi(c.bin)||c.timeUnit&&!f)&&!(g&&!D2(g))&&!ar(d)?Knt({fieldDef:c,fieldDef2:f,channel:e,model:t}):(ut(c)&&ar(d)||m)&&!f?Ynt(c,e,t):oae(e,t,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"})}function Vnt(t,e,n,r,i){if(D2(i))if(n){const o=n.get("type");if(o==="band")return{scale:e,band:i.band};i.band!==1&&(Oe(nZe(o)),i=void 0)}else return{mult:i.band,field:{group:t}};else{if(Ye(i))return i;if(i)return{value:i}}if(n){const o=n.get("range");if(ic(o)&&rn(o.step))return{value:o.step-2}}return{value:PC(r.view,t)-2}}function Ynt(t,e,n){const{markDef:r,encoding:i,config:s,stack:o}=n,u=r.orient,a=n.scaleName(e),l=n.getScaleComponent(e),c=Hi(e),f=El(e),x=ZXe(e),d=n.scaleName(x),p=u==="horizontal"&&e==="y"||u==="vertical"&&e==="x";let g;(i.size||r.size)&&(p?g=lr("size",n,{vgChannel:c,defaultRef:un(r.size)}):Oe(oZe(r.type)));const m=Uoe({channel:e,fieldDef:t,markDef:r,config:s,scaleType:l==null?void 0:l.get("type"),useVlSizeChannel:p});g=g||{[c]:Vnt(c,d||a,l,s,m)};const y=(l==null?void 0:l.get("type"))!=="band"||!("band"in g[c])?"middle":"top",E=sae(e,r,s,y),A=E==="xc"||E==="yc",{offset:v,offsetType:_}=my({channel:e,markDef:r,encoding:i,model:n,bandPosition:A?.5:0}),S=OI({channel:e,channelDef:t,markDef:r,config:s,scaleName:a,scale:l,stack:o,offset:v,defaultRef:g$({model:n,defaultPos:"mid",channel:e,scaleName:a,scale:l}),bandPosition:A?_==="encoding"?0:.5:Ye(m)?{signal:`(1-${m})/2`}:D2(m)?(1-m.band)/2:0});if(c)return Object.assign({[E]:S},g);{const b=ec(f),C=g[c],R=v?Object.assign(Object.assign({},C),{offset:v}):C;return{[E]:S,[b]:be(S)?[S[0],Object.assign(Object.assign({},S[1]),{offset:R})]:Object.assign(Object.assign({},S),{offset:R})}}}function yy(t,e,n,r,i){if(_se(t))return 0;const s=t==="x"||t==="y2"?-e/2:e/2;if(Ye(n)||Ye(i)||Ye(r)){const o=_l(n),u=_l(i),a=_l(r),l=a?`${a} + `:"",c=o?`(${o} ? -1 : 1) * `:"",f=u?`(${u} + ${s})`:s;return{signal:l+c+f}}else return i=i||0,r+(n?-i-s:+i+s)}function Knt({fieldDef:t,fieldDef2:e,channel:n,model:r}){var i,s,o;const{config:u,markDef:a,encoding:l}=r,c=r.getScaleComponent(n),f=r.scaleName(n),x=c?c.get("type"):void 0,d=c.get("reverse"),p=Uoe({channel:n,fieldDef:t,markDef:a,config:u,scaleType:x}),g=(i=r.component.axes[n])===null||i===void 0?void 0:i[0],m=(s=g==null?void 0:g.get("translate"))!==null&&s!==void 0?s:.5,y=Sr(n)&&(o=jt("binSpacing",a,u))!==null&&o!==void 0?o:0,E=El(n),A=ec(n),v=ec(E),{offset:_}=my({channel:n,markDef:a,encoding:l,model:r,bandPosition:0}),S=Ye(p)?{signal:`(1-${p.signal})/2`}:D2(p)?(1-p.band)/2:.5;if(en(t.bin)||t.timeUnit)return{[v]:uae({fieldDef:t,scaleName:f,bandPosition:S,offset:yy(E,y,d,m,_)}),[A]:uae({fieldDef:t,scaleName:f,bandPosition:Ye(S)?{signal:`1-${S.signal}`}:1-S,offset:yy(n,y,d,m,_)})};if(yi(t.bin)){const b=Tx(t,f,{},{offset:yy(E,y,d,m,_)});if(Le(e))return{[v]:b,[A]:Tx(e,f,{},{offset:yy(n,y,d,m,_)})};if(_x(t.bin)&&t.bin.step)return{[v]:b,[A]:{signal:`scale("${f}", ${Ie(t,{expr:"datum"})} + ${t.bin.step})`,offset:yy(n,y,d,m,_)}}}Oe(soe(E))}function uae({fieldDef:t,scaleName:e,bandPosition:n,offset:r}){return vC({scaleName:e,fieldOrDatumDef:t,bandPosition:n,offset:r})}const Xnt=new Set(["aria","width","height"]);function Zs(t,e){const{fill:n=void 0,stroke:r=void 0}=e.color==="include"?iae(t):{};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Jnt(t.markDef,e)),aae(t,"fill",n)),aae(t,"stroke",r)),lr("opacity",t)),lr("fillOpacity",t)),lr("strokeOpacity",t)),lr("strokeWidth",t)),lr("strokeDash",t)),qnt(t)),tae(t)),p$(t,"href")),Mnt(t))}function aae(t,e,n){const{config:r,mark:i,markDef:s}=t;if(jt("invalid",s,r)==="hide"&&n&&!sc(i)){const u=Znt(t,{invalid:!0,channels:fC});if(u)return{[e]:[{test:u,value:null},...qe(n)]}}return n?{[e]:n}:{}}function Jnt(t,e){return yJe.reduce((n,r)=>(!Xnt.has(r)&&t[r]!==void 0&&e[r]!=="ignore"&&(n[r]=un(t[r])),n),{})}function Znt(t,{invalid:e=!1,channels:n}){const r=n.reduce((s,o)=>{const u=t.getScaleComponent(o);if(u){const a=u.get("type"),l=t.vgField(o,{expr:"datum"});l&&As(a)&&(s[l]=!0)}return s},{}),i=Re(r);if(i.length>0){const s=e?"||":"&&";return i.map(o=>DI(o,e)).join(` ${s} `)}}function m$(t){const{config:e,markDef:n}=t;if(jt("invalid",n,e)){const i=ert(t,{channels:na});if(i)return{defined:{signal:i}}}return{}}function ert(t,{invalid:e=!1,channels:n}){const r=n.reduce((s,o)=>{const u=t.getScaleComponent(o);if(u){const a=u.get("type"),l=t.vgField(o,{expr:"datum"});l&&As(a)&&(s[l]=!0)}return s},{}),i=Re(r);if(i.length>0){const s=e?"||":"&&";return i.map(o=>DI(o,e)).join(` ${s} `)}}function lae(t,e){if(e!==void 0)return{[t]:un(e)}}const y$="voronoi",cae={defined:t=>t.type==="point"&&t.nearest,parse:(t,e)=>{if(e.events)for(const n of e.events)n.markname=t.getName(y$)},marks:(t,e,n)=>{const{x:r,y:i}=e.project.hasChannel,s=t.mark;if(sc(s))return Oe(bJe(s)),n;const o={name:t.getName(y$),type:"path",interactive:!0,from:{data:t.getName("marks")},encode:{update:Object.assign({fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0}},tae(t,{reactiveGeom:!0}))},transform:[{type:"voronoi",x:{expr:r||!i?"datum.datum.x || 0":"0"},y:{expr:i||!r?"datum.datum.y || 0":"0"},size:[t.getSizeSignalRef("width"),t.getSizeSignalRef("height")]}]};let u=0,a=!1;return n.forEach((l,c)=>{var f;const x=(f=l.name)!==null&&f!==void 0?f:"";x===t.component.mark[0].name?u=c:x.indexOf(y$)>=0&&(a=!0)}),a||n.splice(u+1,0,o),n}},fae={defined:t=>t.type==="point"&&t.resolve==="global"&&t.bind&&t.bind!=="scales"&&!XI(t.bind),parse:(t,e,n)=>vae(e,n),topLevelSignals:(t,e,n)=>{const r=e.name,i=e.project,s=e.bind,o=e.init&&e.init[0],u=cae.defined(e)?"(item().isVoronoi ? datum.datum : datum)":"datum";return i.items.forEach((a,l)=>{var c,f;const x=yn(`${r}_${a.field}`);n.filter(p=>p.name===x).length||n.unshift(Object.assign(Object.assign({name:x},o?{init:$2(o[l])}:{value:null}),{on:e.events?[{events:e.events,update:`datum && item().mark.marktype !== 'group' ? ${u}[${Fe(a.field)}] : null`}]:[],bind:(f=(c=s[a.field])!==null&&c!==void 0?c:s[a.channel])!==null&&f!==void 0?f:s}))}),n},signals:(t,e,n)=>{const r=e.name,i=e.project,s=n.filter(l=>l.name===r+xc)[0],o=r+gy,u=i.items.map(l=>yn(`${r}_${l.field}`)),a=u.map(l=>`${l} !== null`).join(" && ");return u.length&&(s.update=`${a} ? {fields: ${o}, values: [${u.join(", ")}]} : null`),delete s.value,delete s.on,n}},QC="_toggle",xae={defined:t=>t.type==="point"&&!!t.toggle,signals:(t,e,n)=>n.concat({name:e.name+QC,value:!1,on:[{events:e.events,update:e.toggle}]}),modifyExpr:(t,e)=>{const n=e.name+xc,r=e.name+QC;return`${r} ? null : ${n}, `+(e.resolve==="global"?`${r} ? null : true, `:`${r} ? null : {unit: ${P2(t)}}, `)+`${r} ? ${n} : null`}},trt={defined:t=>t.clear!==void 0&&t.clear!==!1,parse:(t,e)=>{e.clear&&(e.clear=ze(e.clear)?cx(e.clear,"view"):e.clear)},topLevelSignals:(t,e,n)=>{if(fae.defined(e))for(const r of e.project.items){const i=n.findIndex(s=>s.name===yn(`${e.name}_${r.field}`));i!==-1&&n[i].on.push({events:e.clear,update:"null"})}return n},signals:(t,e,n)=>{function r(i,s){i!==-1&&n[i].on&&n[i].on.push({events:e.clear,update:s})}if(e.type==="interval")for(const i of e.project.items){const s=n.findIndex(o=>o.name===i.signals.visual);if(r(s,"[0, 0]"),s===-1){const o=n.findIndex(u=>u.name===i.signals.data);r(o,"null")}}else{let i=n.findIndex(s=>s.name===e.name+xc);r(i,"null"),xae.defined(e)&&(i=n.findIndex(s=>s.name===e.name+QC),r(i,"false"))}return n}},dae={defined:t=>{const e=t.resolve==="global"&&t.bind&&XI(t.bind),n=t.project.items.length===1&&t.project.items[0].field!==hy;return e&&!n&&Oe(RJe),e&&n},parse:(t,e,n)=>{var r;const i=ct(n);if(i.select=ze(i.select)?{type:i.select,toggle:e.toggle}:Object.assign(Object.assign({},i.select),{toggle:e.toggle}),vae(e,i),Qe(n.select)&&(n.select.on||n.select.clear)){const u='event.item && indexof(event.item.mark.role, "legend") < 0';for(const a of e.events)a.filter=qe((r=a.filter)!==null&&r!==void 0?r:[]),a.filter.includes(u)||a.filter.push(u)}const s=JI(e.bind)?e.bind.legend:"click",o=ze(s)?cx(s,"view"):qe(s);e.bind={legend:{merge:o}}},topLevelSignals:(t,e,n)=>{const r=e.name,i=JI(e.bind)&&e.bind.legend,s=o=>u=>{const a=ct(u);return a.markname=o,a};for(const o of e.project.items){if(!o.hasLegend)continue;const u=`${yn(o.field)}_legend`,a=`${r}_${u}`;if(n.filter(c=>c.name===a).length===0){const c=i.merge.map(s(`${u}_symbols`)).concat(i.merge.map(s(`${u}_labels`))).concat(i.merge.map(s(`${u}_entries`)));n.unshift(Object.assign(Object.assign({name:a},e.init?{}:{value:null}),{on:[{events:c,update:"datum.value || item().items[0].items[0].datum.value",force:!0},{events:i.merge,update:`!event.item || !datum ? null : ${a}`,force:!0}]}))}}return n},signals:(t,e,n)=>{const r=e.name,i=e.project,s=n.find(x=>x.name===r+xc),o=r+gy,u=i.items.filter(x=>x.hasLegend).map(x=>yn(`${r}_${yn(x.field)}_legend`)),l=`${u.map(x=>`${x} !== null`).join(" && ")} ? {fields: ${o}, values: [${u.join(", ")}]} : null`;e.events&&u.length>0?s.on.push({events:u.map(x=>({signal:x})),update:l}):u.length>0&&(s.update=l,delete s.value,delete s.on);const c=n.find(x=>x.name===r+QC),f=JI(e.bind)&&e.bind.legend;return c&&(e.events?c.on.push(Object.assign(Object.assign({},c.on[0]),{events:f})):c.on[0].events=f),n}};function nrt(t,e,n){var r,i,s,o;const u=(r=t.fieldDef(e))===null||r===void 0?void 0:r.field;for(const a of mi((i=t.component.selection)!==null&&i!==void 0?i:{})){const l=(s=a.project.hasField[u])!==null&&s!==void 0?s:a.project.hasChannel[e];if(l&&dae.defined(a)){const c=(o=n.get("selections"))!==null&&o!==void 0?o:[];c.push(a.name),n.set("selections",c,!1),l.hasLegend=!0}}}const hae="_translate_anchor",pae="_translate_delta",rrt={defined:t=>t.type==="interval"&&t.translate,signals:(t,e,n)=>{const r=e.name,i=cc.defined(e),s=r+hae,{x:o,y:u}=e.project.hasChannel;let a=cx(e.translate,"scope");return i||(a=a.map(l=>(l.between[0].markname=r+B2,l))),n.push({name:s,value:{},on:[{events:a.map(l=>l.between[0]),update:"{x: x(unit), y: y(unit)"+(o!==void 0?`, extent_x: ${i?x$(t,En):`slice(${o.signals.visual})`}`:"")+(u!==void 0?`, extent_y: ${i?x$(t,ur):`slice(${u.signals.visual})`}`:"")+"}"}]},{name:r+pae,value:{},on:[{events:a,update:`{x: ${s}.x - x(unit), y: ${s}.y - y(unit)}`}]}),o!==void 0&&gae(t,e,o,"width",n),u!==void 0&&gae(t,e,u,"height",n),n}};function gae(t,e,n,r,i){var s,o;const u=e.name,a=u+hae,l=u+pae,c=n.channel,f=cc.defined(e),x=i.filter(b=>b.name===n.signals[f?"data":"visual"])[0],d=t.getSizeSignalRef(r).signal,p=t.getScaleComponent(c),g=p.get("type"),m=p.get("reverse"),y=f?c===En?m?"":"-":m?"-":"":"",E=`${a}.extent_${c}`,A=`${y}${l}.${c} / ${f?`${d}`:`span(${E})`}`,v=f?g==="log"?"panLog":g==="symlog"?"panSymlog":g==="pow"?"panPow":"panLinear":"panLinear",_=f?g==="pow"?`, ${(s=p.get("exponent"))!==null&&s!==void 0?s:1}`:g==="symlog"?`, ${(o=p.get("constant"))!==null&&o!==void 0?o:1}`:"":"",S=`${v}(${E}, ${A}${_})`;x.on.push({events:{signal:l},update:f?S:`clampRange(${S}, 0, ${d})`})}const mae="_zoom_anchor",yae="_zoom_delta",irt={defined:t=>t.type==="interval"&&t.zoom,signals:(t,e,n)=>{const r=e.name,i=cc.defined(e),s=r+yae,{x:o,y:u}=e.project.hasChannel,a=Fe(t.scaleName(En)),l=Fe(t.scaleName(ur));let c=cx(e.zoom,"scope");return i||(c=c.map(f=>(f.markname=r+B2,f))),n.push({name:r+mae,on:[{events:c,update:i?"{"+[a?`x: invert(${a}, x(unit))`:"",l?`y: invert(${l}, y(unit))`:""].filter(f=>!!f).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:s,on:[{events:c,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),o!==void 0&&Eae(t,e,o,"width",n),u!==void 0&&Eae(t,e,u,"height",n),n}};function Eae(t,e,n,r,i){var s,o;const u=e.name,a=n.channel,l=cc.defined(e),c=i.filter(v=>v.name===n.signals[l?"data":"visual"])[0],f=t.getSizeSignalRef(r).signal,x=t.getScaleComponent(a),d=x.get("type"),p=l?x$(t,a):c.name,g=u+yae,m=`${u}${mae}.${a}`,y=l?d==="log"?"zoomLog":d==="symlog"?"zoomSymlog":d==="pow"?"zoomPow":"zoomLinear":"zoomLinear",E=l?d==="pow"?`, ${(s=x.get("exponent"))!==null&&s!==void 0?s:1}`:d==="symlog"?`, ${(o=x.get("constant"))!==null&&o!==void 0?o:1}`:"":"",A=`${y}(${p}, ${m}, ${g}${E})`;c.on.push({events:{signal:g},update:l?A:`clampRange(${A}, 0, ${f})`})}const wx="_store",xc="_tuple",srt="_modify",Aae="vlSelectionResolve",GC=[Pnt,Bnt,Int,xae,fae,cc,dae,trt,rrt,irt,cae];function ort(t){let e=t.parent;for(;e&&!Qo(e);)e=e.parent;return e}function P2(t,{escape:e}={escape:!0}){let n=e?Fe(t.name):t.name;const r=ort(t);if(r){const{facet:i}=r;for(const s of Xs)i[s]&&(n+=` + '__facet_${s}_' + (facet[${Fe(r.vgField(s))}])`)}return n}function E$(t){var e;return mi((e=t.component.selection)!==null&&e!==void 0?e:{}).reduce((n,r)=>n||r.project.items.some(i=>i.field===hy),!1)}function vae(t,e){(ze(e.select)||!e.select.on)&&delete t.events,(ze(e.select)||!e.select.clear)&&delete t.clear,(ze(e.select)||!e.select.toggle)&&delete t.toggle}function A$(t){const e=[];return t.type==="Identifier"?[t.name]:t.type==="Literal"?[t.value]:(t.type==="MemberExpression"&&(e.push(...A$(t.object)),e.push(...A$(t.property))),e)}function _ae(t){return t.object.type==="MemberExpression"?_ae(t.object):t.object.name==="datum"}function Sae(t){const e=Zne(t),n=new Set;return e.visit(r=>{r.type==="MemberExpression"&&_ae(r)&&n.add(A$(r).slice(1).join("."))}),n}class M2 extends Ht{constructor(e,n,r){super(e),this.model=n,this.filter=r,this.expr=WC(this.model,this.filter,this),this._dependentFields=Sae(this.expr)}clone(){return new M2(null,this.model,ct(this.filter))}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}function urt(t,e){var n;const r={},i=t.config.selection;if(!e||!e.length)return r;for(const s of e){const o=yn(s.name),u=s.select,a=ze(u)?u:u.type,l=Qe(u)?ct(u):{type:a},c=i[a];for(const x in c)x==="fields"||x==="encodings"||(x==="mark"&&(l[x]=Object.assign(Object.assign({},c[x]),l[x])),(l[x]===void 0||l[x]===!0)&&(l[x]=(n=c[x])!==null&&n!==void 0?n:l[x]));const f=r[o]=Object.assign(Object.assign({},l),{name:o,type:a,init:s.value,bind:s.bind,events:ze(l.on)?cx(l.on,"scope"):qe(ct(l.on))});for(const x of GC)x.defined(f)&&x.parse&&x.parse(t,f,s)}return r}function bae(t,e,n,r="datum"){const i=ze(e)?e:e.param,s=yn(i),o=Fe(s+wx);let u;try{u=t.getSelectionComponent(s,i)}catch{return`!!${s}`}if(u.project.timeUnit){const c=n??t.component.data.raw,f=u.project.timeUnit.clone();c.parent?f.insertAsParentOf(c):c.parent=f}const a=`vlSelectionTest(${o}, ${r}${u.resolve==="global"?")":`, ${Fe(u.resolve)})`}`,l=`length(data(${o}))`;return e.empty===!1?`${l} && ${a}`:`!${l} || ${a}`}function Cae(t,e,n){const r=yn(e),i=n.encoding;let s=n.field,o;try{o=t.getSelectionComponent(r,e)}catch{return r}if(!i&&!s)s=o.project.items[0].field,o.project.items.length>1&&Oe(`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${Fe(s)}.`);else if(i&&!s){const u=o.project.items.filter(a=>a.channel===i);!u.length||u.length>1?(s=o.project.items[0].field,Oe((u.length?"Multiple ":"No ")+`matching ${Fe(i)} encoding found for selection ${Fe(n.param)}. Using "field": ${Fe(s)}.`)):s=u[0].field}return`${o.name}[${Fe(ko(s))}]`}function art(t,e){var n;for(const[r,i]of yx((n=t.component.selection)!==null&&n!==void 0?n:{})){const s=t.getName(`lookup_${r}`);t.component.data.outputNodes[s]=i.materialized=new vi(new M2(e,t,{param:r}),s,tn.Lookup,t.component.data.outputNodeRefCounts)}}function WC(t,e,n){return nC(e,r=>ze(r)?r:qZe(r)?bae(t,r,n):doe(r))}var VC=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function lrt(t,e){if(t)return be(t)&&!rc(t)?t.map(n=>jI(n,e)).join(", "):t}function v$(t,e,n,r){var i,s,o,u,a;(i=t.encode)!==null&&i!==void 0||(t.encode={}),(s=(u=t.encode)[e])!==null&&s!==void 0||(u[e]={}),(o=(a=t.encode[e]).update)!==null&&o!==void 0||(a.update={}),t.encode[e].update[n]=r}function Ey(t,e,n,r={header:!1}){var i,s;const o=t.combine(),{disable:u,orient:a,scale:l,labelExpr:c,title:f,zindex:x}=o,d=VC(o,["disable","orient","scale","labelExpr","title","zindex"]);if(!u){for(const p in d){const g=Het[p],m=d[p];if(g&&g!==e&&g!=="both")delete d[p];else if(dy(m)){const{condition:y}=m,E=VC(m,["condition"]),A=qe(y),v=Koe[p];if(v){const{vgProp:_,part:S}=v,b=[...A.map(C=>{const{test:R}=C,L=VC(C,["test"]);return Object.assign({test:WC(null,R)},L)}),E];v$(d,S,_,b),delete d[p]}else if(v===null){const _={signal:A.map(S=>{const{test:b}=S,C=VC(S,["test"]);return`${WC(null,b)} ? ${Pse(C)} : `}).join("")+Pse(E)};d[p]=_}}else if(Ye(m)){const y=Koe[p];if(y){const{vgProp:E,part:A}=y;v$(d,A,E,m),delete d[p]}}Ot(["labelAlign","labelBaseline"],p)&&d[p]===null&&delete d[p]}if(e==="grid"){if(!d.grid)return;if(d.encode){const{grid:p}=d.encode;d.encode=Object.assign({},p?{grid:p}:{}),Kt(d.encode)&&delete d.encode}return Object.assign(Object.assign({scale:l,orient:a},d),{domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:Qn(x,0)})}else{if(!r.header&&t.mainExtracted)return;if(c!==void 0){let g=c;!((s=(i=d.encode)===null||i===void 0?void 0:i.labels)===null||s===void 0)&&s.update&&Ye(d.encode.labels.update.text)&&(g=v2(c,"datum.label",d.encode.labels.update.text.signal)),v$(d,"labels","text",{signal:g})}if(d.labelAlign===null&&delete d.labelAlign,d.encode){for(const g of Xoe)t.hasAxisPart(g)||delete d.encode[g];Kt(d.encode)&&delete d.encode}const p=lrt(f,n);return Object.assign(Object.assign(Object.assign(Object.assign({scale:l,orient:a,grid:!1},p?{title:p}:{}),d),n.aria===!1?{aria:!1}:{}),{zindex:Qn(x,0)})}}}function Tae(t){const{axes:e}=t.component,n=[];for(const r of na)if(e[r]){for(const i of e[r])if(!i.get("disable")&&!i.get("gridScale")){const s=r==="x"?"height":"width",o=t.getSizeSignalRef(s).signal;s!==o&&n.push({name:s,update:o})}}return n}function crt(t,e){const{x:n=[],y:r=[]}=t;return[...n.map(i=>Ey(i,"grid",e)),...r.map(i=>Ey(i,"grid",e)),...n.map(i=>Ey(i,"main",e)),...r.map(i=>Ey(i,"main",e))].filter(i=>i)}function Rae(t,e,n,r){return Object.assign.apply(null,[{},...t.map(i=>{if(i==="axisOrient"){const s=n==="x"?"bottom":"left",o=e[n==="x"?"axisBottom":"axisLeft"]||{},u=e[n==="x"?"axisTop":"axisRight"]||{},a=new Set([...Re(o),...Re(u)]),l={};for(const c of a.values())l[c]={signal:`${r.signal} === "${s}" ? ${_l(o[c])} : ${_l(u[c])}`};return l}return e[i]})])}function frt(t,e,n,r){const i=e==="band"?["axisDiscrete","axisBand"]:e==="point"?["axisDiscrete","axisPoint"]:yoe(e)?["axisQuantitative"]:e==="time"||e==="utc"?["axisTemporal"]:[],s=t==="x"?"axisX":"axisY",o=Ye(n)?"axisOrient":`axis${rC(n)}`,u=[...i,...i.map(l=>s+l.substr(4))],a=["axis",o,s];return{vlOnlyAxisConfig:Rae(u,r,t,n),vgAxisConfig:Rae(a,r,t,n),axisConfigStyle:xrt([...a,...u],r)}}function xrt(t,e){var n;const r=[{}];for(const i of t){let s=(n=e[i])===null||n===void 0?void 0:n.style;if(s){s=qe(s);for(const o of s)r.push(e.style[o])}}return Object.assign.apply(null,r)}function _$(t,e,n,r={}){var i;const s=jse(t,n,e);if(s!==void 0)return{configFrom:"style",configValue:s};for(const o of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(((i=r[o])===null||i===void 0?void 0:i[t])!==void 0)return{configFrom:o,configValue:r[o][t]};return{}}const Oae={scale:({model:t,channel:e})=>t.scaleName(e),format:({fieldOrDatumDef:t,config:e,axis:n})=>{const{format:r,formatType:i}=n;return Noe(t,t.type,r,i,e,!0)},formatType:({axis:t,fieldOrDatumDef:e,scaleType:n})=>{const{formatType:r}=t;return Foe(r,e,n)},grid:({fieldOrDatumDef:t,axis:e,scaleType:n})=>{var r;return(r=e.grid)!==null&&r!==void 0?r:drt(n,t)},gridScale:({model:t,channel:e})=>hrt(t,e),labelAlign:({axis:t,labelAngle:e,orient:n,channel:r})=>t.labelAlign||wae(e,n,r),labelAngle:({labelAngle:t})=>t,labelBaseline:({axis:t,labelAngle:e,orient:n,channel:r})=>t.labelBaseline||Dae(e,n,r),labelFlush:({axis:t,fieldOrDatumDef:e,channel:n})=>{var r;return(r=t.labelFlush)!==null&&r!==void 0?r:grt(e.type,n)},labelOverlap:({axis:t,fieldOrDatumDef:e,scaleType:n})=>{var r;return(r=t.labelOverlap)!==null&&r!==void 0?r:mrt(e.type,n,Le(e)&&!!e.timeUnit,Le(e)?e.sort:void 0)},orient:({orient:t})=>t,tickCount:({channel:t,model:e,axis:n,fieldOrDatumDef:r,scaleType:i})=>{var s;const o=t==="x"?"width":t==="y"?"height":void 0,u=o?e.getSizeSignalRef(o):void 0;return(s=n.tickCount)!==null&&s!==void 0?s:Ert({fieldOrDatumDef:r,scaleType:i,size:u,values:n.values})},title:({axis:t,model:e,channel:n})=>{if(t.title!==void 0)return t.title;const r=Nae(e,n);if(r!==void 0)return r;const i=e.typedFieldDef(n),s=n==="x"?"x2":"y2",o=e.fieldDef(s);return qse(i?[Moe(i)]:[],Le(o)?[Moe(o)]:[])},values:({axis:t,fieldOrDatumDef:e})=>Art(t,e),zindex:({axis:t,fieldOrDatumDef:e,mark:n})=>{var r;return(r=t.zindex)!==null&&r!==void 0?r:vrt(n,e)}};function drt(t,e){return!ar(t)&&Le(e)&&!en(e==null?void 0:e.bin)&&!yi(e==null?void 0:e.bin)}function hrt(t,e){const n=e==="x"?"y":"x";if(t.getScaleComponent(n))return t.scaleName(n)}function prt(t,e,n,r,i){const s=e==null?void 0:e.labelAngle;if(s!==void 0)return Ye(s)?s:iC(s);{const{configValue:o}=_$("labelAngle",r,e==null?void 0:e.style,i);return o!==void 0?iC(o):n===En&&Ot([_I,vI],t.type)&&!(Le(t)&&t.timeUnit)?270:void 0}}function S$(t){return`(((${t.signal} % 360) + 360) % 360)`}function Dae(t,e,n,r){if(t!==void 0)if(n==="x"){if(Ye(t)){const i=S$(t),s=Ye(e)?`(${e.signal} === "top")`:e==="top";return{signal:`(45 < ${i} && ${i} < 135) || (225 < ${i} && ${i} < 315) ? "middle" :(${i} <= 45 || 315 <= ${i}) === ${s} ? "bottom" : "top"`}}if(45<t&&t<135||225<t&&t<315)return"middle";if(Ye(e)){const i=t<=45||315<=t?"===":"!==";return{signal:`${e.signal} ${i} "top" ? "bottom" : "top"`}}return(t<=45||315<=t)==(e==="top")?"bottom":"top"}else{if(Ye(t)){const i=S$(t),s=Ye(e)?`(${e.signal} === "left")`:e==="left";return{signal:`${i} <= 45 || 315 <= ${i} || (135 <= ${i} && ${i} <= 225) ? ${r?'"middle"':"null"} : (45 <= ${i} && ${i} <= 135) === ${s} ? "top" : "bottom"`}}if(t<=45||315<=t||135<=t&&t<=225)return r?"middle":null;if(Ye(e)){const i=45<=t&&t<=135?"===":"!==";return{signal:`${e.signal} ${i} "left" ? "top" : "bottom"`}}return(45<=t&&t<=135)==(e==="left")?"top":"bottom"}}function wae(t,e,n){if(t===void 0)return;const r=n==="x",i=r?0:90,s=r?"bottom":"left";if(Ye(t)){const o=S$(t),u=Ye(e)?`(${e.signal} === "${s}")`:e===s;return{signal:`(${i?`(${o} + 90)`:o} % 180 === 0) ? ${r?null:'"center"'} :(${i} < ${o} && ${o} < ${180+i}) === ${u} ? "left" : "right"`}}if((t+i)%180===0)return r?null:"center";if(Ye(e)){const o=i<t&&t<180+i?"===":"!==";return{signal:`${`${e.signal} ${o} "${s}"`} ? "left" : "right"`}}return(i<t&&t<180+i)==(e===s)?"left":"right"}function grt(t,e){if(e==="x"&&Ot(["quantitative","temporal"],t))return!0}function mrt(t,e,n,r){if(n&&!Qe(r)||t!=="nominal"&&t!=="ordinal")return e==="log"||e==="symlog"?"greedy":!0}function yrt(t){return t==="x"?"bottom":"left"}function Ert({fieldOrDatumDef:t,scaleType:e,size:n,values:r}){var i;if(!r&&!ar(e)&&e!=="log"){if(Le(t)){if(en(t.bin))return{signal:`ceil(${n.signal}/10)`};if(t.timeUnit&&Ot(["month","hours","day","quarter"],(i=Ei(t.timeUnit))===null||i===void 0?void 0:i.unit))return}return{signal:`ceil(${n.signal}/40)`}}}function Nae(t,e){const n=e==="x"?"x2":"y2",r=t.fieldDef(e),i=t.fieldDef(n),s=r?r.title:void 0,o=i?i.title:void 0;if(s&&o)return zse(s,o);if(s)return s;if(o)return o;if(s!==void 0)return s;if(o!==void 0)return o}function Art(t,e){const n=t.values;if(be(n))return Yoe(e,n);if(Ye(n))return n}function vrt(t,e){return t==="rect"&&RC(e)?1:0}class j2 extends Ht{constructor(e,n){super(e),this.transform=n,this._dependentFields=Sae(this.transform.calculate)}clone(){return new j2(null,ct(this.transform))}static parseAllForSortIndex(e,n){return n.forEachFieldDef((r,i)=>{if(Ox(r)&&Poe(r.sort)){const{field:s,timeUnit:o}=r,u=r.sort,a=u.map((l,c)=>`${doe({field:s,timeUnit:o,equal:l})} ? ${c} : `).join("")+u.length;e=new j2(e,{calculate:a,as:U2(r,i,{forAs:!0})})}}),e}producedFields(){return new Set([this.transform.as])}dependentFields(){return this._dependentFields}assemble(){return{type:"formula",expr:this.transform.calculate,as:this.transform.as}}hash(){return`Calculate ${Rt(this.transform)}`}}function U2(t,e,n){return Ie(t,Object.assign({prefix:e,suffix:"sort_index"},n??{}))}function YC(t,e){return Ot(["top","bottom"],e)?"column":Ot(["left","right"],e)||t==="row"?"row":"column"}function q2(t,e,n,r){const i=r==="row"?n.headerRow:r==="column"?n.headerColumn:n.headerFacet;return Qn((e||{})[t],i[t],n.header[t])}function KC(t,e,n,r){const i={};for(const s of t){const o=q2(s,e||{},n,r);o!==void 0&&(i[s]=o)}return i}const b$=["row","column"],C$=["header","footer"];function _rt(t,e){const n=t.component.layoutHeaders[e].title,r=t.config?t.config:void 0,i=t.component.layoutHeaders[e].facetFieldDef?t.component.layoutHeaders[e].facetFieldDef:void 0,{titleAnchor:s,titleAngle:o,titleOrient:u}=KC(["titleAnchor","titleAngle","titleOrient"],i.header,r,e),a=YC(e,u),l=iC(o);return{name:`${e}-title`,type:"group",role:`${a}-title`,title:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({text:n},e==="row"?{orient:"left"}:{}),{style:"guide-title"}),Lae(l,a)),Fae(a,l,s)),Iae(r,i,e,xtt,mue))}}function Fae(t,e,n="middle"){switch(n){case"start":return{align:"left"};case"end":return{align:"right"}}const r=wae(e,t==="row"?"left":"top",t==="row"?"y":"x");return r?{align:r}:{}}function Lae(t,e){const n=Dae(t,e==="row"?"left":"top",e==="row"?"y":"x",!0);return n?{baseline:n}:{}}function Srt(t,e){const n=t.component.layoutHeaders[e],r=[];for(const i of C$)if(n[i])for(const s of n[i]){const o=Crt(t,e,i,n,s);o!=null&&r.push(o)}return r}function brt(t,e){var n;const{sort:r}=t;return sa(r)?{field:Ie(r,{expr:"datum"}),order:(n=r.order)!==null&&n!==void 0?n:"ascending"}:be(r)?{field:U2(t,e,{expr:"datum"}),order:"ascending"}:{field:Ie(t,{expr:"datum"}),order:r??"ascending"}}function T$(t,e,n){const{format:r,formatType:i,labelAngle:s,labelAnchor:o,labelOrient:u,labelExpr:a}=KC(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],t.header,n,e),l=NI({fieldOrDatumDef:t,format:r,formatType:i,expr:"parent",config:n}).signal,c=YC(e,u);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({text:{signal:a?v2(v2(a,"datum.label",l),"datum.value",Ie(t,{expr:"parent"})):l}},e==="row"?{orient:"left"}:{}),{style:"guide-label",frame:"group"}),Lae(s,c)),Fae(c,s,o)),Iae(n,t,e,dtt,yue))}function Crt(t,e,n,r,i){if(i){let s=null;const{facetFieldDef:o}=r,u=t.config?t.config:void 0;if(o&&i.labels){const{labelOrient:f}=KC(["labelOrient"],o.header,u,e);(e==="row"&&!Ot(["top","bottom"],f)||e==="column"&&!Ot(["left","right"],f))&&(s=T$(o,e,u))}const a=Qo(t)&&!cy(t.facet),l=i.axes,c=(l==null?void 0:l.length)>0;if(s||c){const f=e==="row"?"height":"width";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:t.getName(`${e}_${n}`),type:"group",role:`${e}-${n}`},r.facetFieldDef?{from:{data:t.getName(`${e}_domain`)},sort:brt(o,e)}:{}),c&&a?{from:{data:t.getName(`facet_domain_${e}`)}}:{}),s?{title:s}:{}),i.sizeSignal?{encode:{update:{[f]:i.sizeSignal}}}:{}),c?{axes:l}:{})}}return null}const Trt={column:{start:0,end:1},row:{start:1,end:0}};function Rrt(t,e){return Trt[e][t]}function Ort(t,e){const n={};for(const r of Xs){const i=t[r];if(i!=null&&i.facetFieldDef){const{titleAnchor:s,titleOrient:o}=KC(["titleAnchor","titleOrient"],i.facetFieldDef.header,e,r),u=YC(r,o),a=Rrt(s,u);a!==void 0&&(n[u]=a)}}return Kt(n)?void 0:n}function Iae(t,e,n,r,i){const s={};for(const o of r){if(!i[o])continue;const u=q2(o,e==null?void 0:e.header,t,n);u!==void 0&&(s[i[o]]=u)}return s}function R$(t){return[...XC(t,"width"),...XC(t,"height"),...XC(t,"childWidth"),...XC(t,"childHeight")]}function XC(t,e){const n=e==="width"?"x":"y",r=t.component.layoutSize.get(e);if(!r||r==="merged")return[];const i=t.getSizeSignalRef(e).signal;if(r==="step"){const s=t.getScaleComponent(n);if(s){const o=s.get("type"),u=s.get("range");if(ar(o)&&ic(u)){const a=t.scaleName(n);return Qo(t.parent)&&t.parent.component.resolve.scale[n]==="independent"?[$ae(a,u)]:[$ae(a,u),{name:i,update:Bae(a,s,`domain('${a}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}else if(r=="container"){const s=i.endsWith("width"),o=s?"containerSize()[0]":"containerSize()[1]",u=n$(t.config.view,s?"width":"height"),a=`isFinite(${o}) ? ${o} : ${u}`;return[{name:i,init:a,on:[{update:a,events:"window:resize"}]}]}else return[{name:i,value:r}]}function $ae(t,e){const n=`${t}_step`;return Ye(e.step)?{name:n,update:e.step.signal}:{name:n,value:e.step}}function Bae(t,e,n){const r=e.get("type"),i=e.get("padding"),s=Qn(e.get("paddingOuter"),i);let o=e.get("paddingInner");return o=r==="band"?o!==void 0?o:i:1,`bandspace(${n}, ${_l(o)}, ${_l(s)}) * ${t}_step`}function kae(t){return t==="childWidth"?"width":t==="childHeight"?"height":t}function Pae(t,e){return Re(t).reduce((n,r)=>{const i=t[r];return Object.assign(Object.assign({},n),k2(e,i,r,s=>un(s.value)))},{})}function Mae(t,e){if(Qo(e))return t==="theta"?"independent":"shared";if(Q2(e))return"shared";if(z$(e))return Sr(t)||t==="theta"||t==="radius"?"independent":"shared";throw new Error("invalid model type for resolve")}function O$(t,e){const n=t.scale[e],r=Sr(e)?"axis":"legend";return n==="independent"?(t[r][e]==="shared"&&Oe(fZe(e)),"independent"):t[r][e]||"shared"}const Drt=Object.assign(Object.assign({},ptt),{disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1}),jae=Re(Drt);class wrt extends Cl{}const Uae={symbols:Nrt,gradient:Frt,labels:Lrt,entries:Irt};function Nrt(t,{fieldOrDatumDef:e,model:n,channel:r,legendCmpt:i,legendType:s}){var o,u,a,l,c,f,x,d;if(s!=="symbol")return;const{markDef:p,encoding:g,config:m,mark:y}=n,E=p.filled&&y!=="trail";let A=Object.assign(Object.assign({},vJe({},n,het)),iae(n,{filled:E}));const v=(o=i.get("symbolOpacity"))!==null&&o!==void 0?o:m.legend.symbolOpacity,_=(u=i.get("symbolFillColor"))!==null&&u!==void 0?u:m.legend.symbolFillColor,S=(a=i.get("symbolStrokeColor"))!==null&&a!==void 0?a:m.legend.symbolStrokeColor,b=v===void 0?(l=qae(g.opacity))!==null&&l!==void 0?l:p.opacity:void 0;if(A.fill){if(r==="fill"||E&&r===qi)delete A.fill;else if(A.fill.field)_?delete A.fill:(A.fill=un((c=m.legend.symbolBaseFillColor)!==null&&c!==void 0?c:"black"),A.fillOpacity=un(b??1));else if(be(A.fill)){const C=(d=(x=D$((f=g.fill)!==null&&f!==void 0?f:g.color))!==null&&x!==void 0?x:p.fill)!==null&&d!==void 0?d:E&&p.color;C&&(A.fill=un(C))}}if(A.stroke){if(r==="stroke"||!E&&r===qi)delete A.stroke;else if(A.stroke.field||S)delete A.stroke;else if(be(A.stroke)){const C=Qn(D$(g.stroke||g.color),p.stroke,E?p.color:void 0);C&&(A.stroke={value:C})}}if(r!==yl){const C=Le(e)&&Hae(n,i,e);C?A.opacity=[Object.assign({test:C},un(b??1)),un(m.legend.unselectedOpacity)]:b&&(A.opacity=un(b))}return A=Object.assign(Object.assign({},A),t),Kt(A)?void 0:A}function Frt(t,{model:e,legendType:n,legendCmpt:r}){var i;if(n!=="gradient")return;const{config:s,markDef:o,encoding:u}=e;let a={};const c=((i=r.get("gradientOpacity"))!==null&&i!==void 0?i:s.legend.gradientOpacity)===void 0?qae(u.opacity)||o.opacity:void 0;return c&&(a.opacity=un(c)),a=Object.assign(Object.assign({},a),t),Kt(a)?void 0:a}function Lrt(t,{fieldOrDatumDef:e,model:n,channel:r,legendCmpt:i}){const s=n.legend(r)||{},o=n.config,u=Le(e)?Hae(n,i,e):void 0,a=u?[{test:u,value:1},{value:o.legend.unselectedOpacity}]:void 0,{format:l,formatType:c}=s,f=Rx(c)?FI({fieldOrDatumDef:e,field:"datum.value",format:l,formatType:c,config:o}):void 0,x=Object.assign(Object.assign(Object.assign({},a?{opacity:a}:{}),f?{text:f}:{}),t);return Kt(x)?void 0:x}function Irt(t,{legendCmpt:e}){const n=e.get("selections");return n!=null&&n.length?Object.assign(Object.assign({},t),{fill:{value:"transparent"}}):t}function qae(t){return zae(t,(e,n)=>Math.max(e,n.value))}function D$(t){return zae(t,(e,n)=>Qn(e,n.value))}function zae(t,e){if(Fet(t))return qe(t.condition).reduce(e,t.value);if(qo(t))return t.value}function Hae(t,e,n){const r=e.get("selections");if(!(r!=null&&r.length))return;const i=Fe(n.field);return r.map(s=>`(!length(data(${Fe(yn(s)+wx)})) || (${s}[${i}] && indexof(${s}[${i}], datum.value) >= 0))`).join(" || ")}const Qae={direction:({direction:t})=>t,format:({fieldOrDatumDef:t,legend:e,config:n})=>{const{format:r,formatType:i}=e;return Noe(t,t.type,r,i,n,!1)},formatType:({legend:t,fieldOrDatumDef:e,scaleType:n})=>{const{formatType:r}=t;return Foe(r,e,n)},gradientLength:t=>{var e,n;const{legend:r,legendConfig:i}=t;return(n=(e=r.gradientLength)!==null&&e!==void 0?e:i.gradientLength)!==null&&n!==void 0?n:Urt(t)},labelOverlap:({legend:t,legendConfig:e,scaleType:n})=>{var r,i;return(i=(r=t.labelOverlap)!==null&&r!==void 0?r:e.labelOverlap)!==null&&i!==void 0?i:qrt(n)},symbolType:({legend:t,markDef:e,channel:n,encoding:r})=>{var i;return(i=t.symbolType)!==null&&i!==void 0?i:Brt(e.type,n,r.shape,e.shape)},title:({fieldOrDatumDef:t,config:e})=>w2(t,e,{allowDisabling:!0}),type:({legendType:t,scaleType:e,channel:n})=>{if(S2(n)&&Uo(e)){if(t==="gradient")return}else if(t==="symbol")return;return t},values:({fieldOrDatumDef:t,legend:e})=>$rt(e,t)};function $rt(t,e){const n=t.values;if(be(n))return Yoe(e,n);if(Ye(n))return n}function Brt(t,e,n,r){var i;if(e!=="shape"){const s=(i=D$(n))!==null&&i!==void 0?i:r;if(s)return s}switch(t){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}function krt(t){const{legend:e}=t;return Qn(e.type,Prt(t))}function Prt({channel:t,timeUnit:e,scaleType:n}){if(S2(t)){if(Ot(["quarter","month","day"],e))return"symbol";if(Uo(n))return"gradient"}return"symbol"}function Mrt({legendConfig:t,legendType:e,orient:n,legend:r}){var i,s;return(s=(i=r.direction)!==null&&i!==void 0?i:t[e?"gradientDirection":"symbolDirection"])!==null&&s!==void 0?s:jrt(n,e)}function jrt(t,e){switch(t){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return e==="gradient"?"horizontal":void 0}}function Urt({legendConfig:t,model:e,direction:n,orient:r,scaleType:i}){const{gradientHorizontalMaxLength:s,gradientHorizontalMinLength:o,gradientVerticalMaxLength:u,gradientVerticalMinLength:a}=t;if(Uo(i))return n==="horizontal"?r==="top"||r==="bottom"?Gae(e,"width",o,s):o:Gae(e,"height",a,u)}function Gae(t,e,n,r){return{signal:`clamp(${t.getSizeSignalRef(e).signal}, ${n}, ${r})`}}function qrt(t){if(Ot(["quantile","threshold","log","symlog"],t))return"greedy"}function Wae(t){const e=$n(t)?zrt(t):Wrt(t);return t.component.legends=e,e}function zrt(t){const{encoding:e}=t,n={};for(const r of[qi,...Aue]){const i=Gn(e[r]);!i||!t.getScaleComponent(r)||r===zi&&Le(i)&&i.type===R2||(n[r]=Grt(t,r))}return n}function Hrt(t,e){const n=t.scaleName(e);if(t.mark==="trail"){if(e==="color")return{stroke:n};if(e==="size")return{strokeWidth:n}}return e==="color"?t.markDef.filled?{fill:n}:{stroke:n}:{[e]:n}}function Qrt(t,e,n,r){switch(e){case"disable":return n!==void 0;case"values":return!!(n!=null&&n.values);case"title":if(e==="title"&&t===(r==null?void 0:r.title))return!0}return t===(n||{})[e]}function Grt(t,e){var n,r,i;let s=t.legend(e);const{markDef:o,encoding:u,config:a}=t,l=a.legend,c=new wrt({},Hrt(t,e));nrt(t,e,c);const f=s!==void 0?!s:l.disable;if(c.set("disable",f,s!==void 0),f)return c;s=s||{};const x=t.getScaleComponent(e).get("type"),d=Gn(u[e]),p=Le(d)?(n=Ei(d.timeUnit))===null||n===void 0?void 0:n.unit:void 0,g=s.orient||a.legend.orient||"right",m=krt({legend:s,channel:e,timeUnit:p,scaleType:x}),y=Mrt({legend:s,legendType:m,orient:g,legendConfig:l}),E={legend:s,channel:e,model:t,markDef:o,encoding:u,fieldOrDatumDef:d,legendConfig:l,config:a,scaleType:x,orient:g,legendType:m,direction:y};for(const b of jae){if(m==="gradient"&&b.startsWith("symbol")||m==="symbol"&&b.startsWith("gradient"))continue;const C=b in Qae?Qae[b](E):s[b];if(C!==void 0){const R=Qrt(C,b,s,t.fieldDef(e));(R||a.legend[b]===void 0)&&c.set(b,C,R)}}const A=(r=s==null?void 0:s.encoding)!==null&&r!==void 0?r:{},v=c.get("selections"),_={},S={fieldOrDatumDef:d,model:t,channel:e,legendCmpt:c,legendType:m};for(const b of["labels","legend","title","symbols","gradient","entries"]){const C=Pae((i=A[b])!==null&&i!==void 0?i:{},t),R=b in Uae?Uae[b](C,S):C;R!==void 0&&!Kt(R)&&(_[b]=Object.assign(Object.assign(Object.assign({},v!=null&&v.length&&Le(d)?{name:`${yn(d.field)}_legend_${b}`}:{}),v!=null&&v.length?{interactive:!!v}:{}),{update:R}))}return Kt(_)||c.set("encode",_,!!(s!=null&&s.encoding)),c}function Wrt(t){const{legends:e,resolve:n}=t.component;for(const r of t.children){Wae(r);for(const i of Re(r.component.legends))n.legend[i]=O$(t.component.resolve,i),n.legend[i]==="shared"&&(e[i]=Vae(e[i],r.component.legends[i]),e[i]||(n.legend[i]="independent",delete e[i]))}for(const r of Re(e))for(const i of t.children)i.component.legends[r]&&n.legend[r]==="shared"&&delete i.component.legends[r];return e}function Vae(t,e){var n,r,i,s;if(!t)return e.clone();const o=t.getWithExplicit("orient"),u=e.getWithExplicit("orient");if(o.explicit&&u.explicit&&o.value!==u.value)return;let a=!1;for(const l of jae){const c=ac(t.getWithExplicit(l),e.getWithExplicit(l),l,"legend",(f,x)=>{switch(l){case"symbolType":return Vrt(f,x);case"title":return Hse(f,x);case"type":return a=!0,vs("symbol")}return UC(f,x,l,"legend")});t.setWithExplicit(l,c)}return a&&(!((r=(n=t.implicit)===null||n===void 0?void 0:n.encode)===null||r===void 0)&&r.gradient&&WL(t.implicit,["encode","gradient"]),!((s=(i=t.explicit)===null||i===void 0?void 0:i.encode)===null||s===void 0)&&s.gradient&&WL(t.explicit,["encode","gradient"])),t}function Vrt(t,e){return e.value==="circle"?e:t}var Yrt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Krt(t,e,n,r){var i,s,o,u,a;(i=t.encode)!==null&&i!==void 0||(t.encode={}),(s=(u=t.encode)[e])!==null&&s!==void 0||(u[e]={}),(o=(a=t.encode[e]).update)!==null&&o!==void 0||(a.update={}),t.encode[e].update[n]=r}function Yae(t){const e=t.component.legends,n={};for(const i of Re(e)){const s=t.getScaleComponent(i),o=on(s.get("domains"));if(n[o])for(const u of n[o])Vae(u,e[i])||n[o].push(e[i]);else n[o]=[e[i].clone()]}return mi(n).flat().map(i=>Xrt(i,t.config)).filter(i=>i!==void 0)}function Xrt(t,e){var n,r,i;const s=t.combine(),{disable:o,labelExpr:u,selections:a}=s,l=Yrt(s,["disable","labelExpr","selections"]);if(!o){if(e.aria===!1&&l.aria==null&&(l.aria=!1),!((n=l.encode)===null||n===void 0)&&n.symbols){const c=l.encode.symbols.update;c.fill&&c.fill.value!=="transparent"&&!c.stroke&&!l.stroke&&(c.stroke={value:"transparent"});for(const f of Aue)l[f]&&delete c[f]}if(l.title||delete l.title,u!==void 0){let c=u;!((i=(r=l.encode)===null||r===void 0?void 0:r.labels)===null||i===void 0)&&i.update&&Ye(l.encode.labels.update.text)&&(c=v2(u,"datum.label",l.encode.labels.update.text.signal)),Krt(l,"labels","text",{signal:c})}return l}}function Jrt(t){return Q2(t)||z$(t)?Zrt(t):Kae(t)}function Zrt(t){return t.children.reduce((e,n)=>e.concat(n.assembleProjections()),Kae(t))}function Kae(t){const e=t.component.projection;if(!e||e.merged)return[];const n=e.combine(),{name:r}=n;if(e.data){const i={signal:`[${e.size.map(o=>o.signal).join(", ")}]`},s=e.data.reduce((o,u)=>{const a=Ye(u)?u.signal:`data('${t.lookupDataSource(u)}')`;return Ot(o,a)||o.push(a),o},[]);if(s.length<=0)throw new Error("Projection's fit didn't find any data sources");return[Object.assign({name:r,size:i,fit:{signal:s.length>1?`[${s.join(", ")}]`:s[0]}},n)]}else return[Object.assign(Object.assign({name:r},{translate:{signal:"[width / 2, height / 2]"}}),n)]}const eit=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];class Xae extends Cl{constructor(e,n,r,i){super(Object.assign({},n),{name:e}),this.specifiedProjection=n,this.size=r,this.data=i,this.merged=!1}get isFit(){return!!this.data}}function Jae(t){t.component.projection=$n(t)?tit(t):iit(t)}function tit(t){var e;if(t.hasProjection){const n=Qi(t.specifiedProjection),r=!(n&&(n.scale!=null||n.translate!=null)),i=r?[t.getSizeSignalRef("width"),t.getSizeSignalRef("height")]:void 0,s=r?nit(t):void 0,o=new Xae(t.projectionName(!0),Object.assign(Object.assign({},(e=Qi(t.config.projection))!==null&&e!==void 0?e:{}),n??{}),i,s);return o.get("type")||o.set("type","equalEarth",!1),o}}function nit(t){const e=[],{encoding:n}=t;for(const r of[[Zu,Ju],[Ks,jo]])(Gn(n[r[0]])||Gn(n[r[1]]))&&e.push({signal:t.getName(`geojson_${e.length}`)});return t.channelHasField(zi)&&t.typedFieldDef(zi).type===R2&&e.push({signal:t.getName(`geojson_${e.length}`)}),e.length===0&&e.push(t.requestDataName(tn.Main)),e}function rit(t,e){const n=pse(eit,i=>!!(!Ze(t.explicit,i)&&!Ze(e.explicit,i)||Ze(t.explicit,i)&&Ze(e.explicit,i)&&fl(t.get(i),e.get(i))));if(fl(t.size,e.size)){if(n)return t;if(fl(t.explicit,{}))return e;if(fl(e.explicit,{}))return t}return null}function iit(t){if(t.children.length===0)return;let e;for(const r of t.children)Jae(r);const n=pse(t.children,r=>{const i=r.component.projection;if(i)if(e){const s=rit(e,i);return s&&(e=s),!!s}else return e=i,!0;else return!0});if(e&&n){const r=t.projectionName(!0),i=new Xae(r,e.specifiedProjection,e.size,ct(e.data));for(const s of t.children){const o=s.component.projection;o&&(o.isFit&&i.data.push(...s.component.projection.data),s.renameProjection(o.get("name"),r),o.merged=!0)}return i}}var sit=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function oit(t,e,n,r){var i,s;if(xy(e,n)){const o=$n(t)?(s=(i=t.axis(n))!==null&&i!==void 0?i:t.legend(n))!==null&&s!==void 0?s:{}:{},u=Ie(e,{expr:"datum"}),a=Ie(e,{expr:"datum",binSuffix:"end"});return{formulaAs:Ie(e,{binSuffix:"range",forAs:!0}),formula:_C(u,a,o.format,o.formatType,r)}}return{}}function Zae(t,e){return`${Lse(t)}_${e}`}function uit(t,e){return{signal:t.getName(`${e}_bins`),extentSignal:t.getName(`${e}_extent`)}}function w$(t,e,n){var r;const i=(r=wC(n,void 0))!==null&&r!==void 0?r:{},s=Zae(i,e);return t.getName(`${s}_bins`)}function ait(t){return"as"in t}function ele(t,e,n){let r,i;ait(t)?r=ze(t.as)?[t.as,`${t.as}_end`]:[t.as[0],t.as[1]]:r=[Ie(t,{forAs:!0}),Ie(t,{binSuffix:"end",forAs:!0})];const s=Object.assign({},wC(e,void 0)),o=Zae(s,t.field),{signal:u,extentSignal:a}=uit(n,o);if(xC(s.extent)){const c=s.extent;i=Cae(n,c.param,c),delete s.extent}const l=Object.assign(Object.assign(Object.assign({bin:s,field:t.field,as:[r]},u?{signal:u}:{}),a?{extentSignal:a}:{}),i?{span:i}:{});return{key:o,binComponent:l}}class xa extends Ht{constructor(e,n){super(e),this.bins=n}clone(){return new xa(null,ct(this.bins))}static makeFromEncoding(e,n){const r=n.reduceFieldDef((i,s,o)=>{if(Js(s)&&en(s.bin)){const{key:u,binComponent:a}=ele(s,s.bin,n);i[u]=Object.assign(Object.assign(Object.assign({},a),i[u]),oit(n,s,o,n.config))}return i},{});return Kt(r)?null:new xa(e,r)}static makeFromTransform(e,n,r){const{key:i,binComponent:s}=ele(n,n.bin,r);return new xa(e,{[i]:s})}merge(e,n){for(const r of Re(e.bins))r in this.bins?(n(e.bins[r].signal,this.bins[r].signal),this.bins[r].as=xl([...this.bins[r].as,...e.bins[r].as],Rt)):this.bins[r]=e.bins[r];for(const r of e.children)e.removeChild(r),r.parent=this;e.remove()}producedFields(){return new Set(mi(this.bins).map(e=>e.as).flat(2))}dependentFields(){return new Set(mi(this.bins).map(e=>e.field))}hash(){return`Bin ${Rt(this.bins)}`}assemble(){return mi(this.bins).flatMap(e=>{const n=[],[r,...i]=e.as,s=e.bin,{extent:o}=s,u=sit(s,["extent"]),a=Object.assign(Object.assign(Object.assign({type:"bin",field:ko(e.field),as:r,signal:e.signal},xC(o)?{extent:null}:{extent:o}),e.span?{span:{signal:`span(${e.span})`}}:{}),u);!o&&e.extentSignal&&(n.push({type:"extent",field:ko(e.field),signal:e.extentSignal}),a.extent={signal:e.extentSignal}),n.push(a);for(const l of i)for(let c=0;c<2;c++)n.push({type:"formula",expr:Ie({field:r[c]},{expr:"datum"}),as:l[c]});return e.formula&&n.push({type:"formula",expr:e.formula,as:e.formulaAs}),n})}}function lit(t,e,n,r){var i;const s=$n(r)?r.encoding[El(e)]:void 0;if(Js(n)&&$n(r)&&qoe(n,s,r.markDef,r.config))t.add(Ie(n,{})),t.add(Ie(n,{suffix:"end"})),n.bin&&xy(n,e)&&t.add(Ie(n,{binSuffix:"range"}));else if(GXe(e)){const o=QXe(e);t.add(r.getName(o))}else t.add(Ie(n));return Ox(n)&&net((i=n.scale)===null||i===void 0?void 0:i.range)&&t.add(n.scale.range.field),t}function cit(t,e){var n;for(const r of Re(e)){const i=e[r];for(const s of Re(i))r in t?t[r][s]=new Set([...(n=t[r][s])!==null&&n!==void 0?n:[],...i[s]]):t[r]={[s]:i[s]}}}class zo extends Ht{constructor(e,n,r){super(e),this.dimensions=n,this.measures=r}clone(){return new zo(null,new Set(this.dimensions),ct(this.measures))}get groupBy(){return this.dimensions}static makeFromEncoding(e,n){let r=!1;n.forEachFieldDef(o=>{o.aggregate&&(r=!0)});const i={},s=new Set;return!r||(n.forEachFieldDef((o,u)=>{var a,l,c,f;const{aggregate:x,field:d}=o;if(x)if(x==="count")(a=i["*"])!==null&&a!==void 0||(i["*"]={}),i["*"].count=new Set([Ie(o,{forAs:!0})]);else{if(Al(x)||nc(x)){const p=Al(x)?"argmin":"argmax",g=x[p];(l=i[g])!==null&&l!==void 0||(i[g]={}),i[g][p]=new Set([Ie({op:p,field:g},{forAs:!0})])}else(c=i[d])!==null&&c!==void 0||(i[d]={}),i[d][x]=new Set([Ie(o,{forAs:!0})]);tc(u)&&n.scaleDomain(u)==="unaggregated"&&((f=i[d])!==null&&f!==void 0||(i[d]={}),i[d].min=new Set([Ie({field:d,aggregate:"min"},{forAs:!0})]),i[d].max=new Set([Ie({field:d,aggregate:"max"},{forAs:!0})]))}else lit(s,u,o,n)}),s.size+Re(i).length===0)?null:new zo(e,s,i)}static makeFromTransform(e,n){var r,i,s;const o=new Set,u={};for(const a of n.aggregate){const{op:l,field:c,as:f}=a;l&&(l==="count"?((r=u["*"])!==null&&r!==void 0||(u["*"]={}),u["*"].count=new Set([f||Ie(a,{forAs:!0})])):((i=u[c])!==null&&i!==void 0||(u[c]={}),u[c][l]=new Set([f||Ie(a,{forAs:!0})])))}for(const a of(s=n.groupby)!==null&&s!==void 0?s:[])o.add(a);return o.size+Re(u).length===0?null:new zo(e,o,u)}merge(e){return kXe(this.dimensions,e.dimensions)?(cit(this.measures,e.measures),!0):(RZe("different dimensions, cannot merge"),!1)}addDimensions(e){e.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...Re(this.measures)])}producedFields(){const e=new Set;for(const n of Re(this.measures))for(const r of Re(this.measures[n])){const i=this.measures[n][r];i.size===0?e.add(`${r}_${n}`):i.forEach(e.add,e)}return e}hash(){return`Aggregate ${Rt({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const e=[],n=[],r=[];for(const s of Re(this.measures))for(const o of Re(this.measures[s]))for(const u of this.measures[s][o])r.push(u),e.push(o),n.push(s==="*"?null:ko(s));return{type:"aggregate",groupby:[...this.dimensions].map(ko),ops:e,fields:n,as:r}}}class z2 extends Ht{constructor(e,n,r,i){super(e),this.model=n,this.name=r,this.data=i;for(const s of Xs){const o=n.facet[s];if(o){const{bin:u,sort:a}=o;this[s]=Object.assign({name:n.getName(`${s}_domain`),fields:[Ie(o),...en(u)?[Ie(o,{binSuffix:"end"})]:[]]},sa(a)?{sortField:a}:be(a)?{sortIndexField:U2(o,s)}:{})}}this.childModel=n.child}hash(){let e="Facet";for(const n of Xs)this[n]&&(e+=` ${n.charAt(0)}:${Rt(this[n])}`);return e}get fields(){var e;const n=[];for(const r of Xs)!((e=this[r])===null||e===void 0)&&e.fields&&n.push(...this[r].fields);return n}dependentFields(){const e=new Set(this.fields);for(const n of Xs)this[n]&&(this[n].sortField&&e.add(this[n].sortField.field),this[n].sortIndexField&&e.add(this[n].sortIndexField));return e}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const e={};for(const n of na){const r=this.childModel.component.scales[n];if(r&&!r.merged){const i=r.get("type"),s=r.get("range");if(ar(i)&&ic(s)){const o=ZC(this.childModel,n),u=j$(o);u?e[n]=u:Oe(oI(n))}}}return e}assembleRowColumnHeaderData(e,n,r){const i={row:"y",column:"x",facet:void 0}[e],s=[],o=[],u=[];i&&r&&r[i]&&(n?(s.push(`distinct_${r[i]}`),o.push("max")):(s.push(r[i]),o.push("distinct")),u.push(`distinct_${r[i]}`));const{sortField:a,sortIndexField:l}=this[e];if(a){const{op:c=SC,field:f}=a;s.push(f),o.push(c),u.push(Ie(a,{forAs:!0}))}else l&&(s.push(l),o.push("max"),u.push(l));return{name:this[e].name,source:n??this.data,transform:[Object.assign({type:"aggregate",groupby:this[e].fields},s.length?{fields:s,ops:o,as:u}:{})]}}assembleFacetHeaderData(e){var n,r;const{columns:i}=this.model.layout,{layoutHeaders:s}=this.model.component,o=[],u={};for(const c of b$){for(const f of C$){const x=(n=s[c]&&s[c][f])!==null&&n!==void 0?n:[];for(const d of x)if(((r=d.axes)===null||r===void 0?void 0:r.length)>0){u[c]=!0;break}}if(u[c]){const f=`length(data("${this.facet.name}"))`,x=c==="row"?i?{signal:`ceil(${f} / ${i})`}:1:i?{signal:`min(${f}, ${i})`}:{signal:f};o.push({name:`${this.facet.name}_${c}`,transform:[{type:"sequence",start:0,stop:x}]})}}const{row:a,column:l}=u;return(a||l)&&o.unshift(this.assembleRowColumnHeaderData("facet",null,e)),o}assemble(){var e,n;const r=[];let i=null;const s=this.getChildIndependentFieldsWithStep(),{column:o,row:u,facet:a}=this;if(o&&u&&(s.x||s.y)){i=`cross_${this.column.name}_${this.row.name}`;const l=[].concat((e=s.x)!==null&&e!==void 0?e:[],(n=s.y)!==null&&n!==void 0?n:[]),c=l.map(()=>"distinct");r.push({name:i,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:l,ops:c}]})}for(const l of[hl,dl])this[l]&&r.push(this.assembleRowColumnHeaderData(l,i,s));if(a){const l=this.assembleFacetHeaderData(s);l&&r.push(...l)}return r}}function tle(t){return t.startsWith("'")&&t.endsWith("'")||t.startsWith('"')&&t.endsWith('"')?t.slice(1,-1):t}function fit(t,e){const n=Ese(t);if(e==="number")return`toNumber(${n})`;if(e==="boolean")return`toBoolean(${n})`;if(e==="string")return`toString(${n})`;if(e==="date")return`toDate(${n})`;if(e==="flatten")return n;if(e.startsWith("date:")){const r=tle(e.slice(5,e.length));return`timeParse(${n},'${r}')`}else if(e.startsWith("utc:")){const r=tle(e.slice(4,e.length));return`utcParse(${n},'${r}')`}else return Oe(IJe(e)),null}function xit(t){const e={};return eC(t.filter,n=>{var r;if(xoe(n)){let i=null;dI(n)?i=Es(n.equal):pI(n)?i=Es(n.lte):hI(n)?i=Es(n.lt):gI(n)?i=Es(n.gt):mI(n)?i=Es(n.gte):yI(n)?i=n.range[0]:EI(n)&&(i=((r=n.oneOf)!==null&&r!==void 0?r:n.in)[0]),i&&(bx(i)?e[n.field]="date":rn(i)?e[n.field]="number":ze(i)&&(e[n.field]="string")),n.timeUnit&&(e[n.field]="date")}}),e}function dit(t){const e={};function n(r){F2(r)?e[r.field]="date":r.type==="quantitative"&&xJe(r.aggregate)?e[r.field]="number":ty(r.field)>1?r.field in e||(e[r.field]="flatten"):Ox(r)&&sa(r.sort)&&ty(r.sort.field)>1&&(r.sort.field in e||(e[r.sort.field]="flatten"))}if(($n(t)||Qo(t))&&t.forEachFieldDef((r,i)=>{if(Js(r))n(r);else{const s=vx(i),o=t.fieldDef(s);n(Object.assign(Object.assign({},r),{type:o.type}))}}),$n(t)){const{mark:r,markDef:i,encoding:s}=t;if(sc(r)&&!t.encoding.order){const o=i.orient==="horizontal"?"y":"x",u=s[o];Le(u)&&u.type==="quantitative"&&!(u.field in e)&&(e[u.field]="number")}}return e}function hit(t){const e={};if($n(t)&&t.component.selection)for(const n of Re(t.component.selection)){const r=t.component.selection[n];for(const i of r.project.items)!i.channel&&ty(i.field)>1&&(e[i.field]="flatten")}return e}class Gr extends Ht{constructor(e,n){super(e),this._parse=n}clone(){return new Gr(null,ct(this._parse))}hash(){return`Parse ${Rt(this._parse)}`}static makeExplicit(e,n,r){var i;let s={};const o=n.data;return!lc(o)&&(!((i=o==null?void 0:o.format)===null||i===void 0)&&i.parse)&&(s=o.format.parse),this.makeWithAncestors(e,s,{},r)}static makeWithAncestors(e,n,r,i){for(const u of Re(r)){const a=i.getWithExplicit(u);a.value!==void 0&&(a.explicit||a.value===r[u]||a.value==="derived"||r[u]==="flatten"?delete r[u]:Oe(Xse(u,r[u],a.value)))}for(const u of Re(n)){const a=i.get(u);a!==void 0&&(a===n[u]?delete n[u]:Oe(Xse(u,n[u],a)))}const s=new Cl(n,r);i.copyAll(s);const o={};for(const u of Re(s.combine())){const a=s.get(u);a!==null&&(o[u]=a)}return Re(o).length===0||i.parseNothing?null:new Gr(e,o)}get parse(){return this._parse}merge(e){this._parse=Object.assign(Object.assign({},this._parse),e.parse),e.remove()}assembleFormatParse(){const e={};for(const n of Re(this._parse)){const r=this._parse[n];ty(n)===1&&(e[n]=r)}return e}producedFields(){return new Set(Re(this._parse))}dependentFields(){return new Set(Re(this._parse))}assembleTransforms(e=!1){return Re(this._parse).filter(n=>e?ty(n)>1:!0).map(n=>{const r=fit(n,this._parse[n]);return r?{type:"formula",expr:r,as:Ase(n)}:null}).filter(n=>n!==null)}}class dc extends Ht{clone(){return new dc(null)}constructor(e){super(e)}dependentFields(){return new Set}producedFields(){return new Set([hy])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:hy}}}class Ay extends Ht{constructor(e,n){super(e),this.params=n}clone(){return new Ay(null,this.params)}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${Rt(this.params)}`}assemble(){return Object.assign({type:"graticule"},this.params===!0?{}:this.params)}}class vy extends Ht{constructor(e,n){super(e),this.params=n}clone(){return new vy(null,this.params)}dependentFields(){return new Set}producedFields(){var e;return new Set([(e=this.params.as)!==null&&e!==void 0?e:"data"])}hash(){return`Hash ${Rt(this.params)}`}assemble(){return Object.assign({type:"sequence"},this.params)}}class Nx extends Ht{constructor(e){super(null),e??(e={name:"source"});let n;if(lc(e)||(n=e.format?Object.assign({},Ys(e.format,["parse"])):{}),py(e))this._data={values:e.values};else if(I2(e)){if(this._data={url:e.url},!n.type){let r=/(?:\.([^.]+))?$/.exec(e.url)[1];Ot(["json","csv","tsv","dsv","topojson"],r)||(r="json"),n.type=r}}else Xue(e)?this._data={values:[{type:"Sphere"}]}:(Yue(e)||lc(e))&&(this._data={});this._generator=lc(e),e.name&&(this._name=e.name),n&&!Kt(n)&&(this._data.format=n)}dependentFields(){return new Set}producedFields(){}get data(){return this._data}hasName(){return!!this._name}get isGenerator(){return this._generator}get dataName(){return this._name}set dataName(e){this._name=e}set parent(e){throw new Error("Source nodes have to be roots.")}remove(){throw new Error("Source nodes are roots and cannot be removed.")}hash(){throw new Error("Cannot hash sources")}assemble(){return Object.assign(Object.assign({name:this._name},this._data),{transform:[]})}}var nle=function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},pit=function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},_y;function N$(t){return t instanceof Nx||t instanceof Ay||t instanceof vy}class F${constructor(){_y.set(this,void 0),nle(this,_y,!1,"f")}setModified(){nle(this,_y,!0,"f")}get modifiedFlag(){return pit(this,_y,"f")}}_y=new WeakMap;class Fx extends F${getNodeDepths(e,n,r){r.set(e,n);for(const i of e.children)this.getNodeDepths(i,n+1,r);return r}optimize(e){const r=[...this.getNodeDepths(e,0,new Map).entries()].sort((i,s)=>s[1]-i[1]);for(const i of r)this.run(i[0]);return this.modifiedFlag}}class L$ extends F${optimize(e){this.run(e);for(const n of e.children)this.optimize(n);return this.modifiedFlag}}class git extends L${mergeNodes(e,n){const r=n.shift();for(const i of n)e.removeChild(i),i.parent=r,i.remove()}run(e){const n=e.children.map(i=>i.hash()),r={};for(let i=0;i<n.length;i++)r[n[i]]===void 0?r[n[i]]=[e.children[i]]:r[n[i]].push(e.children[i]);for(const i of Re(r))r[i].length>1&&(this.setModified(),this.mergeNodes(e,r[i]))}}class mit extends L${constructor(e){super(),this.requiresSelectionId=e&&E$(e)}run(e){e instanceof dc&&(this.requiresSelectionId&&(N$(e.parent)||e.parent instanceof zo||e.parent instanceof Gr)||(this.setModified(),e.remove()))}}class yit extends F${optimize(e){return this.run(e,new Set),this.modifiedFlag}run(e,n){let r=new Set;e instanceof fa&&(r=e.producedFields(),gse(r,n)&&(this.setModified(),e.removeFormulas(n),e.producedFields.length===0&&e.remove()));for(const i of e.children)this.run(i,new Set([...n,...r]))}}class Eit extends L${constructor(){super()}run(e){e instanceof vi&&!e.isRequired()&&(this.setModified(),e.remove())}}class Ait extends Fx{run(e){if(!N$(e)&&!(e.numChildren()>1)){for(const n of e.children)if(n instanceof Gr)if(e instanceof Gr)this.setModified(),e.merge(n);else{if(yse(e.producedFields(),n.dependentFields()))continue;this.setModified(),n.swapWithParent()}}}}class vit extends Fx{run(e){const n=[...e.children],r=e.children.filter(i=>i instanceof Gr);if(e.numChildren()>1&&r.length>=1){const i={},s=new Set;for(const o of r){const u=o.parse;for(const a of Re(u))a in i?i[a]!==u[a]&&s.add(a):i[a]=u[a]}for(const o of s)delete i[o];if(!Kt(i)){this.setModified();const o=new Gr(e,i);for(const u of n){if(u instanceof Gr)for(const a of Re(i))delete u.parse[a];e.removeChild(u),u.parent=o,u instanceof Gr&&Re(u.parse).length===0&&u.remove()}}}}}class _it extends Fx{run(e){e instanceof vi||e.numChildren()>0||e instanceof z2||e instanceof Nx||(this.setModified(),e.remove())}}class Sit extends Fx{run(e){const n=e.children.filter(i=>i instanceof fa),r=n.pop();for(const i of n)this.setModified(),r.merge(i)}}class bit extends Fx{run(e){const n=e.children.filter(i=>i instanceof zo),r={};for(const i of n){const s=Rt(i.groupBy);s in r||(r[s]=[]),r[s].push(i)}for(const i of Re(r)){const s=r[i];if(s.length>1){const o=s.pop();for(const u of s)o.merge(u)&&(e.removeChild(u),u.parent=o,u.remove(),this.setModified())}}}}class Cit extends Fx{constructor(e){super(),this.model=e}run(e){const n=!(N$(e)||e instanceof M2||e instanceof Gr||e instanceof dc),r=[],i=[];for(const s of e.children)s instanceof xa&&(n&&!yse(e.producedFields(),s.dependentFields())?r.push(s):i.push(s));if(r.length>0){const s=r.pop();for(const o of r)s.merge(o,this.model.renameSignal.bind(this.model));this.setModified(),e instanceof xa?e.merge(s,this.model.renameSignal.bind(this.model)):s.swapWithParent()}if(i.length>1){const s=i.pop();for(const o of i)s.merge(o,this.model.renameSignal.bind(this.model));this.setModified()}}}class Tit extends Fx{run(e){const n=[...e.children];if(!A2(n,o=>o instanceof vi)||e.numChildren()<=1)return;const i=[];let s;for(const o of n)if(o instanceof vi){let u=o;for(;u.numChildren()===1;){const[a]=u.children;if(a instanceof vi)u=a;else break}i.push(...u.children),s?(e.removeChild(o),o.parent=s.parent,s.parent.removeChild(s),s.parent=u,this.setModified()):s=u}else i.push(o);if(i.length){this.setModified();for(const o of i)o.parent.removeChild(o),o.parent=s}}}class Lx extends Ht{constructor(e,n){super(e),this.transform=n}clone(){return new Lx(null,ct(this.transform))}addDimensions(e){this.transform.groupby=xl(this.transform.groupby.concat(e),n=>n)}dependentFields(){const e=new Set;return this.transform.groupby&&this.transform.groupby.forEach(e.add,e),this.transform.joinaggregate.map(n=>n.field).filter(n=>n!==void 0).forEach(e.add,e),e}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(e){var n;return(n=e.as)!==null&&n!==void 0?n:Ie(e)}hash(){return`JoinAggregateTransform ${Rt(this.transform)}`}assemble(){const e=[],n=[],r=[];for(const s of this.transform.joinaggregate)n.push(s.op),r.push(this.getDefaultName(s)),e.push(s.field===void 0?null:s.field);const i=this.transform.groupby;return Object.assign({type:"joinaggregate",as:r,ops:n,fields:e},i!==void 0?{groupby:i}:{})}}function Rit(t){return t.stack.stackBy.reduce((e,n)=>{const r=n.fieldDef,i=Ie(r);return i&&e.push(i),e},[])}function Oit(t){return be(t)&&t.every(e=>ze(e))&&t.length>1}class Tl extends Ht{constructor(e,n){super(e),this._stack=n}clone(){return new Tl(null,ct(this._stack))}static makeFromTransform(e,n){const{stack:r,groupby:i,as:s,offset:o="zero"}=n,u=[],a=[];if(n.sort!==void 0)for(const f of n.sort)u.push(f.field),a.push(Qn(f.order,"ascending"));const l={field:u,order:a};let c;return Oit(s)?c=s:ze(s)?c=[s,`${s}_end`]:c=[`${n.stack}_start`,`${n.stack}_end`],new Tl(e,{dimensionFieldDefs:[],stackField:r,groupby:i,offset:o,sort:l,facetby:[],as:c})}static makeFromEncoding(e,n){const r=n.stack,{encoding:i}=n;if(!r)return null;const{groupbyChannels:s,fieldChannel:o,offset:u,impute:a}=r,l=s.map(d=>{const p=i[d];return aa(p)}).filter(d=>!!d),c=Rit(n),f=n.encoding.order;let x;return be(f)||Le(f)?x=Use(f):x=c.reduce((d,p)=>(d.field.push(p),d.order.push(o==="y"?"descending":"ascending"),d),{field:[],order:[]}),new Tl(e,{dimensionFieldDefs:l,stackField:n.vgField(o),facetby:[],stackby:c,sort:x,offset:u,impute:a,as:[n.vgField(o,{suffix:"start",forAs:!0}),n.vgField(o,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(e){this._stack.facetby.push(...e)}dependentFields(){const e=new Set;return e.add(this._stack.stackField),this.getGroupbyFields().forEach(e.add,e),this._stack.facetby.forEach(e.add,e),this._stack.sort.field.forEach(e.add,e),e}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${Rt(this._stack)}`}getGroupbyFields(){const{dimensionFieldDefs:e,impute:n,groupby:r}=this._stack;return e.length>0?e.map(i=>i.bin?n?[Ie(i,{binSuffix:"mid"})]:[Ie(i,{}),Ie(i,{binSuffix:"end"})]:[Ie(i)]).flat():r??[]}assemble(){const e=[],{facetby:n,dimensionFieldDefs:r,stackField:i,stackby:s,sort:o,offset:u,impute:a,as:l}=this._stack;if(a)for(const c of r){const{bandPosition:f=.5,bin:x}=c;if(x){const d=Ie(c,{expr:"datum"}),p=Ie(c,{expr:"datum",binSuffix:"end"});e.push({type:"formula",expr:`${f}*${d}+${1-f}*${p}`,as:Ie(c,{binSuffix:"mid",forAs:!0})})}e.push({type:"impute",field:i,groupby:[...s,...n],key:Ie(c,{binSuffix:"mid"}),method:"value",value:0})}return e.push({type:"stack",groupby:[...this.getGroupbyFields(),...n],field:i,sort:o,as:l,offset:u}),e}}class H2 extends Ht{constructor(e,n){super(e),this.transform=n}clone(){return new H2(null,ct(this.transform))}addDimensions(e){this.transform.groupby=xl(this.transform.groupby.concat(e),n=>n)}dependentFields(){var e,n;const r=new Set;return((e=this.transform.groupby)!==null&&e!==void 0?e:[]).forEach(r.add,r),((n=this.transform.sort)!==null&&n!==void 0?n:[]).forEach(i=>r.add(i.field)),this.transform.window.map(i=>i.field).filter(i=>i!==void 0).forEach(r.add,r),r}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(e){var n;return(n=e.as)!==null&&n!==void 0?n:Ie(e)}hash(){return`WindowTransform ${Rt(this.transform)}`}assemble(){var e;const n=[],r=[],i=[],s=[];for(const x of this.transform.window)r.push(x.op),i.push(this.getDefaultName(x)),s.push(x.param===void 0?null:x.param),n.push(x.field===void 0?null:x.field);const o=this.transform.frame,u=this.transform.groupby;if(o&&o[0]===null&&o[1]===null&&r.every(x=>nI(x)))return Object.assign({type:"joinaggregate",as:i,ops:r,fields:n},u!==void 0?{groupby:u}:{});const a=[],l=[];if(this.transform.sort!==void 0)for(const x of this.transform.sort)a.push(x.field),l.push((e=x.order)!==null&&e!==void 0?e:"ascending");const c={field:a,order:l},f=this.transform.ignorePeers;return Object.assign(Object.assign(Object.assign({type:"window",params:s,as:i,ops:r,fields:n,sort:c},f!==void 0?{ignorePeers:f}:{}),u!==void 0?{groupby:u}:{}),o!==void 0?{frame:o}:{})}}function Dit(t){function e(n){if(!(n instanceof z2)){const r=n.clone();if(r instanceof vi){const i=$$+r.getSource();r.setSource(i),t.model.component.data.outputNodes[i]=r}else(r instanceof zo||r instanceof Tl||r instanceof H2||r instanceof Lx)&&r.addDimensions(t.fields);for(const i of n.children.flatMap(e))i.parent=r;return[r]}return n.children.flatMap(e)}return e}function I$(t){if(t instanceof z2)if(t.numChildren()===1&&!(t.children[0]instanceof vi)){const e=t.children[0];(e instanceof zo||e instanceof Tl||e instanceof H2||e instanceof Lx)&&e.addDimensions(t.fields),e.swapWithParent(),I$(t)}else{const e=t.model.component.data.main;rle(e);const n=Dit(t),r=t.children.map(n).flat();for(const i of r)i.parent=e}else t.children.map(I$)}function rle(t){if(t instanceof vi&&t.type===tn.Main&&t.numChildren()===1){const e=t.children[0];e instanceof z2||(e.swapWithParent(),rle(t))}}const $$="scale_",JC=5;function B$(t){for(const e of t){for(const n of e.children)if(n.parent!==e)return!1;if(!B$(e.children))return!1}return!0}function Ho(t,e){let n=!1;for(const r of e)n=t.optimize(r)||n;return n}function ile(t,e,n){let r=t.sources,i=!1;return i=Ho(new Eit,r)||i,i=Ho(new mit(e),r)||i,r=r.filter(s=>s.numChildren()>0),i=Ho(new _it,r)||i,r=r.filter(s=>s.numChildren()>0),n||(i=Ho(new Ait,r)||i,i=Ho(new Cit(e),r)||i,i=Ho(new yit,r)||i,i=Ho(new vit,r)||i,i=Ho(new bit,r)||i,i=Ho(new Sit,r)||i,i=Ho(new git,r)||i,i=Ho(new Tit,r)||i),t.sources=r,i}function wit(t,e){B$(t.sources);let n=0,r=0;for(let i=0;i<JC&&ile(t,e,!0);i++)n++;t.sources.map(I$);for(let i=0;i<JC&&ile(t,e,!1);i++)r++;B$(t.sources),Math.max(n,r)===JC&&Oe(`Maximum optimization runs(${JC}) reached.`)}class Wi{constructor(e){Object.defineProperty(this,"signal",{enumerable:!0,get:e})}static fromName(e,n){return new Wi(()=>e(n))}}var Nit=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function sle(t){$n(t)?Fit(t):Lit(t)}function Fit(t){const e=t.component.scales;for(const n of Re(e)){const r=$it(t,n);if(e[n].setWithExplicit("domains",r),kit(t,n),t.component.data.isFaceted){let s=t;for(;!Qo(s)&&s.parent;)s=s.parent;if(s.component.resolve.scale[n]==="shared")for(const u of r.value)vl(u)&&(u.data=$$+u.data.replace($$,""))}}}function Lit(t){for(const n of t.children)sle(n);const e=t.component.scales;for(const n of Re(e)){let r,i=null;for(const s of t.children){const o=s.component.scales[n];if(o){r===void 0?r=o.getWithExplicit("domains"):r=ac(r,o.getWithExplicit("domains"),"domains","scale",M$);const u=o.get("selectionExtent");i&&u&&i.param!==u.param&&Oe(wJe),i=u}}e[n].setWithExplicit("domains",r),i&&e[n].set("selectionExtent",i,!0)}}function Iit(t,e,n,r){if(t==="unaggregated"){const{valid:i,reason:s}=ole(e,n);if(!i){Oe(s);return}}else if(t===void 0&&r.useUnaggregatedDomain){const{valid:i}=ole(e,n);if(i)return"unaggregated"}return t}function $it(t,e){const n=t.getScaleComponent(e).get("type"),{encoding:r}=t,i=Iit(t.scaleDomain(e),t.typedFieldDef(e),n,t.config.scale);return i!==t.scaleDomain(e)&&(t.specifiedScales[e]=Object.assign(Object.assign({},t.specifiedScales[e]),{domain:i})),e==="x"&&Gn(r.x2)?Gn(r.x)?ac(hc(n,i,t,"x"),hc(n,i,t,"x2"),"domain","scale",M$):hc(n,i,t,"x2"):e==="y"&&Gn(r.y2)?Gn(r.y)?ac(hc(n,i,t,"y"),hc(n,i,t,"y2"),"domain","scale",M$):hc(n,i,t,"y2"):hc(n,i,t,e)}function Bit(t,e,n){return t.map(r=>({signal:`{data: ${NC(r,{timeUnit:n,type:e})}}`}))}function k$(t,e,n){var r;const i=(r=Ei(n))===null||r===void 0?void 0:r.unit;return e==="temporal"||i?Bit(t,e,i):[t]}function hc(t,e,n,r){const{encoding:i}=n,s=Gn(i[r]),{type:o}=s,u=s.timeUnit;if(tet(e)){const f=hc(t,void 0,n,r),x=k$(e.unionWith,o,u);return ca([...f.value,...x])}else{if(Ye(e))return ca([e]);if(e&&e!=="unaggregated"&&!Aoe(e))return ca(k$(e,o,u))}const a=n.stack;if(a&&r===a.fieldChannel){if(a.offset==="normalize")return vs([[0,1]]);const f=n.requestDataName(tn.Main);return vs([{data:f,field:n.vgField(r,{suffix:"start"})},{data:f,field:n.vgField(r,{suffix:"end"})}])}const l=tc(r)&&Le(s)?Pit(n,r,t):void 0;if(oa(s)){const f=k$([s.datum],o,u);return vs(f)}const c=s;if(e==="unaggregated"){const f=n.requestDataName(tn.Main),{field:x}=s;return vs([{data:f,field:Ie({field:x,aggregate:"min"})},{data:f,field:Ie({field:x,aggregate:"max"})}])}else if(en(c.bin)){if(ar(t))return vs(t==="bin-ordinal"?[]:[{data:tC(l)?n.requestDataName(tn.Main):n.requestDataName(tn.Raw),field:n.vgField(r,xy(c,r)?{binSuffix:"range"}:{}),sort:l===!0||!Qe(l)?{field:n.vgField(r,{}),op:"min"}:l}]);{const{bin:f}=c;if(en(f)){const x=w$(n,c.field,f);return vs([new Wi(()=>{const d=n.getSignalName(x);return`[${d}.start, ${d}.stop]`})])}else return vs([{data:n.requestDataName(tn.Main),field:n.vgField(r,{})}])}}else if(c.timeUnit&&Ot(["time","utc"],t)&&qoe(c,$n(n)?n.encoding[El(r)]:void 0,n.markDef,n.config)){const f=n.requestDataName(tn.Main);return vs([{data:f,field:n.vgField(r)},{data:f,field:n.vgField(r,{suffix:"end"})}])}else return vs(l?[{data:tC(l)?n.requestDataName(tn.Main):n.requestDataName(tn.Raw),field:n.vgField(r),sort:l}]:[{data:n.requestDataName(tn.Main),field:n.vgField(r)}])}function P$(t,e){const{op:n,field:r,order:i}=t;return Object.assign(Object.assign({op:n??(e?"sum":SC)},r?{field:ko(r)}:{}),i?{order:i}:{})}function kit(t,e){var n;const r=t.component.scales[e],i=t.specifiedScales[e].domain,s=(n=t.fieldDef(e))===null||n===void 0?void 0:n.bin,o=Aoe(i)&&i,u=_x(s)&&xC(s.extent)&&s.extent;(o||u)&&r.set("selectionExtent",o??u,!0)}function Pit(t,e,n){if(!ar(n))return;const r=t.fieldDef(e),i=r.sort;if(Poe(i))return{op:"min",field:U2(r,e),order:"ascending"};const{stack:s}=t,o=s?new Set([...s.groupbyFields,...s.stackBy.map(u=>u.fieldDef.field)]):void 0;if(sa(i)){const u=s&&!o.has(i.field);return P$(i,u)}else if(koe(i)){const{encoding:u,order:a}=i,l=t.fieldDef(u),{aggregate:c,field:f}=l,x=s&&!o.has(f);if(Al(c)||nc(c))return P$({field:Ie(l),order:a},x);if(nI(c)||!c)return P$({op:c,field:f,order:a},x)}else{if(i==="descending")return{op:"min",field:t.vgField(e),order:"descending"};if(Ot(["ascending",void 0],i))return!0}}function ole(t,e){const{aggregate:n,type:r}=t;return n?ze(n)&&!hJe.has(n)?{valid:!1,reason:iZe(n)}:r==="quantitative"&&e==="log"?{valid:!1,reason:sZe(t)}:{valid:!0}:{valid:!1,reason:rZe(t)}}function M$(t,e,n,r){return t.explicit&&e.explicit&&Oe(cZe(n,r,t.value,e.value)),{explicit:t.explicit,value:[...t.value,...e.value]}}function Mit(t){const e=xl(t.map(o=>vl(o)?Nit(o,["sort"]):o),Rt),n=xl(t.map(o=>{if(vl(o)){const u=o.sort;return u!==void 0&&!tC(u)&&("op"in u&&u.op==="count"&&delete u.field,u.order==="ascending"&&delete u.order),u}}).filter(o=>o!==void 0),Rt);if(e.length===0)return;if(e.length===1){const o=t[0];if(vl(o)&&n.length>0){let u=n[0];if(n.length>1)Oe(roe),u=!0;else if(Qe(u)&&"field"in u){const a=u.field;o.field===a&&(u=u.order?{order:u.order}:!0)}return Object.assign(Object.assign({},o),{sort:u})}return o}const r=xl(n.map(o=>tC(o)||!("op"in o)||ze(o.op)&&o.op in cJe?o:(Oe(xZe(o)),!0)),Rt);let i;r.length===1?i=r[0]:r.length>1&&(Oe(roe),i=!0);const s=xl(t.map(o=>vl(o)?o.data:null),o=>o);return s.length===1&&s[0]!==null?Object.assign({data:s[0],fields:e.map(u=>u.field)},i?{sort:i}:{}):Object.assign({fields:e},i?{sort:i}:{})}function j$(t){if(vl(t)&&ze(t.field))return t.field;if(gJe(t)){let e;for(const n of t.fields)if(vl(n)&&ze(n.field)){if(!e)e=n.field;else if(e!==n.field)return Oe(dZe),e}return Oe(hZe),e}else if(mJe(t)){Oe(pZe);const e=t.fields[0];return ze(e)?e:void 0}}function ZC(t,e){const r=t.component.scales[e].get("domains").map(i=>(vl(i)&&(i.data=t.lookupDataSource(i.data)),i));return Mit(r)}var jit=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function ule(t){return Q2(t)||z$(t)?t.children.reduce((e,n)=>e.concat(ule(n)),ale(t)):ale(t)}function ale(t){return Re(t.component.scales).reduce((e,n)=>{const r=t.component.scales[n];if(r.merged)return e;const i=r.combine(),{name:s,type:o,selectionExtent:u,domains:a,range:l,reverse:c}=i,f=jit(i,["name","type","selectionExtent","domains","range","reverse"]),x=Uit(i.range,s,n,t),d=ZC(t,n),p=u?Nnt(t,u,r,d):null;return e.push(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:s,type:o},d?{domain:d}:{}),p?{domainRaw:p}:{}),{range:x}),c!==void 0?{reverse:c}:{}),f)),e},[])}function Uit(t,e,n,r){if(Sr(n)){if(ic(t))return{step:{signal:`${e}_step`}}}else if(Qe(t)&&vl(t))return Object.assign(Object.assign({},t),{data:r.lookupDataSource(t.data)});return t}class lle extends Cl{constructor(e,n){super({},{name:e}),this.merged=!1,this.setWithExplicit("type",n)}domainDefinitelyIncludesZero(){return this.get("zero")!==!1?!0:A2(this.get("domains"),e=>be(e)&&e.length===2&&e[0]<=0&&e[1]>=0)}}const qit=["range","scheme"];function zit(t){const e=t.component.scales;for(const n of fC){const r=e[n];if(!r)continue;const i=Hit(n,t);r.setWithExplicit("range",i)}}function cle(t,e){const n=t.fieldDef(e);if(n!=null&&n.bin){const{bin:r,field:i}=n,s=Hi(e),o=t.getName(s);if(Qe(r)&&r.binned&&r.step!==void 0)return new Wi(()=>{const u=t.scaleName(e),a=`(domain("${u}")[1] - domain("${u}")[0]) / ${r.step}`;return`${t.getSignalName(o)} / (${a})`});if(en(r)){const u=w$(t,i,r);return new Wi(()=>{const a=t.getSignalName(u),l=`(${a}.stop - ${a}.start) / ${a}.step`;return`${t.getSignalName(o)} / (${l})`})}}}function Hit(t,e){const n=e.specifiedScales[t],{size:r}=e,s=e.getScaleComponent(t).get("type");for(const f of qit)if(n[f]!==void 0){const x=bI(s,f),d=voe(t,f);if(!x)Oe(toe(s,f,t));else if(d)Oe(d);else switch(f){case"range":{const p=n.range;if(be(p)){if(Sr(t))return ca(p.map(g=>{if(g==="width"||g==="height"){const m=e.getName(g),y=e.getSignalName.bind(e);return Wi.fromName(y,m)}return g}))}else if(Qe(p))return ca({data:e.requestDataName(tn.Main),field:p.field,sort:{op:"min",field:e.vgField(t)}});return ca(p)}case"scheme":return ca(Qit(n[f]))}}const o=t===En||t==="xOffset"?"width":"height",u=r[o];if(la(u)){if(Sr(t))if(ar(s)){const f=fle(u,e,t);if(f)return ca({step:f})}else Oe(noe(o));else if(b2(t)){const f=t===Y0?"x":"y";if(e.getScaleComponent(f).get("type")==="band"){const p=xle(u,s);if(p)return ca(p)}}}const{rangeMin:a,rangeMax:l}=n,c=Git(t,e);return(a!==void 0||l!==void 0)&&bI(s,"rangeMin")&&be(c)&&c.length===2?ca([a??c[0],l??c[1]]):vs(c)}function Qit(t){return eet(t)?Object.assign({scheme:t.name},Ys(t,["name"])):{scheme:t}}function Git(t,e){const{size:n,config:r,mark:i,encoding:s}=e,o=e.getSignalName.bind(e),{type:u}=Gn(s[t]),l=e.getScaleComponent(t).get("type"),{domain:c,domainMid:f}=e.specifiedScales[t];switch(t){case En:case ur:{if(Ot(["point","band"],l)){const p=dle(t,n,r.view);if(la(p))return{step:fle(p,e,t)}}const x=Hi(t),d=e.getName(x);return t===ur&&As(l)?[Wi.fromName(o,d),0]:[0,Wi.fromName(o,d)]}case Y0:case _2:return Wit(t,e,l);case ml:{const x=e.component.scales[t].get("zero"),d=hle(i,x,r),p=Kit(i,n,e,r);return O2(l)?Yit(d,p,Vit(l,r,c,t)):[d,p]}case Mo:return[0,Math.PI*2];case Ex:return[0,360];case Xu:return[0,new Wi(()=>{const x=e.getSignalName("width"),d=e.getSignalName("height");return`min(${x},${d})/2`})];case J0:return[r.scale.minStrokeWidth,r.scale.maxStrokeWidth];case Z0:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case zi:return"symbol";case qi:case ea:case ta:return l==="ordinal"?u==="nominal"?"category":"ordinal":f!==void 0?"diverging":i==="rect"||i==="geoshape"?"heatmap":"ramp";case yl:case K0:case X0:return[r.scale.minOpacity,r.scale.maxOpacity]}}function fle(t,e,n){var r,i,s,o,u;const{encoding:a}=e,l=e.getScaleComponent(n),c=Tse(n),f=a[c];if(_ue({step:t,offsetIsDiscrete:ut(f)&&hoe(f.type)})==="offset"&&tue(a,c)){const d=e.getScaleComponent(c);let g=`domain('${e.scaleName(c)}').length`;if(d.get("type")==="band"){const y=(i=(r=d.get("paddingInner"))!==null&&r!==void 0?r:d.get("padding"))!==null&&i!==void 0?i:0,E=(o=(s=d.get("paddingOuter"))!==null&&s!==void 0?s:d.get("padding"))!==null&&o!==void 0?o:0;g=`bandspace(${g}, ${y}, ${E})`}const m=(u=l.get("paddingInner"))!==null&&u!==void 0?u:l.get("padding");return{signal:`${t.step} * ${g} / (1-${AJe(m)})`}}else return t.step}function xle(t,e){if(_ue({step:t,offsetIsDiscrete:ar(e)})==="offset")return{step:t.step}}function Wit(t,e,n){const r=t===Y0?"x":"y",s=e.getScaleComponent(r).get("type"),o=e.scaleName(r);if(s==="band"){const u=dle(r,e.size,e.config.view);if(la(u)){const a=xle(u,n);if(a)return a}return[0,{signal:`bandwidth('${o}')`}]}else return IXe(`Cannot use ${t} scale if ${r} scale is not discrete.`)}function dle(t,e,n){const r=t===En?"width":"height",i=e[r];return i||MC(n,r)}function Vit(t,e,n,r){switch(t){case"quantile":return e.scale.quantileCount;case"quantize":return e.scale.quantizeCount;case"threshold":return n!==void 0&&be(n)?n.length+1:(Oe(bZe(r)),3)}}function Yit(t,e,n){const r=()=>{const i=_l(e),s=_l(t),o=`(${i} - ${s}) / (${n} - 1)`;return`sequence(${s}, ${i} + ${o}, ${o})`};return Ye(e)?new Wi(r):{signal:r()}}function hle(t,e,n){if(e)return Ye(e)?{signal:`${e.signal} ? 0 : ${hle(t,!1,n)}`}:0;switch(t){case"bar":case"tick":return n.scale.minBandSize;case"line":case"trail":case"rule":return n.scale.minStrokeWidth;case"text":return n.scale.minFontSize;case"point":case"square":case"circle":return n.scale.minSize}throw new Error(hC("size",t))}const ple=.95;function Kit(t,e,n,r){const i={x:cle(n,"x"),y:cle(n,"y")};switch(t){case"bar":case"tick":{if(r.scale.maxBandSize!==void 0)return r.scale.maxBandSize;const s=gle(e,i,r.view);return rn(s)?s-1:new Wi(()=>`${s.signal} - 1`)}case"line":case"trail":case"rule":return r.scale.maxStrokeWidth;case"text":return r.scale.maxFontSize;case"point":case"square":case"circle":{if(r.scale.maxSize)return r.scale.maxSize;const s=gle(e,i,r.view);return rn(s)?Math.pow(ple*s,2):new Wi(()=>`pow(${ple} * ${s.signal}, 2)`)}}throw new Error(hC("size",t))}function gle(t,e,n){const r=la(t.width)?t.width.step:PC(n,"width"),i=la(t.height)?t.height.step:PC(n,"height");return e.x||e.y?new Wi(()=>`min(${[e.x?e.x.signal:r,e.y?e.y.signal:i].join(", ")})`):Math.min(r,i)}function mle(t,e){$n(t)?Xit(t,e):Ale(t,e)}function Xit(t,e){const n=t.component.scales,{config:r,encoding:i,markDef:s,specifiedScales:o}=t;for(const u of Re(n)){const a=o[u],l=n[u],c=t.getScaleComponent(u),f=Gn(i[u]),x=a[e],d=c.get("type"),p=c.get("padding"),g=c.get("paddingInner"),m=bI(d,e),y=voe(u,e);if(x!==void 0&&(m?y&&Oe(y):Oe(toe(d,e,u))),m&&y===void 0)if(x!==void 0){const E=f.timeUnit,A=f.type;switch(e){case"domainMax":case"domainMin":bx(a[e])||A==="temporal"||E?l.set(e,{signal:NC(a[e],{type:A,timeUnit:E})},!0):l.set(e,a[e],!0);break;default:l.copyKeyFromObject(e,a)}}else{const E=e in yle?yle[e]({model:t,channel:u,fieldOrDatumDef:f,scaleType:d,scalePadding:p,scalePaddingInner:g,domain:a.domain,domainMin:a.domainMin,domainMax:a.domainMax,markDef:s,config:r,hasNestedOffsetScale:qI(i,u)}):r.scale[e];E!==void 0&&l.set(e,E,!1)}}}const yle={bins:({model:t,fieldOrDatumDef:e})=>Le(e)?Jit(t,e):void 0,interpolate:({channel:t,fieldOrDatumDef:e})=>Zit(t,e.type),nice:({scaleType:t,channel:e,domain:n,domainMin:r,domainMax:i,fieldOrDatumDef:s})=>est(t,e,n,r,i,s),padding:({channel:t,scaleType:e,fieldOrDatumDef:n,markDef:r,config:i})=>tst(t,e,i.scale,n,r,i.bar),paddingInner:({scalePadding:t,channel:e,markDef:n,scaleType:r,config:i,hasNestedOffsetScale:s})=>nst(t,e,n.type,r,i.scale,s),paddingOuter:({scalePadding:t,channel:e,scaleType:n,scalePaddingInner:r,config:i,hasNestedOffsetScale:s})=>rst(t,e,n,r,i.scale,s),reverse:({fieldOrDatumDef:t,scaleType:e,channel:n,config:r})=>{const i=Le(t)?t.sort:void 0;return ist(e,i,n,r.scale)},zero:({channel:t,fieldOrDatumDef:e,domain:n,markDef:r,scaleType:i})=>sst(t,e,n,r,i)};function Ele(t){$n(t)?zit(t):Ale(t,"range")}function Ale(t,e){const n=t.component.scales;for(const r of t.children)e==="range"?Ele(r):mle(r,e);for(const r of Re(n)){let i;for(const s of t.children){const o=s.component.scales[r];if(o){const u=o.getWithExplicit(e);i=ac(i,u,e,"scale",Vue((a,l)=>{switch(e){case"range":return a.step&&l.step?a.step-l.step:0}return 0}))}}n[r].setWithExplicit(e,i)}}function Jit(t,e){const n=e.bin;if(en(n)){const r=w$(t,e.field,n);return new Wi(()=>t.getSignalName(r))}else if(yi(n)&&_x(n)&&n.step!==void 0)return{step:n.step}}function Zit(t,e){if(Ot([qi,ea,ta],t)&&e!=="nominal")return"hcl"}function est(t,e,n,r,i,s){var o;if(!(!((o=aa(s))===null||o===void 0)&&o.bin||be(n)||i!=null||r!=null||Ot([Gi.TIME,Gi.UTC],t)))return Sr(e)?!0:void 0}function tst(t,e,n,r,i,s){if(Sr(t)){if(Uo(e)){if(n.continuousPadding!==void 0)return n.continuousPadding;const{type:o,orient:u}=i;if(o==="bar"&&!(Le(r)&&(r.bin||r.timeUnit))&&(u==="vertical"&&t==="x"||u==="horizontal"&&t==="y"))return s.continuousBandSize}if(e===Gi.POINT)return n.pointPadding}}function nst(t,e,n,r,i,s=!1){if(t===void 0){if(Sr(e)){const{bandPaddingInner:o,barBandPaddingInner:u,rectBandPaddingInner:a,bandWithNestedOffsetPaddingInner:l}=i;return s?l:Qn(o,n==="bar"?u:a)}else if(b2(e)&&r===Gi.BAND)return i.offsetBandPaddingInner}}function rst(t,e,n,r,i,s=!1){if(t===void 0){if(Sr(e)){const{bandPaddingOuter:o,bandWithNestedOffsetPaddingOuter:u}=i;if(s)return u;if(n===Gi.BAND)return Qn(o,Ye(r)?{signal:`${r.signal}/2`}:r/2)}else if(b2(e)){if(n===Gi.POINT)return .5;if(n===Gi.BAND)return i.offsetBandPaddingOuter}}}function ist(t,e,n,r){if(n==="x"&&r.xReverse!==void 0)return As(t)&&e==="descending"?Ye(r.xReverse)?{signal:`!${r.xReverse.signal}`}:!r.xReverse:r.xReverse;if(As(t)&&e==="descending")return!0}function sst(t,e,n,r,i){if(!!n&&n!=="unaggregated"&&As(i)){if(be(n)){const o=n[0],u=n[n.length-1];if(o<=0&&u>=0)return!0}return!1}if(t==="size"&&e.type==="quantitative"&&!O2(i))return!0;if(!(Le(e)&&e.bin)&&Ot([...na,...nJe],t)){const{orient:o,type:u}=r;return!(Ot(["bar","area","line","trail"],u)&&(o==="horizontal"&&t==="y"||o==="vertical"&&t==="x"))}return!1}function ost(t,e,n,r,i=!1){const s=ust(e,n,r,i),{type:o}=t;return tc(e)?o!==void 0?oet(e,o)?Le(n)&&!set(o,n.type)?(Oe(aZe(o,s)),s):o:(Oe(uZe(e,o,s)),s):s:null}function ust(t,e,n,r){var i;switch(e.type){case"nominal":case"ordinal":{if(S2(t)||tI(t)==="discrete")return t==="shape"&&e.type==="ordinal"&&Oe(aI(t,"ordinal")),"ordinal";if(Sr(t)||b2(t)){if(Ot(["rect","bar","image","rule"],n.type)||r)return"band"}else if(n.type==="arc"&&t in eI)return"band";const s=n[Hi(t)];return D2(s)||PI(e)&&(!((i=e.axis)===null||i===void 0)&&i.tickBand)?"band":"point"}case"temporal":return S2(t)?"time":tI(t)==="discrete"?(Oe(aI(t,"temporal")),"ordinal"):Le(e)&&e.timeUnit&&Ei(e.timeUnit).utc?"utc":"time";case"quantitative":return S2(t)?Le(e)&&en(e.bin)?"bin-ordinal":"linear":tI(t)==="discrete"?(Oe(aI(t,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error(Zse(e.type))}function ast(t,{ignoreRange:e}={}){vle(t),sle(t);for(const n of iet)mle(t,n);e||Ele(t)}function vle(t){$n(t)?t.component.scales=lst(t):t.component.scales=fst(t)}function lst(t){const{encoding:e,mark:n,markDef:r}=t,i={};for(const s of fC){const o=Gn(e[s]);if(o&&n===boe&&s===zi&&o.type===R2)continue;let u=o&&o.scale;if(b2(s)){const a=Rse(s);if(!qI(e,a)){u&&Oe(WJe(s));continue}}if(o&&u!==null&&u!==!1){u??(u={});const a=qI(e,s),l=ost(u,s,o,r,a);i[s]=new lle(t.scaleName(`${s}`,!0),{value:l,explicit:u.type===l})}}return i}const cst=Vue((t,e)=>poe(t)-poe(e));function fst(t){var e,n;const r=t.component.scales={},i={},s=t.component.resolve;for(const o of t.children){vle(o);for(const u of Re(o.component.scales))if((e=(n=s.scale)[u])!==null&&e!==void 0||(n[u]=Mae(u,t)),s.scale[u]==="shared"){const a=i[u],l=o.component.scales[u].getWithExplicit("type");a?YZe(a.value,l.value)?i[u]=ac(a,l,"type","scale",cst):(s.scale[u]="independent",delete i[u]):i[u]=l}}for(const o of Re(i)){const u=t.scaleName(o,!0),a=i[o];r[o]=new lle(u,a);for(const l of t.children){const c=l.component.scales[o];c&&(l.renameScale(c.get("name"),u),c.merged=!0)}}return r}var U$=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};class q${constructor(){this.nameMap={}}rename(e,n){this.nameMap[e]=n}has(e){return this.nameMap[e]!==void 0}get(e){for(;this.nameMap[e]&&e!==this.nameMap[e];)e=this.nameMap[e];return e}}function $n(t){return(t==null?void 0:t.type)==="unit"}function Qo(t){return(t==null?void 0:t.type)==="facet"}function z$(t){return(t==null?void 0:t.type)==="concat"}function Q2(t){return(t==null?void 0:t.type)==="layer"}class H${constructor(e,n,r,i,s,o,u){var a,l;this.type=n,this.parent=r,this.config=s,this.correctDataNames=c=>{var f,x,d;return!((f=c.from)===null||f===void 0)&&f.data&&(c.from.data=this.lookupDataSource(c.from.data)),!((d=(x=c.from)===null||x===void 0?void 0:x.facet)===null||d===void 0)&&d.data&&(c.from.facet.data=this.lookupDataSource(c.from.facet.data)),c},this.parent=r,this.config=s,this.view=Qi(u),this.name=(a=e.name)!==null&&a!==void 0?a:i,this.title=rc(e.title)?{text:e.title}:e.title?Qi(e.title):void 0,this.scaleNameMap=r?r.scaleNameMap:new q$,this.projectionNameMap=r?r.projectionNameMap:new q$,this.signalNameMap=r?r.signalNameMap:new q$,this.data=e.data,this.description=e.description,this.transforms=dnt((l=e.transform)!==null&&l!==void 0?l:[]),this.layout=n==="layer"||n==="unit"?{}:Att(e,n,s),this.component={data:{sources:r?r.component.data.sources:[],outputNodes:r?r.component.data.outputNodes:{},outputNodeRefCounts:r?r.component.data.outputNodeRefCounts:{},isFaceted:bC(e)||(r==null?void 0:r.component.data.isFaceted)&&e.data===void 0},layoutSize:new Cl,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:Object.assign({scale:{},axis:{},legend:{}},o?ct(o):{}),selection:null,scales:null,projection:null,axes:{},legends:{}}}get width(){return this.getSizeSignalRef("width")}get height(){return this.getSizeSignalRef("height")}parse(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}parseScale(){ast(this)}parseProjection(){Jae(this)}renameTopLevelLayoutSizeSignal(){this.getName("width")!=="width"&&this.renameSignal(this.getName("width"),"width"),this.getName("height")!=="height"&&this.renameSignal(this.getName("height"),"height")}parseLegends(){Wae(this)}assembleEncodeFromView(e){const n=U$(e,["style"]),r={};for(const i of Re(n)){const s=n[i];s!==void 0&&(r[i]=un(s))}return r}assembleGroupEncodeEntry(e){let n={};return this.view&&(n=this.assembleEncodeFromView(this.view)),!e&&(this.description&&(n.description=un(this.description)),this.type==="unit"||this.type==="layer")?Object.assign({width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height")},n??{}):Kt(n)?void 0:n}assembleLayout(){if(!this.layout)return;const e=this.layout,{spacing:n}=e,r=U$(e,["spacing"]),{component:i,config:s}=this,o=Ort(i.layoutHeaders,s);return Object.assign(Object.assign(Object.assign({padding:n},this.assembleDefaultLayout()),r),o?{titleBand:o}:{})}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:e}=this.component;let n=[];for(const r of Xs)e[r].title&&n.push(_rt(this,r));for(const r of b$)n=n.concat(Srt(this,r));return n}assembleAxes(){return crt(this.component.axes,this.config)}assembleLegends(){return Yae(this)}assembleProjections(){return Jrt(this)}assembleTitle(){var e,n,r;const i=(e=this.title)!==null&&e!==void 0?e:{},{encoding:s}=i,o=U$(i,["encoding"]),u=Object.assign(Object.assign(Object.assign({},$se(this.config.title).nonMarkTitleProperties),o),s?{encode:{update:s}}:{});if(u.text)return Ot(["unit","layer"],this.type)?Ot(["middle",void 0],u.anchor)&&((n=u.frame)!==null&&n!==void 0||(u.frame="group")):(r=u.anchor)!==null&&r!==void 0||(u.anchor="start"),Kt(u)?void 0:u}assembleGroup(e=[]){const n={};e=e.concat(this.assembleSignals()),e.length>0&&(n.signals=e);const r=this.assembleLayout();r&&(n.layout=r),n.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const i=!this.parent||Qo(this.parent)?ule(this):[];i.length>0&&(n.scales=i);const s=this.assembleAxes();s.length>0&&(n.axes=s);const o=this.assembleLegends();return o.length>0&&(n.legends=o),n}getName(e){return yn((this.name?`${this.name}_`:"")+e)}getDataName(e){return this.getName(tn[e].toLowerCase())}requestDataName(e){const n=this.getDataName(e),r=this.component.data.outputNodeRefCounts;return r[n]=(r[n]||0)+1,n}getSizeSignalRef(e){if(Qo(this.parent)){const n=kae(e),r=cC(n),i=this.component.scales[r];if(i&&!i.merged){const s=i.get("type"),o=i.get("range");if(ar(s)&&ic(o)){const u=i.get("name"),a=ZC(this,r),l=j$(a);if(l){const c=Ie({aggregate:"distinct",field:l},{expr:"datum"});return{signal:Bae(u,i,c)}}else return Oe(oI(r)),null}}}return{signal:this.signalNameMap.get(this.getName(e))}}lookupDataSource(e){const n=this.component.data.outputNodes[e];return n?n.getSource():e}getSignalName(e){return this.signalNameMap.get(e)}renameSignal(e,n){this.signalNameMap.rename(e,n)}renameScale(e,n){this.scaleNameMap.rename(e,n)}renameProjection(e,n){this.projectionNameMap.rename(e,n)}scaleName(e,n){if(n)return this.getName(e);if(bse(e)&&tc(e)&&this.component.scales[e]||this.scaleNameMap.has(this.getName(e)))return this.scaleNameMap.get(this.getName(e))}projectionName(e){if(e)return this.getName("projection");if(this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection")))return this.projectionNameMap.get(this.getName("projection"))}getScaleComponent(e){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");const n=this.component.scales[e];return n&&!n.merged?n:this.parent?this.parent.getScaleComponent(e):void 0}getSelectionComponent(e,n){let r=this.component.selection[e];if(!r&&this.parent&&(r=this.parent.getSelectionComponent(e,n)),!r)throw new Error(CJe(n));return r}hasAxisOrientSignalRef(){var e,n;return((e=this.component.axes.x)===null||e===void 0?void 0:e.some(r=>r.hasOrientSignalRef()))||((n=this.component.axes.y)===null||n===void 0?void 0:n.some(r=>r.hasOrientSignalRef()))}}class _le extends H${vgField(e,n={}){const r=this.fieldDef(e);if(r)return Ie(r,n)}reduceFieldDef(e,n){return Ket(this.getMapping(),(r,i,s)=>{const o=aa(i);return o?e(r,o,s):r},n)}forEachFieldDef(e,n){HI(this.getMapping(),(r,i)=>{const s=aa(r);s&&e(s,i)},n)}}var xst=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};class eT extends Ht{constructor(e,n){var r,i,s;super(e),this.transform=n,this.transform=ct(n);const o=(r=this.transform.as)!==null&&r!==void 0?r:[void 0,void 0];this.transform.as=[(i=o[0])!==null&&i!==void 0?i:"value",(s=o[1])!==null&&s!==void 0?s:"density"]}clone(){return new eT(null,ct(this.transform))}dependentFields(){var e;return new Set([this.transform.density,...(e=this.transform.groupby)!==null&&e!==void 0?e:[]])}producedFields(){return new Set(this.transform.as)}hash(){return`DensityTransform ${Rt(this.transform)}`}assemble(){const e=this.transform,{density:n}=e,r=xst(e,["density"]);return Object.assign({type:"kde",field:n},r)}}class Sy extends Ht{constructor(e,n){super(e),this.filter=n}clone(){return new Sy(null,Object.assign({},this.filter))}static make(e,n){const{config:r,mark:i,markDef:s}=n;if(jt("invalid",s,r)!=="filter")return null;const u=n.reduceFieldDef((a,l,c)=>{const f=tc(c)&&n.getScaleComponent(c);if(f){const x=f.get("type");As(x)&&l.aggregate!=="count"&&!sc(i)&&(a[l.field]=l)}return a},{});return Re(u).length?new Sy(e,u):null}dependentFields(){return new Set(Re(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${Rt(this.filter)}`}assemble(){const e=Re(this.filter).reduce((n,r)=>{const i=this.filter[r],s=Ie(i,{expr:"datum"});return i!==null&&(i.type==="temporal"?n.push(`(isDate(${s}) || (isValid(${s}) && isFinite(+${s})))`):i.type==="quantitative"&&(n.push(`isValid(${s})`),n.push(`isFinite(+${s})`))),n},[]);return e.length>0?{type:"filter",expr:e.join(" && ")}:null}}class tT extends Ht{constructor(e,n){super(e),this.transform=n,this.transform=ct(n);const{flatten:r,as:i=[]}=this.transform;this.transform.as=r.map((s,o)=>{var u;return(u=i[o])!==null&&u!==void 0?u:s})}clone(){return new tT(this.parent,ct(this.transform))}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${Rt(this.transform)}`}assemble(){const{flatten:e,as:n}=this.transform;return{type:"flatten",fields:e,as:n}}}class nT extends Ht{constructor(e,n){var r,i,s;super(e),this.transform=n,this.transform=ct(n);const o=(r=this.transform.as)!==null&&r!==void 0?r:[void 0,void 0];this.transform.as=[(i=o[0])!==null&&i!==void 0?i:"key",(s=o[1])!==null&&s!==void 0?s:"value"]}clone(){return new nT(null,ct(this.transform))}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${Rt(this.transform)}`}assemble(){const{fold:e,as:n}=this.transform;return{type:"fold",fields:e,as:n}}}class G2 extends Ht{constructor(e,n,r,i){super(e),this.fields=n,this.geojson=r,this.signal=i}clone(){return new G2(null,ct(this.fields),this.geojson,this.signal)}static parseAll(e,n){if(n.component.projection&&!n.component.projection.isFit)return e;let r=0;for(const i of[[Zu,Ju],[Ks,jo]]){const s=i.map(o=>{const u=Gn(n.encoding[o]);return Le(u)?u.field:oa(u)?{expr:`${u.datum}`}:qo(u)?{expr:`${u.value}`}:void 0});(s[0]||s[1])&&(e=new G2(e,s,null,n.getName(`geojson_${r++}`)))}if(n.channelHasField(zi)){const i=n.typedFieldDef(zi);i.type===R2&&(e=new G2(e,null,i.field,n.getName(`geojson_${r++}`)))}return e}dependentFields(){var e;const n=((e=this.fields)!==null&&e!==void 0?e:[]).filter(ze);return new Set([...this.geojson?[this.geojson]:[],...n])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${Rt(this.fields)}`}assemble(){return[...this.geojson?[{type:"filter",expr:`isValid(datum["${this.geojson}"])`}]:[],Object.assign(Object.assign(Object.assign({type:"geojson"},this.fields?{fields:this.fields}:{}),this.geojson?{geojson:this.geojson}:{}),{signal:this.signal})]}}class by extends Ht{constructor(e,n,r,i){super(e),this.projection=n,this.fields=r,this.as=i}clone(){return new by(null,this.projection,ct(this.fields),ct(this.as))}static parseAll(e,n){if(!n.projectionName())return e;for(const r of[[Zu,Ju],[Ks,jo]]){const i=r.map(o=>{const u=Gn(n.encoding[o]);return Le(u)?u.field:oa(u)?{expr:`${u.datum}`}:qo(u)?{expr:`${u.value}`}:void 0}),s=r[0]===Ks?"2":"";(i[0]||i[1])&&(e=new by(e,n.projectionName(),i,[n.getName(`x${s}`),n.getName(`y${s}`)]))}return e}dependentFields(){return new Set(this.fields.filter(ze))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${Rt(this.fields)} ${Rt(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}class Ix extends Ht{constructor(e,n){super(e),this.transform=n}clone(){return new Ix(null,ct(this.transform))}dependentFields(){var e;return new Set([this.transform.impute,this.transform.key,...(e=this.transform.groupby)!==null&&e!==void 0?e:[]])}producedFields(){return new Set([this.transform.impute])}processSequence(e){const{start:n=0,stop:r,step:i}=e;return{signal:`sequence(${[n,r,...i?[i]:[]].join(",")})`}}static makeFromTransform(e,n){return new Ix(e,n)}static makeFromEncoding(e,n){const r=n.encoding,i=r.x,s=r.y;if(Le(i)&&Le(s)){const o=i.impute?i:s.impute?s:void 0;if(o===void 0)return;const u=i.impute?s:s.impute?i:void 0,{method:a,value:l,frame:c,keyvals:f}=o.impute,x=rue(n.mark,r);return new Ix(e,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({impute:o.field,key:u.field},a?{method:a}:{}),l!==void 0?{value:l}:{}),c?{frame:c}:{}),f!==void 0?{keyvals:f}:{}),x.length?{groupby:x}:{}))}return null}hash(){return`Impute ${Rt(this.transform)}`}assemble(){const{impute:e,key:n,keyvals:r,method:i,groupby:s,value:o,frame:u=[null,null]}=this.transform,a=Object.assign(Object.assign(Object.assign(Object.assign({type:"impute",field:e,key:n},r?{keyvals:Ytt(r)?this.processSequence(r):r}:{}),{method:"value"}),s?{groupby:s}:{}),{value:!i||i==="value"?o:null});if(i&&i!=="value"){const l=Object.assign({type:"window",as:[`imputed_${e}_value`],ops:[i],fields:[e],frame:u,ignorePeers:!1},s?{groupby:s}:{}),c={type:"formula",expr:`datum.${e} === null ? datum.imputed_${e}_value : datum.${e}`,as:e};return[a,l,c]}else return[a]}}var dst=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};class rT extends Ht{constructor(e,n){var r,i,s;super(e),this.transform=n,this.transform=ct(n);const o=(r=this.transform.as)!==null&&r!==void 0?r:[void 0,void 0];this.transform.as=[(i=o[0])!==null&&i!==void 0?i:n.on,(s=o[1])!==null&&s!==void 0?s:n.loess]}clone(){return new rT(null,ct(this.transform))}dependentFields(){var e;return new Set([this.transform.loess,this.transform.on,...(e=this.transform.groupby)!==null&&e!==void 0?e:[]])}producedFields(){return new Set(this.transform.as)}hash(){return`LoessTransform ${Rt(this.transform)}`}assemble(){const e=this.transform,{loess:n,on:r}=e,i=dst(e,["loess","on"]);return Object.assign({type:"loess",x:r,y:n},i)}}class Cy extends Ht{constructor(e,n,r){super(e),this.transform=n,this.secondary=r}clone(){return new Cy(null,ct(this.transform),this.secondary)}static make(e,n,r,i){const s=n.component.data.sources,{from:o}=r;let u=null;if(Ktt(o)){let a=Tle(o.data,s);a||(a=new Nx(o.data),s.push(a));const l=n.getName(`lookup_${i}`);u=new vi(a,l,tn.Lookup,n.component.data.outputNodeRefCounts),n.component.data.outputNodes[l]=u}else if(Xtt(o)){const a=o.param;r=Object.assign({as:a},r);let l;try{l=n.getSelectionComponent(yn(a),a)}catch{throw new Error(OJe(a))}if(u=l.materialized,!u)throw new Error(DJe(a))}return new Cy(e,r,u.getSource())}dependentFields(){return new Set([this.transform.lookup])}producedFields(){return new Set(this.transform.as?qe(this.transform.as):this.transform.from.fields)}hash(){return`Lookup ${Rt({transform:this.transform,secondary:this.secondary})}`}assemble(){let e;if(this.transform.from.fields)e=Object.assign({values:this.transform.from.fields},this.transform.as?{as:qe(this.transform.as)}:{});else{let n=this.transform.as;ze(n)||(Oe(kJe),n="_lookup"),e={as:[n]}}return Object.assign(Object.assign({type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup]},e),this.transform.default?{default:this.transform.default}:{})}}var hst=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};class iT extends Ht{constructor(e,n){var r,i,s;super(e),this.transform=n,this.transform=ct(n);const o=(r=this.transform.as)!==null&&r!==void 0?r:[void 0,void 0];this.transform.as=[(i=o[0])!==null&&i!==void 0?i:"prob",(s=o[1])!==null&&s!==void 0?s:"value"]}clone(){return new iT(null,ct(this.transform))}dependentFields(){var e;return new Set([this.transform.quantile,...(e=this.transform.groupby)!==null&&e!==void 0?e:[]])}producedFields(){return new Set(this.transform.as)}hash(){return`QuantileTransform ${Rt(this.transform)}`}assemble(){const e=this.transform,{quantile:n}=e,r=hst(e,["quantile"]);return Object.assign({type:"quantile",field:n},r)}}var pst=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};class sT extends Ht{constructor(e,n){var r,i,s;super(e),this.transform=n,this.transform=ct(n);const o=(r=this.transform.as)!==null&&r!==void 0?r:[void 0,void 0];this.transform.as=[(i=o[0])!==null&&i!==void 0?i:n.on,(s=o[1])!==null&&s!==void 0?s:n.regression]}clone(){return new sT(null,ct(this.transform))}dependentFields(){var e;return new Set([this.transform.regression,this.transform.on,...(e=this.transform.groupby)!==null&&e!==void 0?e:[]])}producedFields(){return new Set(this.transform.as)}hash(){return`RegressionTransform ${Rt(this.transform)}`}assemble(){const e=this.transform,{regression:n,on:r}=e,i=pst(e,["regression","on"]);return Object.assign({type:"regression",x:r,y:n},i)}}class oT extends Ht{constructor(e,n){super(e),this.transform=n}clone(){return new oT(null,ct(this.transform))}addDimensions(e){var n;this.transform.groupby=xl(((n=this.transform.groupby)!==null&&n!==void 0?n:[]).concat(e),r=>r)}producedFields(){}dependentFields(){var e;return new Set([this.transform.pivot,this.transform.value,...(e=this.transform.groupby)!==null&&e!==void 0?e:[]])}hash(){return`PivotTransform ${Rt(this.transform)}`}assemble(){const{pivot:e,value:n,groupby:r,limit:i,op:s}=this.transform;return Object.assign(Object.assign(Object.assign({type:"pivot",field:e,value:n},i!==void 0?{limit:i}:{}),s!==void 0?{op:s}:{}),r!==void 0?{groupby:r}:{})}}class uT extends Ht{constructor(e,n){super(e),this.transform=n}clone(){return new uT(null,ct(this.transform))}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${Rt(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}function Sle(t){let e=0;function n(r,i){var s;if(r instanceof Nx&&!r.isGenerator&&!I2(r.data)&&(t.push(i),i={name:null,source:i.name,transform:[]}),r instanceof Gr&&(r.parent instanceof Nx&&!i.source?(i.format=Object.assign(Object.assign({},(s=i.format)!==null&&s!==void 0?s:{}),{parse:r.assembleFormatParse()}),i.transform.push(...r.assembleTransforms(!0))):i.transform.push(...r.assembleTransforms())),r instanceof z2){i.name||(i.name=`data_${e++}`),!i.source||i.transform.length>0?(t.push(i),r.data=i.name):r.data=i.source,t.push(...r.assemble());return}switch((r instanceof Ay||r instanceof vy||r instanceof Sy||r instanceof M2||r instanceof j2||r instanceof by||r instanceof zo||r instanceof Cy||r instanceof H2||r instanceof Lx||r instanceof nT||r instanceof tT||r instanceof eT||r instanceof rT||r instanceof iT||r instanceof sT||r instanceof dc||r instanceof uT||r instanceof oT)&&i.transform.push(r.assemble()),(r instanceof xa||r instanceof fa||r instanceof Ix||r instanceof Tl||r instanceof G2)&&i.transform.push(...r.assemble()),r instanceof vi&&(i.source&&i.transform.length===0?r.setSource(i.source):r.parent instanceof vi?r.setSource(i.name):(i.name||(i.name=`data_${e++}`),r.setSource(i.name),r.numChildren()===1&&(t.push(i),i={name:null,source:i.name,transform:[]}))),r.numChildren()){case 0:r instanceof vi&&(!i.source||i.transform.length>0)&&t.push(i);break;case 1:n(r.children[0],i);break;default:{i.name||(i.name=`data_${e++}`);let o=i.name;!i.source||i.transform.length>0?t.push(i):o=i.source;for(const u of r.children)n(u,{name:null,source:o,transform:[]});break}}}return n}function gst(t){const e=[],n=Sle(e);for(const r of t.children)n(r,{source:t.name,name:null,transform:[]});return e}function mst(t,e){var n,r;const i=[],s=Sle(i);let o=0;for(const a of t.sources){a.hasName()||(a.dataName=`source_${o++}`);const l=a.assemble();s(a,l)}for(const a of i)a.transform.length===0&&delete a.transform;let u=0;for(const[a,l]of i.entries())((n=l.transform)!==null&&n!==void 0?n:[]).length===0&&!l.source&&i.splice(u++,0,i.splice(a,1)[0]);for(const a of i)for(const l of(r=a.transform)!==null&&r!==void 0?r:[])l.type==="lookup"&&(l.from=t.outputNodes[l.from].getSource());for(const a of i)a.name in e&&(a.values=e[a.name]);return i}function yst(t){return t==="top"||t==="left"||Ye(t)?"header":"footer"}function Est(t){for(const e of Xs)Ast(t,e);Cle(t,"x"),Cle(t,"y")}function Ast(t,e){var n;const{facet:r,config:i,child:s,component:o}=t;if(t.channelHasField(e)){const u=r[e],a=q2("title",null,i,e);let l=w2(u,i,{allowDisabling:!0,includeDefault:a===void 0||!!a});s.component.layoutHeaders[e].title&&(l=be(l)?l.join(", "):l,l+=` / ${s.component.layoutHeaders[e].title}`,s.component.layoutHeaders[e].title=null);const c=q2("labelOrient",u.header,i,e),f=u.header!==null?Qn((n=u.header)===null||n===void 0?void 0:n.labels,i.header.labels,!0):!1,x=Ot(["bottom","right"],c)?"footer":"header";o.layoutHeaders[e]={title:u.header!==null?l:null,facetFieldDef:u,[x]:e==="facet"?[]:[ble(t,e,f)]}}}function ble(t,e,n){const r=e==="row"?"height":"width";return{labels:n,sizeSignal:t.child.component.layoutSize.get(r)?t.child.getSizeSignalRef(r):void 0,axes:[]}}function Cle(t,e){var n;const{child:r}=t;if(r.component.axes[e]){const{layoutHeaders:i,resolve:s}=t.component;if(s.axis[e]=O$(s,e),s.axis[e]==="shared"){const o=e==="x"?"column":"row",u=i[o];for(const a of r.component.axes[e]){const l=yst(a.get("orient"));(n=u[l])!==null&&n!==void 0||(u[l]=[ble(t,o,!1)]);const c=Ey(a,"main",t.config,{header:!0});c&&u[l][0].axes.push(c),a.mainExtracted=!0}}}}function vst(t){Q$(t),aT(t,"width"),aT(t,"height")}function _st(t){Q$(t);const e=t.layout.columns===1?"width":"childWidth",n=t.layout.columns===void 0?"height":"childHeight";aT(t,e),aT(t,n)}function Q$(t){for(const e of t.children)e.parseLayoutSize()}function aT(t,e){var n;const r=kae(e),i=cC(r),s=t.component.resolve,o=t.component.layoutSize;let u;for(const a of t.children){const l=a.component.layoutSize.getWithExplicit(r),c=(n=s.scale[i])!==null&&n!==void 0?n:Mae(i,t);if(c==="independent"&&l.value==="step"){u=void 0;break}if(u){if(c==="independent"&&u.value!==l.value){u=void 0;break}u=ac(u,l,r,"")}else u=l}if(u){for(const a of t.children)t.renameSignal(a.getName(r),t.getName(e)),a.component.layoutSize.set(r,"merged",!1);o.setWithExplicit(e,u)}else o.setWithExplicit(e,{explicit:!1,value:void 0})}function Sst(t){const{size:e,component:n}=t;for(const r of na){const i=Hi(r);if(e[i]){const s=e[i];n.layoutSize.set(i,la(s)?"step":s,!0)}else{const s=bst(t,i);n.layoutSize.set(i,s,!1)}}}function bst(t,e){const n=e==="width"?"x":"y",r=t.config,i=t.getScaleComponent(n);if(i){const s=i.get("type"),o=i.get("range");if(ar(s)){const u=MC(r.view,e);return ic(o)||la(u)?"step":u}else return n$(r.view,e)}else{if(t.hasProjection||t.mark==="arc")return n$(r.view,e);{const s=MC(r.view,e);return la(s)?s.step:s}}}function G$(t,e,n){return Ie(e,Object.assign({suffix:`by_${Ie(t)}`},n??{}))}class Ty extends _le{constructor(e,n,r,i){super(e,"facet",n,r,i,e.resolve),this.child=X$(e.spec,this,this.getName("child"),void 0,i),this.children=[this.child],this.facet=this.initFacet(e.facet)}initFacet(e){if(!cy(e))return{facet:this.initFacetFieldDef(e,"facet")};const n=Re(e),r={};for(const i of n){if(![dl,hl].includes(i)){Oe(hC(i,"facet"));break}const s=e[i];if(s.field===void 0){Oe(uI(s,i));break}r[i]=this.initFacetFieldDef(s,i)}return r}initFacetFieldDef(e,n){const r=UI(e,n);return r.header?r.header=Qi(r.header):r.header===null&&(r.header=null),r}channelHasField(e){return!!this.facet[e]}fieldDef(e){return this.facet[e]}parseData(){this.component.data=lT(this),this.child.parseData()}parseLayoutSize(){Q$(this)}parseSelections(){this.child.parseSelections(),this.component.selection=this.child.component.selection}parseMarkGroup(){this.child.parseMarkGroup()}parseAxesAndHeaders(){this.child.parseAxesAndHeaders(),Est(this)}assembleSelectionTopLevelSignals(e){return this.child.assembleSelectionTopLevelSignals(e)}assembleSignals(){return this.child.assembleSignals(),[]}assembleSelectionData(e){return this.child.assembleSelectionData(e)}getHeaderLayoutMixins(){var e,n,r;const i={};for(const s of Xs)for(const o of C$){const u=this.component.layoutHeaders[s],a=u[o],{facetFieldDef:l}=u;if(l){const c=q2("titleOrient",l.header,this.config,s);if(["right","bottom"].includes(c)){const f=YC(s,c);(e=i.titleAnchor)!==null&&e!==void 0||(i.titleAnchor={}),i.titleAnchor[f]="end"}}if(a!=null&&a[0]){const c=s==="row"?"height":"width",f=o==="header"?"headerBand":"footerBand";s!=="facet"&&!this.child.component.layoutSize.get(c)&&((n=i[f])!==null&&n!==void 0||(i[f]={}),i[f][s]=.5),u.title&&((r=i.offset)!==null&&r!==void 0||(i.offset={}),i.offset[s==="row"?"rowTitle":"columnTitle"]=10)}}return i}assembleDefaultLayout(){const{column:e,row:n}=this.facet,r=e?this.columnDistinctSignal():n?1:void 0;let i="all";return(!n&&this.component.resolve.scale.x==="independent"||!e&&this.component.resolve.scale.y==="independent")&&(i="none"),Object.assign(Object.assign(Object.assign({},this.getHeaderLayoutMixins()),r?{columns:r}:{}),{bounds:"full",align:i})}assembleLayoutSignals(){return this.child.assembleLayoutSignals()}columnDistinctSignal(){if(!(this.parent&&this.parent instanceof Ty))return{signal:`length(data('${this.getName("column_domain")}'))`}}assembleGroupStyle(){}assembleGroup(e){return this.parent&&this.parent instanceof Ty?Object.assign(Object.assign({},this.channelHasField("column")?{encode:{update:{columns:{field:Ie(this.facet.column,{prefix:"distinct"})}}}}:{}),super.assembleGroup(e)):super.assembleGroup(e)}getCardinalityAggregateForChild(){const e=[],n=[],r=[];if(this.child instanceof Ty){if(this.child.channelHasField("column")){const i=Ie(this.child.facet.column);e.push(i),n.push("distinct"),r.push(`distinct_${i}`)}}else for(const i of na){const s=this.child.component.scales[i];if(s&&!s.merged){const o=s.get("type"),u=s.get("range");if(ar(o)&&ic(u)){const a=ZC(this.child,i),l=j$(a);l?(e.push(l),n.push("distinct"),r.push(`distinct_${l}`)):Oe(oI(i))}}}return{fields:e,ops:n,as:r}}assembleFacet(){const{name:e,data:n}=this.component.data.facetRoot,{row:r,column:i}=this.facet,{fields:s,ops:o,as:u}=this.getCardinalityAggregateForChild(),a=[];for(const c of Xs){const f=this.facet[c];if(f){a.push(Ie(f));const{bin:x,sort:d}=f;if(en(x)&&a.push(Ie(f,{binSuffix:"end"})),sa(d)){const{field:p,op:g=SC}=d,m=G$(f,d);r&&i?(s.push(m),o.push("max"),u.push(m)):(s.push(p),o.push(g),u.push(m))}else if(be(d)){const p=U2(f,c);s.push(p),o.push("max"),u.push(p)}}}const l=!!r&&!!i;return Object.assign({name:e,data:n,groupby:a},l||s.length>0?{aggregate:Object.assign(Object.assign({},l?{cross:l}:{}),s.length?{fields:s,ops:o,as:u}:{})}:{})}facetSortFields(e){const{facet:n}=this,r=n[e];return r?sa(r.sort)?[G$(r,r.sort,{expr:"datum"})]:be(r.sort)?[U2(r,e,{expr:"datum"})]:[Ie(r,{expr:"datum"})]:[]}facetSortOrder(e){const{facet:n}=this,r=n[e];if(r){const{sort:i}=r;return[(sa(i)?i.order:!be(i)&&i)||"ascending"]}return[]}assembleLabelTitle(){var e;const{facet:n,config:r}=this;if(n.facet)return T$(n.facet,"facet",r);const i={row:["top","bottom"],column:["left","right"]};for(const s of b$)if(n[s]){const o=q2("labelOrient",(e=n[s])===null||e===void 0?void 0:e.header,r,s);if(i[s].includes(o))return T$(n[s],s,r)}}assembleMarks(){const{child:e}=this,n=this.component.data.facetRoot,r=gst(n),i=e.assembleGroupEncodeEntry(!1),s=this.assembleLabelTitle()||e.assembleTitle(),o=e.assembleGroupStyle();return[Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:this.getName("cell"),type:"group"},s?{title:s}:{}),o?{style:o}:{}),{from:{facet:this.assembleFacet()},sort:{field:Xs.map(a=>this.facetSortFields(a)).flat(),order:Xs.map(a=>this.facetSortOrder(a)).flat()}}),r.length>0?{data:r}:{}),i?{encode:{update:i}}:{}),e.assembleGroup(Rnt(this,[])))]}getMapping(){return this.facet}}function Cst(t,e){const{row:n,column:r}=e;if(n&&r){let i=null;for(const s of[n,r])if(sa(s.sort)){const{field:o,op:u=SC}=s.sort;t=i=new Lx(t,{joinaggregate:[{op:u,field:o,as:G$(s,s.sort,{forAs:!0})}],groupby:[Ie(s)]})}return i}return null}function Tle(t,e){var n,r,i,s;for(const o of e){const u=o.data;if(t.name&&o.hasName()&&t.name!==o.dataName)continue;const a=(n=t.format)===null||n===void 0?void 0:n.mesh,l=(r=u.format)===null||r===void 0?void 0:r.feature;if(a&&l)continue;const c=(i=t.format)===null||i===void 0?void 0:i.feature;if((c||l)&&c!==l)continue;const f=(s=u.format)===null||s===void 0?void 0:s.mesh;if(!((a||f)&&a!==f)){if(py(t)&&py(u)){if(fl(t.values,u.values))return o}else if(I2(t)&&I2(u)){if(t.url===u.url)return o}else if(Yue(t)&&t.name===o.dataName)return o}}return null}function Tst(t,e){if(t.data||!t.parent){if(t.data===null){const r=new Nx({values:[]});return e.push(r),r}const n=Tle(t.data,e);if(n)return lc(t.data)||(n.data.format=$Xe({},t.data.format,n.data.format)),!n.hasName()&&t.data.name&&(n.dataName=t.data.name),n;{const r=new Nx(t.data);return e.push(r),r}}else return t.parent.component.data.facetRoot?t.parent.component.data.facetRoot:t.parent.component.data.main}function Rst(t,e,n){var r,i;let s=0;for(const o of e.transforms){let u,a;if(unt(o))a=t=new j2(t,o),u="derived";else if(u$(o)){const l=xit(o);a=t=(r=Gr.makeWithAncestors(t,{},l,n))!==null&&r!==void 0?r:t,t=new M2(t,e,o.filter)}else if(Uue(o))a=t=xa.makeFromTransform(t,o,e),u="number";else if(lnt(o))u="date",n.getWithExplicit(o.field).value===void 0&&(t=new Gr(t,{[o.field]:u}),n.set(o.field,u,!1)),a=t=fa.makeFromTransform(t,o);else if(cnt(o))a=t=zo.makeFromTransform(t,o),u="number",E$(e)&&(t=new dc(t));else if(jue(o))a=t=Cy.make(t,e,o,s++),u="derived";else if(int(o))a=t=new H2(t,o),u="number";else if(snt(o))a=t=new Lx(t,o),u="number";else if(fnt(o))a=t=Tl.makeFromTransform(t,o),u="derived";else if(xnt(o))a=t=new nT(t,o),u="derived";else if(ont(o))a=t=new tT(t,o),u="derived";else if(Jtt(o))a=t=new oT(t,o),u="derived";else if(rnt(o))t=new uT(t,o);else if(ant(o))a=t=Ix.makeFromTransform(t,o),u="derived";else if(Ztt(o))a=t=new eT(t,o),u="derived";else if(ent(o))a=t=new iT(t,o),u="derived";else if(tnt(o))a=t=new sT(t,o),u="derived";else if(nnt(o))a=t=new rT(t,o),u="derived";else{Oe(BJe(o));continue}if(a&&u!==void 0)for(const l of(i=a.producedFields())!==null&&i!==void 0?i:[])n.set(l,u,!1)}return t}function lT(t){var e,n,r,i,s,o,u,a,l,c;let f=Tst(t,t.component.data.sources);const{outputNodes:x,outputNodeRefCounts:d}=t.component.data,p=t.data,m=!(p&&(lc(p)||I2(p)||py(p)))&&t.parent?t.parent.component.data.ancestorParse.clone():new bnt;lc(p)?(Kue(p)?f=new vy(f,p.sequence):c$(p)&&(f=new Ay(f,p.graticule)),m.parseNothing=!0):((e=p==null?void 0:p.format)===null||e===void 0?void 0:e.parse)===null&&(m.parseNothing=!0),f=(n=Gr.makeExplicit(f,t,m))!==null&&n!==void 0?n:f,f=new dc(f);const y=t.parent&&Q2(t.parent);($n(t)||Qo(t))&&y&&(f=(r=xa.makeFromEncoding(f,t))!==null&&r!==void 0?r:f),t.transforms.length>0&&(f=Rst(f,t,m));const E=hit(t),A=dit(t);f=(i=Gr.makeWithAncestors(f,{},Object.assign(Object.assign({},E),A),m))!==null&&i!==void 0?i:f,$n(t)&&(f=G2.parseAll(f,t),f=by.parseAll(f,t)),($n(t)||Qo(t))&&(y||(f=(s=xa.makeFromEncoding(f,t))!==null&&s!==void 0?s:f),f=(o=fa.makeFromEncoding(f,t))!==null&&o!==void 0?o:f,f=j2.parseAllForSortIndex(f,t));const v=t.getDataName(tn.Raw),_=new vi(f,v,tn.Raw,d);if(x[v]=_,f=_,$n(t)){const R=zo.makeFromEncoding(f,t);R&&(f=R,E$(t)&&(f=new dc(f))),f=(u=Ix.makeFromEncoding(f,t))!==null&&u!==void 0?u:f,f=(a=Tl.makeFromEncoding(f,t))!==null&&a!==void 0?a:f}$n(t)&&(f=(l=Sy.make(f,t))!==null&&l!==void 0?l:f);const S=t.getDataName(tn.Main),b=new vi(f,S,tn.Main,d);x[S]=b,f=b,$n(t)&&art(t,b);let C=null;if(Qo(t)){const R=t.getName("facet");f=(c=Cst(f,t.facet))!==null&&c!==void 0?c:f,C=new z2(f,t,R,b.getSource()),x[R]=C}return Object.assign(Object.assign({},t.component.data),{outputNodes:x,outputNodeRefCounts:d,raw:_,main:b,facetRoot:C,ancestorParse:m})}class Ost extends H${constructor(e,n,r,i){var s,o,u,a;super(e,"concat",n,r,i,e.resolve),(((o=(s=e.resolve)===null||s===void 0?void 0:s.axis)===null||o===void 0?void 0:o.x)==="shared"||((a=(u=e.resolve)===null||u===void 0?void 0:u.axis)===null||a===void 0?void 0:a.y)==="shared")&&Oe(LJe),this.children=this.getChildren(e).map((l,c)=>X$(l,this,this.getName(`concat_${c}`),void 0,i))}parseData(){this.component.data=lT(this);for(const e of this.children)e.parseData()}parseSelections(){this.component.selection={};for(const e of this.children){e.parseSelections();for(const n of Re(e.component.selection))this.component.selection[n]=e.component.selection[n]}}parseMarkGroup(){for(const e of this.children)e.parseMarkGroup()}parseAxesAndHeaders(){for(const e of this.children)e.parseAxesAndHeaders()}getChildren(e){return kC(e)?e.vconcat:t$(e)?e.hconcat:e.concat}parseLayoutSize(){_st(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(e){return this.children.reduce((n,r)=>r.assembleSelectionTopLevelSignals(n),e)}assembleSignals(){return this.children.forEach(e=>e.assembleSignals()),[]}assembleLayoutSignals(){const e=R$(this);for(const n of this.children)e.push(...n.assembleLayoutSignals());return e}assembleSelectionData(e){return this.children.reduce((n,r)=>r.assembleSelectionData(n),e)}assembleMarks(){return this.children.map(e=>{const n=e.assembleTitle(),r=e.assembleGroupStyle(),i=e.assembleGroupEncodeEntry(!1);return Object.assign(Object.assign(Object.assign(Object.assign({type:"group",name:e.getName("group")},n?{title:n}:{}),r?{style:r}:{}),i?{encode:{update:i}}:{}),e.assembleGroup())})}assembleGroupStyle(){}assembleDefaultLayout(){const e=this.layout.columns;return Object.assign(Object.assign({},e!=null?{columns:e}:{}),{bounds:"full",align:"each"})}}function Dst(t){return t===!1||t===null}const wst=Object.assign(Object.assign({disable:1,gridScale:1,scale:1},Joe),{labelExpr:1,encode:1}),Rle=Re(wst);class W$ extends Cl{constructor(e={},n={},r=!1){super(),this.explicit=e,this.implicit=n,this.mainExtracted=r}clone(){return new W$(ct(this.explicit),ct(this.implicit),this.mainExtracted)}hasAxisPart(e){return e==="axis"?!0:e==="grid"||e==="title"?!!this.get(e):!Dst(this.get(e))}hasOrientSignalRef(){return Ye(this.explicit.orient)}}function Nst(t,e,n){var r;const{encoding:i,config:s}=t,o=(r=Gn(i[e]))!==null&&r!==void 0?r:Gn(i[El(e)]),u=t.axis(e)||{},{format:a,formatType:l}=u;return Rx(l)?Object.assign({text:FI({fieldOrDatumDef:o,field:"datum.value",format:a,formatType:l,config:s})},n):n}function Fst(t){return na.reduce((e,n)=>(t.component.scales[n]&&(e[n]=[Mst(n,t)]),e),{})}const Lst={bottom:"top",top:"bottom",left:"right",right:"left"};function Ist(t){var e;const{axes:n,resolve:r}=t.component,i={top:0,bottom:0,right:0,left:0};for(const s of t.children){s.parseAxesAndHeaders();for(const o of Re(s.component.axes))r.axis[o]=O$(t.component.resolve,o),r.axis[o]==="shared"&&(n[o]=$st(n[o],s.component.axes[o]),n[o]||(r.axis[o]="independent",delete n[o]))}for(const s of na){for(const o of t.children)if(o.component.axes[s]){if(r.axis[s]==="independent"){n[s]=((e=n[s])!==null&&e!==void 0?e:[]).concat(o.component.axes[s]);for(const u of o.component.axes[s]){const{value:a,explicit:l}=u.getWithExplicit("orient");if(!Ye(a)){if(i[a]>0&&!l){const c=Lst[a];i[a]>i[c]&&u.set("orient",c,!1)}i[a]++}}}delete o.component.axes[s]}if(r.axis[s]==="independent"&&n[s]&&n[s].length>1)for(const o of n[s])o.get("grid")&&!o.explicit.grid&&(o.implicit.grid=!1)}}function $st(t,e){if(t){if(t.length!==e.length)return;const n=t.length;for(let r=0;r<n;r++){const i=t[r],s=e[r];if(!!i!=!!s)return;if(i&&s){const o=i.getWithExplicit("orient"),u=s.getWithExplicit("orient");if(o.explicit&&u.explicit&&o.value!==u.value)return;t[r]=Bst(i,s)}}}else return e.map(n=>n.clone());return t}function Bst(t,e){for(const n of Rle){const r=ac(t.getWithExplicit(n),e.getWithExplicit(n),n,"axis",(i,s)=>{switch(n){case"title":return Hse(i,s);case"gridScale":return{explicit:i.explicit,value:Qn(i.value,s.value)}}return UC(i,s,n,"axis")});t.setWithExplicit(n,r)}return t}function kst(t,e,n,r,i){if(e==="disable")return n!==void 0;switch(n=n||{},e){case"titleAngle":case"labelAngle":return t===(Ye(n.labelAngle)?n.labelAngle:iC(n.labelAngle));case"values":return!!n.values;case"encode":return!!n.encoding||!!n.labelAngle;case"title":if(t===Nae(r,i))return!0}return t===n[e]}const Pst=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function Mst(t,e){var n,r,i;let s=e.axis(t);const o=new W$,u=Gn(e.encoding[t]),{mark:a,config:l}=e,c=(s==null?void 0:s.orient)||((n=l[t==="x"?"axisX":"axisY"])===null||n===void 0?void 0:n.orient)||((r=l.axis)===null||r===void 0?void 0:r.orient)||yrt(t),f=e.getScaleComponent(t).get("type"),x=frt(t,f,c,e.config),d=s!==void 0?!s:_$("disable",l.style,s==null?void 0:s.style,x).configValue;if(o.set("disable",d,s!==void 0),d)return o;s=s||{};const p=prt(u,s,t,l.style,x),g={fieldOrDatumDef:u,axis:s,channel:t,model:e,scaleType:f,orient:c,labelAngle:p,mark:a,config:l};for(const E of Rle){const A=E in Oae?Oae[E](g):Zoe(E)?s[E]:void 0,v=A!==void 0,_=kst(A,E,s,e,t);if(v&&_)o.set(E,A,_);else{const{configValue:S=void 0,configFrom:b=void 0}=Zoe(E)&&E!=="values"?_$(E,l.style,s.style,x):{},C=S!==void 0;v&&!C?o.set(E,A,_):(b!=="vgAxisConfig"||Pst.has(E)&&C||dy(S)||Ye(S))&&o.set(E,S,!1)}}const m=(i=s.encoding)!==null&&i!==void 0?i:{},y=Xoe.reduce((E,A)=>{var v;if(!o.hasAxisPart(A))return E;const _=Pae((v=m[A])!==null&&v!==void 0?v:{},e),S=A==="labels"?Nst(e,t,_):_;return S!==void 0&&!Kt(S)&&(E[A]={update:S}),E},{});return Kt(y)||o.set("encode",y,!!s.encoding||s.labelAngle!==void 0),o}function jst({encoding:t,size:e}){for(const n of na){const r=Hi(n);la(e[r])&&ua(t[n])&&(delete e[r],Oe(noe(r)))}return e}function Ust(t,e,n){const r=Qi(t),i=jt("orient",r,n);if(r.orient=Qst(r.type,e,i),i!==void 0&&i!==r.orient&&Oe(eZe(r.orient,i)),r.type==="bar"&&r.orient){const u=jt("cornerRadiusEnd",r,n);if(u!==void 0){const a=r.orient==="horizontal"&&e.x2||r.orient==="vertical"&&e.y2?["cornerRadius"]:met[r.orient];for(const l of a)r[l]=u;r.cornerRadiusEnd!==void 0&&delete r.cornerRadiusEnd}}return jt("opacity",r,n)===void 0&&(r.opacity=zst(r.type,e)),jt("cursor",r,n)===void 0&&(r.cursor=qst(r,e,n)),r}function qst(t,e,n){return e.href||t.href||jt("href",t,n)?"pointer":t.cursor}function zst(t,e){if(Ot([EC,CI,TI,RI],t)&&!zI(e))return .7}function Hst(t,e,{graticule:n}){if(n)return!1;const r=Sx("filled",t,e),i=t.type;return Qn(r,i!==EC&&i!==yC&&i!==AC)}function Qst(t,e,n){switch(t){case EC:case TI:case RI:case Soe:case aet:case uet:return}const{x:r,y:i,x2:s,y2:o}=e;switch(t){case mC:if(Le(r)&&(yi(r.bin)||Le(i)&&i.aggregate&&!r.aggregate))return"vertical";if(Le(i)&&(yi(i.bin)||Le(r)&&r.aggregate&&!i.aggregate))return"horizontal";if(o||s){if(n)return n;if(!s&&(Le(r)&&r.type===Cx&&!en(r.bin)||kI(r)))return"horizontal";if(!o&&(Le(i)&&i.type===Cx&&!en(i.bin)||kI(i)))return"vertical"}case AC:if(s&&!(Le(r)&&yi(r.bin))&&o&&!(Le(i)&&yi(i.bin)))return;case gC:if(o)return Le(i)&&yi(i.bin)?"horizontal":"vertical";if(s)return Le(r)&&yi(r.bin)?"vertical":"horizontal";if(t===AC){if(r&&!i)return"vertical";if(i&&!r)return"horizontal"}case yC:case CI:{const u=ua(r),a=ua(i);if(n)return n;if(u&&!a)return t!=="tick"?"horizontal":"vertical";if(!u&&a)return t!=="tick"?"vertical":"horizontal";if(u&&a){const l=r,c=i,f=l.type===T2,x=c.type===T2;return f&&!x?t!=="tick"?"vertical":"horizontal":!f&&x?t!=="tick"?"horizontal":"vertical":!l.aggregate&&c.aggregate?t!=="tick"?"vertical":"horizontal":l.aggregate&&!c.aggregate&&t!=="tick"?"horizontal":"vertical"}else return}}return"vertical"}const Gst={vgMark:"arc",encodeEntry:t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),Qr("x",t,{defaultPos:"mid"})),Qr("y",t,{defaultPos:"mid"})),fc(t,"radius")),fc(t,"theta"))},Wst={vgMark:"area",encodeEntry:t=>Object.assign(Object.assign(Object.assign(Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"})),zC("x",t,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:t.markDef.orient==="horizontal"})),zC("y",t,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:t.markDef.orient==="vertical"})),m$(t))},Vst={vgMark:"rect",encodeEntry:t=>Object.assign(Object.assign(Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),fc(t,"x")),fc(t,"y"))},Yst={vgMark:"shape",encodeEntry:t=>Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),postEncodingTransform:t=>{const{encoding:e}=t,n=e.shape;return[Object.assign({type:"geoshape",projection:t.projectionName()},n&&Le(n)&&n.type===R2?{field:Ie(n,{expr:"datum"})}:{})]}},Kst={vgMark:"image",encodeEntry:t=>Object.assign(Object.assign(Object.assign(Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"})),fc(t,"x")),fc(t,"y")),p$(t,"url"))},Xst={vgMark:"line",encodeEntry:t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),Qr("x",t,{defaultPos:"mid"})),Qr("y",t,{defaultPos:"mid"})),lr("size",t,{vgChannel:"strokeWidth"})),m$(t))},Jst={vgMark:"trail",encodeEntry:t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"})),Qr("x",t,{defaultPos:"mid"})),Qr("y",t,{defaultPos:"mid"})),lr("size",t)),m$(t))};function V$(t,e){const{config:n}=t;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"})),Qr("x",t,{defaultPos:"mid"})),Qr("y",t,{defaultPos:"mid"})),lr("size",t)),lr("angle",t)),Zst(t,n,e))}function Zst(t,e,n){return n?{shape:{value:n}}:lr("shape",t)}const eot={vgMark:"symbol",encodeEntry:t=>V$(t)},tot={vgMark:"symbol",encodeEntry:t=>V$(t,"circle")},not={vgMark:"symbol",encodeEntry:t=>V$(t,"square")},rot={vgMark:"rect",encodeEntry:t=>Object.assign(Object.assign(Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),fc(t,"x")),fc(t,"y"))},iot={vgMark:"rule",encodeEntry:t=>{const{markDef:e}=t,n=e.orient;return!t.encoding.x&&!t.encoding.y&&!t.encoding.latitude&&!t.encoding.longitude?{}:Object.assign(Object.assign(Object.assign(Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),zC("x",t,{defaultPos:n==="horizontal"?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:n!=="vertical"})),zC("y",t,{defaultPos:n==="vertical"?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:n!=="horizontal"})),lr("size",t,{vgChannel:"strokeWidth"}))}},sot={vgMark:"text",encodeEntry:t=>{const{config:e,encoding:n}=t;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Zs(t,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"})),Qr("x",t,{defaultPos:"mid"})),Qr("y",t,{defaultPos:"mid"})),p$(t)),lr("size",t,{vgChannel:"fontSize"})),lr("angle",t)),lae("align",oot(t.markDef,n,e))),lae("baseline",uot(t.markDef,n,e))),Qr("radius",t,{defaultPos:null})),Qr("theta",t,{defaultPos:null}))}};function oot(t,e,n){if(jt("align",t,n)===void 0)return"center"}function uot(t,e,n){if(jt("baseline",t,n)===void 0)return"middle"}const aot={vgMark:"rect",encodeEntry:t=>{const{config:e,markDef:n}=t,r=n.orient,i=r==="horizontal"?"width":"height",s=r==="horizontal"?"height":"width";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),Qr("x",t,{defaultPos:"mid",vgChannel:"xc"})),Qr("y",t,{defaultPos:"mid",vgChannel:"yc"})),lr("size",t,{defaultValue:lot(t),vgChannel:i})),{[s]:un(jt("thickness",n,e))})}};function lot(t){var e;const{config:n,markDef:r}=t,{orient:i}=r,s=i==="horizontal"?"width":"height",o=t.getScaleComponent(i==="horizontal"?"x":"y"),u=(e=jt("size",r,n,{vgChannel:s}))!==null&&e!==void 0?e:n.tick.bandSize;if(u!==void 0)return u;{const a=o?o.get("range"):void 0;return a&&ic(a)&&rn(a.step)?a.step*3/4:PC(n.view,s)*3/4}}const cT={arc:Gst,area:Wst,bar:Vst,circle:tot,geoshape:Yst,image:Kst,line:Xst,point:eot,rect:rot,rule:iot,square:not,text:sot,tick:aot,trail:Jst};function cot(t){if(Ot([yC,gC,cet],t.mark)){const e=rue(t.mark,t.encoding);if(e.length>0)return fot(t,e)}else if(t.mark===mC){const e=rI.some(n=>jt(n,t.markDef,t.config));if(t.stack&&!t.fieldDef("size")&&e)return xot(t)}return Y$(t)}const Ole="faceted_path_";function fot(t,e){return[{name:t.getName("pathgroup"),type:"group",from:{facet:{name:Ole+t.requestDataName(tn.Main),data:t.requestDataName(tn.Main),groupby:e}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:Y$(t,{fromPrefix:Ole})}]}const Dle="stack_group_";function xot(t){var e;const[n]=Y$(t,{fromPrefix:Dle}),r=t.scaleName(t.stack.fieldChannel),i=(c={})=>t.vgField(t.stack.fieldChannel,c),s=(c,f)=>{const x=[i({prefix:"min",suffix:"start",expr:f}),i({prefix:"max",suffix:"start",expr:f}),i({prefix:"min",suffix:"end",expr:f}),i({prefix:"max",suffix:"end",expr:f})];return`${c}(${x.map(d=>`scale('${r}',${d})`).join(",")})`};let o,u;t.stack.fieldChannel==="x"?(o=Object.assign(Object.assign({},ey(n.encode.update,["y","yc","y2","height",...rI])),{x:{signal:s("min","datum")},x2:{signal:s("max","datum")},clip:{value:!0}}),u={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},n.encode.update=Object.assign(Object.assign({},Ys(n.encode.update,["y","yc","y2"])),{height:{field:{group:"height"}}})):(o=Object.assign(Object.assign({},ey(n.encode.update,["x","xc","x2","width"])),{y:{signal:s("min","datum")},y2:{signal:s("max","datum")},clip:{value:!0}}),u={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},n.encode.update=Object.assign(Object.assign({},Ys(n.encode.update,["x","xc","x2"])),{width:{field:{group:"width"}}}));for(const c of rI){const f=Sx(c,t.markDef,t.config);n.encode.update[c]?(o[c]=n.encode.update[c],delete n.encode.update[c]):f&&(o[c]=un(f)),f&&(n.encode.update[c]={value:0})}const a=[];if(((e=t.stack.groupbyChannels)===null||e===void 0?void 0:e.length)>0)for(const c of t.stack.groupbyChannels){const f=t.fieldDef(c),x=Ie(f);x&&a.push(x),(f!=null&&f.bin||f!=null&&f.timeUnit)&&a.push(Ie(f,{binSuffix:"end"}))}return o=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce((c,f)=>{if(n.encode.update[f])return Object.assign(Object.assign({},c),{[f]:n.encode.update[f]});{const x=Sx(f,t.markDef,t.config);return x!==void 0?Object.assign(Object.assign({},c),{[f]:un(x)}):c}},o),o.stroke&&(o.strokeForeground={value:!0},o.strokeOffset={value:0}),[{type:"group",from:{facet:{data:t.requestDataName(tn.Main),name:Dle+t.requestDataName(tn.Main),groupby:a,aggregate:{fields:[i({suffix:"start"}),i({suffix:"start"}),i({suffix:"end"}),i({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:o},marks:[{type:"group",encode:{update:u},marks:[n]}]}]}function dot(t){var e;const{encoding:n,stack:r,mark:i,markDef:s,config:o}=t,u=n.order;if(!(!be(u)&&qo(u)&&hse(u.value)||!u&&hse(jt("order",s,o)))){if((be(u)||Le(u))&&!r)return Use(u,{expr:"datum"});if(sc(i)){const a=s.orient==="horizontal"?"y":"x",l=n[a];if(Le(l)){const c=l.sort;if(be(c))return{field:Ie(l,{prefix:a,suffix:"sort_index",expr:"datum"})};if(sa(c))return{field:Ie({aggregate:zI(t.encoding)?c.op:void 0,field:c.field},{expr:"datum"})};if(koe(c)){const f=t.fieldDef(c.encoding);return{field:Ie(f,{expr:"datum"}),order:c.order}}else return c===null?void 0:{field:Ie(l,{binSuffix:!((e=t.stack)===null||e===void 0)&&e.impute?"mid":void 0,expr:"datum"})}}return}}}function Y$(t,e={fromPrefix:""}){const{mark:n,markDef:r,encoding:i,config:s}=t,o=Qn(r.clip,hot(t),pot(t)),u=Mse(r),a=i.key,l=dot(t),c=got(t),f=jt("aria",r,s),x=cT[n].postEncodingTransform?cT[n].postEncodingTransform(t):null;return[Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:t.getName("marks"),type:cT[n].vgMark},o?{clip:!0}:{}),u?{style:u}:{}),a?{key:a.field}:{}),l?{sort:l}:{}),c||{}),f===!1?{aria:f}:{}),{from:{data:e.fromPrefix+t.requestDataName(tn.Main)},encode:{update:cT[n].encodeEntry(t)}}),x?{transform:x}:{})]}function hot(t){const e=t.getScaleComponent("x"),n=t.getScaleComponent("y");return e!=null&&e.get("selectionExtent")||n!=null&&n.get("selectionExtent")?!0:void 0}function pot(t){const e=t.component.projection;return e&&!e.isFit?!0:void 0}function got(t){if(!t.component.selection)return null;const e=Re(t.component.selection).length;let n=e,r=t.parent;for(;r&&n===0;)n=Re(r.component.selection).length,r=r.parent;return n?{interactive:e>0||!!t.encoding.tooltip}:null}class wle extends _le{constructor(e,n,r,i={},s){var o;super(e,"unit",n,r,s,void 0,Sue(e)?e.view:void 0),this.specifiedScales={},this.specifiedAxes={},this.specifiedLegends={},this.specifiedProjection={},this.selection=[],this.children=[];const u=ia(e.mark)?Object.assign({},e.mark):{type:e.mark},a=u.type;u.filled===void 0&&(u.filled=Hst(u,s,{graticule:e.data&&c$(e.data)}));const l=this.encoding=Vet(e.encoding||{},a,u.filled,s);this.markDef=Ust(u,l,s),this.size=jst({encoding:l,size:Sue(e)?Object.assign(Object.assign(Object.assign({},i),e.width?{width:e.width}:{}),e.height?{height:e.height}:{}):i}),this.stack=Nue(a,l),this.specifiedScales=this.initScales(a,l),this.specifiedAxes=this.initAxes(l),this.specifiedLegends=this.initLegends(l),this.specifiedProjection=e.projection,this.selection=((o=e.params)!==null&&o!==void 0?o:[]).filter(c=>ZI(c))}get hasProjection(){const{encoding:e}=this,n=this.mark===boe,r=e&&WXe.some(i=>ut(e[i]));return n||r}scaleDomain(e){const n=this.specifiedScales[e];return n?n.domain:void 0}axis(e){return this.specifiedAxes[e]}legend(e){return this.specifiedLegends[e]}initScales(e,n){return fC.reduce((r,i)=>{var s;const o=Gn(n[i]);return o&&(r[i]=this.initScale((s=o.scale)!==null&&s!==void 0?s:{})),r},{})}initScale(e){const{domain:n,range:r}=e,i=Qi(e);return be(n)&&(i.domain=n.map(Es)),be(r)&&(i.range=r.map(Es)),i}initAxes(e){return na.reduce((n,r)=>{const i=e[r];if(ut(i)||r===En&&ut(e.x2)||r===ur&&ut(e.y2)){const s=ut(i)?i.axis:void 0;n[r]=s&&this.initAxis(Object.assign({},s))}return n},{})}initAxis(e){const n=Re(e),r={};for(const i of n){const s=e[i];r[i]=dy(s)?Bse(s):Es(s)}return r}initLegends(e){return rJe.reduce((n,r)=>{const i=Gn(e[r]);if(i&&sJe(r)){const s=i.legend;n[r]=s&&Qi(s)}return n},{})}parseData(){this.component.data=lT(this)}parseLayoutSize(){Sst(this)}parseSelections(){this.component.selection=urt(this,this.selection)}parseMarkGroup(){this.component.mark=cot(this)}parseAxesAndHeaders(){this.component.axes=Fst(this)}assembleSelectionTopLevelSignals(e){return Ont(this,e)}assembleSignals(){return[...Tae(this),...Tnt(this,[])]}assembleSelectionData(e){return Dnt(this,e)}assembleLayout(){return null}assembleLayoutSignals(){return R$(this)}assembleMarks(){var e;let n=(e=this.component.mark)!==null&&e!==void 0?e:[];return(!this.parent||!Q2(this.parent))&&(n=Jue(this,n)),n.map(this.correctDataNames)}assembleGroupStyle(){const{style:e}=this.view||{};if(e!==void 0)return e;if(this.encoding.x||this.encoding.y)return"cell"}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(e){return Dx(this.encoding,e)}fieldDef(e){const n=this.encoding[e];return aa(n)}typedFieldDef(e){const n=this.fieldDef(e);return Js(n)?n:null}}class K$ extends H${constructor(e,n,r,i,s){super(e,"layer",n,r,s,e.resolve,e.view);const o=Object.assign(Object.assign(Object.assign({},i),e.width?{width:e.width}:{}),e.height?{height:e.height}:{});this.children=e.layer.map((u,a)=>{if(jC(u))return new K$(u,this,this.getName(`layer_${a}`),o,s);if(Sl(u))return new wle(u,this,this.getName(`layer_${a}`),o,s);throw new Error(sI(u))})}parseData(){this.component.data=lT(this);for(const e of this.children)e.parseData()}parseLayoutSize(){vst(this)}parseSelections(){this.component.selection={};for(const e of this.children){e.parseSelections();for(const n of Re(e.component.selection))this.component.selection[n]=e.component.selection[n]}}parseMarkGroup(){for(const e of this.children)e.parseMarkGroup()}parseAxesAndHeaders(){Ist(this)}assembleSelectionTopLevelSignals(e){return this.children.reduce((n,r)=>r.assembleSelectionTopLevelSignals(n),e)}assembleSignals(){return this.children.reduce((e,n)=>e.concat(n.assembleSignals()),Tae(this))}assembleLayoutSignals(){return this.children.reduce((e,n)=>e.concat(n.assembleLayoutSignals()),R$(this))}assembleSelectionData(e){return this.children.reduce((n,r)=>r.assembleSelectionData(n),e)}assembleGroupStyle(){const e=new Set;for(const r of this.children)for(const i of qe(r.assembleGroupStyle()))e.add(i);const n=Array.from(e);return n.length>1?n:n.length===1?n[0]:void 0}assembleTitle(){let e=super.assembleTitle();if(e)return e;for(const n of this.children)if(e=n.assembleTitle(),e)return e}assembleLayout(){return null}assembleMarks(){return wnt(this,this.children.flatMap(e=>e.assembleMarks()))}assembleLegends(){return this.children.reduce((e,n)=>e.concat(n.assembleLegends()),Yae(this))}}function X$(t,e,n,r,i){if(bC(t))return new Ty(t,e,n,i);if(jC(t))return new K$(t,e,n,r,i);if(Sl(t))return new wle(t,e,n,r,i);if(ytt(t))return new Ost(t,e,n,i);throw new Error(sI(t))}var mot=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function yot(t,e={}){e.logger&&CZe(e.logger),e.fieldTitle&&Woe(e.fieldTitle);try{const n=Due(I7(e.config,t.config)),r=pnt(t,n),i=X$(r,null,"",void 0,n);return i.parse(),wit(i.component.data,i),{spec:Aot(i,Eot(t,r.autosize,n,i),t.datasets,t.usermeta),normalized:r}}finally{e.logger&&TZe(),e.fieldTitle&&Met()}}function Eot(t,e,n,r){const i=r.component.layoutSize.get("width"),s=r.component.layoutSize.get("height");if(e===void 0?(e={type:"pad"},r.hasAxisOrientSignalRef()&&(e.resize=!0)):ze(e)&&(e={type:e}),i&&s&&vnt(e.type)){if(i==="step"&&s==="step")Oe(Wse()),e.type="pad";else if(i==="step"||s==="step"){const o=i==="step"?"width":"height";Oe(Wse(cC(o)));const u=o==="width"?"height":"width";e.type=_nt(u)}}return Object.assign(Object.assign(Object.assign({},Re(e).length===1&&e.type?e.type==="pad"?{}:{autosize:e.type}:{autosize:e}),Wue(n,!1)),Wue(t,!0))}function Aot(t,e,n={},r){const i=t.config?Ntt(t.config):void 0,s=[].concat(t.assembleSelectionData([]),mst(t.component.data,n)),o=t.assembleProjections(),u=t.assembleTitle(),a=t.assembleGroupStyle(),l=t.assembleGroupEncodeEntry(!0);let c=t.assembleLayoutSignals();c=c.filter(d=>(d.name==="width"||d.name==="height")&&d.value!==void 0?(e[d.name]=+d.value,!1):!0);const{params:f}=e,x=mot(e,["params"]);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({$schema:"https://vega.github.io/schema/vega/v5.json"},t.description?{description:t.description}:{}),x),u?{title:u}:{}),a?{style:a}:{}),l?{encode:{update:l}}:{}),{data:s}),o.length>0?{projections:o}:{}),t.assembleGroup([...c,...t.assembleSelectionTopLevelSignals([]),...vue(f)])),i?{config:i}:{}),r?{usermeta:r}:{})}const fT=t=>t&&typeof t=="object";function J$(t,e){return!fT(t)||!fT(e)?e:(Object.keys(e).forEach(n=>{const r=t[n],i=e[n];Array.isArray(r)&&Array.isArray(i)?t[n]=[...i]:fT(r)&&fT(i)?t[n]=J$(Object.assign({},r),i):t[n]=i}),t)}class xT{constructor(e,n,r,i={},s){this.document=e,this.styleDefaults=n,this.options=r,this.timezone=s,this.size=i.size||this.styleDefaults.size||"medium",this.chartOptions=i}mapData(e){const n=[];for(const r of e){const i={};for(const s of e.field.allFields){let o=this.getDataValue(r.cell(s));o instanceof Date&&(o=o7e(o,this.timezone)),i[s.name]=o}n.push(i)}return n}getSize(){return this.size==="large"?{height:350,width:500}:{height:175,width:250}}async render(e){if(!e.isArray())throw new Error("Invalid type for chart renderer");const n=this.getVegaLiteSpec(e);n.config=J$(n.config??{},this.chartOptions.vegaConfigOverride??{});const r=yot(n,{logger:{level(o){return o!==void 0?this:0},info(){return this},error(){return this},warn(){return this},debug(){return this}}}).spec,i=new xL(Qie(r),{renderer:"none"});i.logger().level(-1);const s=this.document.createElement("div");return s.innerHTML=await i.toSVG(),s}}const $x="#727883",W2="#E5E7EB",vot=()=>({range:{category:["#1877F2","#30C8B4","#5A24C7","#E42C97","#F0701A","#00487C","#A87CFF","#9C4300","#DA8600","#68013D","#56585C"],diverging:["#3F1691","#5A24C7","#1877F2","#5FAAFF","#32AB4F","#FF9831","#EB660D","#D31E3C","#A50326"],heatmap:["#07316D","#1455B0","#1877F2","#5FAAFF","#8A8D91","#FF9831","#EB660D","#AB3A02","#692600"],ordinal:["#05214D","#083E89","#1877F2","#76B6FF","#A8D1FF"],ramp:["#05214D","#083E89","#1877F2","#76B6FF","#A8D1FF"]},axisY:{gridColor:W2,grid:!0,tickColor:W2,domain:!1,labelFont:"Inter, sans-serif",labelFontSize:10,labelFontWeight:"normal",labelColor:$x,labelPadding:5,titleColor:$x,titleFont:"Inter, sans-serif",titleFontSize:10,titleFontWeight:500,titlePadding:10,labelOverlap:!1},axisX:{gridColor:W2,tickColor:W2,tickSize:0,domain:!1,labelFont:"Inter, sans-serif",labelFontSize:10,labelFontWeight:"normal",labelPadding:5,labelColor:$x,titleColor:$x,titleFont:"Inter, sans-serif",titleFontSize:10,titleFontWeight:500,titlePadding:10},view:{strokeWidth:0}}),dT={$schema:"https://vega.github.io/schema/vega-lite/v5.json",config:{params:[{name:"defaultFont",value:"var(--malloy-font-family, 'Inter')"},{name:"titleColor",value:`var(--malloy-title-color, ${$x})`},{name:"labelColor",value:`var(--malloy-label-color, ${$x})`}],background:void 0,color:{expr:"titleColor"},header:{labelFont:{expr:"defaultFont"},titleFont:{expr:"defaultFont"},titleFontWeight:500},text:{font:{expr:"defaultFont"},color:{expr:"labelColor"}},mark:{font:{expr:"defaultFont"},color:{expr:"labelColor"}},title:{font:{expr:"defaultFont"},subtitleFont:{expr:"defaultFont"},fontWeight:500},axis:{labelColor:{expr:"labelColor"},labelFont:{expr:"defaultFont"},titleFont:{expr:"defaultFont"},titleFontWeight:500,titleColor:{expr:"titleColor"},titleFontSize:12,gridColor:W2,tickColor:W2,labelPadding:5,titlePadding:10},legend:{titleFontWeight:500,titleColor:{expr:"titleColor"},titleFontSize:12,labelColor:{expr:"labelColor"},labelFont:{expr:"defaultFont"},titleFont:{expr:"defaultFont"}}}},pc={config:dT.config,encoding:{y:{field:"#{1}",type:"nominal",axis:null,sort:null}},layer:[{mark:{type:"bar",color:"#aec7e8"},encoding:{x:{field:"#{2}",type:"quantitative",sort:null},color:{value:"#4285F4"}}},{mark:{type:"text",align:"left",x:5},encoding:{text:{field:"#{1}"}}}]},hT={...dT,mark:"bar",data:[],encoding:{x:{field:"#{1}",type:"nominal",sort:null},y:{field:"#{2}",type:"quantitative",sort:null},color:{value:"#4285F4"}}};({...hT,encoding:{...hT.encoding,color:Ba("quantitative",!0,!0)}},{...hT,encoding:{...hT.encoding,color:Ba("nominal",!0,!0)}}),{...pc,layer:({...pc.layer[0],encoding:{...pc.layer[0].encoding,color:Ba("nominal",!0,!0)}},pc.layer[1])},{...pc,layer:({...pc.layer[0],encoding:{...pc.layer[0].encoding,color:Ba("quantitative",!0,!0)}},pc.layer[1])};const pT={...dT,mark:"bar",data:[],encoding:{x:{field:"#{1}",type:"nominal",sort:null},y:{field:"#{2}",type:"quantitative",sort:null},color:{value:"#4285F4"}}};({...pT,encoding:{...pT.encoding,color:Ba("nominal",!0)}},{...pT,encoding:{...pT.encoding,color:Ba("quantitative",!0)}});function Nle(t){return Array.isArray(t)||t!==null&&typeof t=="object"}class _ot extends xT{constructor(e,n,r,i,s){super(e,n,r);const o=s.spec;if(o)this.spec=o;else if(s.spec_name){const u=r.dataStyles[s.spec_name];if(u!==void 0&&u.renderer==="vega")if(u.spec)this.spec=u.spec;else throw new Error(`No spec defined on ${s.spec_name}`);else throw new Error(`No Vega renderer named ${s.spec_name}`)}else throw new Error(`No top level vega spec defined for ${i.name}`)}getDataValue(e){if(e.isNull())return null;if(e.isTimestamp()||e.isDate()||e.isNumber()||e.isString())return e.value;throw new Error("Invalid field type for vega chart.")}getDataType(e){if(e.isAtomicField()){if(e.isDate()||e.isTimestamp()||e.isString())return"nominal";if(e.isNumber())return"quantitative"}throw new Error("Invalid field type for vega chart.")}translateField(e,n){const r=n.match(/#\{(\d+)\}/);return r&&r.groups?e.allFields[parseInt(r.groups[1])-1].name:n}translateFields(e,n){if(Array.isArray(e))for(const r of e)Nle(r)&&this.translateFields(r,n);else if(e&&typeof e=="object")for(const[r,i]of Object.entries(e))if(r==="field"&&typeof i=="string")e[r]=this.translateField(n,i);else if(r==="repeat"&&Array.isArray(i))for(const s of i.keys()){const o=i[s];typeof o=="string"&&(i[s]=this.translateField(n,o))}else Nle(i)&&this.translateFields(i,n)}getVegaLiteSpec(e){if(e.isNull()||!e.isArray())throw new Error("Expected struct value not to be null.");const n=structuredClone(this.spec);this.translateFields(n,e.field);const r={values:this.mapData(e)};return n.data=r,n}}const AT=class AT extends vf{create(e,n,r,i,s){return new _ot(e,n,r,i,s)}get rendererName(){return"vega"}};AT.instance=new AT;let Fle=AT;class Lle extends xT{getVegaLiteSpec(e){const n=e.field.allFields,r=n[0],i=n[1],s=n[2],o=n[3],u=n[4],a=this.getDataType(r),l=this.getDataType(i),c=s?this.getDataType(s):void 0,f=o?this.getDataType(o):void 0,x=u?this.getDataType(u):void 0,d=this.getMark(),p=s!==void 0?{field:s.name,type:c,axis:{title:Af(this.options,s,void 0,this.timezone)},scale:Ba(c,d==="bar")}:{value:"#4285F4"},g=o?{field:o.name,type:f,axis:{title:Af(this.options,o,void 0,this.timezone)}}:void 0,m=u?{field:u.name,type:x,axis:{title:Af(this.options,u,void 0,this.timezone)}}:void 0,y=a==="nominal"?null:void 0,E=l==="nominal"?null:void 0,A={field:r.name,type:a,sort:y,axis:{title:Af(this.options,r,void 0,this.timezone)},scale:{zero:!1}},v={field:i.name,type:l,sort:E,axis:{title:Af(this.options,i,void 0,this.timezone)},scale:{zero:!1}};return{...dT,...this.getSize(),data:{values:this.mapData(e)},mark:d,encoding:{x:A,y:v,size:g,color:p,shape:m},background:"transparent"}}}class Sot extends Lle{getMark(){return"line"}getDataType(e){if(e.isAtomicField()){if(e.isDate()||e.isTimestamp())return"temporal";if(e.isString())return"nominal";if(e.isNumber())return"quantitative"}throw new Error("Invalid field type for line chart.")}getDataValue(e){if(e.isNull())return null;if(e.isTimestamp()||e.isDate()||e.isNumber()||e.isString())return e.value;throw new Error("Invalid field type for line chart.")}}const vT=class vT extends vf{create(e,n,r,i,s,o){return new Sot(e,n,r,s,o)}get rendererName(){return"line_chart"}};vT.instance=new vT;let Z$=vT;class bot extends Lle{getMark(){return"point"}getDataType(e){if(e.isAtomicField()){if(e.isDate()||e.isTimestamp())return"temporal";if(e.isString())return"nominal";if(e.isNumber())return"quantitative"}throw new Error("Invalid field type for scatter chart.")}getDataValue(e){if(e.isNull())return null;if(e.isTimestamp()||e.isDate()||e.isNumber()||e.isString())return e.value;throw new Error("Invalid field type for scatter chart.")}}const _T=class _T extends vf{create(e,n,r,i,s,o){return new bot(e,n,r,s,o)}get rendererName(){return"scatter_chart"}};_T.instance=new _T;let eB=_T;const tB={type:"Topology",bbox:[-179.14733999999999,-14.552548999999999,179.77847,71.352561],transform:{scale:[.003589293992939929,.0008590596905969058],translate:[-179.14733999999999,-14.552548999999999]},objects:{states:{type:"GeometryCollection",geometries:[{type:"MultiPolygon",arcs:[[[0]],[[1,2,3,4,5]]],id:"01",properties:{name:"Alabama"}},{type:"MultiPolygon",arcs:[[[6]],[[7]],[[8]],[[9]],[[10]],[[11]],[[12]],[[13]],[[14]],[[15]],[[16]],[[17]],[[18]],[[19]],[[20]],[[21]],[[22]],[[23]],[[24]],[[25]],[[26]],[[27]],[[28]],[[29]],[[30]],[[31]],[[32]],[[33]],[[34]],[[35]],[[36]],[[37]],[[38]],[[39]],[[40]],[[41]],[[42]],[[43]],[[44]],[[45]],[[46]],[[47]],[[48]],[[49]],[[50]],[[51]],[[52]],[[53]],[[54]],[[55]],[[56]],[[57]],[[58]],[[59]],[[60]],[[61]],[[62]],[[63]],[[64]],[[65]],[[66]],[[67]],[[68]],[[69]],[[70]],[[71]],[[72]],[[73]],[[74]],[[75]],[[76]],[[77]],[[78]],[[79]],[[80]],[[81]],[[82]],[[83]],[[84]],[[85]],[[86]],[[87]],[[88]],[[89]],[[90]],[[91]],[[92]],[[93]],[[94]],[[95]],[[96]],[[97]],[[98]],[[99]],[[100]],[[101]],[[102]],[[103]],[[104]],[[105]],[[106]],[[107]],[[108]],[[109]],[[110]],[[111]],[[112]],[[113]],[[114]],[[115]],[[116]],[[117]],[[118]],[[119]],[[120]],[[121]],[[122]],[[123]],[[124]],[[125]],[[126]],[[127]],[[128]],[[129]],[[130]],[[131]],[[132]],[[133]],[[134]],[[135]],[[136]],[[137]],[[138]],[[139]],[[140]],[[141]],[[142]]],id:"02",properties:{name:"Alaska"}},{type:"Polygon",arcs:[[143,144,145,146,147]],id:"04",properties:{name:"Arizona"}},{type:"Polygon",arcs:[[148,149,150,151,152,153]],id:"08",properties:{name:"Colorado"}},{type:"MultiPolygon",arcs:[[[154]],[[155]],[[156]],[[157]],[[158]],[[159]],[[160]],[[161]],[[162]],[[163,164,-4]]],id:"12",properties:{name:"Florida"}},{type:"Polygon",arcs:[[165,166,167,168,-164,-3]],id:"13",properties:{name:"Georgia"}},{type:"Polygon",arcs:[[169,170,171,172,173]],id:"18",properties:{name:"Indiana"}},{type:"Polygon",arcs:[[174,175,176,-151]],id:"20",properties:{name:"Kansas"}},{type:"MultiPolygon",arcs:[[[177]],[[178]],[[179]],[[180]],[[181]],[[182]],[[183]],[[184,185]]],id:"23",properties:{name:"Maine"}},{type:"MultiPolygon",arcs:[[[186]],[[187]],[[188,189,190,191,192,193,194,195]]],id:"25",properties:{name:"Massachusetts"}},{type:"Polygon",arcs:[[196,197,198,199,200]],id:"27",properties:{name:"Minnesota"}},{type:"Polygon",arcs:[[201,202,203,204,205,206,207,208]],id:"34",properties:{name:"New Jersey"}},{type:"MultiPolygon",arcs:[[[209]],[[210]],[[211,212,213,-167,214]]],id:"37",properties:{name:"North Carolina"}},{type:"Polygon",arcs:[[215,-201,216,217]],id:"38",properties:{name:"North Dakota"}},{type:"Polygon",arcs:[[-152,-177,218,219,220,221]],id:"40",properties:{name:"Oklahoma"}},{type:"Polygon",arcs:[[222,223,-204,224,225,226,227]],id:"42",properties:{name:"Pennsylvania"}},{type:"Polygon",arcs:[[228,-217,-200,229,230,231]],id:"46",properties:{name:"South Dakota"}},{type:"Polygon",arcs:[[-221,232,233,234,235,236,237]],id:"48",properties:{name:"Texas"}},{type:"Polygon",arcs:[[-232,238,-149,239,240,241]],id:"56",properties:{name:"Wyoming"}},{type:"Polygon",arcs:[[-195,242,243,244]],id:"09",properties:{name:"Connecticut"}},{type:"Polygon",arcs:[[245,246,247,248,249,250,251,-219,-176,252]],id:"29",properties:{name:"Missouri"}},{type:"Polygon",arcs:[[253,-227,254,255,256]],id:"54",properties:{name:"West Virginia"}},{type:"Polygon",arcs:[[257,258,259,-174,260,-247]],id:"17",properties:{name:"Illinois"}},{type:"Polygon",arcs:[[-153,-222,-238,261,-147]],id:"35",properties:{name:"New Mexico"}},{type:"Polygon",arcs:[[-252,262,263,264,-235,233,-233,-220]],id:"05",properties:{name:"Arkansas"}},{type:"MultiPolygon",arcs:[[[265]],[[266]],[[267]],[[268]],[[269]],[[270]],[[271]],[[272]],[[273,274,275,-144,276]]],id:"06",properties:{name:"California"}},{type:"MultiPolygon",arcs:[[[-209,277]],[[-225,-203,278,279]]],id:"10",properties:{name:"Delaware"}},{type:"Polygon",arcs:[[280,281]],id:"11",properties:{name:"District of Columbia"}},{type:"MultiPolygon",arcs:[[[282]],[[283]],[[284]],[[285]],[[286]],[[287]],[[288]],[[289]]],id:"15",properties:{name:"Hawaii"}},{type:"Polygon",arcs:[[-199,290,-258,-246,291,-230]],id:"19",properties:{name:"Iowa"}},{type:"MultiPolygon",arcs:[[[-261,-173,292,-257,293,294,-248]],[[295,-250]]],id:"21",properties:{name:"Kentucky"}},{type:"MultiPolygon",arcs:[[[296,297]],[[298]],[[299]],[[-226,-280,300,301,302,303,-281,304,-255]]],id:"24",properties:{name:"Maryland"}},{type:"MultiPolygon",arcs:[[[305]],[[306]],[[307]],[[308]],[[309]],[[310]],[[311]],[[312]],[[313]],[[314,315,-171]],[[316]],[[317,318,319,320,321,322]]],id:"26",properties:{name:"Michigan"}},{type:"MultiPolygon",arcs:[[[323]],[[324]],[[325]],[[326]],[[-264,327,-6,328,329]]],id:"28",properties:{name:"Mississippi"}},{type:"Polygon",arcs:[[330,-218,-229,-242,331]],id:"30",properties:{name:"Montana"}},{type:"Polygon",arcs:[[332,-185,333,-190,334]],id:"33",properties:{name:"New Hampshire"}},{type:"MultiPolygon",arcs:[[[335]],[[336]],[[337]],[[338,-207]],[[339]],[[340]],[[341,342,-196,-245,343,-205,-224]]],id:"36",properties:{name:"New York"}},{type:"MultiPolygon",arcs:[[[344]],[[345]],[[-316,346,-228,-254,-293,-172]]],id:"39",properties:{name:"Ohio"}},{type:"Polygon",arcs:[[347,348,349,274,-275,-274,350]],id:"41",properties:{name:"Oregon"}},{type:"Polygon",arcs:[[-251,-296,-249,-295,351,-215,-166,-2,-328,-263]],id:"47",properties:{name:"Tennessee"}},{type:"Polygon",arcs:[[352,-240,-154,-146,353]],id:"49",properties:{name:"Utah"}},{type:"MultiPolygon",arcs:[[[354]],[[-302,355]],[[356,-297]],[[-256,-305,-282,-304,357,-212,-352,-294]]],id:"51",properties:{name:"Virginia"}},{type:"MultiPolygon",arcs:[[[358]],[[359]],[[360]],[[361]],[[362]],[[363]],[[364]],[[365]],[[366]],[[367]],[[368,-348,369]]],id:"53",properties:{name:"Washington"}},{type:"MultiPolygon",arcs:[[[370]],[[371]],[[372]],[[373]],[[374]],[[375]],[[376]],[[377]],[[378]],[[379]],[[380,-323,321,-321,319,-319,381,-259,-291,-198]]],id:"55",properties:{name:"Wisconsin"}},{type:"MultiPolygon",arcs:[[[382]],[[383]],[[384]]],id:"60",properties:{name:"American Samoa"}},{type:"MultiPolygon",arcs:[[[385]]],id:"66",properties:{name:"Guam"}},{type:"MultiPolygon",arcs:[[[386]],[[387]],[[388]],[[389]],[[390]],[[391]],[[392]],[[393]]],id:"69",properties:{name:"Commonwealth of the Northern Mariana Islands"}},{type:"Polygon",arcs:[[-231,-292,-253,-175,-150,-239]],id:"31",properties:{name:"Nebraska"}},{type:"Polygon",arcs:[[-214,394,-168]],id:"45",properties:{name:"South Carolina"}},{type:"MultiPolygon",arcs:[[[395]],[[396]],[[397]],[[398]],[[399]]],id:"72",properties:{name:"Puerto Rico"}},{type:"MultiPolygon",arcs:[[[400]],[[401]],[[402]]],id:"78",properties:{name:"United States Virgin Islands"}},{type:"Polygon",arcs:[[-369,403,-332,-241,-353,404,-349]],id:"16",properties:{name:"Idaho"}},{type:"Polygon",arcs:[[-275,-350,-405,-354,-145,-276]],id:"32",properties:{name:"Nevada"}},{type:"Polygon",arcs:[[405,-335,-189,-343]],id:"50",properties:{name:"Vermont"}},{type:"MultiPolygon",arcs:[[[406]],[[407]],[[408]],[[409]],[[410]],[[411]],[[412]],[[-265,-330,413,-236]]],id:"22",properties:{name:"Louisiana"}},{type:"MultiPolygon",arcs:[[[-192,414]],[[415]],[[416]],[[417]],[[-243,-194,418]]],id:"44",properties:{name:"Rhode Island"}}]},nation:{type:"GeometryCollection",geometries:[{type:"MultiPolygon",arcs:[[[0]],[[164,4,328,413,236,261,147,276,350,369,403,330,215,196,380,317,381,259,169,314,346,222,341,405,332,185,333,190,414,192,418,243,343,205,338,207,277,201,278,300,355,302,357,212,394,168]],[[6]],[[7]],[[8]],[[9]],[[10]],[[11]],[[12]],[[13]],[[14]],[[15]],[[16]],[[17]],[[18]],[[19]],[[20]],[[21]],[[22]],[[23]],[[24]],[[25]],[[26]],[[27]],[[28]],[[29]],[[30]],[[31]],[[32]],[[33]],[[34]],[[35]],[[36]],[[37]],[[38]],[[39]],[[40]],[[41]],[[42]],[[43]],[[44]],[[45]],[[46]],[[47]],[[48]],[[49]],[[50]],[[51]],[[52]],[[53]],[[54]],[[55]],[[56]],[[57]],[[58]],[[59]],[[60]],[[61]],[[62]],[[63]],[[64]],[[65]],[[66]],[[67]],[[68]],[[69]],[[70]],[[71]],[[72]],[[73]],[[74]],[[75]],[[76]],[[77]],[[78]],[[79]],[[80]],[[81]],[[82]],[[83]],[[84]],[[85]],[[86]],[[87]],[[88]],[[89]],[[90]],[[91]],[[92]],[[93]],[[94]],[[95]],[[96]],[[97]],[[98]],[[99]],[[100]],[[101]],[[102]],[[103]],[[104]],[[105]],[[106]],[[107]],[[108]],[[109]],[[110]],[[111]],[[112]],[[113]],[[114]],[[115]],[[116]],[[117]],[[118]],[[119]],[[120]],[[121]],[[122]],[[123]],[[124]],[[125]],[[126]],[[127]],[[128]],[[129]],[[130]],[[131]],[[132]],[[133]],[[134]],[[135]],[[136]],[[137]],[[138]],[[139]],[[140]],[[141]],[[142]],[[154]],[[155]],[[156]],[[157]],[[158]],[[159]],[[160]],[[161]],[[162]],[[177]],[[178]],[[179]],[[180]],[[181]],[[182]],[[183]],[[186]],[[187]],[[209]],[[210]],[[265]],[[266]],[[267]],[[268]],[[269]],[[270]],[[271]],[[272]],[[282]],[[283]],[[284]],[[285]],[[286]],[[287]],[[288]],[[289]],[[297,356]],[[298]],[[299]],[[305]],[[306]],[[307]],[[308]],[[309]],[[310]],[[311]],[[312]],[[313]],[[316]],[[323]],[[324]],[[325]],[[326]],[[335]],[[336]],[[337]],[[339]],[[340]],[[344]],[[345]],[[354]],[[358]],[[359]],[[360]],[[361]],[[362]],[[363]],[[364]],[[365]],[[366]],[[367]],[[370]],[[371]],[[372]],[[373]],[[374]],[[375]],[[376]],[[377]],[[378]],[[379]],[[382]],[[383]],[[384]],[[385]],[[386]],[[387]],[[388]],[[389]],[[390]],[[391]],[[392]],[[393]],[[395]],[[396]],[[397]],[[398]],[[399]],[[400]],[[401]],[[402]],[[406]],[[407]],[[408]],[[409]],[[410]],[[411]],[[412]],[[415]],[[416]],[[417]]]}]}},arcs:[[[25302,52136],[56,31],[1,25],[14,-40],[-9,-28],[-10,16],[-18,-2],[-20,-17],[-14,15]],[[25338,57677],[0,15],[150,-6],[63,0],[160,-13],[93,-2],[37,2],[159,-4],[61,-5]],[[26061,57664],[15,-321],[23,-443],[18,-379],[13,-294],[15,-311],[33,-713],[9,-32],[-4,-36],[13,-45],[5,-149],[10,-72],[17,-69],[3,-82],[9,-36],[-10,-117],[18,-28],[12,-40],[-10,-52],[-11,0],[2,-24],[-14,-21],[-13,-52],[3,-56],[-2,-86],[-7,-86],[-14,-72],[-3,-45],[6,-124],[-2,-44],[19,-87],[3,-120],[-7,-57],[2,-43],[-8,-80],[1,-79],[-7,-21],[5,-51],[-3,-54],[20,-91],[7,-64],[2,-61]],[[26229,53027],[-67,0],[-71,-5],[-110,-4],[-174,0],[-135,7],[-166,-2],[3,-38],[-13,-115],[2,-23],[23,-79],[3,-41],[36,-80],[3,-69],[-15,-102],[3,-55],[20,-51],[-18,-35],[-8,-82],[-9,-15],[7,-24],[-15,-26]],[[25528,52188],[-38,-35],[-40,-24],[-56,-4],[18,41],[12,-26],[35,27],[3,34],[-15,48],[-7,43],[-20,47],[-7,90],[9,74],[-3,76],[-7,48],[-20,32],[-15,-46],[2,-38],[-9,-57],[1,-41],[-6,-32],[-1,-144],[-8,-66],[-15,-4],[1,36],[-20,40],[-15,-16],[-5,23],[-18,-22]],[[25284,52292],[-3,222],[-3,357],[-6,423],[-10,773],[9,283],[21,710],[5,212],[33,1120],[6,160],[19,643],[12,362],[-16,35],[-13,85]],[[8053,88108],[6,38],[18,-11],[-20,-43],[-4,16]],[[7905,86007],[29,90],[15,-17],[-1,-46],[-28,-74],[-15,19],[0,28]],[[7695,85792],[26,-14],[-3,-36],[-23,50]],[[7642,85774],[22,-17],[-7,-33],[-14,14],[-1,36]],[[7602,85813],[20,-2],[-5,-34],[-15,36]],[[7594,84711],[8,45],[20,-13],[-8,-73],[-15,-17],[-5,58]],[[7543,85532],[12,28],[21,-40],[-33,-2],[0,14]],[[7540,87187],[29,79],[8,112],[31,-29],[-28,-64],[-9,-49],[5,-24],[-36,-25]],[[7464,85521],[14,55],[18,-28],[23,-4],[-33,-33],[-22,10]],[[7385,86976],[17,6],[5,-88],[-22,82]],[[7168,84530],[29,89],[15,6],[26,-66],[5,20],[-21,65],[6,54],[9,10],[27,-25],[21,19],[-29,54],[16,56],[29,-31],[15,4],[-14,56],[12,17],[20,-20],[14,45],[-18,6],[-13,33],[20,3],[22,67],[34,18],[-12,35],[-3,68],[27,66],[7,-31],[53,51],[7,-7],[-12,-118],[-13,-18],[-26,-103],[5,-84],[36,11],[2,69],[22,-9],[21,-71],[20,48],[12,-33],[-17,-117],[9,-22],[9,72],[27,47],[7,-25],[-3,-115],[-30,-89],[-32,23],[-11,81],[-21,-26],[13,-99],[-22,-20],[-39,13],[-16,-54],[-8,36],[2,74],[-10,2],[-9,-114],[-8,-24],[-31,-17],[2,-37],[-16,-22],[-45,-13],[-86,76],[-21,-13],[-15,29]],[[7129,86075],[41,28],[18,-43],[-5,-48],[-13,-16],[-29,-3],[-16,59],[4,23]],[[6962,82933],[31,45],[8,-48],[-37,-9],[-2,12]],[[6905,82759],[20,62],[19,20],[11,-11],[25,17],[5,-40],[19,-37],[36,16],[-2,-37],[-19,-31],[-46,-6],[-32,-13],[-32,25],[-4,35]],[[6789,83718],[20,17],[4,76],[18,75],[25,34],[5,44],[15,-8],[34,70],[33,36],[39,-15],[29,1],[0,-112],[26,-57],[4,45],[17,53],[-18,48],[6,25],[53,-14],[-3,35],[-52,44],[-19,-4],[-1,127],[31,61],[29,29],[20,-12],[22,-56],[6,-133],[15,13],[9,77],[-5,55],[35,-38],[7,47],[-37,36],[-21,58],[7,44],[17,-6],[51,-87],[9,4],[30,-41],[11,10],[-31,75],[-20,34],[-7,44],[17,0],[30,-58],[29,12],[41,-29],[7,49],[36,15],[-8,-63],[-39,-106],[-7,-83],[19,-36],[0,95],[16,43],[16,-49],[5,46],[17,32],[5,41],[14,10],[10,-31],[22,72],[17,8],[-4,-45],[28,-16],[-11,-38],[-11,20],[-18,-15],[19,-36],[-5,-49],[19,22],[11,-51],[27,1],[-24,-53],[-16,33],[-24,2],[-15,-48],[16,-9],[-8,-53],[26,-8],[-26,-89],[23,17],[13,47],[5,-35],[47,-4],[-3,-41],[-36,-78],[-13,-110],[-38,13],[-2,39],[-10,-41],[-23,42],[-17,-6],[-23,49],[-15,-13],[-24,19],[-8,-46],[27,1],[15,-17],[45,-87],[-8,-70],[-23,-52],[-11,36],[-19,-50],[-19,30],[-6,38],[-21,18],[-20,-12],[-17,-37],[29,2],[20,-49],[-38,-53],[-34,12],[-4,-20],[25,-34],[14,13],[35,1],[22,-43],[-11,-28],[-24,-8],[-34,-33],[-8,11],[-19,-29],[3,-49],[-27,-50],[-13,20],[7,34],[-23,50],[7,47],[27,62],[-8,24],[-15,-21],[-34,-105],[-3,-24],[-22,32],[-22,-10],[-5,-35],[26,-6],[10,-63],[-16,-61],[-25,-20],[1,-70],[-25,-41],[-12,13],[-23,-82],[-19,-30],[-18,21],[-31,-20],[22,116],[11,11],[26,71],[24,31],[-2,37],[-33,-23],[3,52],[22,102],[29,52],[-7,30],[-15,-45],[-34,-61],[-26,-112],[-24,-59],[-14,-11],[-5,-44],[-19,-30],[-4,84],[-26,58],[-33,27],[3,100],[-4,106],[-13,83],[-11,32],[-23,20],[-27,5],[14,30],[-15,37],[5,23]],[[6782,82633],[27,101],[51,97],[21,-4],[16,-54],[-12,-23],[-55,-73],[-29,-79],[-19,35]],[[6519,81925],[26,41],[5,38],[13,22],[8,-32],[-6,-43],[5,-68],[-7,-33],[-36,13],[-8,62]],[[6240,82171],[5,47],[14,25],[13,-59],[-13,-63],[-19,50]],[[6225,82357],[9,35],[3,-82],[-10,-1],[-2,48]],[[6080,82757],[21,48],[48,-3],[25,-54],[-35,23],[-16,-26],[-43,-6],[0,18]],[[5919,82533],[19,25],[11,-57],[-9,-11],[-21,43]],[[5642,81925],[8,64],[19,12],[27,-58],[-8,-18],[-21,37],[-25,-37]],[[5573,81984],[16,-49],[-27,12],[11,37]],[[5524,80844],[-1,36],[13,24],[20,-25],[-9,-59],[-19,-15],[-4,39]],[[5506,81836],[8,67],[10,10],[11,-62],[-29,-15]],[[5485,80904],[12,85],[-11,46],[31,-2],[4,-99],[-27,-38],[-9,8]],[[5445,80747],[10,13],[16,-42],[-1,-34],[-23,-4],[-2,67]],[[5429,81185],[17,-21],[5,49],[17,46],[5,-22],[-8,-58],[9,-13],[1,-44],[-10,-61],[13,-30],[-7,-19],[-17,22],[-2,-21],[-20,8],[-3,164]],[[5385,80755],[21,25],[11,-30],[-20,-26],[-12,31]],[[5377,81028],[9,39],[23,41],[5,-36],[-23,-38],[-9,-58],[-5,52]],[[5303,81352],[14,11],[5,-42],[-19,31]],[[5265,80882],[33,98],[15,27],[-5,18],[-22,0],[-4,76],[22,50],[27,-44],[-1,38],[-13,52],[30,-13],[18,114],[12,-23],[-2,-43],[-9,-2],[-5,-75],[12,-18],[0,33],[13,1],[-4,-60],[-11,-37],[-22,12],[-1,-45],[-28,-71],[-18,-24],[-31,-141],[-6,77]],[[5246,85264],[5,41],[14,-83],[-7,-25],[-12,67]],[[5238,81460],[22,42],[36,-14],[-1,-78],[-50,12],[-7,38]],[[5213,85252],[8,77],[5,-57],[-13,-20]],[[5096,81334],[16,74],[25,25],[18,-23],[-2,-46],[10,5],[12,47],[15,-32],[26,-26],[26,25],[7,-66],[-9,-60],[-14,40],[-22,3],[-14,23],[-3,40],[-10,-12],[0,-69],[11,-20],[11,-87],[-11,-60],[-36,35],[-10,59],[-18,-18],[-18,-90],[4,58],[-10,43],[0,104],[-4,28]],[[5033,85142],[7,131],[39,52],[21,6],[39,76],[5,-2],[-55,-273],[-22,-32],[-32,-4],[-2,46]],[[4937,81216],[27,3],[-4,-71],[-26,47],[3,21]],[[4863,81217],[10,31],[36,8],[-9,-51],[-37,-10],[0,22]],[[4804,81100],[4,51],[17,20],[25,-19],[12,-29],[35,-42],[6,-41],[-30,44],[-23,-57],[-28,74],[-11,-38],[-7,37]],[[4656,80881],[30,66],[26,-27],[0,-83],[-11,-53],[-13,-21],[-27,58],[-5,60]],[[4587,90956],[19,44],[21,16],[24,-17],[22,6],[9,-37],[-1,-50],[-75,-13],[-18,19],[-1,32]],[[4545,80324],[1,51],[68,-54],[19,-39],[26,0],[18,-28],[-20,-23],[-10,-33],[-22,40],[-17,-9],[-31,37],[-18,-29],[-22,57],[8,30]],[[4451,81463],[14,-1],[-5,-38],[-9,39]],[[3979,80040],[12,22],[16,-18],[-21,-37],[-7,33]],[[3880,79918],[22,34],[33,-11],[24,18],[5,-24],[-9,-45],[-26,-13],[-47,27],[-2,14]],[[3807,79887],[60,24],[9,-35],[-15,-32],[-13,37],[-34,-4],[-7,10]],[[3781,79848],[17,29],[7,-36],[-18,-14],[-6,21]],[[3751,80090],[13,56],[14,-15],[18,18],[12,-21],[-22,-33],[13,-48],[30,0],[1,-41],[-23,3],[-18,-79],[-23,24],[-2,78],[16,35],[-9,20],[-16,-21],[-4,24]],[[3635,79967],[5,36],[28,54],[30,-6],[3,-58],[20,6],[14,-15],[8,-44],[13,13],[-2,-41],[-26,-36],[-12,11],[-18,-45],[-6,28],[-25,1],[-17,-20],[-18,91],[3,25]],[[3608,79782],[7,15],[27,-33],[-32,-11],[-2,29]],[[3261,87028],[35,25],[57,0],[22,-20],[23,10],[9,-24],[21,10],[10,30],[-8,38],[34,68],[37,-11],[0,37],[25,46],[33,-40],[24,32],[23,9],[15,54],[19,-132],[27,-10],[29,34],[29,-20],[27,-40],[-12,-65],[11,-44],[-11,-40],[13,-11],[4,-65],[-13,-38],[21,-54],[2,-58],[21,10],[-11,-34],[2,-48],[-71,-21],[-6,-34],[-20,19],[-26,-18],[-28,-58],[8,-64],[-26,-8],[-23,71],[-38,47],[-57,-4],[-14,35],[-28,18],[-27,58],[-35,42],[-40,19],[-32,72],[-25,10],[-2,70],[-28,97]],[[3147,79003],[17,23],[22,53],[25,5],[37,40],[9,27],[28,-21],[14,19],[8,44],[22,-19],[3,72],[24,-11],[-17,106],[20,32],[8,-16],[15,18],[-18,35],[4,39],[17,23],[29,-1],[9,-68],[15,7],[-7,50],[13,31],[-53,47],[-14,-21],[-32,81],[0,46],[31,92],[42,50],[36,32],[6,-15],[23,13],[16,-63],[-16,-42],[7,-35],[17,-18],[14,53],[6,-33],[15,29],[-1,41],[18,63],[15,-58],[11,26],[20,-62],[-8,-56],[-23,-13],[-24,-70],[-40,-70],[2,-39],[34,54],[58,64],[4,22],[22,22],[7,-19],[-5,-72],[-16,-51],[-26,-34],[-6,-23],[-45,-51],[-30,-20],[12,-46],[-16,-1],[-4,-61],[-16,17],[-7,-70],[-20,25],[-4,-76],[-36,-13],[-22,30],[-10,-31],[-12,23],[-21,-37],[-6,11],[-44,-73],[-3,-31],[-23,4],[-16,-23],[-13,-60],[-28,23],[-9,-45],[-49,40],[-15,36]],[[3070,93368],[7,34],[34,50],[123,108],[63,74],[48,74],[45,56],[42,64],[84,105],[55,56],[146,167],[172,154],[133,90],[87,45],[135,15],[52,-11],[34,-31],[-41,-11],[7,-38],[-10,-71],[-31,-77],[1,-70],[12,-56],[-21,-59],[-49,-33],[-4,-20],[49,7],[42,-151],[40,-3],[36,32],[42,-1],[49,-30],[47,21],[69,15],[32,-58],[50,21],[18,-34],[52,32],[18,26],[84,-65],[18,59],[26,44],[37,150],[18,26],[40,-9],[8,-39],[32,-12],[31,27],[26,0],[-32,110],[-71,55],[-45,24],[-48,-1],[-60,-60],[13,112],[-3,83],[-62,114],[-22,91],[-26,35],[-59,14],[-8,56],[-32,90],[7,50],[27,18],[10,43],[16,-37],[24,28],[27,-89],[36,-91],[24,-10],[-19,-101],[3,-55],[28,-50],[57,-123],[53,-68],[39,18],[30,28],[9,49],[-45,2],[-10,45],[-56,70],[-53,112],[10,52],[0,60],[14,23],[1,57],[33,93],[30,-32],[22,3],[1,28],[-38,55],[-25,-8],[-28,57],[-87,-29],[-32,-37],[-34,0],[-39,-19],[-34,17],[-20,43],[-17,-16],[-21,23],[-4,-51],[-36,39],[-91,42],[-54,31],[-48,15],[-22,30],[1,98],[-22,163],[-52,216],[-20,58],[-36,62],[-91,101],[-145,228],[-21,24],[-51,87],[-50,49],[-54,37],[-51,23],[-29,35],[-19,70],[-54,84],[-45,40],[-81,41],[-42,-6],[37,40],[92,59],[20,46],[3,57],[19,76],[11,236],[-8,117],[179,-31],[68,6],[144,42],[79,28],[77,15],[77,63],[41,65],[29,30],[53,87],[81,192],[21,92],[7,79],[-2,186],[39,233],[84,183],[65,179],[37,77],[129,162],[96,-35],[69,-3],[68,40],[64,53],[93,104],[74,108],[44,86],[114,188],[33,31],[99,63],[7,-47],[55,-44],[82,-12],[68,15],[13,24],[32,-3],[61,17],[73,51],[74,85],[71,121],[36,88],[86,185],[68,76],[12,-68],[47,-38],[39,-2],[39,-20],[16,-82],[27,41],[99,-49],[15,-98],[-54,-71],[-35,-63],[-41,-4],[12,-146],[81,-15],[44,59],[-7,76],[16,8],[31,67],[23,12],[19,-48],[4,63],[-27,43],[35,55],[21,-47],[-3,65],[15,22],[71,-74],[45,-66],[13,-42],[-11,-33],[1,-109],[9,-49],[61,10],[35,-37],[16,-40],[48,62],[30,75],[112,0],[69,42],[53,-11],[40,-34],[84,-2],[61,-32],[45,-35],[9,-34],[-26,-11],[-26,-83],[-26,-30],[14,-93],[25,5],[19,-24],[45,-6],[10,-28],[69,-20],[33,9],[-17,-43],[9,-25],[-53,-26],[-8,-24],[20,-25],[89,6],[72,-41],[14,-33],[28,5],[44,86],[57,15],[24,-18],[10,34],[40,7],[29,-27],[15,-59],[42,27],[38,8],[58,83],[13,-22],[45,20],[21,-15],[34,26],[12,-30],[66,-8],[62,-72],[28,-1],[19,-24],[26,31],[24,-8],[37,-73],[0,-45],[35,-19],[41,51],[1,-63],[26,57],[81,-77],[14,-67],[24,-23],[49,1],[43,-15],[29,36],[23,-73],[48,-10],[29,45],[43,-12],[62,12],[66,-10],[49,-38],[50,-3],[17,28],[65,-95],[28,-8],[32,-54],[45,-16],[20,-30],[45,-12],[17,-26],[27,32],[66,-20],[45,77],[48,6],[9,20],[84,49],[18,24],[86,30],[42,-25],[48,32],[9,-18],[79,-73],[53,-37],[70,-80],[26,-67],[37,-11],[87,-97],[68,-40],[52,-62],[27,-47],[61,-13],[58,-45],[0,-9012],[2,-971],[-1,-889],[130,-95],[17,100],[135,-145],[81,180],[170,20],[1,-39],[-33,-272],[47,-112],[66,-76],[26,-22],[11,-116],[29,-80],[266,-580],[30,-299],[-8,-93],[22,4],[51,108],[111,158],[11,23],[68,8],[32,139],[-2,209],[30,-19],[18,19],[19,71],[-1,39],[-32,47],[45,48],[68,28],[131,158],[62,-115],[28,-88],[11,-2],[24,-70],[0,-104],[-12,-24],[1,-37],[16,-47],[-5,-42],[18,-76],[73,-38],[5,-66],[32,-73],[24,0],[29,-108],[-6,-69],[26,-20],[-6,-46],[22,-71],[114,-152],[32,-119],[46,-120],[50,-110],[-23,-49],[33,-134],[47,-140],[28,-176],[57,-182],[32,-161],[30,-111],[25,-123],[53,-180],[32,-155],[-33,-140],[89,-52],[-21,-205],[71,-81],[-8,-61],[11,-57],[7,-119],[71,14],[33,-77],[82,-115],[23,-48],[85,-47],[44,-115],[44,-33],[11,-116],[23,-15],[27,-36],[40,23],[28,-143],[-3,-90],[-20,-107],[-18,-67],[1,-60],[10,-38],[-5,-118],[12,-104],[11,-46],[6,-133],[12,-63],[-32,-100],[-24,-122],[-1,-33],[-20,-90],[-23,-77],[-37,-97],[-27,-55],[-19,-14],[3,-46],[-19,-23],[-12,40],[-1,56],[-13,24],[-1,-44],[-12,-22],[-18,18],[-13,52],[-4,108],[3,57],[-17,33],[8,103],[-9,6],[-16,56],[-6,64],[30,63],[17,63],[15,-8],[-3,75],[-11,82],[14,122],[-9,190],[-10,67],[-43,164],[-22,55],[-12,48],[-7,-34],[23,-62],[25,-85],[7,-72],[22,-90],[10,-131],[-16,-43],[-2,-79],[7,-92],[11,-62],[-9,-28],[-11,96],[-8,12],[3,-70],[-4,-74],[-36,-102],[-14,-5],[-24,49],[19,73],[11,73],[-3,38],[-25,-10],[10,-72],[-8,-42],[-33,-56],[-7,1],[-23,108],[-11,-45],[-25,54],[-17,18],[-12,50],[-28,68],[0,76],[31,31],[22,51],[-20,47],[7,75],[-9,39],[23,44],[3,24],[-18,1],[-3,74],[7,43],[-41,-17],[6,-45],[11,-16],[-1,-37],[-13,-85],[-1,-60],[-19,-73],[-18,13],[7,-93],[-10,-43],[-24,52],[-25,22],[-9,30],[-12,132],[-16,70],[21,-29],[7,75],[27,37],[12,147],[-8,102],[10,57],[6,-21],[12,42],[7,92],[-21,-11],[-4,-58],[-19,-30],[-21,-61],[13,-113],[-8,-42],[-33,3],[-12,-43],[3,-30],[-17,-14],[-7,34],[4,67],[-19,23],[-12,128],[-32,-17],[0,-48],[-28,118],[-3,123],[8,25],[25,1],[7,66],[13,49],[30,12],[16,-72],[7,63],[-15,168],[9,3],[30,-45],[4,-59],[11,-32],[6,23],[-9,77],[-22,35],[-19,48],[-3,53],[-11,13],[-12,-25],[-10,49],[-23,32],[-5,57],[12,23],[-4,64],[-22,28],[-37,66],[-13,69],[-15,33],[-13,79],[29,43],[-11,58],[-18,-47],[-19,18],[-2,-27],[-23,58],[-31,8],[-11,56],[-27,-28],[-54,76],[-8,75],[15,73],[18,-22],[33,4],[9,48],[-22,3],[-32,36],[2,35],[-18,125],[13,81],[-24,-10],[-15,19],[-16,53],[7,103],[20,2],[16,-36],[33,-24],[63,-89],[5,15],[-25,58],[-20,19],[-66,130],[-3,95],[-17,-15],[-2,-65],[-20,3],[-39,166],[-55,147],[-11,140],[9,65],[-2,52],[27,41],[-13,100],[-8,-2],[-9,-85],[-20,-30],[0,-42],[12,-22],[-13,-57],[-10,10],[-22,-20],[-25,11],[-36,34],[-7,-15],[-35,36],[-40,174],[-4,110],[-42,140],[-13,79],[19,1],[-11,174],[-19,-56],[1,-58],[-35,132],[-8,177],[-8,92],[-21,135],[-32,116],[-36,37],[-5,-16],[28,-38],[4,-41],[17,-39],[20,-131],[-15,11],[-34,140],[-22,36],[-22,10],[41,-92],[13,-85],[17,-29],[-7,-97],[9,-88],[13,-23],[-5,-24],[27,-124],[3,-55],[25,-139],[2,-32],[-14,11],[27,-204],[9,-85],[1,-69],[-12,8],[-1,-61],[12,-64],[-29,23],[-19,32],[-14,-4],[-18,43],[-15,66],[-10,84],[-22,-16],[-33,50],[-27,-37],[-50,-19],[3,81],[-25,16],[-4,19],[30,39],[-10,69],[5,53],[-28,109],[0,36],[-22,84],[13,24],[-2,90],[-19,64],[-12,10],[15,-131],[-12,-125],[-27,-5],[-42,70],[-26,30],[-15,150],[-11,-68],[-13,-22],[-44,54],[-14,-20],[-10,50],[-12,-18],[-3,-54],[45,-35],[7,7],[45,-44],[33,-66],[30,-104],[-11,-44],[-24,-44],[6,-11],[33,44],[7,30],[27,1],[7,-105],[26,-78],[16,-157],[-19,-44],[-43,-32],[-11,10],[9,47],[-18,16],[-12,-17],[7,-39],[-10,-37],[-43,22],[-11,-23],[5,-60],[-8,-35],[-29,5],[-8,78],[-36,35],[3,15],[-28,74],[-17,19],[-29,-19],[-35,70],[-16,15],[-56,107],[-51,75],[-2,50],[-30,70],[-37,64],[-5,28],[4,75],[-15,48],[-55,121],[-30,47],[-96,89],[-36,71],[-43,66],[-98,104],[-42,49],[-91,144],[-30,39],[5,29],[31,89],[24,-14],[-9,-27],[24,3],[0,43],[21,70],[-22,7],[2,77],[-14,116],[7,35],[22,41],[-5,34],[16,30],[-13,56],[-19,-51],[-2,-59],[-25,-21],[-21,-72],[-1,-49],[-107,-100],[-12,-28],[-28,-28],[-95,22],[-67,36],[-26,32],[-123,125],[-17,56],[18,-10],[34,24],[11,71],[-33,131],[3,42],[-20,-17],[-31,44],[6,-50],[45,-120],[-10,-21],[-54,-51],[-39,0],[-49,55],[-61,24],[-32,23],[-81,40],[-45,11],[-59,-4],[-63,-33],[-77,-12],[-80,-28],[-54,-48],[-39,39],[-45,-26],[-64,-120],[-46,-115],[6,65],[36,103],[62,117],[46,2],[-16,66],[-49,48],[-8,25],[-10,-82],[-26,84],[-26,30],[-17,-9],[-16,27],[-71,19],[9,28],[38,23],[-42,33],[-19,-6],[-2,25],[37,156],[-15,15],[-13,-36],[-29,-22],[-1,-57],[-20,-66],[-39,12],[-70,97],[1,31],[-26,36],[-39,26],[-41,-35],[-22,27],[13,29],[31,32],[25,74],[-14,10],[-18,-49],[-79,-93],[-29,-23],[-38,5],[1,-54],[60,27],[11,-24],[2,-53],[-17,2],[-28,-37],[-18,6],[-41,-38],[-41,-77],[-12,2],[-12,48],[47,77],[-37,-12],[-17,11],[-1,54],[23,83],[13,27],[18,2],[20,-31],[24,17],[22,41],[38,13],[57,58],[42,20],[-9,25],[-19,-2],[1,71],[-11,-49],[-19,-20],[1,30],[25,65],[1,21],[-33,-58],[-45,-47],[-19,-3],[-4,30],[63,112],[-6,38],[-29,-60],[-38,-14],[-12,26],[-15,-49],[-20,-14],[-54,13],[-10,58],[27,19],[11,-9],[18,25],[40,16],[29,28],[23,65],[-25,2],[-14,-46],[-23,-19],[-45,-2],[-18,68],[-12,3],[-17,-69],[-21,-8],[-4,59],[16,26],[17,-6],[-11,44],[-3,55],[13,34],[26,114],[96,6],[-7,38],[-91,-5],[-21,-63],[-27,-26],[-21,-77],[-31,-48],[-23,12],[20,36],[-10,113],[-12,53],[18,30],[-22,10],[-14,-23],[-1,-51],[12,-63],[-14,-63],[1,-41],[-13,-15],[-26,48],[-2,-67],[-27,-45],[-21,22],[0,52],[-11,19],[-7,-73],[-9,15],[4,129],[9,62],[-15,11],[-17,-130],[9,-111],[-4,-29],[-19,-9],[1,49],[-27,34],[-7,-46],[16,-65],[-13,-8],[-38,16],[-34,-48],[-28,9],[-5,31],[14,95],[42,151],[1,53],[49,123],[16,81],[-6,18],[-73,-211],[-1,-35],[-18,-58],[-8,8],[-8,69],[-12,-1],[-3,-81],[-11,-54],[-18,-42],[-3,-64],[-16,-68],[-21,27],[-7,-44],[24,-28],[-5,-91],[10,-8],[19,85],[37,6],[11,-22],[4,-91],[-14,-45],[-31,-32],[-22,-76],[1,-63],[21,20],[17,75],[30,44],[30,-89],[0,-44],[10,-43],[-23,-192],[-26,0],[-9,52],[-19,9],[1,-36],[-27,-44],[0,-17],[28,14],[23,-27],[61,-124],[26,-85],[-15,-77],[-13,-26],[-34,-35],[-17,16],[-14,-18],[-29,-6],[9,51],[-26,67],[9,60],[-17,63],[-16,-126],[0,-62],[-12,-41],[-19,69],[-9,-8],[-7,-59],[-18,-33],[-34,50],[-29,-40],[-15,52],[-27,-21],[-22,5],[-9,28],[24,74],[-9,14],[-27,-38],[-29,-175],[-30,-42],[-9,18],[14,55],[13,84],[-15,172],[-16,5],[-5,-28],[1,-81],[13,-53],[-10,-4],[-10,-72],[-17,11],[-8,-20],[-5,-68],[-11,-17],[4,-47],[25,-31],[-6,-74],[-27,32],[-12,127],[8,37],[-11,78],[-17,6],[6,-52],[-8,-49],[5,-196],[-5,-64],[-27,74],[-1,43],[-16,28],[-34,31],[3,-40],[24,-36],[-1,-63],[-69,-158],[-32,-91],[0,-36],[-16,-10],[-9,-86],[-12,2],[-3,70],[34,211],[0,29],[-26,-65],[-19,-111],[-12,11],[-9,142],[-13,-52],[-11,2],[16,-62],[-5,-80],[-39,0],[-8,-61],[-18,-24],[-22,-55],[7,-43],[-15,-41],[-16,-10],[0,54],[-16,36],[-13,-45],[-1,-53],[-22,-17],[-24,31],[-9,-23],[-21,38],[-7,43],[-12,-36],[-21,-27],[6,-35],[-20,0],[-5,-39],[-41,-7],[-6,76],[-22,-14],[-21,22],[3,22],[-21,8],[-3,70],[8,36],[16,18],[5,71],[32,31],[9,-11],[29,51],[33,3],[0,45],[33,21],[34,62],[31,-9],[-11,69],[22,26],[3,32],[37,102],[-13,15],[-24,-22],[-60,-109],[-30,-20],[-18,-39],[-39,16],[-43,67],[-15,40],[-5,46],[18,117],[13,45],[15,133],[27,79],[17,33],[35,99],[11,98],[0,71],[23,32],[5,156],[4,27],[-18,44],[-22,163],[39,35],[5,27],[63,27],[89,164],[92,118],[51,-161],[41,-16],[13,-27],[34,112],[30,8],[36,-45],[19,10],[63,-48],[65,-20],[30,-55],[-1,27],[-22,63],[-29,36],[-38,-14],[-51,63],[-24,-1],[-40,42],[-25,68],[-39,66],[-29,28],[18,55],[24,9],[31,124],[23,18],[8,60],[46,27],[30,45],[-32,50],[-20,4],[-43,-64],[-11,-49],[-19,-14],[-12,-70],[0,-70],[-18,-31],[-25,19],[-36,7],[-74,-17],[-26,43],[-28,16],[-14,-52],[-87,-84],[-39,-154],[-36,-12],[-19,-31],[-33,2],[-39,-63],[-48,-109],[-1,-29],[26,-124],[-2,-23],[-38,25],[-19,-18],[-30,-52],[-21,-92],[-27,-29],[-32,-74],[-6,-73],[8,-34],[19,-24],[-40,-56],[-9,-67],[-13,-4],[-28,-70],[-19,-7],[-9,28],[-25,-11],[4,-68],[16,-13],[-3,-30],[25,-42],[8,-35],[-12,-73],[-19,-47],[-7,-62],[-25,-21],[-4,-22],[-39,-2],[-15,12],[-40,-31],[-18,3],[-19,-60],[23,16],[15,-20],[15,30],[19,1],[7,-50],[-16,-116],[-19,-16],[-26,-51],[-28,37],[5,-34],[-13,-18],[-18,18],[7,35],[2,75],[-22,71],[3,-119],[-9,-55],[-18,-15],[-13,25],[-6,-35],[16,-28],[-9,-53],[-49,-10],[17,-93],[-8,-32],[-27,-21],[-10,8],[-24,-45],[-12,13],[-36,-37],[5,-26],[20,-18],[-23,-32],[-7,-43],[2,-61],[-12,-44],[-24,-35],[24,-26],[-6,-59],[10,-60],[27,63],[59,-23],[16,22],[12,-22],[15,25],[22,-78],[19,-27],[19,13],[23,-34],[18,-53],[8,-53],[15,-22],[-28,-14],[-14,-118],[-12,-39],[-30,-25],[-11,-55],[-24,-33],[-48,0],[-15,-17],[-4,-94],[-12,-33],[-27,1],[-5,-20],[10,-79],[11,-32],[-27,-36],[-20,15],[-2,-45],[20,-46],[-11,-81],[-21,-30],[-6,-33],[9,-24],[-23,0],[-14,-52],[-26,66],[-9,-7],[5,-57],[-4,-40],[-21,-3],[-12,-43],[-17,16],[0,27],[-20,-1],[-4,-39],[-22,-24],[-23,31],[-28,-17],[-35,-69],[15,-52],[-9,-51],[-40,-44],[-28,-2],[1,-53],[14,-25],[-6,-40],[-20,-16],[-36,59],[-10,30],[-20,-20],[-5,-63],[1,-69],[-26,-27],[-3,-97],[-65,-7],[-21,24],[-2,-74],[8,-71],[-20,0],[-12,37],[-21,3],[-4,-39],[-32,-27],[-39,-92],[-15,-12],[-5,-44],[13,-11],[47,64],[4,-50],[-6,-53],[-15,-7],[0,-31],[18,-38],[-10,-38],[-18,-26],[-2,-49],[-26,-44],[-8,-32],[2,-42],[-32,14],[-31,-28],[-4,-70],[-12,-12],[-19,75],[-8,-53],[-27,-42],[-11,-53],[-24,-6],[5,-50],[-17,-27],[-25,43],[-24,67],[-22,-16],[0,-51],[11,-5],[1,-36],[-29,-10],[-13,-67],[6,-32],[18,-6],[5,-52],[-36,-4],[-24,-15],[-17,77],[-51,-38],[-18,-51],[-16,-3],[-9,-49],[19,-1],[27,25],[20,-17],[6,-54],[-16,-47],[-43,44],[-23,11],[-5,-70],[-33,6],[-23,21],[-20,-33],[-27,-88],[2,-44],[47,-20],[32,-36],[-3,-29],[-32,-42],[1,-23],[18,-4],[25,31],[16,-7],[-55,-78],[-23,-63],[1,-52],[-13,50],[-10,-17],[16,-66],[-6,-50],[-7,39],[-10,-2],[-2,-53],[-25,80],[0,95],[-19,-60],[8,-73],[-4,-67],[-24,-6],[3,58],[-35,1],[-16,-80],[-25,-9],[-75,-43],[-29,-22],[-7,-22],[-3,-74],[-17,46],[5,80],[-23,-19],[10,-30],[1,-104],[-16,-71],[6,-46],[-24,-81],[-32,-30],[2,52],[24,4],[-1,40],[-10,4],[2,111],[18,72],[-29,39],[-28,12],[-13,-18],[3,-45],[-12,-21],[-13,22],[-25,-13],[-9,-82],[-35,-74],[-26,-20],[-37,28],[-6,-29],[11,-44],[-20,-81],[1,-31],[-21,-37],[-12,105],[-10,13],[-14,-37],[-11,14],[-18,-31],[31,-13],[-2,-68],[-32,-10],[-16,25],[5,39],[-13,24],[-22,-22],[-19,-90],[-61,-85],[-26,2],[-11,29],[-26,-29],[-13,4],[10,156],[29,96],[1,46],[-15,16],[-31,-2],[-24,-29],[-24,-101],[4,-129],[-40,-140],[-7,-12],[-14,-85],[-21,36],[-19,-12],[13,-65],[10,-17],[1,-56],[-25,-38],[-19,33],[0,45],[-16,15],[-13,-60],[10,-49],[-17,-47],[-14,27],[-32,-8],[-16,18],[-14,74],[32,6],[-21,47],[-8,104],[-21,56],[-11,7],[-16,-33],[-10,-65],[7,-27],[14,0],[18,-70],[-11,-46],[14,-95],[0,-52],[-22,30],[-20,-19],[3,-26],[-17,-30],[-18,-7],[-22,28],[-16,59],[4,36],[-13,56],[-21,37],[-31,-25],[-10,-56],[49,-85],[4,-31],[-50,-111],[-24,-21],[-20,-33],[16,-56],[27,2],[9,24],[22,-50],[13,-83],[-26,6],[8,34],[-17,6],[-10,-28],[-16,22],[-17,62],[-25,-39],[2,-69],[-18,-1],[-28,-50],[-23,18],[-37,10],[-45,-5],[-34,-14],[-41,-40],[-29,-71],[-4,-69],[-29,-53],[-51,-33],[-29,3],[-28,28],[-9,30],[-9,74],[-10,30],[-1,55],[8,29],[44,41],[14,25],[23,110],[19,110],[-1,29],[22,54],[14,13],[25,-46],[38,39],[25,49],[25,0],[37,81],[34,20],[36,-14],[31,5],[1,-37],[28,-72],[9,-61],[-5,-50],[27,24],[-8,52],[2,37],[30,-30],[-15,42],[2,77],[-10,109],[32,46],[26,21],[42,-15],[21,14],[10,69],[-16,4],[4,28],[18,10],[7,38],[18,-4],[26,99],[3,-32],[15,-20],[21,48],[-5,83],[-20,-9],[27,68],[64,206],[33,52],[23,62],[19,13],[27,42],[25,68],[27,14],[35,39],[37,20],[89,70],[30,-9],[10,18],[45,5],[10,-10],[-20,-27],[-1,-47],[14,-2],[-3,-49],[-29,-18],[-3,-85],[38,-98],[11,22],[27,-39],[4,19],[-29,53],[-3,85],[-6,32],[26,-28],[57,3],[7,-86],[23,7],[26,-36],[7,22],[-14,40],[27,15],[-56,89],[-32,36],[1,58],[-16,-7],[39,166],[15,123],[11,56],[23,44],[36,96],[18,13],[40,74],[30,81],[82,96],[41,74],[35,39],[68,106],[17,42],[29,-68],[19,-14],[31,19],[8,59],[-13,47],[-2,46],[15,122],[29,108],[41,130],[24,62],[22,37],[40,41],[21,52],[22,87],[14,15],[26,62],[30,25],[8,-74],[18,-15],[4,41],[-10,105],[-23,-2],[-6,34],[2,95],[9,59],[25,409],[14,42],[38,16],[12,53],[-20,-9],[-34,77],[-3,62],[9,97],[20,106],[27,33],[29,101],[49,102],[4,57],[19,93],[-5,45],[13,33],[-3,43],[13,38],[-20,0],[-11,-32],[0,-38],[-21,-53],[-28,-31],[-38,-27],[-21,-31],[-29,-22],[-5,-21],[-41,-28],[-44,-61],[-79,-73],[-26,5],[-28,53],[-5,73],[-20,49],[-40,38],[2,46],[11,17],[9,167],[-12,-3],[-25,-101],[-41,-54],[-6,-58],[5,-58],[-8,-37],[-14,-12],[-3,-32],[9,-80],[16,-91],[19,-76],[-26,-87],[-28,-21],[-42,32],[-39,161],[-47,208],[-26,73],[-23,42],[-31,13],[16,65],[-16,44],[-25,-9],[-6,-87],[-15,7],[1,-65],[-29,-30],[-24,79],[3,26],[-19,19],[-11,-30],[-16,6],[-1,59],[-22,-18],[-25,61],[18,47],[-17,89],[-44,-52],[-46,-72],[-31,-62],[-20,-95],[-13,57],[-36,-33],[-94,-124],[-10,-41],[0,-49],[-41,-38],[-8,-26],[-22,-10],[-15,-44],[-20,-15],[-4,55],[-29,45],[-54,-20],[-29,33],[49,47],[15,-39],[18,12],[5,50],[25,77],[3,60],[-8,85],[1,81],[-16,74],[5,21],[-16,20],[-29,97],[-20,139],[29,128],[21,23],[24,79],[24,26],[-15,77],[-18,44],[-15,64],[-10,107],[-50,162],[-3,74],[-25,67],[-10,63],[-30,85],[-10,44],[-22,9],[-11,-37],[-2,-74],[6,-37],[-8,-56],[-12,-21],[-27,-10],[-18,21],[-19,-54],[-36,-29],[-50,-68],[-73,-48],[-88,-28],[-75,10],[-51,38],[-13,32],[-13,99],[23,18],[-18,69],[-54,62],[-32,108],[-5,34],[-33,51],[-18,62],[-42,8],[-31,42],[-47,110],[23,32],[24,55],[-2,36],[-24,6],[-38,-54],[-48,10],[-16,51],[11,32],[32,1],[57,128],[10,-4],[17,45],[-16,34],[-4,41],[32,24],[-27,7],[5,70],[27,78],[-17,3],[-18,-48],[-40,42],[-6,40],[22,49],[27,-6],[19,23],[0,45],[-17,-21],[-30,32],[-16,54],[2,23],[-20,7],[-13,35],[-10,-14],[-12,-99],[-14,-6],[-38,16],[-10,21],[-10,66],[1,129],[-11,19],[-43,10],[-18,37],[-10,98],[42,44],[6,38],[-17,46],[-30,31],[-45,-27],[0,-46],[-21,23],[-9,88],[8,147],[6,11],[-2,-107],[92,47],[0,19],[-35,20],[-20,28],[-24,82],[2,18],[36,19],[55,-8],[33,25],[-29,134],[-4,46],[3,84],[21,77],[101,278],[4,29],[27,77],[29,61],[5,70],[18,67],[21,34],[19,-4],[9,23],[-11,115],[26,188],[18,70],[38,61],[-18,24],[4,22],[58,133],[60,46],[48,11],[42,-45],[43,-11],[32,-84],[24,-6],[6,-26],[54,-88],[73,24],[61,124],[4,47],[44,29],[63,172],[23,89],[23,39],[-9,58],[14,5],[28,-28],[22,-5],[13,-77],[52,0],[45,20],[26,-20],[77,28],[48,38],[9,51],[56,128],[38,135],[0,71],[-12,81],[-23,95],[-17,121],[-1,118],[-5,52],[-71,157],[-9,32],[-41,28],[-27,1],[10,97],[27,33],[14,-25],[35,-20],[51,7],[-10,45],[31,10],[41,81],[2,114],[-42,122],[-47,68],[-25,48],[-1,-32],[-27,-48],[-20,-86],[-42,-30],[-42,42],[-59,-93],[-81,-34],[-18,-71],[-85,-103],[-21,-70],[-5,-99],[-44,-70],[-4,93],[-15,110],[-23,50],[-28,-3],[4,34],[-32,46],[-9,36],[-38,-60],[16,-45],[21,-7],[16,-39],[24,11],[2,-48],[-22,-81],[-19,-11],[-22,82],[-55,76],[-41,33],[-64,13],[-41,-27],[-27,12],[-52,3],[-45,-22],[-108,-112],[-58,-17],[-111,74],[-94,45],[-47,14],[-88,40],[-49,79],[-20,96],[1,74],[20,36],[-6,64],[-28,63],[-45,56],[-1,59],[-46,64],[-10,56],[39,-33],[33,3],[9,27],[24,15],[16,32],[-3,55],[35,61],[-38,63],[-19,9],[-29,-16],[-39,15],[-64,52],[-104,21],[-49,52],[-38,63],[-55,60],[-46,30],[-15,93]],[[2812,78476],[27,27],[-1,59],[18,0],[10,36],[0,57],[21,33],[5,57],[-10,16],[11,87],[46,106],[16,-26],[27,16],[28,-3],[-9,65],[-12,5],[9,77],[-6,26],[18,76],[40,67],[54,37],[29,-53],[31,1],[2,-23],[-21,-74],[5,-60],[-55,-95],[-65,-72],[-19,-66],[-1,-36],[-28,-81],[-15,-58],[-25,-10],[-28,-71],[-15,-17],[-4,-51],[-15,21],[-27,-49],[-54,-69],[13,45]],[[2752,78371],[29,49],[-1,-45],[-26,-25],[-2,21]],[[2615,78610],[4,50],[19,16],[4,-44],[-9,-45],[-12,-8],[-6,31]],[[2607,82847],[50,-13],[29,5],[10,-14],[-27,-68],[-23,4],[-9,46],[-20,10],[-10,30]],[[2611,78728],[8,-39],[-15,13],[7,26]],[[2547,78457],[17,17],[23,-3],[-2,19],[27,23],[19,-10],[10,-25],[-17,-105],[-30,50],[-25,-29],[-19,14],[-3,49]],[[2517,78521],[8,26],[23,-16],[1,-31],[-14,-31],[-13,16],[-5,36]],[[2497,78313],[4,72],[33,-18],[-7,-57],[-30,3]],[[2431,83489],[9,43],[22,15],[12,-10],[29,22],[-2,-56],[-32,-62],[-5,31],[-33,17]],[[2316,78170],[5,42],[40,72],[31,-27],[1,-27],[-13,-58],[-19,2],[-17,-26],[-15,-48],[-15,21],[2,49]],[[2228,78152],[9,-32],[-16,2],[7,30]],[[2183,78046],[17,42],[16,-37],[-12,-55],[-19,-1],[-2,51]],[[2036,90914],[2,37],[25,87],[-3,75],[8,18],[-5,57],[21,3],[8,-42],[-4,-48],[12,-34],[64,-57],[77,-48],[55,-20],[58,87],[58,58],[58,-14],[29,-69],[23,-15],[15,-104],[-2,-38],[53,-56],[56,-14],[22,-32],[9,-35],[36,-20],[88,-20],[14,6],[102,-55],[-27,-131],[-22,-43],[-51,35],[-43,-1],[-50,-29],[-44,-89],[-10,-61],[1,-53],[-20,-46],[-30,22],[3,24],[-26,119],[-32,62],[-50,60],[-39,-5],[-11,69],[-17,55],[-54,80],[-86,69],[-65,11],[-47,-44],[-18,-58],[-36,-34],[-28,33],[-49,36],[-24,83],[-7,56],[3,73]],[[1818,77819],[15,59],[33,49],[12,-2],[27,-39],[-1,-41],[-28,-51],[-32,-27],[-22,-1],[-4,53]],[[1695,87369],[6,69],[25,52],[11,-3],[-4,-58],[12,-54],[33,-70],[48,-63],[22,-14],[25,13],[57,-94],[-21,-19],[-9,37],[-51,8],[-26,-17],[-33,46],[-58,136],[-37,31]],[[1687,87598],[8,-5],[5,-84],[-20,42],[7,47]],[[1421,77626],[35,0],[33,-31],[9,30],[14,-2],[33,27],[25,-1],[-6,-28],[10,-29],[8,15],[31,-24],[23,16],[10,-11],[32,11],[5,-12],[41,-7],[-25,-23],[-16,6],[-14,-22],[-44,-1],[-22,-35],[-8,16],[-16,-19],[-19,4],[-18,25],[-52,3],[-9,-15],[-29,19],[-10,49],[-11,-1],[-10,40]],[[1064,77503],[55,37],[11,-28],[25,50],[3,-22],[19,38],[5,29],[18,-29],[27,8],[8,34],[6,-24],[35,37],[1,42],[44,10],[-13,41],[43,-5],[13,34],[-1,36],[-32,7],[-23,29],[5,26],[21,-16],[12,36],[-2,39],[38,46],[33,-32],[22,-76],[1,-31],[-21,-85],[-34,8],[-4,-43],[33,-79],[-3,-24],[-15,21],[-17,-10],[-4,-27],[-16,-4],[-20,23],[-19,-95],[-25,31],[-64,-55],[-13,29],[-29,12],[-23,-6],[-13,-35],[-22,-8],[-33,6],[-32,25]],[[1013,77451],[17,17],[7,-29],[-22,-4],[-2,16]],[[1005,77685],[16,-19],[-11,-12],[-5,31]],[[949,77433],[5,9],[40,-3],[1,-26],[-19,3],[-22,-24],[-5,41]],[[890,77452],[11,14],[28,-1],[15,-90],[-16,5],[-17,49],[-21,23]],[[821,77563],[14,45],[26,-9],[23,-80],[-20,-38],[15,-56],[-13,-34],[-18,-2],[-18,22],[3,57],[-7,2],[-8,77],[3,16]],[[811,77269],[5,56],[12,10],[10,-27],[19,10],[-12,22],[34,30],[10,-23],[-2,-55],[-23,0],[13,-52],[-29,29],[2,-40],[-12,12],[-5,-39],[-7,45],[-15,22]],[[601,77040],[11,67],[15,16],[7,36],[-13,66],[4,27],[32,7],[7,59],[-13,69],[10,45],[15,4],[18,-20],[19,59],[9,-14],[3,-74],[-20,-29],[-2,-50],[13,-20],[19,4],[31,26],[30,5],[7,-64],[-7,-88],[-15,-12],[-36,18],[-13,-52],[-18,-12],[-13,-41],[-23,31],[-6,-25],[6,-48],[-11,17],[-13,-26],[-4,55],[-14,29],[-19,-108],[-14,11],[-2,32]],[[469,77371],[13,9],[2,-26],[-14,-17],[-1,34]],[[402,77131],[18,33],[24,-17],[26,34],[50,39],[21,43],[2,128],[12,16],[16,-10],[15,-44],[-26,-98],[5,-86],[-7,-38],[-33,-31],[-36,61],[-27,-33],[-40,-10],[-1,-43],[-10,5],[-9,51]],[[257,77332],[8,29],[29,17],[39,-5],[11,-42],[-2,-30],[19,-32],[15,17],[18,-17],[33,34],[-10,-40],[-41,-32],[-12,-71],[4,-31],[-12,-31],[-8,16],[-9,-44],[8,-57],[-8,-5],[-9,56],[-14,-24],[-16,48],[-13,8],[4,28],[41,25],[-3,64],[-20,1],[-13,34],[-39,66],[0,18]],[[130,77016],[32,-12],[-3,-18],[-27,7],[-2,23]],[[81,76979],[27,-17],[7,-23],[-25,5],[-9,35]],[[77,77233],[14,52],[20,-35],[0,-61],[-19,-10],[-15,54]],[[43,76751],[8,25],[10,-22],[5,-50],[-12,-2],[-10,-32],[-1,81]],[[3,76640],[12,18],[6,-59],[-18,-25],[0,66]],[[99917,77451],[12,-2],[12,35],[26,14],[31,-61],[-9,-68],[-24,-42],[-12,-5],[-25,29],[-11,29],[0,71]],[[99678,77049],[5,24],[26,-29],[19,3],[27,-24],[4,-31],[24,-42],[27,-78],[25,-26],[11,-57],[44,-11],[21,-33],[-18,-19],[-9,14],[-29,-16],[-15,41],[-41,72],[-30,101],[-30,43],[-17,-8],[-22,25],[-22,51]],[[99628,77446],[9,11],[20,-16],[11,-33],[-14,-49],[-10,-4],[-16,91]],[[99570,77271],[19,-7],[21,-67],[-22,15],[-18,59]],[[99530,77510],[7,22],[17,-22],[3,-34],[-17,-20],[-10,54]],[[99282,77351],[24,27],[15,50],[39,26],[6,63],[16,96],[11,18],[20,-52],[-12,-32],[-8,-57],[-20,-53],[21,-18],[0,-35],[-13,-10],[-42,17],[-17,-31],[-4,-70],[-11,2],[-25,40],[0,19]],[[98911,77903],[26,-13],[-18,-27],[-8,40]],[[98408,78327],[22,-8],[3,-26],[-24,15],[-1,19]],[[98376,78346],[14,-8],[0,-29],[-14,37]],[[98352,78374],[20,-27],[-12,-2],[-8,29]],[[98210,77943],[6,31],[19,27],[23,-6],[26,67],[41,5],[-17,-40],[-5,-37],[10,-104],[-21,0],[-17,52],[-35,-19],[-30,24]],[[97960,78551],[47,86],[33,11],[100,-20],[29,-63],[24,-15],[35,-94],[2,-18],[-35,-8],[-21,38],[-17,-71],[-9,-13],[-38,15],[-26,-41],[-27,32],[-12,40],[-3,63],[-32,56],[-35,-24],[-15,26]],[[13347,81071],[9,23],[10,-28],[-5,-52],[-16,34],[2,23]],[[13279,80906],[61,56],[7,-80],[13,-14],[-20,-68],[-24,-1],[-33,63],[-4,44]],[[13241,80901],[26,65],[8,-25],[-26,-58],[-8,18]],[[13234,81005],[16,62],[-2,43],[13,20],[-14,43],[-2,70],[5,39],[11,9],[19,-32],[5,-35],[13,-7],[17,-40],[0,-165],[-9,-34],[-27,-2],[-13,32],[-23,-36],[-9,33]],[[13172,81388],[4,66],[6,1],[52,-135],[-12,-28],[-1,-68],[-15,-111],[-23,74],[-9,113],[-2,88]],[[12999,82714],[4,48],[9,-30],[-13,-18]],[[12979,82569],[2,29],[21,40],[21,-38],[-1,-22],[-24,-37],[-19,28]],[[12954,82690],[20,33],[17,52],[-5,-50],[-18,-75],[-14,40]],[[12888,80934],[18,6],[-4,-53],[-14,47]],[[12850,82395],[7,53],[10,-24],[22,-97],[10,-68],[-13,-15],[-21,61],[-9,4],[-6,86]],[[12838,82543],[18,86],[21,30],[30,-20],[24,22],[28,-42],[4,-36],[-18,-53],[6,-82],[-16,-19],[-44,-22],[-23,65],[-24,29],[-6,42]],[[12768,81460],[21,27],[-2,-46],[-16,-11],[-3,30]],[[12700,80811],[9,0],[10,-128],[-15,29],[-4,99]],[[12674,81692],[9,23],[1,61],[20,-30],[1,-32],[-22,-72],[-9,50]],[[12659,81749],[12,9],[-1,-36],[-11,27]],[[12637,81497],[8,92],[8,25],[32,-9],[10,-16],[-2,-35],[-16,-42],[8,-16],[20,40],[5,43],[13,-19],[19,68],[19,-2],[16,-39],[-5,-60],[-15,-35],[-19,15],[-13,-35],[17,-22],[-2,-37],[-22,-21],[-22,-50],[-9,-97],[-23,78],[17,61],[-1,78],[-29,51],[-14,-16]],[[12629,82086],[11,22],[24,102],[28,10],[11,20],[-22,13],[-1,47],[15,-22],[9,34],[-36,62],[14,29],[-10,86],[23,49],[45,-24],[71,-17],[24,-82],[11,-73],[-5,-69],[14,-6],[13,-68],[17,-48],[17,5],[57,-119],[12,-52],[33,-111],[3,-126],[29,-29],[8,-82],[8,-32],[31,-50],[13,-58],[-10,-6],[-19,46],[-75,98],[-3,-31],[-23,-74],[11,-8],[14,47],[8,-19],[23,10],[5,-37],[20,-13],[10,-29],[-38,-14],[8,-36],[32,21],[14,-52],[16,-14],[11,-87],[8,-9],[-12,-49],[-20,9],[2,-32],[22,-22],[11,8],[3,46],[14,36],[9,-21],[5,-91],[-15,-34],[4,-36],[-22,-94],[-29,-40],[18,-23],[27,59],[15,-10],[0,-203],[7,-72],[-20,-105],[-37,-9],[-26,48],[-14,-19],[-17,38],[-1,37],[-38,-2],[17,53],[27,-10],[1,39],[-19,42],[-19,13],[-35,78],[9,38],[10,115],[-15,9],[-11,-58],[7,101],[8,28],[-11,39],[-5,-55],[-27,-21],[14,-103],[-18,-58],[-47,56],[-4,35],[17,58],[-18,100],[-20,-5],[-10,50],[-21,3],[12,-78],[18,-65],[6,-72],[-7,-36],[15,-17],[20,-145],[24,-26],[-4,58],[24,18],[28,-65],[4,-124],[-14,-16],[-18,74],[-7,-7],[23,-170],[-29,0],[-26,32],[-2,60],[-20,40],[-49,177],[-10,22],[-2,84],[-12,10],[-8,61],[29,8],[-27,33],[3,119],[-33,-28],[-10,26],[-18,-19],[-9,42],[6,84],[33,30],[11,-63],[17,20],[-13,29],[6,39],[14,20],[14,-14],[22,44],[-29,96],[14,12],[-16,32],[4,66],[-24,-21],[-49,87],[-4,28],[16,-1],[-9,50],[3,35],[-27,18],[6,-57],[-10,-13],[-32,39],[-16,58],[12,52],[28,14],[37,-54],[28,35],[-17,67],[-18,16],[-12,-20],[-9,17],[8,30],[-2,42],[7,63],[-5,16],[-13,-47],[-27,-65],[-22,-33],[-23,38],[-5,45]],[[12611,83642],[15,25],[14,-33],[-27,-31],[-2,39]],[[12594,82026],[14,28],[11,-6],[4,-52],[-8,-48],[-10,3],[-11,75]],[[12476,82024],[28,22],[1,-43],[31,33],[8,75],[7,-2],[-9,-101],[-22,-24],[-20,-56],[-18,17],[8,30],[-14,49]],[[12463,83115],[17,52],[16,17],[7,33],[33,-1],[1,26],[28,-40],[11,-83],[18,-54],[31,-2],[9,-21],[10,26],[-29,44],[-13,80],[-2,55],[-35,79],[11,53],[34,26],[51,-37],[25,-9],[47,-44],[31,-20],[7,14],[57,-11],[30,-74],[14,-82],[3,-56],[9,-23],[23,-11],[16,-48],[5,-46],[33,-52],[9,-64],[15,-34],[-31,-38],[-20,-42],[-26,-24],[-16,16],[-31,4],[-43,24],[5,-48],[-23,-51],[-40,25],[-19,29],[-12,-47],[-15,-20],[-25,-2],[-17,15],[-3,87],[-11,32],[-30,-64],[13,-29],[-2,-90],[-23,-3],[-2,-31],[10,-51],[-11,-51],[-2,-62],[-17,-50],[4,-39],[-9,-64],[-10,-11],[-25,15],[-14,-103],[-15,19],[-12,52],[-7,63],[-1,109],[-10,87],[2,75],[14,48],[-3,57],[15,101],[-12,28],[-22,-1],[5,77],[-20,56],[-8,75],[2,43],[-5,91]],[[12311,84926],[43,-96],[7,-47],[14,-9],[8,-130],[19,1],[21,38],[11,-23],[20,-2],[21,-29],[54,13],[-3,-89],[25,-75],[2,-52],[21,-52],[14,-87],[17,-55],[2,-142],[21,-60],[4,-65],[-9,-2],[-5,47],[-38,120],[-10,115],[-19,37],[-9,53],[-21,0],[26,-101],[4,-34],[-13,-23],[35,-121],[23,-49],[-2,-62],[24,-113],[-19,6],[15,-102],[0,-27],[-25,-62],[-20,26],[-17,-1],[4,-34],[-21,-104],[-38,-83],[-24,-25],[-2,-33],[-31,-65],[-29,3],[-9,89],[-4,135],[21,80],[15,23],[-16,31],[-1,69],[14,6],[12,-39],[6,23],[-40,141],[-1,58],[-18,60],[-5,82],[-11,43],[8,125],[-12,81],[-3,95],[-11,91],[4,44],[-20,93],[-17,45],[-9,77],[-6,101],[3,42]],[[12292,85061],[35,-45],[27,-125],[-10,-5],[-22,115],[-23,19],[-7,41]],[[12202,85643],[15,-71],[0,-46],[-10,29],[-5,88]],[[12106,83714],[16,11],[1,26],[28,65],[-4,68],[36,64],[18,-12],[25,-85],[15,10],[18,-58],[23,-24],[38,4],[22,-14],[12,-79],[-2,-49],[-20,35],[-19,-2],[-1,-22],[21,-25],[11,-46],[29,-278],[-1,-71],[12,-56],[0,-58],[18,-142],[5,-107],[-5,-112],[-11,1],[8,-81],[3,-240],[-9,-111],[-11,6],[-28,70],[-10,86],[-21,59],[-40,212],[4,48],[22,23],[-18,30],[-26,-31],[-14,88],[-11,-15],[-17,42],[-12,55],[2,34],[-14,-22],[-10,24],[-30,2],[-19,96],[19,3],[10,-29],[10,13],[-3,105],[19,53],[6,38],[-39,86],[24,63],[-4,22],[14,35],[4,53],[-33,16],[-21,-28],[-14,79],[-26,72]],[[12097,84881],[16,18],[19,-7],[16,-52],[-29,-6],[-22,47]],[[12062,83572],[4,48],[-3,66],[25,9],[34,-62],[15,-74],[12,-19],[17,30],[23,-10],[-16,-82],[-24,-14],[-27,-161],[-12,6],[-40,-30],[-9,8],[3,102],[25,47],[1,50],[-22,4],[2,29],[-13,31],[5,22]],[[11978,85151],[9,14],[7,-59],[-16,45]],[[11978,84786],[30,41],[3,-53],[-16,-19],[-17,31]],[[11861,84371],[5,174],[16,33],[8,-9],[29,60],[3,51],[-12,92],[32,-2],[0,-54],[12,-60],[28,61],[29,-6],[17,-20],[17,49],[36,50],[14,-55],[41,-30],[25,-53],[-12,-78],[-31,-76],[4,-49],[12,-5],[8,60],[32,108],[15,12],[34,-55],[46,-10],[11,-32],[29,-16],[15,-79],[-4,-67],[-22,-44],[-37,49],[-10,-8],[12,-40],[18,-18],[33,-75],[-21,-29],[-25,-2],[4,-28],[21,-13],[23,24],[7,-95],[14,-69],[12,-143],[-14,-42],[-42,-11],[-17,12],[-44,95],[-65,99],[-27,50],[-22,-26],[-9,29],[-4,-32],[30,-55],[22,-8],[-21,-31],[6,-25],[0,-72],[-9,-50],[-31,-87],[-51,47],[-1,38],[-42,85],[-20,90],[-12,-38],[-19,43],[-10,79],[4,25],[-18,86],[2,24],[-16,57],[-26,30],[-7,49],[-25,36]],[[9331,87212],[28,-14],[12,-44],[-27,-9],[-13,67]],[[9232,87245],[16,14],[58,-26],[-3,-31],[-21,-10],[-50,53]],[[8867,87809],[26,35],[27,3],[15,-16],[-18,-53],[-50,31]],[[8817,87545],[4,86],[28,16],[21,-89],[-11,-44],[-37,-10],[-5,41]],[[8816,87079],[2,14],[43,47],[1,-36],[-40,-59],[-6,34]],[[8698,86532],[8,21],[3,71],[23,12],[-3,42],[21,54],[16,7],[-3,41],[30,34],[9,30],[43,75],[22,118],[27,44],[-3,40],[10,71],[27,34],[4,-43],[24,2],[-17,-51],[9,-17],[24,28],[8,-22],[-11,-37],[-62,-118],[-49,-129],[-8,-80],[-33,-60],[30,-57],[-19,-42],[-23,-8],[-22,15],[-17,-57],[-9,6],[-45,-47],[-14,23]],[[8692,87068],[44,270],[11,-41],[12,13],[-4,66],[44,84],[0,-54],[-12,-32],[-3,-82],[-20,-37],[20,-42],[-24,-97],[2,-46],[-17,-104],[-24,45],[-3,25],[-25,7],[-1,25]],[[8672,87628],[15,31],[17,-19],[17,-48],[-24,-45],[-25,81]],[[17950,55027],[5,31],[24,-13],[25,26],[-2,40],[18,63],[1,79],[-15,136],[-16,8],[-7,-13],[-13,25],[-3,-17],[-14,68],[7,67],[2,142],[-15,41],[9,65],[-8,51],[19,9],[28,138],[9,24],[-4,46],[4,110],[8,12],[-2,74],[-7,64],[1,51],[6,6],[-2,55],[-7,20],[28,116],[0,69],[8,28],[23,29],[10,40],[17,21],[1,19],[25,65],[-1,49],[-11,54],[-14,19],[-31,100],[-13,7],[2,58],[-26,239],[-23,63],[-7,69],[-16,57],[1,147]],[[17974,57684],[6,95],[-10,22],[21,43],[0,72],[-9,178],[-6,65],[-11,47],[-4,58],[6,36],[0,103],[-9,38],[3,39],[-7,31],[3,51],[-5,59],[4,56],[9,24],[-10,31],[-12,97],[4,43],[-7,80],[25,31],[9,29],[5,-14],[12,25],[17,-1],[2,-25],[24,19],[13,-3],[18,-71],[-2,-28],[21,-51],[24,11],[24,183],[5,15],[1,230],[-2,272],[0,437]],[[18136,60011],[200,0],[222,0],[313,1],[97,1],[160,2],[6,-7],[235,0],[162,1]],[[19531,60009],[0,-1691],[-1,-237],[1,-30],[0,-925],[-1,-608],[1,-145],[-1,-113],[0,-2847]],[[19530,53413],[-64,2],[-201,-1],[-128,-1],[-172,0],[-359,476],[-212,269],[-102,136],[-368,471],[5,66],[-5,17],[1,60],[8,16],[17,103]],[[19530,64667],[242,0],[154,2],[327,0],[66,-5],[137,-1],[242,1],[7,2],[217,2]],[[20922,64668],[282,1],[135,0],[140,0],[0,-1163]],[[21479,63506],[1,-381],[0,-434],[1,-193],[0,-1270],[1,-137],[0,-1089]],[[21482,60002],[-183,3],[-22,5],[-62,1]],[[21215,60011],[-204,-3],[-169,-5],[-184,0],[-34,2],[-301,-1],[-186,-2],[-2,9],[-152,-1],[-230,-1],[-222,0]],[[19531,60009],[0,583],[1,36],[0,738],[-5,129],[0,517],[2,216],[0,1857],[1,46],[0,536]],[[27414,45876],[14,60],[5,-33],[-14,-44],[-5,17]],[[27386,45813],[9,39],[11,4],[-5,-33],[-15,-10]],[[27310,45701],[52,90],[6,-30],[-45,-80],[-13,20]],[[27118,45540],[19,106],[20,46],[25,43],[3,23],[36,66],[38,-67],[4,-52],[14,-43],[-4,-11],[-40,-48],[-3,27],[-27,-5],[-3,-24],[-46,-73],[-36,-15],[0,27]],[[27062,45510],[39,24],[-10,-43],[-17,-14],[-13,8],[1,25]],[[27020,45533],[6,35],[12,-10],[-5,-41],[-13,16]],[[26992,48019],[5,-18],[19,-211],[8,-28],[17,-26],[7,17],[14,-21],[-14,-31],[-9,-1],[-21,50],[-7,28],[-13,115],[-6,76],[0,50]],[[26806,45614],[15,13],[4,-23],[-20,-10],[1,20]],[[26322,51623],[29,47],[0,-29],[-16,-37],[-11,-6],[-2,25]],[[26229,53027],[6,-79],[11,-52],[2,-83],[6,-75],[14,-48],[136,-25],[261,-56],[206,-51],[135,-34],[-5,-14],[2,-57],[7,-26],[-3,-71],[11,-76],[37,13],[0,75],[6,47],[3,119],[-12,91],[4,60],[-1,49],[8,16],[-4,24],[12,-8],[9,59],[15,-7],[7,-33],[17,-3],[18,-28],[7,-25],[33,-19],[17,-18],[14,15],[13,-19]],[[27221,52688],[4,-13],[-4,-113],[3,-92],[-4,-22],[10,-25],[4,-95],[1,-113],[23,-389],[13,-129],[0,-51],[28,-302],[32,-288],[29,-229],[65,-412],[38,-200],[4,-63],[10,-83],[-18,-57],[-4,-54],[-1,-87],[5,-130],[6,-96],[16,-145],[35,-269],[15,-166],[5,-84],[5,-29],[11,-140],[17,-152],[9,-66],[6,-94],[13,-109],[17,-258],[-1,-235],[-7,-175],[-5,-210],[-3,-37],[-8,-286],[0,-169],[-3,-80],[-7,-81],[0,-44],[-6,23],[3,51],[-5,20],[-16,-25],[-10,-102],[-6,-17],[-1,-64],[-8,-40],[-2,-78],[5,-33],[-2,-46],[6,-16],[-8,-53],[-8,-13],[-1,-49],[21,39],[25,194],[7,41],[0,-41],[-8,-83],[-34,-222],[-9,-82],[-25,-93],[-34,-139],[-24,-66],[-3,12],[34,122],[14,40],[7,53],[3,81],[5,32],[-6,23],[-9,-11],[-7,26],[-6,-18],[-34,-22],[-14,-41],[-9,-6],[-18,45],[-18,-13],[-7,-41],[-27,-18],[-23,-6],[-17,52],[-8,68],[2,79],[6,60],[6,-3],[-2,49],[-12,97],[-11,47],[2,34],[-8,62],[-11,32],[-5,85],[-6,18],[-11,-15],[-9,101],[-24,31],[-1,16],[-21,38],[-21,55],[-11,-13],[-8,-39],[-16,126],[-15,148],[-5,173],[-7,109],[-7,57],[-28,113],[-11,9],[-1,52],[-12,23],[0,-64],[-14,-11],[-1,66],[-8,113],[-12,51],[3,24],[13,-3],[9,-39],[11,159],[-2,86],[-8,14],[0,40],[8,10],[-4,31],[-12,-4],[-5,-33],[-11,-11],[8,-148],[-9,-20],[-20,-11],[-5,-50],[0,75],[-6,50],[-17,94],[-26,177],[-9,94],[-19,140],[-27,149],[-14,56],[-4,58],[-10,61],[10,-19],[1,-30],[15,30],[10,72],[12,28],[13,98],[13,34],[-2,23],[14,26],[11,84],[-5,75],[-22,21],[5,-113],[-22,30],[6,34],[-1,65],[-5,39],[-38,71],[1,-65],[-11,-28],[11,-37],[16,-6],[11,-110],[-10,-42],[0,-62],[-4,-27],[-21,-6],[-3,-32],[7,-38],[-9,-30],[-4,40],[2,83],[-14,85],[-9,26],[-8,58],[6,182],[-5,66],[-4,164],[9,1],[0,-93],[4,-89],[9,-7],[-4,153],[9,37],[1,41],[8,44],[0,38],[7,50],[0,39],[9,47],[1,91],[5,83],[-6,66],[2,56],[-13,29],[4,42],[-9,109],[12,64],[-21,110],[3,31],[-8,55],[-10,3],[5,33],[-1,49],[-7,13],[-47,23],[-9,-51],[-7,-4],[-9,100],[3,45],[-14,32],[-12,9],[-2,63],[-7,58],[-11,45],[-15,6],[-5,44],[-24,48],[0,111],[-4,67],[-12,7],[-10,38],[-13,17],[-13,61],[0,42],[-9,35],[-5,51],[-14,44],[-28,62],[-40,72],[-26,75],[-11,-2],[-26,-33],[-31,29],[-1,-35],[-26,-69],[9,-99],[-3,-28],[-10,-7],[-15,15],[-5,26],[-24,-22],[-31,-73],[-65,-132],[-6,2],[7,44],[-10,12],[-7,-39],[-15,-41],[-36,1],[13,-49],[2,-38],[16,-22],[30,53],[29,40],[27,84],[3,-13],[-24,-82],[-28,-43],[-35,-66],[-12,-14],[-10,33],[-16,22],[-23,51],[-19,7],[-17,-28],[-13,94],[-5,119],[8,42],[0,-105],[6,-91],[7,-22],[10,39],[1,97],[-17,105],[-18,60],[-17,13],[-15,40],[-16,71],[-27,47],[-22,69],[-41,95],[-47,76],[-58,70],[-31,20],[-62,18],[-33,-5],[-47,-25],[-65,-49],[-32,-15],[-7,10],[-63,-51]],[[26061,57664],[39,-2],[136,6],[183,1]],[[26419,57669],[196,-2],[-1,6],[143,10]],[[26757,57683],[-3,-72],[-31,-68],[-26,-105],[1,-36],[-8,-26],[3,-64],[30,-82],[17,-7],[23,-104],[23,-51],[28,16],[8,-12],[8,-64],[3,-64],[12,-30],[3,-50],[11,-52],[0,-51],[7,-68],[12,-24],[8,-67],[14,-48],[11,-101],[9,-1],[19,-72],[29,-52],[29,-98],[4,-61],[9,-41],[1,-40],[13,-38],[12,-2],[17,-37],[18,-93],[15,-26],[4,-24],[-7,-43],[4,-39],[-4,-32],[28,-82],[-4,-30],[13,-42],[11,5],[-2,-41],[8,-45],[27,-55],[9,1],[16,-58],[19,-43],[-5,-67],[12,-64],[2,-49],[9,-15],[0,-85],[4,-32],[-5,-45],[6,-8],[4,-48],[-5,-41],[12,-48],[25,-26],[0,-23],[23,-81],[-4,-34],[15,-105],[4,4],[6,-76],[-10,-44],[11,-67],[-4,-26],[5,-62],[21,-34],[11,17],[22,-71],[9,-4]],[[27376,54230],[12,-12],[-5,-64],[-14,-29],[-10,15],[-6,-48],[10,-8],[-16,-60],[-21,23],[-3,-56],[11,-11],[-9,-59],[-17,-54],[-17,13],[-3,-16],[12,-33],[8,5],[-1,-84],[-7,-62],[-28,-26],[0,-22],[17,10],[6,-24],[-23,-131],[-6,-91],[7,-13],[-5,-30],[-5,-97],[-13,-22],[-8,-59],[-9,-3],[0,-71],[-7,-69],[-7,2],[-12,-44],[13,-24],[11,24],[1,-81],[-16,-161],[5,-70]],[[25527,65491],[15,-41],[12,20],[7,-15],[-6,-40],[27,-23],[29,1],[28,25],[52,75],[31,59]],[[25722,65552],[90,-1],[198,-1],[187,1],[87,1],[0,-75]],[[26284,65477],[1,-242],[0,-1380],[-3,-437],[0,-441],[-2,-278],[0,-238]],[[26280,62461],[-19,-45],[-2,-20],[16,-71],[2,-31],[-11,-38],[3,-37],[17,-7],[4,-25],[-13,-46],[6,-44],[-22,3],[-16,-23],[-9,5],[-35,-63],[-14,-39],[-19,10],[-10,43],[-26,-7],[-16,7],[-12,-33],[4,-125],[6,-71],[-16,-40],[-7,-44],[-30,-34],[-19,-161],[-19,-39],[-14,24],[-10,-13],[-6,-63],[-16,-72],[1,-87],[-5,-70],[-8,-24],[-23,-18],[-4,-36],[-13,58],[-22,1],[-26,55],[-1,94],[-21,67],[-8,-2],[1,-34],[13,-12],[-1,-25],[-13,-2],[-8,-29],[-8,23],[-9,-29],[9,-17],[-6,-42],[-18,-9],[-2,-94],[5,-38],[-23,-9],[-2,-63],[-11,-29],[-7,24],[5,51],[-10,10],[-10,-25],[-10,22],[-12,89],[-17,-2],[-14,-52],[-29,-27],[-10,-30],[-5,-97],[-7,-27],[-11,-3],[-8,62],[-18,13],[-22,57],[-22,44],[-20,6],[-14,-37],[-14,19],[-6,49],[-8,6],[-7,-66],[11,-64],[-13,-40],[-11,3],[3,56],[-5,30],[-42,-31],[-11,52],[-9,4],[-10,-40],[10,-91],[-12,-47],[-23,32]],[[25386,60941],[-11,2],[-4,34],[12,-9],[-16,92],[24,-8],[-15,29],[15,67],[1,60],[-8,26],[19,19],[2,38],[-12,-19],[22,73],[-14,60],[-4,59],[9,-10],[9,68],[5,-35],[7,41],[8,-33],[13,102],[8,9],[13,84],[-2,38],[24,42],[0,66],[9,83],[7,32],[14,12],[14,76],[-1,42],[-15,94],[11,111],[-18,40],[1,79],[-16,55],[-3,73],[19,60],[-9,50],[2,60],[6,32],[13,9],[0,347],[-1,0],[0,397],[1,12],[0,294],[1,247],[0,1196],[1,254]],[[21479,63506],[257,-1],[104,0],[263,-1],[273,1],[163,0],[279,-1],[263,-1],[144,0],[133,0]],[[23358,63503],[16,-60],[13,-11],[1,-43],[13,6],[5,-36],[26,-14],[8,41],[24,-13],[-4,-28],[7,-33],[11,-11],[-4,-42],[-9,-1],[3,-36],[12,16],[-1,-49],[-10,-6],[-13,24],[-5,-75],[-15,-19],[-7,-41],[2,-41],[-17,-24],[1,-48],[15,-41],[1,-29],[16,-31],[12,-61],[14,0],[5,-21],[-9,-25],[6,-79],[18,-52],[-3,-28],[15,-13],[5,-31],[14,-11],[9,16],[5,-31],[20,-3],[-5,-41],[0,-444],[-1,-120],[0,-696],[-1,-52],[0,-779],[-1,-97],[0,-281]],[[23550,60009],[-249,1],[-196,-1],[-169,0],[-218,0],[-208,-1],[-258,2],[-103,0],[-154,3],[-149,-4],[-209,-4],[-155,-3]],[[30863,68384],[14,7],[-7,-35],[-7,28]],[[30827,68345],[7,83],[6,-34],[19,-55],[-15,-45],[-5,34],[-12,17]],[[30819,68560],[3,42],[11,-71],[-14,29]],[[30732,68434],[14,2],[3,-41],[-17,39]],[[30712,67988],[8,37],[1,-75],[-9,38]],[[30703,68290],[8,41],[25,45],[11,-50],[-9,-8],[14,-78],[-11,-39],[-18,-13],[-12,24],[5,25],[-3,50],[-10,3]],[[30697,68452],[13,68],[2,64],[9,25],[6,-26],[-9,-35],[1,-36],[-8,-70],[-10,-29],[-4,39]],[[30213,67064],[-35,81],[0,69],[6,42],[-41,128],[-9,53],[8,101],[-4,10],[6,88],[-6,23],[-5,313],[0,89],[-11,861],[-15,757]],[[30107,69679],[21,15],[0,33],[25,-41],[-1,-38],[7,-43],[11,-15],[13,85],[2,86],[-6,28],[12,36],[8,-3],[12,-44],[21,-9],[1,39],[-24,83],[-1,32],[22,107],[14,27],[11,43],[8,-1],[15,41],[24,38],[-9,71],[21,66],[23,45],[5,56],[-7,28],[-14,0],[0,66],[10,38],[-8,14],[15,51],[5,46],[-15,44],[16,115],[8,18],[-1,37],[17,32],[14,59],[11,8],[17,324],[215,890],[13,-3],[27,-38],[11,4],[-3,-58],[1,-141],[4,-18],[37,-73],[25,43],[26,30],[28,2],[11,52],[30,11],[25,-12],[0,62],[16,23],[25,-6],[23,-36],[4,-32],[33,-68],[36,-132],[0,-15],[28,-51],[0,-545],[3,-693],[-1,-71],[9,-30],[-15,-39],[14,-70],[-15,-34],[1,-136],[23,-18],[3,20],[10,-57],[19,-28],[30,-23],[14,19],[8,-62],[1,-56],[-13,8],[-11,-22],[7,-68],[16,-63],[-9,-73],[-10,-41],[23,-116],[0,-23],[18,-40],[13,28],[1,46],[18,-30],[19,-3],[13,-56],[6,-51],[-8,-14],[10,-32],[12,-98],[15,-38],[1,-118],[-12,-50],[-10,2],[-4,-32],[-32,-113],[-24,-25],[4,-22],[-15,-8],[6,42],[-4,85],[-27,-30],[12,-58],[-12,-43],[-11,13],[-13,-58],[-13,18],[-10,-12],[2,-35],[16,-40],[-22,-57],[-13,46],[-6,57],[-13,-10],[-3,-38],[-8,3],[-7,59],[-7,-62],[-9,-14],[-8,-74],[-7,19],[-6,-48],[-4,42],[-20,-51],[-5,27],[-12,-92],[-16,39],[0,36],[-10,-21],[-11,9],[2,-66],[-16,-71],[11,-33],[-35,-16],[-23,32],[-16,107],[6,29],[22,27],[-9,45],[-13,-35],[2,44],[-10,-3],[1,-68],[-5,0],[0,64],[-24,-56],[5,-35],[-6,-43],[14,-67],[-3,-45],[-23,-77],[9,-11],[-12,-31],[11,-56],[-5,-69],[-16,-10],[-3,85],[6,4],[-3,55],[-17,45],[-4,64],[15,51],[-19,40],[6,26],[-10,10],[-18,-21],[1,113],[11,44],[1,50],[-7,14],[-7,-46],[-14,-40],[-11,33],[-7,-32],[-15,-4],[14,-81],[-3,-48],[-12,-23],[-10,-71],[-4,-72],[-13,-78],[19,-30],[-13,-28],[10,-57],[-10,-38],[-27,4],[-13,-72],[-15,-1],[-2,-58],[-11,-9],[0,52],[7,37],[-9,15],[-3,-30],[-12,-13],[5,65],[-18,-9],[1,-52],[-16,-37],[-5,-50],[-12,51],[-2,-47],[-15,-32],[-12,26],[-3,-66],[-13,51],[-13,-92],[-23,-27],[-5,-19],[-5,83],[-16,5],[-15,-42],[-5,-39],[-20,4],[-7,-49],[-20,4],[-10,-49],[-3,-50],[5,-29],[-8,-32],[-13,29],[-22,-31],[-9,-46],[6,-67],[-8,-43],[-10,-15],[3,-33],[-14,-24],[-14,4],[-10,-25],[-11,-98],[5,-19],[-14,-80],[1,-22],[-14,-74],[-9,-13]],[[30332,65028],[13,-24],[29,5],[18,17],[12,70],[16,-105],[-1,-30],[-10,-16],[-33,4],[-41,60],[-3,19]],[[30177,65078],[18,0],[19,90],[27,60],[11,-15],[7,-70],[15,-27],[10,40],[-1,-84],[-41,1],[-31,-9],[-18,-47],[-16,61]],[[29500,66699],[224,-22]],[[29724,66677],[199,-23],[126,-12],[10,46],[21,1],[-1,62],[15,36],[19,-18],[9,62],[36,32],[15,-30],[8,13]],[[30181,66846],[2,-72],[9,-136],[25,-47],[12,42],[14,-34],[-16,-90],[-23,-7],[-38,-35],[12,-50],[-18,-50],[-7,9],[-5,-59],[-4,41],[-11,-53],[11,-74],[-13,10],[-5,-28],[8,-26],[-5,-27],[14,-14],[6,36],[14,8],[9,-47],[24,-28],[12,-42],[2,-46],[21,-93],[-1,-50],[-7,-39],[-12,-5],[3,-24],[21,-51],[12,8],[8,-24],[8,-83],[-5,-50],[13,-48],[23,-35],[34,-12],[9,-23],[19,44],[19,8],[27,33],[6,25],[-1,79],[-6,61],[-13,-31],[0,97],[-5,55],[-15,34],[-9,-7],[-5,-39],[-11,59],[13,11],[21,-18],[23,-58],[18,-123],[9,-119],[2,-137],[-15,-129],[-2,-44],[-7,9],[12,112],[-7,23],[-26,-5],[-43,-40],[-30,8],[-7,-28],[-17,-7],[-15,-62],[-33,-10],[-34,-66],[-16,-47],[-21,-28],[-23,-15],[6,26],[35,34],[16,47],[24,49],[5,40],[-2,117],[6,41],[-26,26],[0,-59],[-7,14],[-4,-50],[-14,3],[2,-32],[-31,-11],[-7,-49],[2,-44],[-6,-29],[-25,-23],[-12,17],[-10,-14]],[[30097,65246],[-3,189],[-18,18]],[[30076,65453],[-8,41]],[[30068,65494],[-10,48],[-19,33],[-5,56],[2,81],[-12,-6],[0,147],[-116,-13]],[[29908,65840],[-1,18],[-202,13],[-22,-4],[-42,6],[-3,-39],[-14,-6],[1,45],[-54,3],[-118,14],[-15,-1]],[[29438,65889],[-6,42],[34,395],[34,373]],[[22823,73980],[83,-1],[266,0],[229,-1],[0,449],[27,-37],[28,20],[29,-53],[8,-35],[14,-202],[7,-25],[18,-251],[-6,-69],[4,-54],[14,-43],[29,-45],[24,-12],[8,19],[44,-11],[11,-58],[61,-7],[48,-21],[8,-66],[-3,-49],[6,-12],[42,2],[5,15],[22,-2],[23,20],[-1,48],[33,46],[39,18],[9,-22],[53,0],[72,-98],[26,4],[1,-49],[-19,-7],[-4,-37],[16,-31],[41,13],[15,-54],[-6,-34],[6,-49],[24,-127],[25,27],[-8,84],[13,45],[15,-11],[42,16],[16,-44],[-2,-65],[17,-41],[14,9],[9,-36],[41,-9],[5,-67],[-4,-31],[20,-21],[23,13],[-3,-75],[22,28],[14,-22],[19,24],[34,17],[46,113],[17,13],[13,32],[25,30],[14,-13],[0,-67],[17,-17],[-6,-26],[10,-48],[16,-3],[35,29],[6,-29],[25,15],[26,-18],[19,13],[48,8],[29,-28],[9,-66],[34,-53],[15,35],[20,9],[13,-20],[23,6],[11,-18],[25,22],[-27,-56],[-10,20],[-4,-34],[-17,-15],[-26,-58],[-37,-34],[-14,-37],[-52,-44],[-48,-54],[-15,-6],[-42,-45],[-4,-14],[-51,-77],[-37,-79],[-72,-183],[-17,-69],[-55,-178],[-26,-72],[-26,-41],[-26,-88],[-11,-11],[-28,-83],[-10,-10],[-61,-134],[-9,-25],[8,-50],[14,-46]],[[24276,71309],[-21,50],[-14,-11],[-3,-29],[-16,-14],[9,-19],[-11,-43],[-22,16],[0,-685],[-10,-10],[-6,-59],[-24,7],[-10,-56],[-14,13],[-8,-38],[-25,-23],[-20,-47],[-20,-148],[-22,-49],[-7,-114],[1,-53],[21,-21],[10,9],[14,-32],[-1,-31],[23,-85],[-1,-50],[-15,-47],[1,-29],[-17,-49],[2,-91],[-4,-32],[6,-91],[-16,-58],[11,-34],[-2,-65],[6,-41],[-7,-42],[3,-75],[-12,-80],[5,-36],[16,-27],[31,-87],[-1,-24],[14,-16],[9,-44],[50,-9],[12,-17],[10,-78],[14,-38],[50,-51],[22,-39],[14,-40],[0,-53],[8,-15],[5,-84],[17,-45],[27,-41],[3,-29],[36,-90],[39,-29],[15,-55],[30,-136],[9,-75],[-8,-113],[2,-71],[10,-37],[-4,-44],[8,-53]],[[24498,67577],[-204,0],[-224,0],[-116,-1],[-223,0],[-180,1],[-313,0],[-199,0]],[[23039,67577],[0,1215],[1,101],[-1,302],[0,479],[-10,65],[-36,59],[-18,4],[-14,55],[-9,73],[-26,98],[5,46],[25,62],[22,39],[12,63],[14,46],[4,128]],[[23008,70412],[-4,106],[6,37],[-11,188],[-1,129],[-13,27],[-20,98],[-5,49],[-4,119],[-11,57],[-2,39],[5,68],[-6,112],[5,17],[6,117],[-6,-11],[-11,51],[1,171],[-5,92],[-2,114],[3,50],[-7,103],[1,217],[-5,3],[-7,89],[-11,92],[-8,17],[-11,101],[-3,58],[-11,34],[-5,121],[-16,101],[-3,110],[7,53],[-8,93],[3,52],[-1,107],[-7,59],[7,76],[9,24],[3,62],[-15,80],[-8,124],[-6,24],[-11,98],[3,40]],[[28860,63072],[14,65]],[[28874,63137],[9,32],[5,61],[12,42]],[[28900,63272],[17,44],[38,25],[25,45],[0,69],[16,25],[7,33],[34,72],[18,15],[12,51],[10,-8],[17,39],[-14,71],[-20,41],[-7,52],[-21,54],[-7,68],[-25,19],[-4,45],[2,95],[-10,37],[-17,-5],[-9,14],[-2,83],[7,30],[-8,22],[9,100],[11,-5],[23,113],[-24,120],[13,48],[18,29],[16,56],[-4,24],[17,35],[11,49],[14,124],[22,69],[16,13]],[[29101,65083],[88,-173],[132,-246],[3,-19],[-20,-187],[-12,-65],[-4,-65],[-6,-22]],[[29282,64306],[-7,-34]],[[29275,64272],[-37,-35],[-4,-84],[-9,-16],[-3,-50]],[[29222,64087],[0,-43],[19,-28],[16,18],[24,-44],[14,-9],[4,44],[4,-90],[-3,-107],[-14,-182],[-13,-247],[-5,-173],[-40,-241],[-11,-48],[-9,-9],[3,-32],[-10,-55],[-20,-63],[-1,-19],[-31,-55],[-32,-108],[-21,-118],[-22,-149],[-20,-60],[-19,-14],[-11,14],[6,88],[15,97],[3,69],[-21,37],[-18,4],[-6,25],[-18,-3],[-7,-36],[-9,24],[-2,47],[-18,37],[-3,30],[-10,-12],[-15,68],[-7,-8],[-18,58],[-10,56],[-19,25],[6,140],[-12,29]],[[28861,63044],[-1,28]],[[28814,58772],[18,-19],[12,-74],[1,-47],[-15,9],[2,45],[-18,86]],[[28734,57762],[8,60],[8,0],[47,86],[15,12],[14,33],[12,2],[16,35],[13,10],[5,74],[11,252],[0,54],[-8,95],[-6,105],[3,-2],[11,-106],[5,-95],[-3,-136],[-15,-286],[-24,-8],[-50,-64],[-43,-78],[-19,-43]],[[27156,59531],[84,-16],[55,-3],[95,-15],[37,4],[114,-21],[48,-2],[170,-2],[279,0],[74,4],[264,0],[106,-1],[0,10],[31,-2],[120,0],[142,0]],[[28775,59487],[2,-58],[17,-245],[16,-158],[23,-156],[35,-271],[-9,14],[-18,146],[-14,80],[-13,11],[-9,174],[-16,155],[-8,23],[3,39],[-5,89],[-10,30],[-4,48],[-25,13],[-1,40],[-13,-20],[6,-61],[16,-48],[11,10],[0,-67],[15,-135],[9,-61],[-1,-26],[11,-75],[0,-47],[-19,64],[1,37],[-13,61],[-3,38],[-12,12],[6,-38],[-3,-28],[14,-39],[-31,25],[-32,118],[-15,12],[19,-97],[10,-17],[6,-52],[-9,-23],[-24,-14],[-21,71],[7,-63],[10,-27],[-7,-14],[-31,45],[-13,5],[-5,29],[-18,24],[23,-73],[21,-23],[-7,-19],[-24,-8],[-13,-62],[-16,-22],[-17,1],[-8,31],[-20,12],[-12,121],[0,61],[12,78],[-5,13],[-14,-76],[-2,-76],[8,-94],[11,-77],[-5,-42],[8,-34],[40,10],[37,47],[9,-49],[13,6],[13,30],[26,24],[32,-1],[14,-41],[0,-43],[-14,-78],[3,-55],[2,-164],[9,5],[7,115],[3,150],[14,40],[-6,33],[14,20],[25,-21],[16,-94],[7,-65],[-4,-52],[7,-98],[-8,-25],[4,-54],[-13,-54],[-17,-10],[-6,18],[-10,-16],[-6,-40],[-10,-9],[-3,-43],[-7,-11],[-7,-71],[-13,-15],[-3,-46],[-17,-25],[-3,-24],[-26,25],[-29,-4],[-26,18],[-5,25],[-10,-14],[-15,45],[-13,115],[31,3],[5,45],[-28,-25],[-12,11],[-9,-33],[9,-57],[6,-86],[-7,0],[-29,47],[-14,-10],[-20,34],[-31,30],[-23,48],[-1,-29],[17,-61],[21,-5],[63,-102],[46,-28],[8,-31],[1,-40],[-7,-56],[-13,-54],[1,-28],[-9,-53],[-15,-42],[-50,-112],[-50,112],[1,-65],[24,-55],[36,-43],[36,80],[13,2],[27,30],[4,62],[11,-14],[3,-66],[8,-31],[18,-5],[-9,75],[20,-29],[2,-85],[-17,-75],[-18,-13],[0,-34],[-11,-20],[-14,-84],[-7,-71],[-17,20],[1,80],[-10,19],[1,-82],[-16,-7],[42,-64],[23,123],[33,120],[24,75],[47,176],[8,-21],[-28,-83],[-26,-96],[-22,-62],[-21,-78],[-18,-82],[-21,-115],[-3,-32],[-4,67],[-35,55],[-39,1],[-60,-38],[-29,-33],[-20,-32],[-32,-81],[-39,-75],[-26,-63],[-37,-113],[-14,-55],[-25,-128],[-14,-111],[-10,-112],[-9,-69],[-4,-69],[-13,7],[-3,34],[-21,21],[-23,9],[-28,-2],[-30,-12],[-35,-42],[-8,-17]],[[28030,56345],[-93,330],[-104,362],[-31,116],[-88,302],[-61,1],[-74,7],[-178,10],[4,135],[-42,199],[-30,-73],[-5,21],[7,48],[-2,53],[-55,13],[-105,16],[-188,29],[-23,-20],[-5,39],[-12,-52],[-7,9],[-20,-27],[-6,5],[-29,-47],[-28,-60],[-7,21],[-91,-99]],[[26419,57669],[9,275],[22,48],[3,-26],[28,4],[22,63],[-5,57],[9,25],[-4,44],[17,62],[13,15],[8,48],[16,8],[15,45],[80,7],[11,50],[22,32],[5,26],[10,-7],[16,48],[4,35],[16,4],[8,40],[21,29],[24,-18],[26,115],[-3,63],[10,30],[15,-36],[20,98],[33,70],[10,-40],[-5,-70],[15,-20],[28,62],[15,93],[15,35],[17,21],[12,-5],[9,33],[19,-12],[4,-50],[15,0],[14,28],[33,200],[21,53],[11,12],[8,-23],[17,0],[-10,74],[7,65],[6,12],[-4,80],[9,60]],[[20923,73979],[188,-1],[322,0],[212,0],[92,0],[193,1],[160,-1],[135,0],[141,1],[256,1],[201,0]],[[23008,70412],[-210,-1],[-186,1],[-119,1],[-252,4],[-192,2],[-179,2],[-253,1],[-123,0],[-292,1],[-173,0],[-105,0]],[[20924,70423],[0,2828],[-1,17],[0,711]],[[23550,60009],[0,-581]],[[23550,59428],[6,-130],[7,-206],[6,-127],[14,-355],[4,-82],[15,-387],[-2,-319],[-3,-261],[-1,-235],[-2,-170],[-2,-417],[-5,-642]],[[23587,56097],[-9,-25],[-19,73],[-16,-13],[-1,23],[-17,-1],[-18,79],[-15,-16],[-12,5],[-21,78],[-7,58],[-22,2],[-23,85],[-27,28],[-7,-68],[-11,-32],[-13,-7],[-34,4],[0,15],[-21,-7],[-7,61],[-10,3],[-24,-52],[-20,3],[1,-45],[-13,9],[-9,-31],[-29,61],[-1,-30],[-30,-29],[-15,13],[1,-20],[-14,8],[-8,-90],[-14,-14],[-19,19],[-7,-81],[-12,-3],[-1,22],[-17,79],[-21,-6],[-8,57],[-11,-4],[-16,30],[12,58],[-25,16],[-8,-86],[-18,-9],[-4,42],[-13,14],[-6,-33],[-9,25],[-6,95],[-5,11],[-14,-27],[-6,15],[3,-73],[-16,-57],[-13,19],[11,-42],[-13,-22],[3,-64],[-11,-31],[-11,14],[-12,94],[10,30],[-2,66],[-9,28],[-10,-19],[-2,-42],[-13,19],[-9,-7],[-11,-64],[-20,5],[-5,30],[1,63],[-12,19],[-16,-27],[-11,25],[3,41],[-19,42],[-9,-3],[-12,-58],[-29,-92],[-12,-9],[-16,34],[-9,3],[4,65],[-5,-1],[7,60],[-7,20],[-13,-14],[-19,11],[-10,91],[8,35],[-4,50],[-17,-47],[-20,22],[-15,0],[-19,28],[-11,-40],[-3,-44],[-20,-26],[-24,96],[-21,23],[-12,-37],[-21,4],[-13,26],[-13,3],[-17,24],[-19,46],[-16,-27],[-9,15],[-12,-11],[-2,20],[-18,-3],[-5,140],[-18,56],[4,22],[-16,5],[-18,57],[-4,-92],[-12,-4],[-22,47],[-17,2],[-6,-49],[-30,15],[-24,78],[-37,143],[-20,-19],[0,2257],[-123,0],[-179,0],[-150,0],[-175,1],[-210,0]],[[21214,59429],[1,119],[0,463]],[[27478,65805],[48,61],[45,74],[9,24],[10,60],[13,3],[3,-28],[36,72],[47,74]],[[27689,66145],[0,-314],[1,-2],[247,-1],[77,3],[167,-2],[243,1],[105,3],[111,-4],[169,-1],[107,2],[14,-59],[5,4],[8,-100],[15,4],[27,-34],[10,-49],[-8,-32],[14,-21],[2,-159],[-8,-12],[25,-113],[1,-34],[11,5],[15,-33],[-2,-18],[25,3],[3,-22],[16,8],[-1,-30],[13,-55]],[[28900,63272],[-23,37],[-22,6],[-24,-20],[-15,-34],[-20,-82]],[[28796,63179],[-217,-1],[-118,-1],[-151,0],[-236,3],[-305,-2]],[[27769,63178],[-167,0],[-124,0],[0,1068]],[[27478,64246],[0,1559]],[[20920,69320],[5,4],[0,872],[-1,227]],[[23039,67577],[-40,0],[5,-22],[-7,-37],[22,-64],[-1,-110],[-14,-5],[8,-52],[-3,-31],[24,-3],[2,-83],[9,-35],[-7,-66],[-14,-16],[5,-56],[-8,-28],[6,-21],[-12,-46],[0,-80],[-11,-16],[-3,-52],[-11,-26],[1,-76],[15,-27],[17,-60],[10,-87],[-4,-45],[13,-31]],[[23041,66402],[-17,-7],[-5,30],[-24,-5],[-7,53],[-21,66],[7,52],[-11,16],[-21,3],[-1,40],[-28,35],[-12,-17],[-8,48],[-43,13],[-5,28],[-18,20],[-1,38],[-25,25],[-15,-14],[-15,13],[-7,-23],[-18,14],[-16,-13],[-16,11],[-18,-17],[-25,9],[-20,21],[-8,-11],[-9,-74],[-12,-29],[-19,-9],[-31,69],[-36,62],[-58,85],[-9,59],[-112,0],[-186,-1],[-153,1],[-214,-1],[-206,-2],[-62,4],[-178,0],[-143,1],[-293,1]],[[20922,66996],[0,345],[-1,8],[0,1828],[-1,143]],[[23587,56097],[8,8],[0,-54],[11,-25],[9,6],[-2,-36],[10,-9],[5,27],[8,-18],[3,29],[21,-27],[11,46],[12,-17],[5,-30],[6,21],[16,-22]],[[23710,55996],[0,0]],[[23710,55996],[1,-11],[0,-608]],[[23711,55377],[0,-1196],[8,-12],[11,-72],[18,-31],[9,-83],[15,-55],[-2,-34],[8,-56],[-7,-42],[3,-45],[-7,-28],[6,-51],[9,-32],[13,-6],[3,-35],[-6,-27],[14,-36],[-1,-32],[8,-15],[3,-49],[-6,-53],[12,-47],[6,2],[6,-113],[19,12],[-6,-102],[8,-31],[2,-54],[-13,-21],[-1,-33],[12,-55],[-9,-22],[-3,-38],[4,-63],[-9,-33],[-9,-63],[-3,-73],[-12,-25],[-2,-68],[-14,-30],[-3,-40],[7,-24],[5,-91],[-13,-51],[-6,-74],[16,-52],[1,-53],[-5,-39],[9,-79],[-12,-70],[9,-19],[-11,-51],[-14,-39],[-7,-78],[-13,-74],[-17,-45],[-2,-25],[9,-30],[17,-94]],[[23768,51502],[0,-14],[-46,3],[-37,-40],[-128,-208],[-28,-61],[-10,-54],[-15,7],[22,71],[9,47],[13,-1],[9,19],[8,46],[9,-16],[11,8],[-15,55],[-54,-54],[-8,26],[17,90],[4,80],[0,74],[-12,5],[-5,23],[-17,-29],[-10,-41],[-4,-50],[-15,-24],[-6,46],[-18,-45],[-2,-35],[9,-32],[-10,-50],[10,-55],[20,-17],[-6,-54],[11,-20],[2,-78],[-2,-67],[-8,-31],[-9,10],[-19,-71],[-22,-65],[-3,26],[-13,-8],[-2,-88],[6,-26],[13,44],[26,65],[3,19],[32,99],[15,23],[0,45],[26,-15],[-20,-61],[-62,-153],[-24,-69],[-4,-25],[-32,-91],[-40,-143],[-15,-8],[-69,-146],[-35,-80],[-53,-89],[-61,-112],[-34,-87],[-13,-42],[-15,-74],[-53,-111],[-24,-68],[-47,-155],[-32,-143],[-11,-83],[-14,-59],[-33,-221],[-24,-197],[-11,-127],[-10,-192],[-2,-108],[1,-103],[8,-205],[14,-207],[12,-134],[16,-229],[11,-260],[-7,47],[-5,147],[-12,189],[-11,152],[-24,16],[18,27],[-9,83],[-6,87],[-9,88],[-3,106],[1,138],[-1,122],[11,276],[16,180],[19,148],[14,70],[10,87],[8,35],[-2,47],[13,86],[18,38],[9,45],[18,127],[28,58],[8,53],[16,2],[35,105],[23,49],[24,23],[-4,43],[9,29],[-9,16],[-16,-41],[-20,-35],[-11,-40],[-17,-5],[-6,40],[0,60],[-18,12],[-6,-31],[0,-84],[-5,-25],[6,-41],[-4,-36],[-20,-56],[-17,-61],[-8,-1],[-18,30],[-3,43],[-32,-61],[-17,-67],[21,-22],[24,57],[8,-74],[-7,-23],[-38,-223],[-12,-2],[-6,55],[-21,-10],[-4,18],[-32,-11],[-11,12],[-6,-38],[12,-32],[15,-1],[11,17],[-4,-64],[7,-48],[15,-34],[17,-18],[-19,-146],[-13,-185],[-12,-106],[-20,-27],[-7,-27],[-11,18],[14,21],[3,59],[-8,3],[-6,-31],[-29,-75],[4,-32],[24,-16],[25,38],[8,2],[-5,-116],[3,-4],[-4,-202],[-6,-207],[-4,-3],[10,-230],[8,-65],[1,-84],[9,-1],[23,-215],[5,-29],[-9,-47],[4,-34],[-1,-62],[8,-72],[20,-11],[1,-35],[12,18],[2,-127],[-23,7],[-13,-8],[0,-19],[-21,-12],[-6,-99],[-20,11],[-7,40],[-15,3],[-6,55],[-11,4],[-18,98],[-31,12],[-11,33],[-17,-9],[-7,16],[-23,-17],[-4,18],[-13,-1],[-3,-29],[-10,31],[-20,-14],[-8,22],[-6,-22],[-14,20],[-8,30],[3,25],[-16,1],[-3,44],[-15,-1],[-21,75],[-9,-11],[-25,48],[-19,-22],[-13,35],[-15,69],[-10,8],[-2,33],[-8,12],[-18,-15],[-21,47],[-12,-3],[-8,20],[-12,-19],[-9,44],[6,50],[-10,56],[-11,13],[-3,98],[-6,42],[-3,79],[-8,25],[-1,49],[-7,64],[-17,43],[2,31],[-13,26],[-7,37],[5,20],[-11,46],[-9,7],[-1,52],[6,31],[-3,66],[4,29],[-4,86],[-16,25],[1,37],[-12,11],[9,30],[5,86],[-3,31],[4,60],[-13,10],[5,76],[-12,58],[-7,-14],[-7,46],[-9,-18],[-9,39],[-10,-6],[-18,90],[-9,11],[-3,38],[-8,-9],[-10,38],[0,50],[-7,26],[3,41],[-13,48],[2,47],[-17,16],[-7,81],[-10,23],[-8,70],[-35,53],[-4,53],[-7,-2],[-13,59],[2,38],[-17,100],[3,47],[-9,39],[9,29],[-12,11],[-9,47],[4,39],[-14,28],[1,33],[-15,28],[-4,51],[2,41],[-8,26],[-4,73],[-6,1],[-9,88],[-8,1],[-6,47],[1,76],[-7,106],[-18,46],[-10,40],[3,14],[-9,71],[-23,41],[-2,30],[-17,46],[-18,25],[-13,84],[0,21],[-26,21],[-6,44],[-23,7],[3,57],[-2,65],[-5,5],[-6,-67],[-6,27],[2,53],[-17,27],[-13,108],[-8,-4],[-9,32],[-13,-25],[-7,44],[-8,-27],[-37,-13],[-19,31],[-6,-8],[-15,22],[-22,-14],[-12,24],[-17,-7],[-4,-22],[-26,21],[-11,50],[-13,-3],[-20,40],[-14,-18],[-10,-111],[-34,19],[-9,-37],[-7,11],[-22,-32],[-7,10],[-8,-54],[2,-23],[-13,-40],[0,-50],[-7,0],[-2,-59],[-11,-30],[1,-33],[-7,-58],[2,-52],[-5,-48],[-10,-5],[-3,-72],[-5,-37],[10,-22],[-5,-38],[-18,-38],[-10,8],[-7,-67],[-17,-43],[-7,-36],[-4,-84],[-14,-8],[-17,15],[-15,-11],[-14,46],[-27,24],[-27,111],[-24,33],[-10,-8],[-22,38],[-18,77],[-13,24],[-39,21],[-17,28],[-19,61],[-11,12],[-19,81],[0,24],[-14,47],[-21,7],[-12,27],[-5,34],[-30,78],[-9,43],[-7,110],[-12,56],[-7,60],[-13,63],[0,59],[-7,57],[6,72],[-3,54],[2,55],[-7,68],[-11,30],[-3,44],[-13,39],[-1,30],[-13,34],[2,33],[-13,177],[-7,40],[-12,4],[-11,91],[-15,0],[-14,66],[-12,10],[-3,24],[-15,34],[-12,-4],[-7,28],[-31,39],[0,39],[-44,118],[-13,107],[-12,37],[-18,26],[-9,33],[-9,2],[-2,36],[-24,106],[-20,35],[-4,54],[-14,32],[-21,7],[-35,78],[-11,88],[-10,24],[-6,68],[-13,89],[-9,41],[-19,38],[-11,-19],[-11,41]],[[20232,53938],[-5,28],[-16,20],[1,23],[-10,25],[-3,38],[7,18],[1,101],[331,0],[250,-1],[226,0],[183,1],[0,1212],[2,254],[0,149],[2,417],[2,232],[0,1518],[1,434],[0,809],[-1,213],[11,0]],[[20922,66996],[0,-2328]],[[19530,64667],[-136,-2],[-143,-1],[-52,-3],[-133,1],[-93,2],[0,442],[1,219],[-1,508]],[[18973,65833],[0,676],[1,163],[0,1090],[-1,26],[0,516],[-1,267],[1,140]],[[18973,68711],[-2,175],[-1,282],[1,156],[75,2],[22,-12],[85,2],[11,8],[45,-5],[25,8],[87,-2],[194,5],[11,-7],[221,0],[316,0],[14,-4],[144,-2],[178,-1],[23,7],[132,0],[251,-2],[115,-1]],[[29908,65840],[0,-107],[3,-222],[0,-150],[-3,-209],[-12,-8],[3,-76],[-8,-29]],[[29891,65039],[-7,19],[-17,2],[-21,-24],[-18,3],[-13,-24],[-16,28],[-6,-37],[-49,-35],[-3,20],[-15,0],[-27,-33],[-6,21],[-26,1],[-7,-26],[-18,23],[-40,-27],[-3,60],[-9,-17],[-19,-82],[-12,0],[-22,-73],[-13,23],[-24,-58],[-7,13],[-23,-28],[5,-22],[-10,-32],[-29,-11],[-22,-54],[-9,15],[-15,-35]],[[29390,64649],[1,33],[-20,102],[68,130],[-19,97],[4,161],[5,295],[9,422]],[[23231,64184],[167,-9],[159,-8],[156,3],[130,8],[62,0],[197,12],[152,13],[101,14],[12,-38],[1,-33],[18,-14],[-1,-36],[16,-57],[10,-2],[1,-56],[11,-31],[19,-7]],[[24442,63943],[-8,-18],[-17,-144],[-2,-71],[6,-165],[14,-99],[7,-28],[-8,-66],[5,-38],[15,-34],[4,-28],[-3,-61],[26,-77],[15,-57],[11,-14],[10,-69],[13,-8],[11,-76],[16,-54],[59,-137],[20,-90],[3,-90],[8,-78],[-9,-36],[11,-85],[3,-65],[22,-69],[11,7],[11,32],[9,66],[19,4],[27,-45],[16,-5],[38,-82],[-2,-60],[-12,-29],[-13,-59],[10,-92],[-2,-37],[-22,-96],[-6,-99],[-17,-68],[-7,-52],[-1,-78],[5,-70],[18,-50],[20,-89],[25,-37],[11,-54],[8,0],[17,-60],[16,7],[3,-27],[-12,-24],[6,-50],[20,-5],[10,31],[13,-28],[1,-29],[15,-12],[23,-70],[-2,-40],[14,-3],[9,-42],[19,-24],[0,-57],[11,-68],[-13,-8],[2,-50],[26,-161],[-4,-62],[-15,-12],[-8,-56],[17,-53],[-1,-47],[13,-87],[11,-46],[-1,-53],[24,-56],[10,27],[-15,45],[14,12],[17,-56],[8,-53],[11,14]],[[25079,59990],[9,-21],[-5,-90],[-6,-46],[-10,-9],[-1,-38],[17,-37],[-3,-28],[-16,3],[-4,-44],[11,-58],[-8,-29],[-7,-71],[-13,-18],[-18,78],[-13,-13],[-13,-142]],[[24999,59427],[-8,-40],[-13,7],[2,31]],[[24980,59425],[6,38],[-5,49],[-21,2],[-4,-30],[9,-58]],[[24965,59426],[6,-22],[-7,-64],[10,-59],[-5,-37],[-24,-1],[0,-37],[21,-39],[1,-27],[-15,-15],[-30,16],[-3,-21],[28,-74],[1,-61],[-22,-40],[-3,-75],[-12,-23]],[[24911,58847],[-179,-6],[16,110],[23,58],[0,23],[15,53],[16,28],[3,43],[9,7],[5,133],[-22,44],[3,15],[-5,71],[-349,-1],[-323,1],[-141,0],[-222,1],[-210,1]],[[23358,63503],[-31,56],[8,79],[-24,76],[-2,77],[-20,19],[1,32],[-18,26],[-12,110],[1,39],[-11,34],[-1,40],[13,42],[-11,18],[-1,-33],[-20,3],[1,63]],[[26900,61666],[18,-20],[35,40],[23,11],[5,49],[3,98],[12,28],[16,-7],[6,30],[-3,101],[-10,105],[21,52],[0,67],[14,88],[12,27],[6,37],[13,-40],[11,-1],[12,-79],[-8,-40],[11,-20],[9,22],[3,42],[9,20],[9,-25],[4,111],[-10,29],[-3,43],[19,19],[-3,96],[8,41],[10,12],[3,55],[31,-7],[3,83],[25,76],[17,-19],[6,-52],[11,3],[21,47],[17,8],[11,54],[11,8],[8,48],[16,57],[30,89],[16,9],[4,83],[10,26],[-11,50],[12,48],[0,57],[10,23],[-4,60],[13,-11],[-2,52],[7,20],[0,122],[9,30],[0,58],[10,48],[5,61],[10,23],[5,65],[-3,95],[4,71],[-9,84],[-11,44],[9,50],[14,-1],[18,27]],[[27769,63178],[-3,-600],[10,7],[33,103],[12,-1],[10,67],[31,60],[13,75],[11,-2],[28,-36],[11,54],[38,158],[13,-10],[-13,-14],[13,-18],[2,-26],[20,-34],[17,1],[7,-18],[28,-4],[14,38],[-7,49],[13,-1],[-11,32],[14,-11],[9,37],[19,-23],[28,87],[24,-20],[17,-49],[8,-40],[18,20],[17,-23],[14,4],[0,-37],[-16,-15],[12,-69],[19,-41],[-2,-33],[9,-12],[5,-43],[-6,-63],[10,-14]],[[28258,62713],[-9,-45],[-21,-175],[-78,209],[-66,179],[-4,-62],[5,-28],[-6,-36],[7,-11],[-23,-106],[6,-15],[-11,-54],[10,-36],[-16,-62],[-7,-7],[-24,-88],[6,-16],[-14,-63],[-7,21],[-15,-66],[-10,-24],[0,36],[-23,-71],[-20,-130],[-35,101],[-9,-69],[-17,-82],[-1,-71],[-8,1],[-10,-57],[-15,-138],[-28,-94],[-46,53],[-17,109],[-31,47],[-14,-121],[3,-65],[-12,-60],[-22,-87],[6,-44],[-12,-21],[-25,-81],[-7,-56],[6,-29],[-8,-30],[-6,-60],[-10,-51],[-18,-51],[-30,-104],[-21,-112],[2,-36],[-12,-39],[4,-41],[17,-34],[-12,-40],[-18,-34],[-1,-32],[13,-4],[-4,-29],[-49,-99],[-10,68],[-12,-9],[-19,-47],[-41,-71],[-4,26],[-21,38],[-7,-51],[9,-43],[-19,-47],[-17,-5],[-37,-27],[-31,-51],[-27,75],[-11,45],[-8,-21],[-8,-55],[-23,-17],[-2,-30],[-13,-29],[-34,-7],[-19,48],[0,24],[-12,25],[-18,3],[-7,52],[-14,31],[-2,90],[-15,22],[-1,33],[18,34],[-11,29]],[[27075,60636],[-14,-4],[-28,30],[-3,37],[-8,1],[-7,40],[-9,-2],[-7,42],[-15,11],[-13,134],[-10,19],[-13,61],[1,34],[-15,19],[-8,39],[11,55],[-15,22],[-9,80],[-10,45],[-15,37],[0,38],[8,0],[3,55],[-4,20],[11,33],[1,58],[-8,36],[1,90]],[[24442,63943],[12,16],[-2,50],[4,90],[-11,35],[13,69],[31,43],[18,-1],[18,41],[1,61],[6,49],[1,67],[10,27],[14,66],[11,19],[6,106],[-1,98],[-13,75],[-13,6],[-20,85],[11,77],[2,74],[6,55],[19,21],[13,-15],[23,40],[31,-6],[24,17],[16,56],[10,13],[26,-1],[18,57],[16,21],[-1,66],[9,59],[0,52],[9,29],[28,49],[-1,41],[8,72],[-3,58],[7,61],[-7,37],[1,89],[-13,41],[-47,73],[-15,74],[3,60],[-16,63],[-22,37],[-2,26],[-22,35],[0,47]],[[24658,66423],[45,-2],[227,-2],[51,-5],[194,-11],[41,4],[152,1],[82,-5]],[[25450,66403],[-2,-124],[-8,-97],[10,-109],[21,-117],[12,-37],[3,-54],[13,-139],[4,-75],[14,-93],[8,-20],[2,-47]],[[25386,60941],[-8,-66],[-17,-35],[-11,-56],[7,-105],[20,-68],[-6,-50],[-48,-19],[-12,-11],[-18,-52],[-14,26],[-18,-44],[-2,-55],[-9,-65],[2,-25],[17,-65],[7,-66],[-10,-89],[-15,-10],[-13,13],[-19,52],[-35,40],[-14,39],[-31,42],[-19,5],[-13,-21],[-13,-42],[-9,-65],[-16,-52],[-4,-55],[14,-52]],[[20232,53938],[-214,0],[-254,0],[0,-524],[-234,-1]],[[24911,58847],[4,-38],[18,-49],[0,-45],[-24,23],[-9,-49],[20,-36],[-11,-33],[-11,-1],[-9,-52],[-17,-22],[-9,21],[-15,-41],[6,-68],[9,-17],[12,23],[3,-38],[-26,-42],[1,-53],[9,-10],[-3,-40],[-22,56],[-9,-9],[-5,-58],[9,-42],[-11,-75],[-8,88],[-23,-67],[-3,-46],[12,-6],[2,43],[15,-35],[-9,-47],[0,-45],[-16,-10],[4,-47],[15,-7],[6,-29],[-12,-43],[15,-58],[-10,-25],[-12,21],[-9,-26],[-9,-100],[-25,13],[-3,-49]],[[24751,57677],[17,-55],[0,-45],[-18,-44],[-31,-44],[-4,59],[-11,2],[-2,-29],[8,-44],[-5,-25],[6,-72],[-14,-19],[-5,34],[2,57],[-10,-27],[2,-35],[-7,-14],[6,-40],[20,-2],[2,-31],[-14,-50],[-11,18],[1,49],[-10,-21],[0,-64],[12,-61],[1,-27],[-13,-51],[6,-83],[-25,-57],[0,-63],[-10,1],[3,54],[-19,-1],[-5,-27],[8,-45],[-7,-30],[-19,-15],[-4,-71],[-16,43],[-9,-29],[14,-43],[20,1],[2,-25],[-13,-28],[-16,33],[-12,-32],[9,-51],[11,3],[3,-24],[-8,-61],[-24,-6],[7,-45],[-11,-16],[-5,43],[-16,-23],[-3,-29],[22,-34],[-18,-78],[7,-55],[16,-26],[-10,-34],[-8,18],[-24,-2],[-1,-59],[10,-26],[13,14],[8,-50],[-12,-18],[-16,22],[-7,35],[-17,-16],[-2,-28],[25,-51],[2,-33],[-28,-41],[13,-63],[-14,-80],[18,16],[-1,51],[14,-27],[-4,-54],[-17,-10],[-3,-19],[10,-24],[17,14],[10,73],[5,-32],[-23,-90],[0,-64],[12,-68],[3,42],[10,13],[2,-23],[-13,-52],[2,-75],[-3,-23],[-14,-8],[-11,14],[-5,-39],[23,-62],[-13,-59]],[[24512,55359],[-219,4],[-154,5],[-157,7],[-86,0],[-185,2]],[[16868,55911],[16,-5],[28,-53],[21,-22],[1,-25],[16,-61],[-5,-43],[-13,25],[-26,7],[-6,35],[0,74],[-20,16],[-12,52]],[[16867,55390],[9,4],[22,-117],[40,-130],[-10,4],[-11,-22],[-17,44],[-13,72],[-14,119],[-6,26]],[[16741,55926],[8,7],[1,-41],[-11,7],[2,27]],[[16637,56552],[8,-17],[11,14],[0,-30],[-17,-4],[-9,21],[7,16]],[[16596,55679],[14,7],[20,-35],[8,-31],[-13,-15],[-20,21],[-9,53]],[[16501,56608],[18,-7],[13,-22],[15,5],[19,-43],[19,-4],[7,39],[20,-20],[-11,-43],[-28,-11],[-17,-31],[-42,24],[-1,61],[-12,52]],[[16410,56520],[22,8],[9,21],[13,-8],[13,19],[0,-48],[18,-13],[1,-48],[-41,-54],[-16,37],[-19,86]],[[16354,56562],[16,17],[6,28],[6,-35],[13,-26],[-21,-6],[-20,22]],[[15305,65829],[155,-4],[9,6],[77,-1],[56,12],[28,-8],[115,2],[37,5],[95,-1],[45,-5],[154,-8],[114,-4],[197,0],[92,2]],[[16479,65825],[0,-1]],[[16479,65824],[0,-1448],[1,-34],[0,-756],[-1,-393],[-1,-13],[0,-457],[-1,-122],[2,-263],[26,-77],[115,-330],[114,-336],[63,-182],[99,-298],[125,-377],[62,-186],[127,-394],[313,-989],[234,-759],[70,-234],[147,-492]],[[17950,55027],[-416,-126],[-254,-89],[-3,98],[-9,62],[-8,20],[-14,-23],[-3,66],[1,71],[-8,41],[9,61],[-9,161],[-13,127],[-9,54],[-40,193],[-25,61],[-10,51],[-15,37],[-9,-2],[-19,95],[-26,59],[-14,15],[-20,57],[-25,88],[-24,39],[-2,-47],[-21,-23],[-18,14],[-10,25],[-15,6],[-4,38],[9,34],[1,43],[-14,116],[-11,64],[-17,50],[-35,1],[-22,-8],[-16,-36],[-14,38],[-28,16],[-37,59],[-12,2],[-24,53],[-17,141],[-10,10],[-17,53],[-4,-3],[-20,65],[-21,25],[-6,20],[-32,4],[-16,-24],[-18,25],[-22,-10],[-37,60],[-23,0],[-15,15],[-44,-7],[-48,-22],[-1,31],[-13,66],[-16,30],[-12,-4],[-6,32],[13,143],[-11,60],[8,119],[-17,54],[9,115],[1,140],[-18,56],[-14,7],[-3,-21],[-27,55],[-11,48],[10,131],[-2,50],[-11,53],[-27,14],[-27,102],[-18,101],[-24,25],[-17,66],[-5,81],[-16,47],[-7,37],[-14,35],[-6,99],[-5,35],[-20,29],[-15,104],[-25,94],[-33,64],[-11,45],[-8,80],[1,42],[-11,101],[2,92],[-11,16],[10,74],[18,-38],[9,30],[7,61],[8,141],[-21,149],[-12,43],[-10,11],[-9,-28],[-37,2],[-28,68],[-22,102],[-14,18],[-2,31],[-17,60],[-4,62],[5,129],[-12,89],[-2,52],[-12,14],[-6,33],[-1,64],[5,27],[2,77],[-6,134],[14,28],[16,8],[6,-24],[7,-88],[-9,-9],[11,-107],[-2,-27],[27,-23],[27,-80],[8,5],[14,-63],[12,3],[-6,40],[-12,19],[-10,87],[-7,109],[-21,54],[-2,46],[-22,26],[9,74],[-7,68],[-15,-1],[-14,68],[8,-9],[9,26],[0,40],[19,-2],[10,39],[-10,71],[-26,44],[-13,-30],[-14,-6],[2,-47],[-5,-46],[15,-51],[-12,-25],[-4,-44],[19,-56],[-7,-14],[-11,29],[7,-71],[-15,-16],[-9,38],[-26,61],[-13,-12],[-23,67],[-10,53],[-17,33],[-16,8],[-20,-33],[14,127],[3,48],[-12,92],[7,20],[-16,70],[-11,-10],[-1,67],[-17,106],[-20,51],[-14,19],[-22,64],[-37,176],[-14,29],[-8,41],[-31,90],[-24,116],[14,78],[-1,42],[-14,126],[-16,123],[-7,105],[3,99],[13,132],[-5,52],[0,65],[-14,92],[-4,108],[-16,36],[-6,55],[-35,133],[-7,6],[0,43],[-8,43],[-22,32],[-49,151],[4,63],[-4,70],[-13,74],[9,98],[14,109],[42,265],[11,95],[7,119],[-12,37],[-1,97],[4,2],[11,99],[12,244],[-5,126],[-15,128],[-8,96],[-9,-4],[-17,54],[10,74],[5,110],[-3,67]],[[28861,63044],[-1,28]],[[28874,63137],[-6,7],[-22,-81],[2,-39],[11,-31],[1,-49],[-8,-28],[0,-41],[14,-52],[7,-58],[21,-62],[10,-68],[3,-58],[-5,-35],[2,-126],[16,-48],[7,-43],[2,-74],[34,-137],[16,-29],[10,24],[4,-36],[5,-129],[4,-244]],[[29002,61700],[-105,1],[-74,9],[-2,72],[-25,1311],[0,86]],[[28426,62262],[21,70],[37,-118],[-36,-118]],[[28448,62096],[0,93],[-22,73]],[[6433,39922],[2,44],[19,76],[12,7],[13,93],[16,52],[3,58],[-17,94],[-4,45],[-1,105],[8,37],[18,-9],[18,-32],[3,-32],[22,-44],[15,-47],[12,6],[25,-32],[39,-77],[13,-19],[22,-61],[16,-57],[17,-76],[-3,-47],[1,-90],[8,-10],[16,12],[7,-57],[-1,-57],[22,-82],[22,-39],[5,-21],[-4,-44],[-13,-51],[-17,-47],[-14,-56],[-23,-38],[-20,-47],[-20,-18],[-16,15],[-9,-9],[-18,-66],[-16,-25],[-13,-48],[-14,-16],[-12,-59],[1,-33],[-8,-37],[-5,-59],[-20,-63],[-15,61],[-22,52],[-22,29],[-10,95],[5,113],[4,151],[-10,106],[1,46],[-9,12],[-5,114],[-7,66],[-9,8],[-8,108]],[[6254,41293],[5,69],[11,56],[14,6],[13,-33],[10,-78],[10,-50],[24,29],[18,35],[26,-21],[0,-16],[17,-51],[10,-15],[5,-40],[31,-37],[5,-32],[0,-52],[-8,-43],[-13,-40],[-6,3],[-17,-36],[-14,10],[-30,-53],[-21,-9],[-17,26],[-7,210],[-7,20],[-14,-24],[-26,50],[-13,58],[-6,58]],[[6253,40841],[7,29],[28,57],[10,-30],[-4,-44],[5,-17],[-13,-19],[-5,15],[-18,-23],[-10,32]],[[6153,41274],[7,27],[13,5],[26,-19],[17,-60],[8,-51],[-9,-65],[-19,-29],[-17,-5],[-7,60],[-3,73],[-14,32],[-2,32]],[[6084,41504],[6,52],[9,29],[-2,58],[17,-2],[3,-14],[54,-29],[10,34],[4,-42],[22,-13],[27,18],[17,-25],[-8,-55],[-18,-51],[-20,-21],[-35,32],[-26,31],[-15,-14],[-29,-5],[-16,17]],[[5814,42059],[43,9],[13,49],[4,35],[13,48],[14,15],[6,-27],[6,-70],[20,-84],[4,-52],[-4,-15],[3,-47],[18,-55],[3,57],[12,-2],[-4,-64],[8,-24],[-1,-29],[17,-70],[-12,-37],[-11,18],[-21,-29],[-6,26],[-17,31],[-25,11],[-30,-20],[-7,4],[-7,84],[-11,34],[-1,31],[-14,67],[0,61],[-13,45]],[[5394,42585],[1,40],[11,38],[4,49],[33,72],[8,26],[23,-18],[3,25],[16,-11],[8,14],[15,-20],[10,-37],[5,-45],[0,-46],[-11,-63],[1,-106],[-4,-28],[-28,-78],[-8,15],[-36,12],[-18,71],[-24,29],[-9,61]],[[5266,42374],[4,43],[12,44],[19,45],[2,38],[11,9],[2,-31],[-5,-57],[2,-36],[-20,-28],[-16,-97],[-12,30],[1,40]],[[24498,67577],[-5,-52],[10,-50],[-1,-74],[27,-41],[13,-76],[-18,-60],[-6,-52],[-9,-24],[1,-108],[8,-88],[0,-68],[12,-25],[13,-169],[33,-64],[47,-37],[17,-20],[18,-109],[0,-37]],[[23231,64184],[4,28],[-10,56],[-13,16],[-15,58],[2,37],[13,35],[-4,83],[10,51],[-7,27],[2,66],[-9,20],[1,42],[-7,30],[5,27],[-5,93],[12,17],[-24,24],[4,37],[-5,63],[13,41],[-20,27],[7,29],[-1,116],[-20,10],[2,77],[-9,1],[-2,-37],[-15,28],[3,56],[-11,39],[7,39],[-8,41],[11,18],[-6,54],[8,20],[3,46],[-12,23],[-1,38],[-14,61],[6,11],[3,66],[-16,6],[1,30],[-15,11],[5,16],[-15,25],[1,83],[-22,56],[-3,48],[10,25],[-14,103],[-11,29],[0,76],[9,44],[-4,44],[-14,8]],[[26280,62461],[18,48],[7,-2],[15,-54],[21,-28],[14,29],[14,-3],[8,29],[8,-8],[4,-69],[29,-32],[10,-84],[16,-83],[0,-66],[5,-26],[40,-41],[33,19],[29,-46],[3,-34],[15,-26],[5,-50],[28,-29],[14,66],[26,22],[15,-32],[28,-20],[11,-24],[5,-43],[13,24],[30,-1],[10,53],[18,34],[9,39],[15,0],[21,32],[7,-33],[-3,-44],[9,-111],[13,-37],[21,-6],[21,-79],[13,-35],[2,-44]],[[27075,60636],[-108,-317],[-37,-39],[-22,-41],[-19,-49],[-25,-45],[0,-86],[-16,-39],[-12,-2],[-12,-33],[3,-59],[-6,-45],[-25,-36],[-29,-4],[-16,-80],[-2,-50],[-16,-4],[-33,-35],[-39,-52],[-21,2],[-33,-49],[-8,-27]],[[26599,59546],[-4,-21],[-83,8],[-79,2],[-76,5],[-83,11],[-51,16],[-74,9],[-55,-14],[-96,8],[-56,10],[-83,22],[-49,4],[-16,-22],[-7,22],[-146,-12],[-92,-2],[-114,-8],[1,35],[-61,17],[10,-147],[-6,-64],[-137,6],[-126,0],[-84,6],[-33,-10]],[[24980,59425],[-15,1]],[[28739,61120],[-14,0]],[[28725,61120],[-1,72],[8,28],[11,-40],[-4,-60]],[[28711,61320],[2,79],[11,13],[7,-30],[5,-118],[-15,21],[4,27],[-14,8]],[[28627,62072],[5,20],[5,-46],[-10,26]],[[29002,61700],[-1,-43],[-9,-105],[-5,-15],[-20,-211],[-18,-120]],[[28949,61206],[-107,-38],[-6,-55],[-6,4]],[[28830,61117],[-13,30],[-19,-4],[-22,-64],[-9,-1],[-1,67],[7,70],[17,28],[-17,2],[2,45],[11,40],[-21,9],[-12,-33],[-4,28],[5,58],[26,27],[-6,39],[-9,-13],[-4,36],[15,112],[-15,-24],[-7,-47],[0,-60],[-8,-1],[-11,77],[11,9],[-1,53],[-8,10],[-4,-49],[-9,-33],[6,-27],[-9,-62],[-4,29],[-17,-23],[-9,12],[-16,83],[-9,13],[2,43],[-24,151],[20,14],[5,39],[-8,-7],[-9,51],[8,40],[12,22],[6,-25],[12,26],[1,-36],[22,-9],[13,-39],[4,10],[-16,69],[-17,14],[-8,42],[-7,-3],[-16,77],[-5,-28],[-12,20],[-1,-59],[-7,8],[3,101],[18,92],[14,-45],[8,10],[-3,124],[-8,17],[-17,-47],[-12,4],[1,-48],[-12,-17],[4,104],[16,101],[7,-51],[21,-11],[11,31],[-6,54],[11,55],[-16,-9],[-3,-52],[4,-31],[-12,17],[3,63],[-6,59],[-7,14],[16,136],[12,42],[-2,24],[14,25],[7,37],[30,-6],[-11,24],[18,70],[-10,6],[12,122],[-35,-24],[-6,-48],[12,-24],[4,-32],[-12,-14],[-34,-97],[-7,31],[7,54],[-8,28],[0,-44],[-9,-51],[8,-34],[-7,-46],[-6,96],[-15,14],[6,-103],[-8,8],[-6,-42],[12,-22],[-21,-44],[-7,-28],[-13,8],[-2,26],[-22,46],[3,-46],[9,-13],[2,-41],[27,-54],[2,-67],[-5,-25],[13,-48],[-23,-45],[7,-37],[-3,-40],[-9,4],[-7,-55],[6,-53],[-17,-58],[9,-50],[-2,-54],[6,-73],[-2,-89],[7,-65],[22,-80],[8,-62],[-9,-45],[-14,7],[9,-42],[9,22],[8,-14],[-7,-47],[4,-48],[18,-92],[-5,-22],[5,-97],[-9,19],[-11,58],[-8,4],[-5,64],[-8,-9],[-2,-57],[-7,38],[-8,-3],[-5,48],[-12,45],[-23,23],[-35,3],[-8,129],[-8,13],[-4,-31],[10,-68],[-2,-22],[-22,43],[-2,34],[-13,31],[-12,114],[-20,-44],[-33,-56],[-12,27],[-7,115],[11,82],[15,57],[20,30],[-5,10]],[[28423,61914],[-1,45],[7,27],[18,25],[1,85]],[[28426,62262],[-9,37],[-20,6],[-8,17],[1,48],[-26,42],[-34,15],[-6,39],[-10,13],[1,58],[9,18],[7,49],[-23,43],[-6,45],[-15,-1],[-16,25],[-13,-3]],[[26327,70327],[8,17],[9,-60],[65,-63],[-17,-58],[-23,18],[-14,61],[-28,85]],[[26120,70229],[5,40],[7,-20],[-12,-20]],[[26084,70289],[21,-39],[-4,-36],[-19,38],[2,37]],[[26055,70019],[7,48],[3,69],[6,15],[1,57],[18,-7],[-1,-85],[4,-83],[-19,-44],[-19,30]],[[26035,70180],[13,8],[-5,-54],[-7,1],[-1,45]],[[25984,69839],[13,-17],[1,-59],[-14,76]],[[25933,69486],[6,23],[19,-25],[-6,-96],[-17,52],[-2,46]],[[25908,69335],[11,44],[6,-47],[-17,3]],[[25759,70041],[20,-64],[-8,-22],[-4,36],[-14,43],[6,7]],[[25722,65552],[30,68],[27,87],[37,261],[34,146],[19,134],[10,99],[10,176],[-1,58],[6,87],[-1,163],[-6,182],[-11,120],[-35,230],[-11,94],[-12,138],[-17,119],[0,48],[22,102],[7,50],[1,77],[-9,134],[-14,90],[4,32],[20,51],[24,151],[21,112],[4,124],[9,134],[-11,112],[1,33],[27,43],[20,15],[6,93],[-2,74],[10,36],[13,-18],[16,80],[18,-35],[17,13],[8,32],[9,86],[10,16],[15,94],[11,47],[9,-7],[12,35],[3,-39],[-19,-32],[-3,-42],[12,-81],[-23,-81],[13,19],[0,-74],[-6,-7],[-8,-84],[7,-95],[8,-2],[19,145],[3,98],[13,20],[-8,-158],[-15,-44],[-6,-67],[14,-14],[8,65],[7,13],[22,135],[5,78],[-1,56],[4,82],[-6,85],[5,94],[17,49],[10,3],[18,48],[18,16],[25,-7],[26,14],[12,20],[-1,33],[-33,17],[-14,47],[-8,114],[16,75],[13,14],[20,69],[-2,31],[-18,27],[60,-15],[7,49],[61,-102],[26,-58],[13,20],[11,-16],[13,10],[32,-34],[24,-85],[3,-57],[17,-27],[33,4],[8,-9],[29,-77],[23,-7],[34,-71],[29,6],[21,-78],[11,-25],[-9,-27],[15,-96],[11,-30],[14,-133],[-20,21],[-16,34],[-15,-41],[4,-110],[12,-44],[21,-26],[5,-59],[1,-98],[7,-37],[-4,-71],[-8,-67],[2,-65],[-5,-111],[-1,-121],[-12,-15],[-14,-64],[-24,2],[-8,-30],[-8,-108],[-4,-115],[-19,-5],[-8,-19],[0,-49],[-42,-6],[-13,-35],[-9,-76],[-5,-124],[-8,-42],[13,-91],[16,-32],[9,33],[5,-38],[20,-21],[13,-38],[10,16],[28,120],[14,0],[7,25],[-7,51],[9,44],[9,87],[4,-50],[19,31],[5,29],[-21,31],[24,-3],[11,24],[5,41],[23,10],[34,28],[9,45],[31,30],[11,-30],[23,-25],[15,-39],[17,-123],[10,-37],[7,-97],[5,-208],[17,-178],[4,-247],[10,-143],[18,-110],[2,-48],[-11,-46],[-7,-145],[4,-47],[-12,-113],[-4,-67],[-18,-66],[-15,4],[-12,-42],[1,66],[-9,27],[10,16],[15,62],[-14,26],[-15,-5],[-19,-34],[-7,-32],[9,-27],[2,-45],[-15,4],[-11,-52],[1,-84],[-7,-77],[-17,-53],[-30,-25],[-18,-97],[2,-127],[-3,-44],[-15,-25],[-1,-70],[-16,-39],[-6,-39],[-13,-4],[-7,-65],[-11,-11],[-17,-72],[5,-79],[-8,-9]],[[26661,65520],[-86,-11],[-167,-20],[-124,-12]],[[25045,72671],[21,69],[95,141],[7,-2],[43,98],[31,42],[6,-11],[28,29],[-1,-28],[-12,-16],[-30,-80],[0,-30],[-25,-55],[-51,-53],[-42,-66],[2,-20],[23,0],[-59,-73],[-18,3],[-18,52]],[[24721,71146],[19,40],[12,3],[39,49],[38,34],[31,77],[19,64],[16,27],[33,17],[15,-17],[29,27],[22,-3],[52,75],[30,94],[22,5],[29,23],[10,39],[5,51],[25,65],[14,16],[30,82],[23,23],[21,56],[11,54],[20,52],[58,85],[56,25],[50,-7],[23,-39],[1,-45],[-11,5],[-17,-24],[-19,13],[-21,-10],[5,-47],[-32,-57],[-30,-95],[-19,-20],[-5,-74],[-7,9],[-7,-52],[-14,-26],[-5,-67],[-12,-48],[-9,-6],[-12,-164],[6,-52],[-9,-35],[11,3],[20,87],[3,44],[7,-13],[29,80],[28,43],[-12,-55],[-12,-24],[-15,-77],[30,84],[26,18],[14,-13],[37,1],[15,-30],[8,8],[17,-35],[8,-39],[15,11],[22,-63],[3,-61],[17,-49],[6,-47],[14,-49],[19,-15],[-2,-79],[11,-28],[26,-15],[42,10],[25,43],[11,-8],[14,-72],[12,-27],[19,-4],[8,46],[16,-7],[9,-38],[4,69],[-7,53],[16,20],[7,-32],[-6,-56],[17,-26],[26,72],[40,62],[59,110],[11,-21],[61,42],[46,-16],[35,-3],[30,7],[62,85],[24,12],[30,-7],[32,14],[-22,-84],[-2,-135],[2,-45],[-8,-19],[9,-51],[16,-8],[9,16],[6,-26],[15,3],[17,-28],[34,49],[13,-4],[11,-46],[-1,-35],[25,28],[7,-7],[10,65],[19,24],[23,-19],[11,9],[8,39],[27,-5],[5,-30],[-10,-100],[7,-120],[1,-95],[-29,-2],[-8,-65],[15,-12],[5,21],[15,-4],[8,-38],[19,-19],[-13,-40],[24,-75],[12,-1],[20,-45],[8,38],[14,-35],[8,26],[-16,100],[14,-15],[41,13],[12,-15],[14,-91],[16,-31],[-10,-64],[-14,-20],[-27,39],[-31,-16],[-31,42],[-11,-12],[-27,1],[-27,23],[-60,-26],[-13,-28],[-37,69],[-15,48],[-13,-7],[-13,30],[-10,-41],[2,-51],[-15,-32],[1,-45],[9,-63],[-12,-20],[-24,42],[-3,31],[-21,37],[-5,30],[-22,64],[-38,46],[-13,-7],[-33,49],[-18,-5],[-13,23],[-5,-20],[-19,11],[-25,-75],[-17,-73],[-9,-8],[-32,23],[-23,-15],[-8,-22],[2,-34],[-23,37],[-21,17],[-24,-14],[-10,11],[-23,-24],[-13,-42],[-2,-63],[-9,-72],[-14,4],[-7,-39],[-22,-15],[-6,-46],[-13,-3],[0,-45],[-12,-9],[4,-61],[-20,32],[-9,40],[12,27],[1,34],[11,31],[1,40],[13,-4],[15,87],[-3,43],[-12,10],[-18,-75],[-38,24],[3,-51],[-13,-47],[-5,-56],[-30,-31],[-5,-27],[-6,39],[3,55],[-4,67],[-8,32],[-10,-19],[-5,-120],[3,-12],[-31,-55],[-26,-129],[-17,-146],[-19,-65],[-20,-112],[-41,-174],[6,-33]],[[25508,69434],[-19,14],[-8,47],[-13,28],[-2,29],[15,118],[11,48],[-2,34],[-11,25],[-16,-47],[-27,-10]],[[25436,69720],[0,0]],[[25436,69720],[-7,47],[7,24],[-3,38],[13,34],[6,40],[-3,47],[8,69],[-14,75],[12,13],[-8,44],[-13,18],[-6,33],[-24,4],[-9,43],[-21,-18],[-18,45],[17,52],[-7,21],[0,47],[-40,48],[-14,-14],[-24,47],[-12,-15],[-21,21],[-2,25],[-27,-2],[-3,-32],[-14,0],[-4,29],[-17,16],[-12,-13],[-86,142],[-287,231],[1,27],[-28,167],[-27,16],[-10,24]],[[24739,71113],[0,0]],[[24739,71113],[-12,-6],[-6,39]],[[25252,52115],[30,-13],[-14,-20],[-12,9],[-4,24]],[[25179,52148],[16,13],[30,-29],[6,-15],[-24,5],[-28,26]],[[25119,52114],[15,7],[15,31],[-4,-29],[-21,-27],[-5,18]],[[25071,52140],[21,-1],[8,13],[-5,-43],[-10,-7],[-17,26],[3,12]],[[24751,57677],[229,-2],[156,1],[202,1]],[[25284,52292],[-4,-32],[-7,15],[-10,-40],[-18,27],[-13,-15],[-5,30],[-18,7],[-18,-23],[-23,49],[-2,-28],[-21,38],[-22,-3],[-31,-27],[-28,-42],[-30,-33],[4,54],[-10,30],[-14,-27],[9,-17],[1,-40],[-25,-57],[-8,-80],[-9,10],[-13,-16]],[[24969,52072],[-12,0],[-13,50],[-4,66],[0,69],[-15,77],[0,54],[-10,43],[-11,19],[-4,39],[-10,34],[-4,95],[-8,14],[10,88],[-4,36],[7,25],[9,125],[7,19],[-1,45],[7,22],[-7,36],[-165,-2],[-134,-1],[-226,0],[13,21],[7,58],[-16,50],[-1,28],[10,46],[-3,41],[-12,30],[1,38],[18,-7],[17,20],[2,43],[-12,37],[-1,45],[-7,16],[9,39],[4,-50],[8,-29],[9,7],[0,29],[-13,75],[-1,74],[20,18],[12,35],[-4,32],[-18,-13],[-9,30],[5,38],[10,-28],[18,0],[1,106],[11,35],[23,5],[4,18],[-29,11],[7,94],[12,11],[2,-43],[7,-17],[5,28],[-6,21],[24,78],[-2,50],[7,25],[19,14],[0,50],[-19,26],[5,25],[13,-39],[5,36],[12,22],[9,69],[-15,24],[2,-62],[-32,11],[2,79],[27,20],[7,27],[14,-31],[5,42],[-2,53],[12,-8],[16,79],[-4,18],[-6,-40],[-23,17],[0,58],[8,20],[-8,35],[-10,-20],[-23,49],[3,58],[5,1],[17,-48],[10,7],[-5,26],[-21,50],[14,31],[8,37],[-7,37],[-6,-46],[-20,-26],[-6,14],[-3,52],[9,38],[16,33],[2,27],[-31,30],[1,71],[5,37],[21,52],[2,39],[-9,72],[-11,-4],[1,-67],[-14,-26],[-9,22],[3,48],[10,50]],[[17580,73980],[234,-2],[232,3],[190,-5],[190,2],[348,-2],[211,0],[232,2],[328,0],[141,0],[292,0],[227,1],[143,-1],[294,0],[114,0],[167,1]],[[18973,68711],[-21,23],[-6,49],[-24,59],[2,43],[-28,117],[-17,36],[-8,-52],[-20,-3],[5,-33],[-16,-98],[15,-64],[-32,26],[-9,-16],[-24,13],[-3,-19],[-30,-40],[-13,63],[-22,-8],[-13,-25],[-10,13],[-21,-30],[-8,22],[-14,-8],[-12,35],[-16,7],[-9,-35],[-9,0],[-2,-61],[-8,-45],[-24,38],[-8,-20],[-11,24],[-33,2],[-17,22],[-17,-23],[-15,-72],[6,-53],[-9,-22],[-11,44],[-18,24],[-15,40],[-6,53],[5,34],[-21,81],[9,48],[-5,50],[-18,109],[-32,58],[-26,-44],[-4,40],[-28,53],[-11,97],[14,13],[2,55],[-4,61],[-19,39],[2,26],[-17,15],[-7,73],[-24,73],[-1,35],[-14,54],[2,70],[-8,19],[-6,57],[6,30],[-1,46],[-19,0],[7,95],[-15,25],[-12,-2],[2,26],[-10,44],[-15,26],[-9,-13],[2,-41],[-15,-35],[-19,-82],[-19,-26],[-13,12],[-3,-58],[-24,-42],[-5,36],[-14,22],[-13,60],[-25,0],[4,53],[-8,36],[18,37],[1,48],[-19,74],[18,89],[25,1],[7,44],[-13,54],[6,49],[-19,27],[-4,54],[9,58],[-17,33],[2,49],[19,7],[-1,79],[-6,30],[13,24],[1,116],[13,65],[-7,69],[12,3],[10,123],[-3,58],[-8,10],[-26,-23],[-4,-21],[-22,15],[-19,-5],[-8,39],[6,39],[-7,30],[-14,9],[-4,-30],[-15,-21],[-6,17],[6,55],[-34,58],[-16,59],[4,71],[-20,60],[-13,-1],[-6,60],[-19,82],[-17,54],[-12,13],[-5,37],[-11,7],[2,38],[-9,41],[-24,10],[-32,45],[-7,54],[-47,87],[-11,-2],[12,36],[22,8],[3,22],[-16,7],[-5,57],[-11,5],[2,34],[13,32],[-12,55],[2,63],[-13,24],[-7,47],[-8,-6],[-8,88],[-15,21],[-39,152],[-1,279],[1,109],[0,804]],[[29991,69339],[3,68],[18,64],[-3,15],[11,74],[-13,36],[18,11],[4,26],[22,42],[15,-61],[28,-5],[13,70]],[[30213,67064],[-30,-174],[-2,-44]],[[29724,66677],[-9,53],[-6,-10],[-12,102],[9,73],[1,57],[13,10],[8,45],[-6,52],[9,33],[-5,65],[4,138],[12,64],[-6,60],[10,135],[-5,35],[5,74],[15,33],[6,109],[9,44],[19,43],[6,44],[-1,64],[19,67],[0,85],[12,44],[12,69],[0,47],[-10,68],[6,57],[-6,34],[10,61],[35,32],[10,-13],[16,21],[5,52],[24,14],[14,39],[7,45],[16,22],[-6,59],[11,13],[2,73],[-10,38],[-11,102],[15,52],[4,64],[18,75],[-13,89],[11,30]],[[29842,64964],[3,18],[27,22],[-21,-43],[-9,3]],[[29812,64781],[5,20],[11,-16],[0,-50],[-6,35],[-10,11]],[[29792,64880],[16,16],[-12,-43],[-4,27]],[[29275,64272],[5,-67],[-9,-39],[-38,-78],[-11,-1]],[[28633,68013],[16,50],[-5,-45],[-11,-5]],[[28611,68032],[12,40],[9,-5],[-21,-35]],[[27689,66145],[33,53],[53,111],[29,91],[30,50],[26,25],[11,70],[13,36],[4,52],[36,56],[19,54],[-4,80],[-13,40],[2,43],[-7,37],[-23,35],[1,92],[-18,15],[9,77],[-5,125],[-3,13],[28,22],[38,42],[56,47],[40,20],[33,2],[38,-9],[36,8],[86,-42],[23,-19],[15,-47],[23,-46],[12,-10],[40,49],[35,1],[43,12],[21,-19],[23,-1],[14,25],[30,20],[18,40],[9,1],[19,80],[30,64],[10,8],[19,54],[14,5],[20,-15],[17,19],[9,53],[2,87],[-9,180],[-20,40],[11,50],[14,11],[2,-33],[21,41],[-3,43],[-19,47],[-22,-15],[5,29],[-15,51],[-15,1],[1,80],[16,115],[19,5],[23,42],[0,48],[18,22],[27,55],[9,-5],[16,29],[25,75],[4,46],[12,51],[41,121],[31,100],[56,141],[-1,12],[68,109],[26,62],[18,0],[22,37],[27,-29],[19,10],[91,-8],[53,-1],[107,14],[24,-1],[93,10]],[[29478,69336],[1,-109],[-7,-30],[-4,-63],[13,-57],[-10,-55],[-2,-92],[-4,-31],[4,-70],[19,-88],[4,-69],[-12,-80],[7,-114],[-4,-36],[-19,-63],[-5,-89],[-8,-79],[9,-27],[-1,-103],[10,-67],[-5,-64],[12,-57],[-16,-97],[-7,-114],[10,-26],[7,66],[19,0],[2,-53],[13,-29],[-2,-343],[-6,-422],[0,-74],[-4,-37],[8,-65]],[[29390,64649],[-7,-42],[-21,-42],[-2,-79],[-13,2],[9,-60],[18,87],[11,-15],[10,42],[21,27],[18,2],[4,33],[22,-30],[2,41],[9,-28],[20,-8],[18,-23],[23,28],[2,43],[17,8],[10,-12],[75,3],[39,20],[14,18],[30,63],[9,40],[12,13],[13,50],[21,21],[12,-2],[-18,-52],[-9,-6],[15,-31],[5,-44],[17,-12],[11,25],[16,-72],[15,17],[23,48],[2,28],[17,11],[12,-12],[-5,-21],[-67,-94],[-78,-123],[-50,-62],[-81,-93],[-53,-78],[-43,-41],[-27,-12],[-6,15],[-64,-60],[-61,10],[-46,-55],[3,38],[-23,-2],[3,25],[-11,39],[7,35],[-8,36]],[[26861,65369],[16,17],[-2,-36],[-14,19]],[[26831,65420],[6,90],[11,-35],[-3,-35],[-14,-42],[0,22]],[[26661,65520],[1,-26],[21,-28],[13,17],[37,-82],[25,-20],[11,-21],[18,-66],[19,-29],[18,23],[2,50],[7,13],[14,-55],[19,2],[-1,-37],[29,-96],[16,-33],[22,-21],[41,57],[22,4],[17,35],[51,60],[37,-38],[19,15],[20,-9],[29,61],[29,86],[8,10],[16,58],[44,102],[10,1],[67,108],[30,17],[24,34],[65,69],[17,24]],[[15490,70789],[21,10],[13,-45],[-1,-55],[17,-42],[25,-1],[32,51],[14,-4],[59,-119],[7,-61],[18,-81],[1,-57],[7,-52],[-3,-67],[10,-88],[-4,-41],[3,-50],[33,-54],[46,-35],[11,-19],[17,14],[13,-32],[18,-5],[23,39],[23,7],[54,83],[12,45],[15,16],[21,-15],[29,12],[28,26],[19,-30],[17,-9],[18,14],[34,-40],[9,-75],[14,4],[19,50],[34,4],[13,-16],[11,34],[47,51],[15,35],[21,-9],[21,-51],[22,6],[34,26],[20,5],[11,42],[28,27],[29,46],[46,27],[37,10],[13,57],[14,23],[24,-22],[64,39],[17,-14],[19,6],[28,42],[11,36],[163,1],[250,-3],[164,-3]],[[17338,70482],[16,-107],[11,-27],[16,-75],[18,5],[10,-47],[19,-2],[16,-48],[0,-53],[13,-49],[7,-54],[-24,-108],[-1,-55],[-10,-23],[-24,-150],[1,-36],[-9,-51],[-7,-116],[-13,-40],[-6,-53],[-14,-44],[-3,-51],[7,-58],[-9,-68],[-18,-76],[0,-21],[-32,-49],[-14,-93],[-8,-97],[-10,-66],[-18,-48],[3,-66],[-8,-36],[15,-69],[-8,-56],[13,-35],[19,25],[16,-59],[20,12],[2,-53],[18,-17],[1,-31],[-10,-62],[-12,-17],[1,-42],[11,-32],[-1,-43],[-12,-81],[0,-54],[-11,-11],[-2,-59],[0,-2105]],[[17307,65831],[-166,-2],[-273,-5],[-26,-3],[-143,2],[-220,2]],[[15305,65829],[-21,55],[-15,55],[-7,69],[2,33],[-14,81],[2,32],[-7,63],[-2,126],[13,147],[-7,107],[-17,87],[-11,2],[-11,123],[15,90],[12,96],[6,83],[0,52],[9,80],[6,99],[-6,42],[17,53],[8,43],[16,132],[15,193],[15,283],[7,225],[4,188],[-2,8],[10,197],[-1,69],[7,184],[0,92],[-5,39],[8,91],[12,227],[8,117],[4,157],[-3,66],[3,109],[-4,69],[5,24],[5,176],[-1,76],[-11,41],[6,87],[-2,83],[-7,45],[16,36],[1,109],[-19,193],[27,-79],[14,-14],[-3,38],[23,10],[7,17],[11,-28],[12,31],[15,0],[20,51]],[[26599,59546],[33,-4],[78,1],[5,-5],[157,-1],[61,3],[151,-2],[3,26],[77,-5],[-8,-28]],[[18139,65823],[61,-6],[262,13],[192,2],[5,-5],[196,3],[118,3]],[[18136,60011],[0,880],[1,11],[-1,272],[1,173],[-1,298],[1,318],[0,1661],[1,149],[0,628],[1,266],[0,1156]],[[28738,60998],[7,-15],[-7,-27],[0,42]],[[28949,61206],[-16,-79],[-15,-98],[-8,-27],[-5,21],[-15,-7],[-19,-78],[-12,-70],[-11,-126],[1,-64],[-23,-128],[7,-14],[-18,-91],[-12,-79],[-9,-11],[1,-57],[-11,-86],[-18,-64],[-16,2],[4,-35],[-9,-5],[-1,84],[-10,55],[-4,61],[2,70],[9,59],[3,89],[10,105],[4,76],[16,79],[18,110],[-4,34],[21,17],[15,65],[1,28],[-20,21],[25,54]],[[28739,61120],[-11,-44],[-3,44]],[[28423,61914],[-20,-21],[-13,21],[0,-52],[-18,-113],[-4,-52],[2,-76],[15,-59],[29,15],[6,26],[15,0],[12,38],[9,-30],[-6,-74],[19,-64],[0,-49],[35,-59],[25,-2],[7,-28],[6,21],[24,-9],[4,-44],[16,-39],[8,-59],[13,-15],[15,-54],[20,-23],[30,-68],[-5,-65],[-15,-24],[-2,-107],[4,-29],[-11,-46],[13,-23],[-19,-30],[-31,64],[-11,-27],[-7,25],[0,41],[-13,81],[-19,32],[-8,35],[-12,12],[-21,103],[-11,11],[-4,45],[-13,30],[-2,-30],[28,-89],[20,-114],[15,-24],[1,-25],[16,-14],[10,-96],[11,-53],[30,-4],[7,-36],[31,-24],[-14,-29],[-1,-37],[13,-8],[4,22],[8,-41],[5,-110],[-8,-90],[-18,63],[-21,45],[-9,-42],[11,-39],[7,-55],[9,-14],[-22,-24],[-18,-4],[6,-39],[22,11],[-2,-76],[14,12],[4,-31],[12,-20],[6,-49],[-9,-97],[-4,15],[-16,-18],[-15,-34],[-10,68],[-29,61],[-14,45],[4,48],[-13,71],[-22,-9],[-8,-25],[-10,46],[-18,11],[-4,23],[-21,-35],[11,-33],[12,8],[18,-13],[15,-55],[9,-2],[8,58],[8,-119],[1,-67],[22,-19],[25,-82],[1,-65],[27,4],[9,27],[1,-33],[9,-11],[-3,86],[17,6],[13,-29],[35,-36],[17,27],[11,-11],[8,-128],[12,-140],[9,-71],[7,-94]],[[15775,72069],[4,105],[10,72],[12,-52],[-2,-58],[19,-32],[-18,-27],[-5,-26],[-18,-12],[-2,30]],[[15740,73454],[0,40],[20,-41],[-17,-26],[-3,27]],[[15720,73667],[6,14],[26,-115],[-18,42],[-14,59]],[[15715,73495],[8,29],[12,-47],[-15,-33],[-5,51]],[[15707,73080],[13,89],[14,59],[2,55],[16,11],[7,-19],[0,-49],[19,-38],[3,-26],[-15,-19],[-17,15],[-1,-29],[-13,-34],[-14,-7],[3,-24],[23,10],[11,-42],[8,-84],[-4,-14],[10,-100],[8,27],[-5,67],[10,-3],[16,-57],[16,-13],[7,-94],[-8,-58],[-14,13],[-12,86],[-21,-25],[2,30],[-19,44],[3,93],[-5,56],[-18,-4],[-3,30],[-22,54]],[[15649,73739],[11,-4],[34,-53],[-8,-8],[-22,20],[-15,45]],[[15623,73630],[17,26],[2,-33],[-19,7]],[[15618,73982],[15,0],[4,-29],[-17,-2],[-2,31]],[[15586,73509],[7,30],[20,1],[2,-29],[15,-33],[17,-9],[-18,69],[37,108],[12,-2],[37,-58],[-19,-50],[11,-66],[-2,-62],[-11,-25],[4,-69],[-20,-12],[-15,50],[-9,-12],[-22,11],[-31,62],[-6,76],[-9,20]],[[15577,73617],[18,-10],[18,-54],[-30,41],[-6,23]],[[17306,73978],[-1,-290],[0,-441],[-2,-286],[0,-702],[1,-52],[0,-1247],[-7,-48],[20,-76],[8,-54],[0,-63],[12,-40],[-17,-93],[7,-11],[11,-93]],[[15490,70789],[-34,9],[-3,34],[-12,6],[-10,-31],[-13,10],[-19,-51],[-9,7],[-21,74],[-10,8],[-7,-47],[-10,-10],[6,139],[1,124],[-4,165],[13,-61],[-2,-100],[4,-137],[17,0],[1,37],[-10,40],[0,61],[12,-37],[14,83],[-19,116],[11,42],[25,53],[-17,37],[-6,-27],[-18,-2],[4,-23],[-16,4],[-20,44],[-1,55],[-11,130],[8,8],[6,-52],[11,31],[52,63],[-10,27],[-34,23],[-2,45],[-27,14],[-8,-24],[8,-90],[-16,-21],[3,38],[-4,206],[-14,176],[-24,80],[-9,207],[-5,77],[-15,162],[-14,36],[-4,55],[-14,23],[-5,31],[-19,29],[-12,110],[-8,101],[1,53],[-11,56],[12,58],[9,138],[-19,46],[3,22],[17,1],[40,-55],[32,-64],[10,-1],[25,-39],[6,12],[41,-55],[-1,-20],[35,-41],[56,-11],[21,13],[31,-37],[9,19],[10,-18],[24,7],[12,-32],[41,2],[32,71],[-3,-24],[22,-42],[7,-45],[17,17],[17,-5],[-3,-32],[14,-20],[1,-59],[10,6],[3,53],[-14,34],[0,40],[12,28],[21,10],[3,-31],[-15,-34],[10,-50],[7,6],[2,48],[10,14],[8,-100],[-15,-10],[11,-42],[8,-78],[13,-21],[-8,-25],[-16,2],[2,-42],[-17,-36],[-9,-113],[-14,-9],[11,113],[-6,17],[-19,-101],[-4,-53],[-21,-70],[-38,-183],[-13,-119],[12,8],[23,-13],[12,27],[21,17],[3,38],[-44,-62],[-17,27],[42,226],[31,74],[29,28],[3,73],[16,73],[31,68],[-9,97],[22,-40],[14,-187],[-22,0],[3,-40],[11,-14],[-4,-56],[7,-19],[0,-53],[-14,-38],[-1,-38],[15,-16],[-10,-48],[-6,-87],[4,-21],[-10,-57],[7,-49],[-15,-79],[-27,78],[8,96],[-16,-42],[-6,-63],[30,-83],[-10,-16],[1,-48],[-11,-26],[-16,46],[-20,105],[12,37],[1,61],[-7,25],[0,-51],[-12,-57],[7,-72],[-6,-48],[13,14],[11,-66],[27,-22],[11,37],[0,33],[13,16],[8,79],[10,53],[-2,30],[25,-58],[10,25],[-4,36],[27,34],[0,50],[-8,58],[-8,11],[6,35],[-10,40],[-7,71],[22,38],[-24,58],[16,82],[-6,91],[15,46],[9,119],[22,25],[-1,69],[-14,23],[-23,86],[1,74],[-10,49],[-15,4],[3,-24],[-11,-28],[10,-67],[18,-50],[1,-35],[-26,85],[-12,4],[-7,58],[2,77],[18,24],[16,-22],[10,42],[-10,45],[-28,45],[-13,48],[1,39],[-29,-33],[-7,33],[4,45],[-13,-17],[3,39],[24,28],[13,-15],[9,-49],[19,7],[-10,108],[17,6],[5,34],[-21,66],[-5,66],[8,44],[-13,30],[-17,-6],[-11,-41],[9,-44],[-19,40],[8,57],[-10,25],[-9,-14],[-1,65],[-21,54],[11,21],[-5,36],[-13,16],[16,54],[184,0],[97,-6],[145,5],[143,-2],[190,0],[169,0],[165,1],[178,0],[325,-2]],[[25685,69733],[6,80],[31,-17],[-23,-128],[-14,65]],[[25568,69555],[12,14],[2,-63],[-14,23],[0,26]],[[24707,71654],[8,83],[12,4],[-5,-75],[-15,-12]],[[24691,71507],[21,33],[-14,-47],[-7,14]],[[24655,71564],[5,21],[30,29],[5,-13],[-11,-48],[-24,-11],[-5,22]],[[24625,71464],[3,27],[20,41],[1,-19],[-24,-49]],[[24631,71609],[14,-54],[-13,-3],[-8,37],[7,20]],[[24621,71679],[35,36],[11,-55],[14,34],[2,-44],[-16,-9],[-17,-49],[-11,42],[-16,20],[-2,25]],[[24616,71401],[17,18],[32,86],[14,-32],[-30,-33],[5,-35],[-17,-4],[-20,-37],[-1,37]],[[24563,71635],[15,17],[-1,-44],[-14,27]],[[24276,71309],[20,-30],[34,11],[49,52],[19,27],[18,0],[48,70],[25,27],[6,26],[17,-22],[7,33],[25,10],[22,70],[14,-12],[14,35],[10,-4],[24,-81],[-14,-76],[-24,-78],[9,-73],[-16,-35],[-11,-77],[13,-16],[42,73],[5,54],[42,-108],[13,-22],[9,10],[25,-27]],[[25508,69434],[-10,-58],[-1,-80],[-37,-13],[-21,-40],[3,-47],[-11,-59],[-9,-15],[-11,-83],[-12,-42],[-7,-104],[3,-25],[-13,-50],[20,-42],[12,7],[7,53],[26,64],[10,3],[15,63],[0,36],[31,133],[26,36],[11,-7],[11,34],[15,-32],[-6,46],[12,97],[27,109],[7,100],[12,-5],[21,32],[1,59],[17,60],[22,-3],[-2,-87],[-16,-5],[-2,-142],[-12,-40],[-8,4],[-5,-53],[-14,-52],[5,-43],[-13,-39],[4,-26],[-18,-33],[-13,-62],[-8,-87],[-17,-107],[-9,-26],[-9,-62],[-21,-268],[9,-94],[-2,-71],[-12,-41],[-23,-46],[-3,-62],[-8,-37],[-14,-162],[2,-82],[8,-50],[-2,-102],[-21,-118],[-7,-136],[-20,-107],[-9,-156],[8,-76],[-5,-38],[8,-85],[-7,-57],[14,-62],[0,-85],[6,-63],[16,-59],[-4,-89],[-11,-107],[6,-145]],[[2682,386],[26,11],[1,-51],[-9,8],[-8,-28],[-10,60]],[[2636,452],[21,8],[-4,-21],[-13,-12],[-4,25]],[[2313,271],[13,35],[16,2],[19,68],[4,-20],[27,2],[4,-44],[-7,13],[-29,-30],[-23,-89],[-11,47],[-13,16]],[[90204,32599],[5,15],[34,16],[21,137],[6,65],[7,-11],[7,-43],[14,-11],[-10,-88],[-32,-109],[-9,-44],[-2,-111],[-12,-56],[-18,30],[-7,101],[8,50],[-12,59]],[[90597,35570],[10,43],[4,-16],[-8,-45],[-6,18]],[[90537,37432],[5,20],[1,-49],[-6,29]],[[90507,37973],[14,53],[0,59],[11,0],[0,-66],[-9,-13],[-10,-55],[-6,22]],[[90501,34555],[4,28],[2,101],[9,-12],[20,67],[5,-22],[-14,-80],[4,-63],[-13,7],[0,-73],[-12,18],[-5,29]],[[90487,38800],[6,39],[11,-28],[-1,-51],[-8,-23],[-7,25],[-1,38]],[[90486,35993],[20,2],[3,-36],[-19,-8],[-4,42]],[[90472,34420],[4,45],[13,54],[5,-54],[-4,-24],[7,-40],[-2,-61],[-9,-29],[-14,109]],[[90343,33382],[11,51],[21,35],[15,-9],[-2,-35],[-12,-13],[-8,-39],[-11,-6],[-5,23],[-9,-7]],[[28030,56345],[-13,-8],[-36,-51],[-27,-66],[-35,-121],[-18,-79],[-7,-45],[-16,-58],[-14,-93],[-13,-174],[3,-55],[-7,-48],[-14,-47],[-23,-41],[-9,-97],[-17,10],[-17,-16],[-11,39],[-16,-33],[-10,-63],[3,-31],[8,10],[0,-33],[-15,-20],[-18,-45],[-9,-52],[-34,-59],[-10,38],[-11,-7],[-1,-32],[17,-22],[-5,-59],[-25,-52],[-7,-40],[-10,5],[-24,-22],[-17,-59],[-6,18],[-36,-90],[-8,21],[-15,-28],[-2,30],[-13,-1],[-4,-42],[15,-83],[-7,-74],[-32,-62],[-19,-20],[-2,41],[-19,40],[-11,-22],[-2,-31],[12,-15],[14,-59],[-15,-65],[-25,-59],[-9,0],[-17,-67],[5,-21]],[[31708,38299],[11,-21],[12,13],[9,-36],[-17,-36],[-12,19],[-3,61]],[[31642,38028],[49,54],[35,-32],[-18,-26],[-21,-7],[-11,-24],[-8,12],[-17,-17],[-9,40]],[[31637,38350],[7,-14],[0,-44],[-7,58]],[[31170,38320],[15,18],[17,49],[-4,63],[7,32],[14,12],[20,-6],[17,-25],[50,2],[20,-22],[24,26],[18,-5],[25,-25],[8,20],[28,0],[27,-20],[16,1],[7,-19],[6,24],[37,-35],[4,19],[18,-18],[6,7],[31,-33],[14,-49],[7,13],[5,-27],[10,-6],[14,22],[-5,-40],[3,-84],[13,-30],[-7,-43],[-11,19],[3,-28],[-10,2],[-7,-32],[-13,1],[-11,-59],[-7,-83],[-8,-6],[-1,-44],[-25,-46],[-15,-9],[-12,12],[-7,-27],[-10,13],[-21,-43],[-10,9],[-9,-29],[-8,9],[-18,66],[-12,-10],[-7,-34],[-21,60],[-8,0],[-25,-33],[-14,24],[-12,-19],[-25,47],[-7,-39],[-14,-27],[-21,-3],[-12,-18],[-8,41],[-21,8],[-11,-32],[-19,19],[-12,-12],[1,53],[10,31],[-11,12],[3,65],[5,15],[1,75],[7,31],[-10,101],[-13,21],[-9,78]],[[30985,38023],[20,12],[5,-43],[-15,-38],[-12,32],[2,37]],[[31858,38286],[13,39],[11,-4],[15,-28],[-13,-4],[1,-49],[-9,20],[-13,-5],[-5,31]],[[31828,37522],[7,36],[-4,40],[7,30],[10,-13],[8,22],[17,3],[6,-29],[39,5],[2,-18],[-32,-48],[-41,-30],[-19,2]],[[31779,38288],[6,50],[10,-23],[12,26],[19,-21],[33,6],[-2,-23],[-14,-4],[9,-42],[-16,-11],[-15,23],[-7,-20],[-12,49],[-23,-10]],[[17306,73978],[171,1],[103,1]],[[18139,65823],[-119,3],[-36,-2],[-58,9],[-63,-7],[-79,0],[-293,0],[-184,5]],[[29478,69336],[71,5],[115,0],[40,-9],[62,-5],[57,2],[168,10]],[[25149,51924],[13,-63],[5,-76],[-3,-101],[-10,-105],[-4,3],[8,90],[4,100],[-1,46],[-12,106]],[[25020,51931],[11,38],[32,81],[2,-14],[-13,-63],[2,-28],[13,-33],[-15,-50],[-3,47],[-10,-10],[-17,10],[-2,22]],[[24941,51321],[17,10],[-9,-42],[-8,32]],[[24732,50824],[7,27],[13,-65],[-8,-14],[-12,52]],[[24681,50807],[39,-33],[-19,-8],[-20,41]],[[24628,50763],[25,19],[2,-17],[-26,-20],[-1,18]],[[24275,51386],[10,27],[12,-5],[3,26],[22,-6],[23,-61],[9,7],[6,-29],[-15,-36],[-1,-40],[-14,-19],[-59,115],[4,21]],[[24969,52072],[-17,-35],[-8,7],[-17,-56],[-2,-38],[-12,-15],[3,-40],[-28,17],[-11,-45],[5,-68],[18,-10],[13,25],[-4,-59],[8,-34],[15,-19],[13,11],[6,29],[5,101],[-2,13],[24,54],[3,44],[18,-34],[13,6],[0,-21],[-17,-34],[0,-34],[15,-17],[3,-61],[15,14],[11,82],[16,-25],[-4,-55],[-13,0],[-12,-44],[22,2],[-3,-29],[-31,-22],[13,-66],[11,22],[-7,-59],[-9,26],[-14,11],[-12,-55],[-1,-99],[-9,-5],[-6,86],[-11,1],[-2,-66],[13,-58],[-13,33],[-14,5],[-8,-17],[-15,6],[18,-39],[0,-32],[-23,49],[0,-25],[12,-32],[-12,-14],[1,-34],[11,-36],[20,-11],[-1,-22],[12,-24],[-1,-34],[7,-46],[9,30],[5,-21],[22,-2],[16,-34],[3,30],[20,-91],[11,44],[24,-111],[0,-59],[6,-13],[18,28],[7,-41],[-24,-15],[-2,-33],[16,-3],[-8,-52],[-11,24],[-12,-96],[2,-44],[-21,36],[-2,55],[-8,16],[-31,-138],[-15,-41],[7,67],[9,29],[5,48],[9,21],[0,54],[9,23],[-1,51],[-10,24],[-4,-62],[-16,-29],[-12,29],[-14,77],[-34,43],[-10,45],[-56,33],[-12,-14],[-48,-143],[-46,-115],[-7,10],[4,41],[-12,16],[-2,41],[6,3],[-12,100],[-11,27],[-9,-1],[1,-28],[-8,-36],[2,76],[-10,56],[-13,-64],[-14,14],[-7,-22],[-7,31],[-6,-27],[10,-63],[-12,4],[-7,-27],[-4,-54],[-8,7],[-5,-57],[-8,12],[-19,-33],[-6,-76],[-16,16],[5,21],[-13,67],[-18,57],[-11,-13],[-26,21],[-10,33],[-25,12],[-16,25],[-16,60],[12,14],[7,58],[8,-12],[12,-52],[7,22],[-1,-68],[15,-17],[-4,104],[-23,64],[0,42],[-11,7],[-9,-41],[-13,-13],[2,41],[-10,-7],[3,39],[9,28],[-10,40],[-29,-50],[-10,80],[-10,-8],[-6,118],[-26,1],[6,33],[1,85],[-32,16],[-13,-10],[-20,-38],[-7,57],[8,41],[8,-3],[-2,46],[-16,8],[-14,-22],[-9,20],[-2,-40],[-24,-36],[-14,-34],[-6,32],[-18,-16],[0,-32],[9,-30],[18,-8],[-9,-30],[8,-63],[20,21],[5,-18],[-13,-14],[6,-20],[-32,-6],[-26,-49],[-20,-9],[-82,63],[-35,42],[-57,101],[-23,32],[-41,40],[-33,5],[-14,-14],[-36,7],[-58,-25],[-17,-13],[-26,-53]],[[30097,65246],[-20,-46],[-6,102],[2,64],[-10,22],[2,-159],[-17,2],[-2,-35],[-10,-7],[-1,55],[16,95],[8,68],[17,46]],[[30029,65436],[5,7],[11,-52],[-5,-7],[-11,52]],[[30019,65203],[6,51],[-4,23],[5,57],[4,-20],[0,-85],[-11,-26]],[[29960,64853],[11,80],[5,-14],[1,-76],[-17,10]],[[30068,65494],[-3,-45],[-14,-41],[-6,42],[4,35],[-19,54],[-8,40],[5,-129],[-22,17],[12,-39],[1,-75],[-12,-11],[8,-53],[0,-72],[-10,-45],[-8,-73],[-12,6],[-27,-18],[-27,-34],[-38,-30],[-1,16]]]},Cot={AL:"01",Alabama:"01",AK:"02",Alaska:"02",AZ:"04",Arizona:"04",AR:"05",Arkansas:"05",CA:"06",California:"06",CO:"08",Colorado:"08",CT:"09",Connecticut:"09",DE:"10",Delaware:"10",DC:"11","District of Columbia":"11",FL:"12",Florida:"12",GA:"13",Georgia:"13",HI:"15",Hawaii:"12",ID:"16",Idaho:"16",IL:"17",Illinois:"17",IN:"18",Indiana:"18",IA:"19",Iowa:"19",KS:"20",Kansas:"20",KY:"21",Kentucky:"21",LA:"22",Louisiana:"22",ME:"23",Maine:"23",MD:"24",Maryland:"24",MA:"25",Massachusetts:"25",MI:"26",Michigan:"26",MN:"27",Minnesota:"27",MS:"28",Mississippi:"28",MO:"29",Missouri:"29",MT:"30",Montana:"30",NE:"31",Nebraska:"31",NV:"32",Nevada:"32",NH:"33","New Hampshire":"33",NJ:"34","New Jersey":"34",NM:"35","New Mexico":"35",NY:"36","New York":"36",NC:"37","North Carolina":"37",ND:"38","North Dakota":"38",OH:"39",Ohio:"39",OK:"40",Oklahoma:"40",OR:"41",Oregon:"41",PA:"42",Pennsylvania:"42",RI:"44","Rhode Island":"44",SC:"45","South Carolina":"45",SD:"46","South Dakota":"46",TN:"47",Tennessee:"47",TX:"48",Texas:"48",UT:"49",Utah:"49",VT:"50",Vermont:"50",VA:"51",Virginia:"51",WA:"53",Washington:"53",WV:"54","West Virginia":"54",WI:"55",Wisconsin:"55",WY:"56",Wyoming:"56",PR:"72","Puerto Rico":"72",VI:"78",AS:"60",MP:"69",GU:"66"};class Tot extends xT{getRegionField(e){return e.allFields[0]}getColorField(e){return e.allFields[1]}getDataValue(e){if(e.isNumber())return e.value;if(e.isString())if(e.field===this.getRegionField(e.field.parentExplore)){const n=Cot[e.value];return n===void 0?void 0:n}else return e.value;else{if(e.isNull())return;throw new Error("Invalid field type for shape map.")}}getDataType(e){if(e.isAtomicField()){if(e.isDate()||e.isTimestamp())return"nominal";if(e.isString())return e===this.getRegionField(e.parentExplore)?"quantitative":"nominal";if(e.isNumber())return"quantitative"}throw new Error("Invalid field type for shape map.")}getVegaLiteSpec(e){if(e.isNull())throw new Error("Expected struct value not to be null.");if(!e.isArray())throw new Error("Invalid data for shape map");const n=this.getRegionField(e.field),r=this.getColorField(e.field),i=r?this.getDataType(r):void 0,s=r!==void 0?{field:r.name,type:i,axis:{title:Af(this.options,r,void 0,this.timezone)},scale:Ba(i,!1)}:void 0,o=this.mapData(e).filter(u=>u[n.name]!==void 0);return{...this.getSize(),data:{values:o},projection:{type:"albersUsa"},layer:[{data:{values:tB,format:{type:"topojson",feature:"states"}},mark:{type:"geoshape",fill:"#efefef",stroke:"white"}},{transform:[{lookup:n.name,from:{data:{values:tB,format:{type:"topojson",feature:"states"}},key:"id"},as:"geo"}],mark:"geoshape",encoding:{shape:{field:"geo",type:"geojson"},color:s}}],background:"transparent",config:{axis:{labelFont:"var(--malloy-font-family, Roboto)",titleFont:"var(--malloy-font-family, Roboto)",titleFontWeight:500,titleColor:"var(--malloy-title-color, #505050)",labelColor:"var(--malloy-label-color, #000000)",titleFontSize:12},legend:{labelFont:"var(--malloy-font-family, Roboto)",titleFont:"var(--malloy-font-family, Roboto)",titleFontWeight:500,titleColor:"var(--malloy-title-color, #505050)",labelColor:"var(--malloy-label-color, #000000)",titleFontSize:12},header:{labelFont:"var(--malloy-font-family, Roboto)",titleFont:"var(--malloy-font-family, Roboto)",titleFontWeight:500},mark:{font:"var(--malloy-font-family, Roboto)"},title:{font:"var(--malloy-font-family, Roboto)",subtitleFont:"var(--malloy-font-family, Roboto)",fontWeight:500}}}}}const ST=class ST extends vf{create(e,n,r,i,s,o){return new Tot(e,n,r,s,o)}get rendererName(){return"shape_map"}};ST.instance=new ST;let nB=ST;class Rot extends xT{getDataValue(e){if(e.isNull()||e.isNumber()||e.isString())return e.value;throw new Error("Invalid field type for segment map.")}getDataType(e){if(e.isAtomicField()){if(e.isString())return"nominal";if(e.isNumber())return"quantitative"}throw new Error("Invalid field type for segment map.")}getVegaLiteSpec(e){if(e.isNull())throw new Error("Expected struct value not to be null.");const n=e.field.allFields,r=n[0],i=n[1],s=n[2],o=n[3],u=n[4],a=u?this.getDataType(u):void 0,l=u!==void 0?{field:u.name,type:a,axis:{title:Af(this.options,u,void 0,this.timezone)},scale:Ba(a,!1)}:void 0;return{...this.getSize(),data:{values:this.mapData(e)},projection:{type:"albersUsa"},layer:[{data:{values:tB,format:{type:"topojson",feature:"states"}},mark:{type:"geoshape",fill:"lightgray",stroke:"white"}},{mark:"line",encoding:{latitude:{field:r.name,type:"quantitative"},longitude:{field:i.name,type:"quantitative"},latitude2:{field:s.name,type:"quantitative"},longitude2:{field:o.name,type:"quantitative"},color:l}}],background:"transparent",config:{axis:{labelFont:"var(--malloy-font-family, Roboto)",titleFont:"var(--malloy-font-family, Roboto)",titleFontWeight:500,titleColor:"var(--malloy-title-color, #505050)",labelColor:"var(--malloy-label-color, #000000)",titleFontSize:12},legend:{labelFont:"var(--malloy-font-family, Roboto)",titleFont:"var(--malloy-font-family, Roboto)",titleFontWeight:500,titleColor:"var(--malloy-title-color, #505050)",labelColor:"var(--malloy-label-color, #000000)",titleFontSize:12},header:{labelFont:"var(--malloy-font-family, Roboto)",titleFont:"var(--malloy-font-family, Roboto)",titleFontWeight:500},mark:{font:"var(--malloy-font-family, Roboto)"},title:{font:"var(--malloy-font-family, Roboto)",subtitleFont:"var(--malloy-font-family, Roboto)",fontWeight:500}}}}}const bT=class bT extends vf{create(e,n,r,i,s,o){return new Rot(e,n,r,s,o)}get rendererName(){return"segment_map"}};bT.instance=new bT;let rB=bT;var Oot=kt("<div>");const Dot=[Z$.instance,eB.instance,nB.instance,rB.instance];function wot(t){var o;const e=mx(),n=iB(),r=((o=n.vegaConfigOverride)==null?void 0:o.call(n,t.type))??{},i=()=>{var u;return(u=Dot.find(a=>a.rendererName===t.type))==null?void 0:u.create(document,{size:Bs(e.rootField)===Bs(t.data.field)?"large":"medium"},{dataStyles:{}},t.data.field,{vegaConfigOverride:r})};let s;return no(async()=>{if(s&&i()){const u=await i().render(t.data);s.replaceChildren(u)}}),(()=>{var u=Oot(),a=s;return typeof a=="function"?Yo(a,u):s=u,u})()}function gT(t,e){const n=e??t.tagParse().tag;return!t.isExplore()&&t.isAtomicField()?n.has("link")?"link":n.has("image")?"image":"cell":FS(n,"list","list_detail")?"list":FS(n,"bar_chart","line_chart")?"chart":n.has("dashboard")?"dashboard":FS(n,"scatter_chart","shape_map","segment_map")?"legacy_chart":"table"}const Not="∅";function Bx(t){const{field:e,dataColumn:n,resultMetadata:r,tag:i,customProps:s={}}=t,o=gT(e,i);let u="";const a=s[o]||{};if(n.isNull())u=Not;else switch(o){case"cell":{const l=n.value;MG(e,l)?u=mh(e,l):jG(e,l)?u=l:e.isAtomicField()&&(e.isDate()||e.isTimestamp())?u=bKe(t):u=String(l);break}case"link":{u=p7e(e,n);break}case"list":{u=EXe(t);break}case"image":{u=vXe(t);break}case"chart":{u=st(zKe,Ac({field:e,get data(){return r.getData(n)},metadata:r},a));break}case"dashboard":{if(n.isArray())u=st(OXe,Ac({data:n},a));else throw new Error(`Malloy render: wrong data type passed to the dashboard renderer for field ${n.field.name}`);break}case"legacy_chart":{if(n.isArray())u=st(wot,{type:o,data:n});else throw new Error(`Malloy render: wrong data type passed to the ${o} renderer for field ${n.field.name}`);break}case"table":{if(n.isArrayOrRecord())u=st(gXe,Ac({data:n},a));else throw new Error(`Malloy render: wrong data type passed to the table renderer for field ${n.field.name}`);break}default:try{u=String(n.value)}catch{console.warn("Couldnt get value for ",e,n)}}return{renderAs:o,renderValue:u}}function Fot(t,e){const n=e??t.tagParse().tag,r=n.tag("bar_chart")??n.tag("bar"),i=!n.has("tooltip"),s=(r==null?void 0:r.text("size"))==="spark"||n.text("size")==="spark";if(!r)throw new Error("Tried to render a bar_chart, but no bar_chart tag was found");const o={fields:[],type:null},u={fields:[],type:null},a={fields:[],type:null},l=r.has("stack");r.text("x")&&o.fields.push(r.text("x")),r.text("y")?u.fields.push(r.text("y")):r.textArray("y")&&u.fields.push(...r.textArray("y")),r.text("series")&&a.fields.push(r.text("series"));const c=[],f=[],x=[];ML(t,p=>{const{tag:g}=p.tagParse();g.has("x")&&c.push(ji(t,p)),g.has("y")&&f.push(ji(t,p)),g.has("series")&&x.push(ji(t,p))}),c.forEach(p=>{o.fields.push(p)}),f.forEach(p=>{u.fields.push(p)}),x.forEach(p=>{a.fields.push(p)});const d=t.allFields.filter(p=>p.isAtomicField()&&p.sourceWasDimension());if(o.fields.length===0&&d.length>0&&o.fields.push(ji(t,d[0])),u.fields.length===0){const p=t.allFields.find(g=>g.isAtomicField()&&g.sourceWasMeasureLike()&&g.isNumber());p&&u.fields.push(ji(t,p))}if(a.fields.length===0&&d.length>1){const p=d.find(g=>{const m=ji(t,g);return!o.fields.includes(m)});p&&a.fields.push(ji(t,p))}return o.type="nominal",u.type="quantitative",a.type="nominal",{xChannel:o,yChannel:u,seriesChannel:a,isStack:l,interactive:i,hideReferences:s}}const Lot={spark:[180,1],xs:[170,2],sm:[216,3],md:[256,4],lg:[472,7],xl:[508,10],"2xl":[730,14]},mT=28;function Ile(t,e,n,r){var ae;const i=(r==null?void 0:r.xField)??t.allFields.at(0),s=(r==null?void 0:r.yField)??t.allFields.at(1),{tag:o}=t.tagParse(),u=n.numeric("size","width")??o.numeric("size","width"),a=n.numeric("size","height")??o.numeric("size","height"),l=(n.text("size")??o.text("size"))||"md";let c=0,f=0,x=0;[c,x]=Lot[l],f=x*mT,u&&(c=u),a&&(f=a);let d=0,p=0,g=-90,m="right",y="middle",E=0,A=0,v=0;const _=l!=="spark",S=l!=="spark",b=e.fields[Bs(t)];let C=l!=="spark"?mT-1:0,R;const L=Bs(s),[$,U]=((ae=r==null?void 0:r.getYMinMax)==null?void 0:ae.call(r))??[e.fields[L].min,e.fields[L].max],z=Lt("linear")().domain([$,U]).nice().range([f,0]),ee=z.domain();if(S){const V=z.domain().at(1),te=z.domain().at(0),se=ZV(),he=s.isAtomicField()?mh(s,te):se.format(",")(te),D=s.isAtomicField()?mh(s,V):se.format(",")(V);v=31,p=Math.max(O7(he,"10px Inter, sans-serif")+4,O7(D,"10px Inter, sans-serif")+4)+5+v;const N=Math.ceil(f/40),W=z.ticks(N).at(-1);if(W<V){const H=(V-W)/(V-te),w=f/(1-H);C=Math.max(0,C-(w-f)),f=w,R=N}}if(_){const V=Bs(i),te=e.fields[V].maxString,se=O7(te,"10px Inter, sans-serif")+4,he=1;A=26,d=Math.min(se,he*f),E=d;const D=e.fields[V].values.size,N=D<=20?D:b.maxUniqueFieldValueCounts.get(e.getFieldKey(i)),P=c/N;(P>d||P>se)&&(g=0,E=P,m=void 0,y="top",A=22,d=14)}const G=f+d+A,fe=Math.ceil(G/mT)*mT;A+=fe-G;const pe=o.text("size")==="spark";return{plotWidth:c,plotHeight:f,xAxis:{labelAngle:g,labelAlign:m,labelBaseline:y,labelLimit:E,height:d,titleSize:A,hidden:pe},yAxis:{width:p,tickCount:R,hidden:pe,yTitleSize:v},yScale:{domain:n.has("y","independent")?null:ee},padding:pe?{top:0,left:0,bottom:0,right:0}:{top:C+1,left:p,bottom:d+A,right:8},xField:i,yField:s,get totalWidth(){return this.plotWidth+this.padding.left+this.padding.right},get totalHeight(){return this.plotHeight+this.padding.top+this.padding.bottom}}}function $le({type:t,title:e,tickCount:n,labelLimit:r,fieldPath:i,showBrushes:s=!0,axisSettings:o}){const u={orient:"left",scale:"yscale",title:e,...o,tickCount:{signal:`${n}`},labelLimit:r,encode:{labels:{enter:{text:{signal:`renderMalloyNumber(malloyExplore, '${i}', datum.value, datum, item)`}},update:{text:{signal:`renderMalloyNumber(malloyExplore, '${i}', datum.value, datum, item)`},fillOpacity:[...s?[{test:'brushMeasureIn !== "empty" ? (datum.index !== 0 && datum.index !== 1) : false',value:0},{test:'brushMeasureRangeIn && datum.value >= (brushMeasureRangeIn[0] - (invert("yscale", 0)-invert("yscale", 20))) && datum.value <= (brushMeasureRangeIn[1] + (invert("yscale", 0)-invert("yscale", 20)))',value:0}]:[],{value:1}]}}}},a=$ot({type:t,fieldPath:i,axisSettings:o}),l=Iot({type:t,axisSettings:o});return{axis:u,interactiveMarks:[a,l],interactiveSignals:[],brushMeasureEvents:[{events:"@y_axis_overlay:mousemove",update:"yIsBrushing ? null : { fieldRefId: measureFieldRefId, sourceId: brushMeasureSourceId, value: event.shiftKey ? invert('yscale',y(item())) : snapValue([domain('yscale')[0],domain('yscale')[1]], 1000,invert('yscale',y(item()))), type: 'measure'}"},{events:"@y_axis_overlay:mouseout",update:"null"}]}}function Iot(t){const e={name:`${t.type}_axis_overlay`,type:"rect",encode:{enter:{}}};return e.encode.enter={x:{value:-t.axisSettings.width+t.axisSettings.yTitleSize},x2:{value:0},y:{value:0},y2:{signal:"height"},fill:{value:"transparent"}},e}function $ot(t){const e={signal:'brushMeasureIn === "empty" || yIsBrushing ? 0 : 1'},n=-t.axisSettings.width+t.axisSettings.yTitleSize,r=(s=0)=>`brushMeasureIn !== "empty" ? (scale("yscale",brushMeasureIn) + ${s}) : 0`;return{name:"y_reference_line_group",type:"group",marks:[{name:"y_reference_lines_backdrop",type:"rect",encode:{enter:{x:{value:n-2},x2:{value:0},fill:{value:{x1:1,y1:0,x2:1,y2:1,gradient:"linear",stops:[{offset:0,color:"rgba(255,255,255,0)"},{offset:.275,color:"white"},{offset:.7,color:"white"},{offset:1,color:"rgba(255,255,255,0)"}]}},height:{value:40}},update:{y:{signal:r(-25)},opacity:e}}},{name:"y_reference_lines",type:"rule",encode:{enter:{x:{value:n},x2:{signal:"width"},stroke:{value:"black"},strokeOpacity:{value:.5},strokeDash:{value:[4,2]}},update:{y:{signal:r()},y2:{signal:r(0)},opacity:e}}},{name:"y_reference_line_label_backdrop",type:"text",encode:{enter:{x:{value:n},dy:{value:-4},align:{value:"left"},baseline:{value:"alphabetic"},fill:{value:"white"},stroke:{value:"white"},strokeWidth:{value:3},fontSize:{value:10},fontWeight:{value:"normal"},font:{value:"Inter, sans-serif"},strokeOpacity:{value:1}},update:{y:{signal:r()},text:{signal:`brushMeasureIn ? renderMalloyNumber(malloyExplore, '${t.fieldPath}', brushMeasureIn) : ''`},opacity:e}}},{name:"y_reference_line_label",type:"text",encode:{enter:{x:{value:n},dy:{value:-4},align:{value:"left"},baseline:{value:"alphabetic"},fill:{value:$x},fontSize:{value:10},fontWeight:{value:"normal"},font:{value:"Inter, sans-serif"}},update:{y:{signal:r()},text:{signal:`brushMeasureIn ? renderMalloyNumber(malloyExplore, '${t.fieldPath}', brushMeasureIn) : ''`},opacity:e}}}]}}function Ble({explore:t,records:e,metadata:n}){const r=t.allFields.filter(s=>s.tagParse().tag.has("tooltip")),i=[];return r.forEach(s=>{(s.isAtomicField()||s.isExploreField())&&e.forEach(o=>{i.push({label:s.name,value:()=>Bx({field:s,dataColumn:o.__source.__malloyDataRecord.cell(s.name),resultMetadata:n,tag:s.tagParse().tag}).renderValue,highlight:!1,color:"",entryType:s.isExploreField()?"block":"list-item",ignoreHighlightState:!0})})}),i}const Bot=.4,kot=384;function Pot(t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[t[n]]=n);return e}function Mot(t,e){var le;const n=t.tagParse().tag,r=n.tag("bar_chart")??n.tag("bar");if(!r)throw new Error("Bar chart should only be rendered for bar_chart or bar tag");const i=Fot(t,n),s=i.xChannel.fields.at(0),o=i.yChannel.fields.at(0),u=i.seriesChannel.fields.at(0);if(!s)throw new Error("Malloy Bar Chart: Missing x field");if(!o)throw new Error("Malloy Bar Chart: Missing y field");const a=ys(t,s),l=ys(t,o),c=u?ys(t,u):null,f=V0(a),x=V0(l),d=c&&V0(c),p=e.field(a),g=c?e.field(c):null,m=i.yChannel.fields.reduce((Se,Pe)=>{const Me=ys(t,Pe);return{...Se,[Pe]:V0(Me)}},{}),y=Pot(m),E=!!c,A=i.yChannel.fields.length>1,v=E||A,_="brush-x_"+crypto.randomUUID(),S="brush-series_"+crypto.randomUUID(),b="brush-measure_"+crypto.randomUUID(),C="brush-measure-range_"+crypto.randomUUID(),R=v&&!i.isStack,L=v&&i.isStack;let $=1/0,U=-1/0;for(const Se of i.yChannel.fields){const Pe=ys(t,Se),Me=e.field(Pe).min;Me!==null&&($=Math.min($,Me));const J=e.field(Pe).max;J!==null&&(U=Math.max(U,J))}const z=Math.min(0,$),ee=Math.max(0,U),G=Ile(t,e,r,{xField:a,yField:l,chartType:"bar_chart",getYMinMax:()=>[z,ee]}),fe=p.values.size<=20,pe=r.text("x","independent")==="false",ae=r.has("x","independent")&&!pe,V=pe||fe&&!ae,te=g&&g.values.size<=20,se=r.text("series","independent")==="false",he=r.has("series","independent")&&!se,D=se||te&&!he,O=G.yAxis.hidden?null:$le({type:"y",title:i.yChannel.fields.join(", "),tickCount:G.yAxis.tickCount??"ceil(height/40)",labelLimit:G.yAxis.width+10,fieldPath:o,fieldRef:x,brushMeasureRangeSourceId:C,axisSettings:G.yAxis}),N=.25,P=0,W={};let H={};R?(W.signal=`scale('xOffset', datum.series)+bandwidth("xscale")*${N/2}`,H={scale:"xOffset",band:1-P}):(W.signal=`bandwidth("xscale")*${N/2}`,H={scale:"xscale",band:1-N});const w={name:"x_group",from:{facet:{data:"values",name:"x_facet",groupby:["x"],aggregate:{fields:["x","x"],ops:["values","min"],as:["v","x"]}}},data:[{name:"x_facet_values",source:"x_facet",transform:[{type:"aggregate",fields:["x","x"],ops:["values","min"],as:["v","x"]}]}],type:"group",interactive:!1,encode:{enter:{x:{scale:"xscale",field:"x"}}},marks:[]},B=.35,k={name:"bars",type:"rect",from:{data:"x_facet"},zindex:2,encode:{enter:{x:{offset:W},width:H,y:{scale:"yscale",field:i.isStack?"y0":"y"},y2:i.isStack?{scale:"yscale",field:"y1"}:{scale:"yscale",value:0}},update:{fill:{scale:"color",field:"series"},fillOpacity:[{test:"brushSeriesIn && brushSeriesIn != datum.series",value:B},{test:A?"length(brushMeasureListIn) > 0 && indexof(brushMeasureListIn, datum.series) === -1":"false",value:B},{test:"brushXIn && length(brushXIn) > 0 && indexof(brushXIn, datum.x) === -1",value:B},{test:"brushMeasureRangeIn && (datum.y < brushMeasureRangeIn[0] || datum.y > brushMeasureRangeIn[1])",value:B},{value:1}]}}},Q={name:"x_highlight",type:"rect",from:{data:"x_facet_values"},zindex:1,encode:{enter:{x:{value:0},width:{scale:"xscale",band:1},y:{value:0},y2:{signal:"height"}},update:{fill:{value:"#4c72ba"},fillOpacity:[{test:"brushXIn ? indexof(brushXIn,datum.x) > -1 : false",value:.1},{value:0}]}}};w.marks.push(Q,k);const I={name:"values",values:[],transform:[]};A&&(I.transform.push({type:"fold",fields:i.yChannel.fields.map(Se=>`__source.${Se}`),as:["series","y"]}),I.transform.push({type:"formula",as:"series",expr:"replace(datum.series, '__source.', '')"})),L&&I.transform.push({type:"stack",groupby:["x"],field:"y",sort:{field:"series"}});const q=[w],M=[{name:"malloyExplore"},{name:"xFieldRefId",value:f},{name:"seriesFieldRefId",value:d},{name:"measureFieldRefId",value:x},{name:"yRefsMap",value:m},{name:"yRefToFieldPath",value:y},{name:"yRefsList",value:Object.values(m)},{name:"brushXSourceId",value:_},{name:"brushSeriesSourceId",value:S},{name:"brushMeasureSourceId",value:b},{name:"brushIn",value:[]},{name:"brushXIn",update:"getMalloyBrush(brushIn, xFieldRefId)"},{name:"brushSeriesIn",update:"getMalloyBrush(brushIn, seriesFieldRefId)"},{name:"brushMeasureIn",update:`getMalloyBrush(brushIn, yRefsList, 'measure') || "empty"`},{name:"brushMeasureRangeIn",update:"getMalloyBrush(brushIn, measureFieldRefId, 'measure-range') || null"},{name:"brushMeasureListIn",update:A?"pluck(getMalloyMeasureBrushes(brushIn, yRefsList, yRefToFieldPath),'fieldPath')":"[]"}];if(i.interactive){O&&q.push(...O.interactiveMarks);const Se=O?O.interactiveSignals:[];M.push({name:"brushX",on:f?[{events:"@x_highlight:mouseover, @bars:mouseover",update:"{ fieldRefId: xFieldRefId, value: [datum.x], sourceId: brushXSourceId, type: 'dimension'}"},{events:"@x_highlight:mouseout, @bars:mouseout",update:"null"}]:[]},{name:"brushSeries",on:E&&d?[{events:"@bars:mouseover",update:"{ fieldRefId: seriesFieldRefId, value: datum.series, sourceId: brushSeriesSourceId, type: 'dimension' }"},{events:"@bars:mouseout",update:"null"},{events:"@legend_labels:mouseover, @legend_symbols:mouseover",update:"{ fieldRefId: seriesFieldRefId, value: datum.value, sourceId: brushSeriesSourceId, type: 'dimension' }"},{events:"@legend_labels:mouseout, @legend_symbols:mouseout",update:"null"}]:[]},{name:"brushMeasure",on:[{events:"@bars:mouseover",update:A?`{ fieldRefId: yRefsMap[datum.series], value: datum['${L?"y1":"y"}'], sourceId: brushMeasureSourceId, type: 'measure'}`:`{ fieldRefId: measureFieldRefId, value: datum['${L?"y1":"y"}'], sourceId: brushMeasureSourceId, type: 'measure'}`},{events:"@bars:mouseout",update:"null"},...(O==null?void 0:O.brushMeasureEvents)??[],...A?[{events:"@legend_labels:mouseover, @legend_symbols:mouseover",update:"{ fieldRefId: yRefsMap[datum.value], value: null, sourceId: brushMeasureSourceId, type: 'measure' }"},{events:"@legend_labels:mouseout, @legend_symbols:mouseout",update:"null"}]:[]]},{name:"brushOut",update:"[{ sourceId: brushXSourceId, data: brushX }, { sourceId: brushSeriesSourceId, data: brushSeries, debounce: { time: 100, strategy: 'on-empty' } },{ sourceId: brushMeasureSourceId, data: brushMeasure, debounce: { time: 100, strategy: 'on-empty' } } ]"},...Se,{name:"yIsBrushing",value:!1})}else M.push({name:"yIsBrushing",value:!1});const Z={$schema:"https://vega.github.io/schema/vega/v5.json",width:G.plotWidth,height:G.plotHeight,autosize:{type:"none",resize:!0,contains:"content"},padding:G.padding,data:[I],scales:[{name:"xscale",type:"band",domain:V?[...p.values]:{data:"values",field:"x"},range:"width",paddingOuter:.05,round:!0},{name:"yscale",nice:!0,range:"height",domain:i.isStack?{data:"values",field:"y1"}:G.yScale.domain??{data:"values",field:"y"}},{name:"color",type:"ordinal",range:"category",domain:D?[...g.values]:{data:"values",field:"series"}},{name:"xOffset",type:"band",domain:D?[...g.values]:{data:"values",field:"series"},range:{signal:`[0,bandwidth('xscale') * ${1-N}]`}}],axes:[{orient:"bottom",scale:"xscale",title:s,...G.xAxis,encode:{labels:{update:{fillOpacity:[{test:"brushXIn ? indexof(brushXIn,datum.value) === -1 : false",value:.35},{value:1}]}}}},...O?[O.axis]:[]],legends:[],marks:q,signals:M};let xe=0;if(v){E?(xe=((le=g.maxString)==null?void 0:le.length)??0,xe=Math.max(xe,c.name.length)):xe=i.yChannel.fields.reduce((Me,J)=>Math.max(Me,J.length),xe);const Se=Math.min(kot,G.totalWidth*Bot,xe*10+20),Pe={titleLimit:Se-20,labelLimit:Se-40,padding:8,offset:4};Z.padding.right=Se,Z.legends.push({fill:"color",title:c?c.name:"",...Pe,encode:{entries:{name:"legend_entries",interactive:!0},labels:{name:"legend_labels",interactive:!0,update:{fillOpacity:[{test:"brushSeriesIn === datum.value",value:1},{test:"brushSeriesIn && brushSeriesIn != datum.value",value:.35},...A?[{test:"length(brushMeasureListIn) > 0 && indexof(brushMeasureListIn, datum.value) > -1",value:1},{test:"length(brushMeasureListIn) > 0 && indexof(brushMeasureListIn, datum.value) === -1",value:.35}]:[],{value:1}]}},symbols:{name:"legend_symbols",interactive:!0,update:{fillOpacity:[{test:"brushSeriesIn === datum.value",value:1},{test:"brushSeriesIn && brushSeriesIn != datum.value",value:.35},{value:1}]}}}})}const oe=(Se,Pe)=>{const Me=Se.allFields.filter(ie=>ie.isAtomicField()&&(ie.isDate()||ie.isTimestamp()));Pe.forEach(ie=>{Me.forEach(Te=>{const $e=ie[Te.name];(typeof $e=="number"||typeof $e=="string")&&(ie[Te.name]=X3(new Date($e),Te.isDate(),Te.timeframe))})});const J=Pe.map(ie=>({__source:ie,x:ie[s],y:ie[o],series:u?ie[u]:o}));return Z.data[0].values=J,J},Y=new Map;return{spec:Z,plotWidth:G.plotWidth,plotHeight:G.plotHeight,totalWidth:G.totalWidth,totalHeight:G.totalHeight,chartType:"bar_chart",mapMalloyDataToChartData:oe,getTooltipData:(Se,Pe)=>{if(Y.has(Se))return Y.get(Se);let Me=null,J=[];const ie=Pe.scale("color"),Te=ne=>{const K=ne.series,ue=E?l:ys(t,K),Be=ne.y;return ue.isAtomicField()?mh(ue,Be):String(Be)};if(Y5(Se)==="x_highlight"){const ne=Se.datum.x;J=Se.datum.v,Me={title:[ne],entries:J.map(K=>({label:K.series,value:Te(K),highlight:!1,color:ie(K.series),entryType:"list-item"}))}}let $e=null;if(Se.datum&&["bars"].includes(Y5(Se))){const ne=Se.datum;$e=ne.series,J=Se.mark.group.datum.v,Me={title:[ne.x],entries:J.map(K=>({label:K.series,value:Te(K),highlight:$e===K.series,color:ie(K.series),entryType:"list-item"}))}}const ke=J.filter(ne=>ne.series===$e);let j=[];if(E&&ke.length===1?j=ke:A?j=J.slice(0,1):!E&&!A&&J.length===1&&(j=J),Me){const ne=Ble({explore:t,records:j,metadata:e}),K=d?Me.entries.findIndex(ue=>ue.highlight)+1:Me.entries.length;Me.entries.splice(K,0,...ne)}return Y.set(Se,Me),Me}}}function jot(t,e){const n=e??t.tagParse().tag,r=n.tag("line_chart");if(!r)throw new Error("Tried to render a bar_chart, but no bar_chart tag was found");const i=r.has("zero_baseline")?r.text("zero_baseline")!=="false":!0,s=!n.has("tooltip"),o={fields:[],type:null},u={fields:[],type:null},a={fields:[],type:null};r.text("x")&&o.fields.push(r.text("x")),r.text("y")?u.fields.push(r.text("y")):r.textArray("y")&&u.fields.push(...r.textArray("y")),r.text("series")&&a.fields.push(r.text("series"));const l=[],c=[],f=[];ML(t,d=>{const{tag:p}=d.tagParse();p.has("x")&&l.push(ji(t,d)),p.has("y")&&c.push(ji(t,d)),p.has("series")&&f.push(ji(t,d))}),l.forEach(d=>{o.fields.push(d)}),c.forEach(d=>{u.fields.push(d)}),f.forEach(d=>{a.fields.push(d)});const x=t.allFields.filter(d=>d.isAtomicField()&&d.sourceWasDimension());if(o.fields.length===0&&x.length>0&&o.fields.push(ji(t,x[0])),u.fields.length===0){const d=t.allFields.find(p=>p.isAtomicField()&&p.sourceWasMeasureLike()&&p.isNumber());d&&u.fields.push(ji(t,d))}if(a.fields.length===0&&x.length>1){const d=x.find(p=>{const g=ji(t,p);return!o.fields.includes(g)});d&&a.fields.push(ji(t,d))}return o.type="nominal",u.type="quantitative",a.type="nominal",{xChannel:o,yChannel:u,seriesChannel:a,zeroBaseline:i,interactive:s}}const Uot=.4,qot=384;function zot(t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[t[n]]=n);return e}function Hot(t,e){var oe;const n=t.tagParse().tag,r=n.tag("line_chart");if(!r)throw new Error("Line chart should only be rendered for line_chart tag");const i=jot(t,n),s=i.xChannel.fields.at(0),o=i.yChannel.fields.at(0),u=i.seriesChannel.fields.at(0);if(!s)throw new Error("Malloy Bar Chart: Missing x field");if(!o)throw new Error("Malloy Bar Chart: Missing y field");const a=ys(t,s),l=ys(t,o),c=u?ys(t,u):null,f=V0(a),x=V0(l),d=c&&V0(c),p=e.field(a),g=c?e.field(c):null,m=i.yChannel.fields.reduce((Y,le)=>{const Se=ys(t,le);return{...Y,[le]:V0(Se)}},{}),y=zot(m),E=!!c,A=i.yChannel.fields.length>1,v=E||A,_="brush-x_"+crypto.randomUUID(),S="brush-series_"+crypto.randomUUID(),b="brush-measure_"+crypto.randomUUID(),C="brush-measure-range_"+crypto.randomUUID();let R=1/0,L=-1/0;for(const Y of i.yChannel.fields){const le=ys(t,Y),Se=e.field(le).min;Se!==null&&(R=Math.min(R,Se));const Pe=e.field(le).max;Pe!==null&&(L=Math.max(L,Pe))}const $=i.zeroBaseline?Math.min(0,R):R,U=i.zeroBaseline?Math.max(0,L):L,z=Ile(t,e,r,{xField:a,yField:l,chartType:"line_chart",getYMinMax:()=>[$,U]}),ee=p.values.size<=20,G=r.text("x","independent")==="false",fe=r.has("x","independent")&&!G,pe=G||ee&&!fe,ae=g&&g.values.size<=20,V=r.text("series","independent")==="false",te=r.has("series","independent")&&!V,se=V||ae&&!te,he=z.yAxis.hidden?null:$le({type:"y",title:i.yChannel.fields.join(", "),tickCount:z.yAxis.tickCount??"ceil(height/40)",labelLimit:z.yAxis.width+10,fieldPath:o,fieldRef:x,brushMeasureRangeSourceId:C,axisSettings:z.yAxis}),D=[],O={name:"series_group",from:{facet:{data:"values",name:"series_facet",groupby:["series"],aggregate:{ops:["count"],as:["count"]}}},type:"group",interactive:!1,marks:[]},P={name:"lines",type:"line",from:{data:"series_facet"},encode:{enter:{x:{scale:"xscale",field:"x"},y:{scale:"yscale",field:"y"},stroke:{scale:"color",field:"series"},strokeWidth:{value:2},zindex:{value:0}},update:{strokeOpacity:[{test:"brushSeriesIn && brushSeriesIn != datum.series",value:.35},{value:1}],zindex:[{test:"brushSeriesIn && brushSeriesIn === datum.series",value:1},{value:0}]}}},W={name:"x_highlight_rule",type:"rule",from:{data:"x_data"},zindex:1,interactive:!1,encode:{enter:{x:{scale:"xscale",field:"x"},y:{value:0},y2:{signal:"height"}},update:{stroke:{value:"#4c72ba"},fill:{value:"#4c72ba"},strokeOpacity:[{test:"brushXIn ? indexof(brushXIn,datum.x) > -1 : false",value:.2},{value:0}]}}},H={name:"x_hit_target_group",type:"group",marks:[{name:"mid_points",type:"symbol",zindex:1,from:{data:"x_data"},interactive:!1,encode:{enter:{fill:{value:"transparent"},size:{value:36},x:{scale:"xscale",field:"x"},y:{signal:"height /2"}}}},{name:"x_hit_target",type:"path",from:{data:"mid_points"},encode:{enter:{fill:{value:"transparent"}}},transform:[{type:"voronoi",x:"datum.x",y:"datum.y",size:[{signal:"width"},{signal:"height"}]}]}]},w={name:"ref_line_targets",type:"symbol",from:{data:"values"},encode:{enter:{x:{scale:"xscale",field:"x"},y:{scale:"yscale",field:"y"},fill:{value:"transparent"},size:{value:256}}}},B={name:"points",type:"symbol",from:{data:"series_facet"},encode:{enter:{x:{scale:"xscale",field:"x"},y:{scale:"yscale",field:"y"},fill:{scale:"color",field:"series"}},update:{fillOpacity:[{test:"brushXIn ? indexof(brushXIn,datum.x) > -1 : false",value:1},{signal:"item.mark.group.datum.count > 1 ? 0 : 1"}]}}};O.marks.push(P),O.marks.push(B),D.push(O),i.interactive&&he&&D.push(...he.interactiveMarks),D.push(W,H,w);const k={name:"values",values:[],transform:[]};A&&(k.transform.push({type:"fold",fields:i.yChannel.fields.map(Y=>`__source.${Y}`),as:["series","y"]}),k.transform.push({type:"formula",as:"series",expr:"replace(datum.series, '__source.', '')"}));const Q=he?he.interactiveSignals:[],I=[{name:"malloyExplore"},{name:"xFieldRefId",value:f},{name:"seriesFieldRefId",value:d},{name:"measureFieldRefId",value:x},{name:"yRefsMap",value:m},{name:"yRefToFieldPath",value:y},{name:"yRefsList",value:Object.values(m)},{name:"brushXSourceId",value:_},{name:"brushSeriesSourceId",value:S},{name:"brushMeasureSourceId",value:b},{name:"brushIn",value:[]},{name:"brushXIn",update:"getMalloyBrush(brushIn, xFieldRefId)"},{name:"brushSeriesIn",update:"getMalloyBrush(brushIn, seriesFieldRefId)"},{name:"brushMeasureIn",update:`getMalloyBrush(brushIn, yRefsList, 'measure') || "empty"`},{name:"brushMeasureRangeIn",update:"getMalloyBrush(brushIn, measureFieldRefId, 'measure-range') || null"},{name:"brushMeasureListIn",update:A?"pluck(getMalloyMeasureBrushes(brushIn, yRefsList, yRefToFieldPath),'fieldPath')":"[]"}];i.interactive&&I.push({name:"brushX",on:f?[{events:"@x_hit_target:mouseover",update:"{ fieldRefId: xFieldRefId, value: [datum.datum.x], sourceId: brushXSourceId, type: 'dimension'}"},{events:"@ref_line_targets:mouseover",update:"{ fieldRefId: xFieldRefId, value: [datum.x], sourceId: brushXSourceId, type: 'dimension'}"},{events:"@x_hit_target:mouseout",update:"null"},{events:"@ref_line_targets:mouseout",update:"null"}]:[]},{name:"brushSeries",on:E&&d?[{events:"@ref_line_targets:mouseover",update:"{ fieldRefId: seriesFieldRefId, value: datum.series, sourceId: brushSeriesSourceId, type: 'dimension' }"},{events:"@ref_line_targets:mouseout",update:"null"},{events:"@legend_labels:mouseover, @legend_symbols:mouseover",update:"{ fieldRefId: seriesFieldRefId, value: datum.value, sourceId: brushSeriesSourceId, type: 'dimension' }"},{events:"@legend_labels:mouseout, @legend_symbols:mouseout",update:"null"}]:[]},{name:"brushMeasure",on:x?[{events:"@ref_line_targets:mouseover",update:"{ fieldRefId: measureFieldRefId, value: [datum.y], sourceId: brushMeasureSourceId, type: 'measure'}"},...(he==null?void 0:he.brushMeasureEvents)??[],{events:"@ref_line_targets:mouseout",update:"null"}]:[]},{name:"brushOut",update:"[{ sourceId: brushXSourceId, data: brushX }, { sourceId: brushSeriesSourceId, data: brushSeries, debounce: { time: 100, strategy: 'on-empty' } }, { sourceId: brushMeasureSourceId, data: brushMeasure } ]"},...Q,{name:"yIsBrushing",value:!1});const q={$schema:"https://vega.github.io/schema/vega/v5.json",width:z.plotWidth,height:z.plotHeight,autosize:{type:"none",resize:!0,contains:"content"},padding:z.padding,data:[k,{name:"x_data",source:"values",transform:[{type:"aggregate",groupby:["x"],fields:["x"],ops:["values"],as:["v"]}]}],scales:[{name:"xscale",type:"point",domain:pe?[...p.values]:{data:"values",field:"x"},range:"width",paddingOuter:.05},{name:"yscale",nice:!0,range:"height",zero:i.zeroBaseline,domain:z.yScale.domain??{data:"values",field:"y"}},{name:"color",type:"ordinal",range:"category",domain:se?[...g.values]:{data:"values",field:"series"}}],axes:[{orient:"bottom",scale:"xscale",title:s,labelOverlap:"greedy",...z.xAxis},...he?[he.axis]:[]],legends:[],marks:D,signals:I};let M=0;if(v){E?(M=((oe=g.maxString)==null?void 0:oe.length)??0,M=Math.max(M,c.name.length)):M=i.yChannel.fields.reduce((Se,Pe)=>Math.max(Se,Pe.length),M);const Y=Math.min(qot,z.totalWidth*Uot,M*10+20),le={titleLimit:Y-20,labelLimit:Y-40,padding:8,offset:4};q.padding.right=Y,q.legends.push({fill:"color",title:c?c.name:"",...le,encode:{entries:{name:"legend_entries",interactive:!0},labels:{name:"legend_labels",interactive:!0,update:{fillOpacity:[{test:"brushSeriesIn === datum.value",value:1},{test:"brushSeriesIn && brushSeriesIn != datum.value",value:.35},...A?[{test:"length(brushMeasureListIn) > 0 && indexof(brushMeasureListIn, datum.value) > -1",value:1},{test:"length(brushMeasureListIn) > 0 && indexof(brushMeasureListIn, datum.value) === -1",value:.35}]:[],{value:1}]}},symbols:{name:"legend_symbols",interactive:!0,update:{fillOpacity:[{test:"brushSeriesIn === datum.value",value:1},{test:"brushSeriesIn && brushSeriesIn != datum.value",value:.35},{value:1}]}}}})}const Z=(Y,le)=>{const Se=Y.allFields.filter(Me=>Me.isAtomicField()&&(Me.isDate()||Me.isTimestamp()));le.forEach(Me=>{Se.forEach(J=>{const ie=Me[J.name];(typeof ie=="number"||typeof ie=="string")&&(Me[J.name]=X3(new Date(ie),J.isDate(),J.timeframe))})});const Pe=le.map(Me=>({__source:Me,x:Me[s],y:Me[o],series:u?Me[u]:o}));return q.data[0].values=Pe,Pe},xe=new Map;return{spec:q,plotWidth:z.plotWidth,plotHeight:z.plotHeight,totalWidth:z.totalWidth,totalHeight:z.totalHeight,chartType:"line_chart",mapMalloyDataToChartData:Z,getTooltipData(Y,le){if(xe.has(Y))return xe.get(Y);const Se=Y5(Y);let Pe=null,Me=[];const J=le.scale("color"),ie=j=>{const ne=j.series,K=E?l:ys(t,ne),ue=j.y;return K.isAtomicField()?mh(K,ue):String(ue)};if(["x_hit_target","ref_line_targets"].includes(Se)){const j=Se==="x_hit_target"?Y.datum.datum.x:Y.datum.x;Me=Se==="x_hit_target"?Y.datum.datum.v:[],Pe={title:[j],entries:Me.map(ne=>({label:ne.series,value:ie(ne),highlight:!1,color:J(ne.series),entryType:"list-item"}))}}let Te=null;if(Y.datum&&["ref_line_targets"].includes(Y5(Y))){const j=Y.datum;Te=j.series,Me=[];for(const ne of Y.mark.items){const K=ne.datum;K.x===j.x&&Me.push(K)}Pe={title:[j.x],entries:Me.map(ne=>({label:ne.series,value:ie(ne),highlight:Te===ne.series,color:J(ne.series),entryType:"list-item"}))}}const $e=Me.filter(j=>j.series===Te);let ke=[];if(E&&$e.length===1?ke=$e:A?ke=Me.slice(0,1):!E&&!A&&Me.length===1&&(ke=Me),Pe){const j=Ble({explore:t,records:ke,metadata:e}),ne=d?Pe.entries.findIndex(K=>K.highlight)+1:Pe.entries.length;Pe.entries.splice(ne,0,...j)}return xe.set(Y,Pe),Pe}}}function Qot(){const t=new WeakMap;return{get:e=>{if(!t.has(e)&&e.isArray()){const n=[];for(const r of e){const i=Object.assign(r.toObject(),{__malloyDataRecord:r});n.push(i)}t.set(e,n)}return t.get(e)}}}function Got(t,e={}){const n=new WeakMap,r=a=>{if(n.has(a))return n.get(a);const l=Bs(a);return n.set(a,l),l},i=Qot(),s=t.data.field,o={fields:{},fieldKeyMap:n,getFieldKey:r,field:a=>o.fields[r(a)],getData:i.get,modelTag:t.modelTag,resultTag:t.tagParse().tag,rootField:s,store:jKe()},u=o.getFieldKey(s);return o.fields[u]={field:s,min:null,max:null,minString:null,maxString:null,values:new Set,maxRecordCt:null,maxUniqueFieldValueCounts:new Map,renderAs:gT(s,t.tagParse().tag)},kle(t.data.field,o),Ple(t.data,o),Object.values(o.fields).forEach(a=>{const l=a.field;l.isExploreField()?Mle(l,l.tagParse().tag,o,e):l.isExplore()&&Mle(l,t.tagParse().tag,o,e)}),o}function kle(t,e){for(const n of t.allFields){const r=e.getFieldKey(n);e.fields[r]={field:n,min:null,max:null,minString:null,maxString:null,values:new Set,maxRecordCt:null,maxUniqueFieldValueCounts:new Map,renderAs:gT(n)},n.isExploreField()&&kle(n,e)}}const Ple=(t,e)=>{let n=0;const r=t.field,i=e.field(r),s=new Map;t.field.allFields.forEach(o=>{s.set(Bs(o),new Set)});for(const o of t){n++;for(const u of t.field.allFields){const a=e.field(u),l=s.get(Bs(u)),c=u.isAtomicField()?o.cell(u).value:void 0;if(MG(u,c)){const f=c;a.min=Math.min(a.min??f,f),a.max=Math.max(a.max??f,f),u.isAtomicField()&&u.sourceWasDimension()&&(a.values.add(f),l.add(f))}else if(jG(u,c)){const f=c;a.values.add(f),l.add(f),(!a.minString||a.minString.length>f.length)&&(a.minString=f),(!a.maxString||a.maxString.length<f.length)&&(a.maxString=f)}else if(pRe(u,c)){const f=Number(c);a.min=Math.min(a.min??f,f),a.max=Math.max(a.max??f,f);const x=X3(c,u.isAtomicField()&&u.isDate(),u.isAtomicField()&&(u.isDate()||u.isTimestamp())?u.timeframe:void 0).toString();(!a.minString||a.minString.length>x.length)&&(a.minString=x),(!a.maxString||a.maxString.length<x.length)&&(a.maxString=x),u.isAtomicField()&&u.sourceWasDimension()&&a.values.add(x)}else if(u.isExploreField()){const f=o.cell(u);f.isArray()&&Ple(f,e)}}}for(const[o,u]of s)i.maxUniqueFieldValueCounts.set(o,Math.max(i.maxUniqueFieldValueCounts.get(o)??0,u.size));i.maxRecordCt=Math.max(i.maxRecordCt??n,n)};function Mle(t,e,n,r){var o,u,a;const i=n.field(t);let s=null;if(FS(e,"bar","bar_chart")?s=Mot(t,n):e.has("line_chart")&&(s=Hot(t,n)),s){const l=J$(vot(),((o=r.getVegaConfigOverride)==null?void 0:o.call(r,s.chartType))??{});i.vegaChartProps={...s,spec:{...s.spec,config:l}},(u=i.vegaChartProps)!=null&&u.spec&&(i.runtime=Qie((a=i.vegaChartProps)==null?void 0:a.spec))}}const jle=FT(),iB=()=>{const t=LT(jle);if(!t)throw new Error("ConfigContext missing a value; did you provide a ConfigProvider?");return t};function Wot(t,{element:e}){const n=Wn(()=>t.result?t.result:t.queryResult&&t.modelDef?new TB.Result(t.queryResult,t.modelDef):null);return st(Wo,{get when(){return n()},get children(){return st(jle.Provider,{get value(){return{onClick:t.onClick,vegaConfigOverride:t.vegaConfigOverride}},get children(){return st(Vot,{get result(){return n()},element:e,get scrollEl(){return t.scrollEl},get vegaConfigOverride(){return t.vegaConfigOverride}})}})}})}function Vot(t){const e=Wn(()=>Got(t.result,{getVegaConfigOverride:t.vegaConfigOverride})),n=()=>{const i=e().modelTag,s=e().resultTag,o=i.tag("theme"),u=s.tag("theme");return{modelTag:i,resultTag:s,modelTheme:o,localTheme:u}};no(()=>{if(t.element){const i=Yot(n().modelTheme,n().localTheme);for(const[s,o]of Object.entries(i))t.element.style.setProperty(s,o)}});const r=()=>Bx({field:t.result.resultExplore,dataColumn:t.result.data,resultMetadata:e(),tag:n().resultTag,customProps:{table:{scrollEl:t.scrollEl},dashboard:{scrollEl:t.scrollEl}}});return st(nse.Provider,{get value(){return e()},get children(){return r().renderValue}})}function eo(t,...e){let n;for(const r of e)if(n=r==null?void 0:r.text(t),typeof n<"u")break;return n??`var(--malloy-theme--${t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()})`}function Yot(t,e){const n={},r=eo("tableRowHeight",e,t),i=eo("tableBodyColor",e,t),s=eo("tableFontSize",e,t),o=eo("tableHeaderColor",e,t),u=eo("tableHeaderWeight",e,t),a=eo("tableBodyWeight",e,t),l=eo("tableBorder",e,t),c=eo("tableBackground",e,t),f=eo("tableGutterSize",e,t),x=eo("tablePinnedBackground",e,t),d=eo("tablePinnedBorder",e,t),p=eo("fontFamily",e,t);return n["--malloy-render--table-row-height"]=r,n["--malloy-render--table-body-color"]=i,n["--malloy-render--table-font-size"]=s,n["--malloy-render--font-family"]=p,n["--malloy-render--table-header-color"]=o,n["--malloy-render--table-header-weight"]=u,n["--malloy-render--table-body-weight"]=a,n["--malloy-render--table-border"]=l,n["--malloy-render--table-background"]=c,n["--malloy-render--table-gutter-size"]=f,n["--malloy-render--table-pinned-background"]=x,n["--malloy-render--table-pinned-border"]=d,n}const Kot=`:host {
1471
+ color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(a=n==null?void 0:n.onChange)==null||a.call(n,i),i}}function UL(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const GKe=(t,e)=>Math.abs(t-e)<1,WKe=(t,e,n)=>{let r;return function(...i){t.clearTimeout(r),r=t.setTimeout(()=>e.apply(this,i),n)}};var y2={};const VKe=t=>t,YKe=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),r=[];for(let i=e;i<=n;i++)r.push(i);return r},KKe=(t,e)=>{const n=t.scrollElement;if(!n)return;const r=t.targetWindow;if(!r)return;const i=o=>{const{width:u,height:a}=o;e({width:Math.round(u),height:Math.round(a)})};if(i(n.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const s=new r.ResizeObserver(o=>{const u=o[0];if(u!=null&&u.borderBoxSize){const a=u.borderBoxSize[0];if(a){i({width:a.inlineSize,height:a.blockSize});return}}i(n.getBoundingClientRect())});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},use={passive:!0},XKe=typeof window>"u"?!0:"onscrollend"in window,JKe=(t,e)=>{const n=t.scrollElement;if(!n)return;const r=t.targetWindow;if(!r)return;let i=0;const s=XKe?()=>{}:WKe(r,()=>{e(i,!1)},t.options.isScrollingResetDelay),o=l=>()=>{const{horizontal:c,isRtl:f}=t.options;i=c?n.scrollLeft*(f&&-1||1):n.scrollTop,s(),e(i,l)},u=o(!0),a=o(!1);return a(),n.addEventListener("scroll",u,use),n.addEventListener("scrollend",a,use),()=>{n.removeEventListener("scroll",u),n.removeEventListener("scrollend",a)}},ZKe=(t,e,n)=>{if(e!=null&&e.borderBoxSize){const r=e.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(t.getBoundingClientRect()[n.options.horizontal?"width":"height"])},eXe=(t,{adjustments:e=0,behavior:n},r)=>{var i,s;const o=t+e;(s=(i=r.scrollElement)==null?void 0:i.scrollTo)==null||s.call(i,{[r.options.horizontal?"left":"top"]:o,behavior:n})};class tXe{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(s=>{this._measureElement(s.target,s)})}));return{disconnect:()=>{var i;return(i=r())==null?void 0:i.disconnect()},observe:i=>{var s;return(s=r())==null?void 0:s.observe(i,{box:"border-box"})},unobserve:i=>{var s;return(s=r())==null?void 0:s.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,i])=>{typeof i>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:VKe,rangeExtractor:YKe,onChange:()=>{},measureElement:ZKe,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,...n}},this.notify=n=>{var r,i;(i=(r=this.options).onChange)==null||i.call(r,this,n)},this.maybeNotify=m2(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:y2.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=s,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const i=new Map,s=new Map;for(let o=r-1;o>=0;o--){const u=n[o];if(i.has(u.lane))continue;const a=s.get(u.lane);if(a==null||u.end>a.end?s.set(u.lane,u):u.end<a.end&&i.set(u.lane,!0),i.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((o,u)=>o.end===u.end?o.index-u.index:o.end-u.end)[0]:void 0},this.getMeasurementOptions=m2(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,r,i,s,o)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:i,getItemKey:s,enabled:o}),{key:!1}),this.getMeasurements=m2(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:i,getItemKey:s,enabled:o},u)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const a=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const l=this.measurementsCache.slice(0,a);for(let c=a;c<n;c++){const f=s(c),x=this.options.lanes===1?l[c-1]:this.getFurthestMeasurement(l,c),d=x?x.end+this.options.gap:r+i,p=u.get(f),g=typeof p=="number"?p:this.options.estimateSize(c),m=d+g,y=x?x.lane:c%this.options.lanes;l[c]={index:c,start:d,size:g,end:m,key:f,lane:y}}return this.measurementsCache=l,l},{key:y2.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=m2(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(n,r,i)=>this.range=n.length>0&&r>0?nXe({measurements:n,outerSize:r,scrollOffset:i}):null,{key:y2.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=m2(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(n,r,i,s)=>r===null?[]:n({startIndex:r.startIndex,endIndex:r.endIndex,overscan:i,count:s}),{key:y2.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,i=n.getAttribute(r);return i?parseInt(i,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const i=this.indexFromElement(n),s=this.measurementsCache[i];if(!s)return;const o=s.key,u=this.elementsCache.get(o);u!==n&&(u&&this.observer.unobserve(u),this.observer.observe(n),this.elementsCache.set(o,n)),n.isConnected&&this.resizeItem(i,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const i=this.measurementsCache[n];if(!i)return;const s=this.itemSizeCache.get(i.key)??i.size,o=r-s;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,o,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&(y2.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",o),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,r)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((r,i)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=m2(()=>[this.getIndexes(),this.getMeasurements()],(n,r)=>{const i=[];for(let s=0,o=n.length;s<o;s++){const u=n[s],a=r[u];i.push(a)}return i},{key:y2.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return UL(r[ase(0,r.length-1,i=>UL(r[i]).start,n)])},this.getOffsetForAlignment=(n,r)=>{const i=this.getSize(),s=this.getScrollOffset();r==="auto"&&(n<=s?r="start":n>=s+i?r="end":r="start"),r==="start"?n=n:r==="end"?n=n-i:r==="center"&&(n=n-i/2);const o=this.options.horizontal?"scrollWidth":"scrollHeight",a=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[o]:this.scrollElement[o]:0)-i;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const s=this.getSize(),o=this.getScrollOffset();if(r==="auto")if(i.end>=o+s-this.options.scrollPaddingEnd)r="end";else if(i.start<=o+this.options.scrollPaddingStart)r="start";else return[o,r];const u=r==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(u,r),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:r="start",behavior:i}={})=>{this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:r="auto",behavior:i}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const s=this.getOffsetForIndex(n,r);if(!s)return;const[o,u]=s;this._scrollToOffset(o,{adjustments:void 0,behavior:i}),i!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const[l]=UL(this.getOffsetForIndex(n,u));GKe(l,this.getScrollOffset())||this.scrollToIndex(n,{align:u,behavior:i})}else this.scrollToIndex(n,{align:u,behavior:i})}))},this.scrollBy=(n,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let i;return r.length===0?i=this.options.paddingStart:i=this.options.lanes===1?((n=r[r.length-1])==null?void 0:n.end)??0:Math.max(...r.slice(-this.options.lanes).map(s=>s.end)),i-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(n,{adjustments:r,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const ase=(t,e,n,r)=>{for(;t<=e;){const i=(t+e)/2|0,s=n(i);if(s<r)t=i+1;else if(s>r)e=i-1;else return i}return t>0?t-1:0};function nXe({measurements:t,outerSize:e,scrollOffset:n}){const r=t.length-1,s=ase(0,r,u=>t[u].start,n);let o=s;for(;o<r&&t[o].end<n+e;)o++;return{startIndex:s,endIndex:o}}function rXe(t){const e=Ac(t),n=new tXe(e),[r,i]=J5(n.getVirtualItems()),[s,o]=_i(n.getTotalSize()),u={get(l,c){switch(c){case"getVirtualItems":return()=>r;case"getTotalSize":return()=>s();default:return Reflect.get(l,c)}}},a=new Proxy(n,u);return a.setOptions(e),Px(()=>{const l=a._didMount();a._willUpdate(),X2(l)}),i0e(()=>{a.setOptions(Ac(e,t,{onChange:(l,c)=>{var f;l._willUpdate(),i(MKe(l.getVirtualItems(),{key:"index"})),o(l.getTotalSize()),(f=t.onChange)==null||f.call(t,l,c)}})),a.measure()}),a}function lse(t){return rXe(Ac({observeElementRect:KKe,observeElementOffset:JKe,scrollToFn:eXe},t))}var iXe=kt("<div class=cell-content>"),sXe=kt('<div class="column-cell th">'),oXe=kt('<div class="column-cell td">'),uXe=kt("<div style=position:sticky;left:0px;height:0px;visibility:hidden;>"),aXe=kt("<div style=position:sticky;top:0px;left:0px;height:0px;visibility:hidden;>"),lXe=kt("<div class=pinned-header-row>"),cXe=kt("<div class=table-row><div class=table-row>"),qL=kt("<div class=table-row>"),fXe=kt('<div class="table-row limit-row table-gutter-left table-gutter-right">Limiting nested table to <!> records'),xXe=kt("<div class=malloy-table>"),dXe=kt("<div class=pinned-header-subrow>");const hXe=navigator.userAgent.toLowerCase().indexOf("chrome")>=0,cse=t=>{const e=()=>{const i=g2().layout,s=t.field.tagParse().tag.tag("column"),o=i.fieldLayout(t.field).width,u=i.fieldLayout(t.field).height,a={};return t.isHeader||(o&&(a.width=`${o}px`,a["min-width"]=`${o}px`,a["max-width"]=`${o}px;`),u&&(a.height=`${u}px`),(s==null?void 0:s.text("word_break"))==="break_all"&&(a["word-break"]="break-all")),a},n=iB(),r=i=>{n.onClick&&n.onClick({field:t.field,displayValue:t.isHeader?t.rawValue:typeof t.value!="function"?t.value:null,value:typeof t.rawValue!="function"?t.rawValue:null,fieldPath:t.field.fieldPath,isHeader:!!t.isHeader,event:i,type:"table-cell"})};return(()=>{var i=iXe();return bB(i,"click",n.onClick?r:void 0),xt(i,()=>t.value),fr(s=>{var o=!!t.isHeader,u=!!t.hideStartGutter,a=!!t.hideEndGutter,l=!!t.tableGutterLeft,c=!!t.tableGutterRight,f=!!t.isChart,x=e(),d=typeof t.value=="string"?t.value:"";return o!==s.e&&i.classList.toggle("header",s.e=o),u!==s.t&&i.classList.toggle("hide-start-gutter",s.t=u),a!==s.a&&i.classList.toggle("hide-end-gutter",s.a=a),l!==s.o&&i.classList.toggle("table-gutter-left",s.o=l),c!==s.i&&i.classList.toggle("table-gutter-right",s.i=c),f!==s.n&&i.classList.toggle("chart",s.n=f),s.s=vc(i,x,s.s),d!==s.h&&Vo(i,"title",s.h=d),s},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),i})()},fse=t=>{const{layout:e}=g2(),n=mx(),r=Xg(t.field),i=Xg(t.field.parentExplore),s=!t.field.parentExplore.isExploreField(),o=r&&(i||s),u=Kg(t.field),a=Kg(t.field.parentExplore),l=u&&(a||s),c=e.fieldLayout(t.field),f=t.isPinned?c.absoluteColumnRange:c.relativeColumnRange,x=c.depth>0&&Xg(t.field)||c.metadata.renderAs==="table",d=c.depth>0&&Kg(t.field)||c.depth===0&&c.metadata.renderAs==="table";return(()=>{var p=sXe();return xt(p,st(cse,{get field(){return t.field},get value(){return t.field.name.replace(/_/g,"_​")},hideStartGutter:o,hideEndGutter:l,tableGutterLeft:x,tableGutterRight:d,isHeader:!0,get rawValue(){return t.field.name}})),fr(g=>{var m=t.isPinned?n.getFieldKey(t.field):void 0,y=!!(t.field.isAtomicField()&&t.field.isNumber()),E=!!t.isPinned,A=`${f[0]+1} / span ${D7(f)}`,v=t.isPinned?void 0:`var(--malloy-render--table-header-height-${c.depth})`;return m!==g.e&&Vo(p,"data-pinned-header",g.e=m),y!==g.t&&p.classList.toggle("numeric",g.t=y),E!==g.a&&p.classList.toggle("pinned-header",g.a=E),A!==g.o&&((g.o=A)!=null?p.style.setProperty("grid-column",A):p.style.removeProperty("grid-column")),v!==g.i&&((g.i=v)!=null?p.style.setProperty("height",v):p.style.removeProperty("height")),g},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),p})()},xse=t=>{let e="",n="";({renderValue:e,renderAs:n}=Bx({field:t.field,dataColumn:t.row.cell(t.field),resultMetadata:mx(),tag:t.field.tagParse().tag,customProps:{table:{rowLimit:100}}}));const i=g2().layout.fieldLayout(t.field),s=i.relativeColumnRange,o={"grid-column":`${s[0]+1} / span ${D7(s)}`,height:"fit-content"};n==="table"?(o.display="grid",o.grid="auto / subgrid"):hXe&&t.field.isAtomicField()&&(o.position="sticky",o.top=`var(--malloy-render--table-header-cumulative-height-${i.depth})`);const u=i.depth>0&&Xg(t.field),a=i.depth>0&&Kg(t.field);return(()=>{var l=oXe();return xt(l,st(vB,{get children(){return[st(Uy,{when:n==="table",children:e}),st(Uy,{when:!0,get children(){return st(cse,{get field(){return t.field},value:e,get hideStartGutter(){return Xg(t.field)},get hideEndGutter(){return Kg(t.field)},tableGutterLeft:u,tableGutterRight:a,get rawValue(){return t.row.cell(t.field).value},isChart:n==="chart"})}})]}})),fr(c=>{var f=!!(t.field.isAtomicField()&&t.field.isNumber()),x=o;return f!==c.e&&l.classList.toggle("numeric",c.e=f),c.t=vc(l,x,c.t),c},{e:void 0,t:void 0}),l})()},pXe=t=>{var pe;const e=Ac({rowLimit:1/0},t),n=g2(),r=mx(),i=n.root&&((pe=e.data.field.tagParse().tag.tag("table"))==null?void 0:pe.text("size"))==="fill",s=Wn(()=>Object.entries(n.layout.fieldHeaderRangeMap).sort((V,te)=>V[1].depth<te[1].depth?-1:V[1].depth>te[1].depth?1:V[1].abs[0]<te[1].abs[0]?-1:V[1].abs[0]>te[1].abs[0]?1:0).filter(([V,te])=>te.depth>=0&&gT(r.fields[V].field.parentExplore)==="table").map(([V,te])=>({fieldKey:V,field:r.fields[V].field,...te}))),o=Wn(()=>Math.max(...s().map(ae=>ae.depth))),u=Wn(()=>Object.entries(n.layout.fieldHeaderRangeMap).filter(([V])=>!r.fields[V].field.isExplore())),a=()=>{const ae=n.layout.fieldLayout(e.data.field).relativeColumnRange,V={"--table-row-span":D7(ae)};if(n.root){let te=0;Object.entries(n.headerSizeStore[0]).sort(([he],[D])=>parseInt(he)-parseInt(D)).forEach(([he,D])=>{V[`--malloy-render--table-header-height-${he}`]=`${D}px`,te+=D,V[`--malloy-render--table-header-cumulative-height-${he}`]=`${te}px`}),V["--total-header-size"]=n.layout.totalHeaderSize;const se=u().map(([he])=>{const D=n.store.columnWidths[he];return i?D?D+"px":"auto":`minmax(${D?D+"px":"auto"}, max-content)`}).join(" ");V["grid-template-columns"]=se}return V},[l,c]=_i(!1),f=Wn(()=>{const ae=[];let V=0;for(const te of e.data){if(V>=e.rowLimit){c(!0);break}ae.push(te),V++}return ae}),x=()=>e.data.field.allFields.filter(ae=>!rse(ae)),d=()=>s().reduce((V,te)=>((V[te.depth]||(V[te.depth]=[])).push(te),V),[]);let p,g;const[m,y]=_i(!1),[E,A]=_i(!1),v=()=>m()&&!E();Px(()=>{p&&g&&(new IntersectionObserver(([te])=>{y(te.intersectionRatio<1)},{threshold:[1]}).observe(p),new IntersectionObserver(([te])=>{A(te.intersectionRatio<1)},{threshold:[1]}).observe(g))});const _=[];Px(()=>{if(n.root){const[ae,V]=n.headerSizeStore,te=new ResizeObserver(se=>{const he=se.reduce((D,O)=>{const N=O.target.getAttribute("data-depth"),P=O.contentRect.height;return typeof N=="string"&&ae[N]!==P&&(D[N]=P),D},{});Object.entries(he).length>0&&V(D=>({...D,...he}))});_.forEach(se=>{te.observe(se)})}});let S;e.scrollEl&&(S=e.scrollEl);let b;const[C,R]=_i(1e3),L=n.root&&!e.disableVirtualization;L&&(b=lse({count:f().length,getScrollElement:()=>S,estimateSize:()=>C()}));const $=b==null?void 0:b.getVirtualItems();let U,z=!1;const ee=()=>{z=!0,setTimeout(()=>{z=!1},2e3)};function G(){const ae=U.querySelectorAll("[data-pinned-header]"),V=[];ae.forEach(te=>{const se=te.getAttribute("data-pinned-header"),he=te.clientWidth,D=n.store.columnWidths[se];(typeof D>"u"||he>D)&&V.push([se,he])}),V.length>0&&n.setStore("columnWidths",tse(te=>{V.forEach(([se,he])=>te[se]=he)}))}Px(()=>{U&&(new ResizeObserver(()=>{z&&G()}).observe(U),requestAnimationFrame(()=>G()))}),Px(()=>{if(n.root){let ae=null;new ResizeObserver(te=>{const[se]=te;!z&&ae!==null&&ae!==se.contentRect.width&&n.setStore(he=>({...he,columnWidths:{}})),ae=se.contentRect.width}).observe(S)}});const fe=()=>({"margin-bottom":`calc(-1 * (var(--malloy-render--table-header-cumulative-height-${o()}) - var(--malloy-render--table-header-height-0)))`});return(()=>{var ae=xXe();return ae.addEventListener("scroll",ee),Yo(V=>{e.scrollEl||(S=V)},ae),ae.classList.toggle("full-width",!!i),xt(ae,st(Wo,{get when(){return n.root},get children(){return[(()=>{var V=uXe(),te=p;return typeof te=="function"?Yo(te,V):p=V,V})(),(()=>{var V=aXe(),te=g;return typeof te=="function"?Yo(te,V):g=V,V})(),(()=>{var V=lXe(),te=U;return typeof te=="function"?Yo(te,V):U=V,xt(V,st(Si,{get each(){return d()},children:(se,he)=>(()=>{var D=dXe();return Yo(O=>_[he()]=O,D),xt(D,st(Si,{each:se,children:O=>st(fse,{get field(){return O.field},isPinned:!0})})),fr(()=>Vo(D,"data-depth",he())),D})()})),fr(se=>vc(V,fe(),se)),V})()]}}),null),xt(ae,st(Wo,{when:L,get children(){var V=cXe(),te=V.firstChild;return V.style.setProperty("width","100%"),V.style.setProperty("position","relative"),te.style.setProperty("height","fit-content"),te.style.setProperty("width","100%"),xt(te,st(Si,{each:$,children:se=>(()=>{var he=qL();return Yo(D=>queueMicrotask(()=>{b.measureElement(D),se.index===0&&R(D.clientHeight)}),he),xt(he,st(Wo,{get when(){return se.index>=0},get children(){return st(Si,{get each(){return x()},children:D=>st(xse,{field:D,get row(){return f()[se.index]}})})}})),fr(()=>Vo(he,"data-index",se.index)),he})()})),fr(se=>{var O;var he=b.getTotalSize()+"px",D=`${((O=$[0])==null?void 0:O.start)??0}px`;return he!==se.e&&((se.e=he)!=null?V.style.setProperty("height",he):V.style.removeProperty("height")),D!==se.t&&((se.t=D)!=null?te.style.setProperty("padding-top",D):te.style.removeProperty("padding-top")),se},{e:void 0,t:void 0}),V}}),null),xt(ae,st(Wo,{when:!L,get children(){return[st(Wo,{get when(){return!n.root},get children(){var V=qL();return xt(V,st(Si,{get each(){return x()},children:te=>st(fse,{field:te})})),V}}),st(Si,{get each(){return f()},children:V=>(()=>{var te=qL();return xt(te,st(Si,{get each(){return x()},children:se=>st(xse,{field:se,row:V})})),te})()}),st(Wo,{get when(){return l()},get children(){var V=fXe(),te=V.firstChild,se=te.nextSibling;return se.nextSibling,xt(V,()=>e.rowLimit,se),V}})]}}),null),fr(V=>{var te=!!n.root,se=!!v(),he=n.root?"table-container":"",D=a();return te!==V.e&&ae.classList.toggle("root",V.e=te),se!==V.t&&ae.classList.toggle("pinned",V.t=se),he!==V.a&&Vo(ae,"part",V.a=he),V.o=vc(ae,D,V.o),V},{e:void 0,t:void 0,a:void 0,o:void 0}),ae})()},gXe=t=>{const e=mx(),n=!!g2(),r=Wn(()=>{if(n)return{...g2(),root:!1};const[i,s]=QKe();return{root:!0,layout:HKe(e,t.data.field),store:i,setStore:s,headerSizeStore:J5({})}});return st(ose.Provider,{get value(){return r()},get children(){return st(pXe,t)}})};SB(["click"]);var mXe=kt('<div class=malloy-list style="text-wrap:wrap;line-height:calc(var(--malloy-render--table-row-height) * 5 / 7 - 1px);">'),yXe=kt("<span>");function EXe(t){if(t.dataColumn.isNull())return"∅";const e=t.tag.tag("list"),n=t.tag.tag("list_detail");if(!e&&!n)throw new Error("Missing tag for List renderer");if(!t.field.isExplore())throw new Error("List renderer: Field must be ExploreField");if(!t.dataColumn.isArray())throw new Error("List renderer: DataColumn must be DataArray");const r=t.field.allFields.filter(u=>{const{tag:a}=u.tagParse();return!a.has("hidden")})[0],i=!!n,s=t.field.allFields.filter(u=>{const{tag:a}=u.tagParse();return!a.has("hidden")})[1],o=[];for(const u of t.dataColumn)o.push(u);return(()=>{var u=mXe();return xt(u,st(Si,{each:o,children:(a,l)=>(()=>{var c=yXe();return xt(c,()=>Bx({field:r,dataColumn:a.cell(r),resultMetadata:t.resultMetadata,tag:r.tagParse().tag}).renderValue,null),xt(c,()=>i&&s&&"("+Bx({field:s,dataColumn:a.cell(s),resultMetadata:t.resultMetadata,tag:s.tagParse().tag}).renderValue+")",null),xt(c,()=>l()<o.length-1&&", ",null),c})()})),u})()}var AXe=kt("<img>");function vXe(t){const e=t.tag.tag("image");if(!e)throw new Error("Missing tag for Image renderer");if(!t.field.isAtomicField())throw new Error("Image renderer: Field must be AtomicField");if(!t.dataColumn.isString())throw new Error("Image renderer: DataColumn must be DataString");const n=e.text("width"),r=e.text("height"),i={};n&&(i.width=n),r&&(i.height=r);let s;const o=e.tag("alt");o&&(s=AW({tag:o,data:t.dataColumn})??o.text());let u;return t.dataColumn.isNull()||(u=t.dataColumn.value),(()=>{var a=AXe();return vc(a,i),Vo(a,"src",u),Vo(a,"alt",s),a})()}var _Xe=kt("<div class=dashboard-item><div class=dashboard-item-title></div><div class=dashboard-item-value>"),SXe=kt("<div class=malloy-dashboard><div><div>"),bXe=kt("<div class=dashboard-row><div class=dashboard-row-header><div class=dashboard-row-header-dimension-list></div><div class=dashboard-row-header-separator>"),CXe=kt("<div class=dashboard-dimension-wrapper><div class=dashboard-dimension-name></div><div class=dashboard-dimension-value>"),TXe=kt("<div class=dashboard-row-body>");function RXe(t){const e=Bx({field:t.field,dataColumn:t.row.cell(t.field),tag:t.field.tagParse().tag,resultMetadata:t.resultMetadata,customProps:{table:{disableVirtualization:!t.maxTableHeight}}}),n=iB(),r=s=>{n.onClick&&n.onClick({field:t.field,displayValue:typeof e.renderValue!="function"?e.renderValue:null,value:t.row.cell(t.field).value,fieldPath:t.field.fieldPath,isHeader:!1,event:s,type:"dashboard-item"})},i={};return e.renderAs==="table"&&t.maxTableHeight&&(i["max-height"]=`${t.maxTableHeight}px`),(()=>{var s=_Xe(),o=s.firstChild,u=o.nextSibling;return bB(s,"click",n.onClick?r:void 0),xt(o,()=>t.field.name),vc(u,i),xt(u,()=>e.renderValue),fr(()=>u.classList.toggle("dashboard-item-value-measure",!!t.isMeasure)),s})()}function OXe(t){const e=()=>t.data.field,n=e().tagParse().tag.tag("dashboard");let r=361;const i=n==null?void 0:n.tag("table","max_height");(i==null?void 0:i.text())==="none"?r=null:i!=null&&i.numeric()&&(r=i.numeric());const s=()=>e().allFields.filter(d=>!d.tagParse().tag.has("hidden")&&d.isAtomicField()&&d.sourceWasDimension()),o=()=>{const d=[],p=[];for(const g of e().allFields)g.tagParse().tag.has("hidden")||(g.isAtomicField()&&g.sourceWasMeasureLike()?d.push(g):(!g.isAtomicField()||!g.sourceWasDimension())&&p.push(g));return[...d,...p]},u=()=>{const d=[[]];for(const p of o()){const{tag:g}=p.tagParse();g.has("break")&&d.push([]),d.at(-1).push(p)}return d},a=Wn(()=>{const d=[];for(const p of t.data)d.push(p);return d});let l;t.scrollEl&&(l=t.scrollEl);const c=lse({count:a().length,getScrollElement:()=>l,estimateSize:()=>192}),f=c.getVirtualItems(),x=mx();return(()=>{var d=SXe(),p=d.firstChild,g=p.firstChild;return Yo(m=>{t.scrollEl||(l=m)},d),p.style.setProperty("width","100%"),p.style.setProperty("position","relative"),g.style.setProperty("height","fit-content"),g.style.setProperty("width","100%"),xt(g,st(Si,{each:f,children:m=>(()=>{var y=bXe(),E=y.firstChild,A=E.firstChild;return Yo(v=>queueMicrotask(()=>c.measureElement(v)),y),xt(A,st(Si,{get each(){return s()},children:v=>(()=>{var _=CXe(),S=_.firstChild,b=S.nextSibling;return xt(S,()=>v.name),xt(b,()=>Bx({field:v,dataColumn:a()[m.index].cell(v),tag:v.tagParse().tag,resultMetadata:x}).renderValue),_})()})),xt(y,st(Si,{get each(){return u()},children:v=>(()=>{var _=TXe();return xt(_,st(Si,{each:v,children:S=>st(RXe,{field:S,get row(){return a()[m.index]},resultMetadata:x,get isMeasure(){return Wn(()=>!!S.isAtomicField())()&&S.sourceWasMeasureLike()},maxTableHeight:r})})),_})()}),null),fr(()=>Vo(y,"data-index",m.index)),y})()})),fr(m=>{var A;var y=c.getTotalSize()+"px",E=`${((A=f[0])==null?void 0:A.start)??0}px`;return y!==m.e&&((m.e=y)!=null?p.style.setProperty("height",y):p.style.removeProperty("height")),E!==m.t&&((m.t=E)!=null?g.style.setProperty("padding-top",E):g.style.removeProperty("padding-top")),m},{e:void 0,t:void 0}),d})()}SB(["click"]),Array.prototype.flat||Object.defineProperty(Array.prototype,"flat",{configurable:!0,value:function t(){var e=isNaN(arguments[0])?1:Number(arguments[0]);return e?Array.prototype.reduce.call(this,function(n,r){return Array.isArray(r)?n.push.apply(n,t.call(r,e-1)):n.push(r),n},[]):Array.prototype.slice.call(this)},writable:!0}),Array.prototype.flatMap||Object.defineProperty(Array.prototype,"flatMap",{configurable:!0,value:function(t){return Array.prototype.map.apply(this,arguments).flat()},writable:!0});var dse={exports:{}};(function(t){var e=function(){function n(x,d){return d!=null&&x instanceof d}var r;try{r=Map}catch{r=function(){}}var i;try{i=Set}catch{i=function(){}}var s;try{s=Promise}catch{s=function(){}}function o(x,d,p,g,m){typeof d=="object"&&(p=d.depth,g=d.prototype,m=d.includeNonEnumerable,d=d.circular);var y=[],E=[],A=typeof Buffer<"u";typeof d>"u"&&(d=!0),typeof p>"u"&&(p=1/0);function v(_,S){if(_===null)return null;if(S===0)return _;var b,C;if(typeof _!="object")return _;if(n(_,r))b=new r;else if(n(_,i))b=new i;else if(n(_,s))b=new s(function(pe,ae){_.then(function(V){pe(v(V,S-1))},function(V){ae(v(V,S-1))})});else if(o.__isArray(_))b=[];else if(o.__isRegExp(_))b=new RegExp(_.source,f(_)),_.lastIndex&&(b.lastIndex=_.lastIndex);else if(o.__isDate(_))b=new Date(_.getTime());else{if(A&&Buffer.isBuffer(_))return Buffer.allocUnsafe?b=Buffer.allocUnsafe(_.length):b=new Buffer(_.length),_.copy(b),b;n(_,Error)?b=Object.create(_):typeof g>"u"?(C=Object.getPrototypeOf(_),b=Object.create(C)):(b=Object.create(g),C=g)}if(d){var R=y.indexOf(_);if(R!=-1)return E[R];y.push(_),E.push(b)}n(_,r)&&_.forEach(function(pe,ae){var V=v(ae,S-1),te=v(pe,S-1);b.set(V,te)}),n(_,i)&&_.forEach(function(pe){var ae=v(pe,S-1);b.add(ae)});for(var L in _){var $;C&&($=Object.getOwnPropertyDescriptor(C,L)),!($&&$.set==null)&&(b[L]=v(_[L],S-1))}if(Object.getOwnPropertySymbols)for(var U=Object.getOwnPropertySymbols(_),L=0;L<U.length;L++){var z=U[L],ee=Object.getOwnPropertyDescriptor(_,z);ee&&!ee.enumerable&&!m||(b[z]=v(_[z],S-1),ee.enumerable||Object.defineProperty(b,z,{enumerable:!1}))}if(m)for(var G=Object.getOwnPropertyNames(_),L=0;L<G.length;L++){var fe=G[L],ee=Object.getOwnPropertyDescriptor(_,fe);ee&&ee.enumerable||(b[fe]=v(_[fe],S-1),Object.defineProperty(b,fe,{enumerable:!1}))}return b}return v(x,p)}o.clonePrototype=function(d){if(d===null)return null;var p=function(){};return p.prototype=d,new p};function u(x){return Object.prototype.toString.call(x)}o.__objToStr=u;function a(x){return typeof x=="object"&&u(x)==="[object Date]"}o.__isDate=a;function l(x){return typeof x=="object"&&u(x)==="[object Array]"}o.__isArray=l;function c(x){return typeof x=="object"&&u(x)==="[object RegExp]"}o.__isRegExp=c;function f(x){var d="";return x.global&&(d+="g"),x.ignoreCase&&(d+="i"),x.multiline&&(d+="m"),d}return o.__getRegExpFlags=f,o}();t.exports&&(t.exports=e)})(dse);var DXe=dse.exports;const wXe=zy(DXe);var NXe=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,s;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;i--!==0;){var o=s[i];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n};const FXe=zy(NXe);var LXe=function(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});var n=typeof e.cycles=="boolean"?e.cycles:!1,r=e.cmp&&function(s){return function(o){return function(u,a){var l={key:u,value:o[u]},c={key:a,value:o[a]};return s(l,c)}}}(e.cmp),i=[];return function s(o){if(o&&o.toJSON&&typeof o.toJSON=="function"&&(o=o.toJSON()),o!==void 0){if(typeof o=="number")return isFinite(o)?""+o:"null";if(typeof o!="object")return JSON.stringify(o);var u,a;if(Array.isArray(o)){for(a="[",u=0;u<o.length;u++)u&&(a+=","),a+=s(o[u])||"null";return a+"]"}if(o===null)return"null";if(i.indexOf(o)!==-1){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var l=i.push(o)-1,c=Object.keys(o).sort(r&&r(o));for(a="",u=0;u<c.length;u++){var f=c[u],x=s(o[f]);x&&(a&&(a+=","),a+=JSON.stringify(f)+":"+x)}return i.splice(l,1),"{"+a+"}"}}(t)};const zL=zy(LXe);function HL(t){return!!t.or}function QL(t){return!!t.and}function GL(t){return!!t.not}function eC(t,e){if(GL(t))eC(t.not,e);else if(QL(t))for(const n of t.and)eC(n,e);else if(HL(t))for(const n of t.or)eC(n,e);else e(t)}function E2(t,e){return GL(t)?{not:E2(t.not,e)}:QL(t)?{and:t.and.map(n=>E2(n,e))}:HL(t)?{or:t.or.map(n=>E2(n,e))}:e(t)}const fl=FXe,ct=wXe;function IXe(t){throw new Error(t)}function ey(t,e){const n={};for(const r of e)Ze(t,r)&&(n[r]=t[r]);return n}function Ys(t,e){const n=Object.assign({},t);for(const r of e)delete n[r];return n}Set.prototype.toJSON=function(){return`Set(${[...this].map(t=>zL(t)).join(",")})`};const on=zL;function Rt(t){if(rn(t))return t;const e=ze(t)?t:zL(t);if(e.length<250)return e;let n=0;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);n=(n<<5)-n+i,n=n&n}return n}function hse(t){return t===!1||t===null}function Ot(t,e){return t.includes(e)}function A2(t,e){let n=0;for(const[r,i]of t.entries())if(e(i,r,n++))return!0;return!1}function pse(t,e){let n=0;for(const[r,i]of t.entries())if(!e(i,r,n++))return!1;return!0}function $Xe(t,...e){for(const n of e)BXe(t,n??{});return t}function BXe(t,e){for(const n of Re(e))BS(t,n,e[n],!0)}function xl(t,e){const n=[],r={};let i;for(const s of t)i=e(s),!(i in r)&&(r[i]=1,n.push(s));return n}function kXe(t,e){if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}function gse(t,e){for(const n of t)if(e.has(n))return!0;return!1}function mse(t){const e=new Set;for(const n of t){const i=ka(n).map((o,u)=>u===0?o:`[${o}]`),s=i.map((o,u)=>i.slice(0,u+1).join(""));for(const o of s)e.add(o)}return e}function yse(t,e){return t===void 0||e===void 0?!0:gse(mse(t),mse(e))}function Kt(t){return Re(t).length===0}const Re=Object.keys,mi=Object.values,yx=Object.entries;function tC(t){return t===!0||t===!1}function yn(t){const e=t.replace(/\W/g,"_");return(t.match(/^\d+/)?"_":"")+e}function nC(t,e){return GL(t)?`!(${nC(t.not,e)})`:QL(t)?`(${t.and.map(n=>nC(n,e)).join(") && (")})`:HL(t)?`(${t.or.map(n=>nC(n,e)).join(") || (")})`:e(t)}function WL(t,e){if(e.length===0)return!0;const n=e.shift();return n in t&&WL(t[n],e)&&delete t[n],Kt(t)}function rC(t){return t.charAt(0).toUpperCase()+t.substr(1)}function Ese(t,e="datum"){const n=ka(t),r=[];for(let i=1;i<=n.length;i++){const s=`[${n.slice(0,i).map(Fe).join("][")}]`;r.push(`${e}${s}`)}return r.join(" && ")}function PXe(t,e="datum"){return`${e}[${Fe(ka(t).join("."))}]`}function MXe(t){return t.replace(/(\[|\]|\.|'|")/g,"\\$1")}function ko(t){return`${ka(t).map(MXe).join("\\.")}`}function v2(t,e,n){return t.replace(new RegExp(e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),n)}function Ase(t){return`${ka(t).join(".")}`}function ty(t){return t?ka(t).length:0}function Qn(...t){for(const e of t)if(e!==void 0)return e}let jXe=42;function UXe(t){const e=++jXe;return t?String(t)+e:e}function qXe(t){return zXe(t)?t:`__${t}`}function zXe(t){return t.startsWith("__")}function iC(t){if(t!==void 0)return(t%360+360)%360}function VL(t){return rn(t)?!0:!isNaN(t)&&!isNaN(parseFloat(t))}var ny=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const dl="row",hl="column",sC="facet",En="x",ur="y",Po="x2",Ku="y2",Y0="xOffset",_2="yOffset",Xu="radius",pl="radius2",Mo="theta",gl="theta2",Ju="latitude",Zu="longitude",jo="latitude2",Ks="longitude2",qi="color",ea="fill",ta="stroke",zi="shape",ml="size",Ex="angle",yl="opacity",K0="fillOpacity",X0="strokeOpacity",J0="strokeWidth",Z0="strokeDash",ry="text",iy="order",sy="detail",oC="key",Ax="tooltip",uC="href",aC="url",lC="description",HXe={x:1,y:1,x2:1,y2:1},vse={theta:1,theta2:1,radius:1,radius2:1};function _se(t){return t in vse}const YL={longitude:1,longitude2:1,latitude:1,latitude2:1};function QXe(t){switch(t){case Ju:return"y";case jo:return"y2";case Zu:return"x";case Ks:return"x2"}}function GXe(t){return t in YL}const WXe=Re(YL),KL=Object.assign(Object.assign(Object.assign(Object.assign({},HXe),vse),YL),{xOffset:1,yOffset:1,color:1,fill:1,stroke:1,opacity:1,fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeDash:1,size:1,angle:1,shape:1,order:1,text:1,detail:1,key:1,tooltip:1,href:1,url:1,description:1});function S2(t){return t===qi||t===ea||t===ta}const Sse={row:1,column:1,facet:1},Xs=Re(Sse),XL=Object.assign(Object.assign({},KL),Sse),VXe=Re(XL),YXe=ny(XL,["order","detail","tooltip"]),KXe=ny(YXe,["row","column","facet"]);function XXe(t){return!!KXe[t]}function bse(t){return!!XL[t]}const JXe=[Po,Ku,jo,Ks,gl,pl];function Cse(t){return vx(t)!==t}function vx(t){switch(t){case Po:return En;case Ku:return ur;case jo:return Ju;case Ks:return Zu;case gl:return Mo;case pl:return Xu}return t}function ec(t){if(_se(t))switch(t){case Mo:return"startAngle";case gl:return"endAngle";case Xu:return"outerRadius";case pl:return"innerRadius"}return t}function El(t){switch(t){case En:return Po;case ur:return Ku;case Ju:return jo;case Zu:return Ks;case Mo:return gl;case Xu:return pl}}function Hi(t){switch(t){case En:case Po:return"width";case ur:case Ku:return"height"}}function ZXe(t){switch(t){case En:return"xOffset";case ur:return"yOffset";case Po:return"x2Offset";case Ku:return"y2Offset";case Mo:return"thetaOffset";case Xu:return"radiusOffset";case gl:return"theta2Offset";case pl:return"radius2Offset"}}function Tse(t){switch(t){case En:return"xOffset";case ur:return"yOffset"}}function Rse(t){switch(t){case"xOffset":return"x";case"yOffset":return"y"}}const eJe=Re(KL),JL=ny(KL,["x","y","x2","y2","xOffset","yOffset","latitude","longitude","latitude2","longitude2","theta","theta2","radius","radius2"]),tJe=Re(JL),ZL={x:1,y:1},na=Re(ZL);function Sr(t){return t in ZL}const eI={theta:1,radius:1},nJe=Re(eI);function cC(t){return t==="width"?En:ur}const Ose={xOffset:1,yOffset:1};function b2(t){return t in Ose}const Dse=ny(JL,["text","tooltip","href","url","description","detail","key","order"]),rJe=Re(Dse);function iJe(t){return!!JL[t]}function sJe(t){switch(t){case qi:case ea:case ta:case ml:case zi:case yl:case J0:case Z0:return!0;case K0:case X0:case Ex:return!1}}const wse=Object.assign(Object.assign(Object.assign(Object.assign({},ZL),eI),Ose),Dse),fC=Re(wse);function tc(t){return!!wse[t]}function oJe(t,e){return aJe(t)[e]}const Nse={arc:"always",area:"always",bar:"always",circle:"always",geoshape:"always",image:"always",line:"always",rule:"always",point:"always",rect:"always",square:"always",trail:"always",text:"always",tick:"always"},uJe=ny(Nse,["geoshape"]);function aJe(t){switch(t){case qi:case ea:case ta:case lC:case sy:case oC:case Ax:case uC:case iy:case yl:case K0:case X0:case J0:case sC:case dl:case hl:return Nse;case En:case ur:case Y0:case _2:case Ju:case Zu:return uJe;case Po:case Ku:case jo:case Ks:return{area:"always",bar:"always",image:"always",rect:"always",rule:"always",circle:"binned",point:"binned",square:"binned",tick:"binned",line:"binned",trail:"binned"};case ml:return{point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",text:"always",line:"always",trail:"always"};case Z0:return{line:"always",point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",geoshape:"always"};case zi:return{point:"always",geoshape:"always"};case ry:return{text:"always"};case Ex:return{point:"always",square:"always",text:"always"};case aC:return{image:"always"};case Mo:return{text:"always",arc:"always"};case Xu:return{text:"always",arc:"always"};case gl:case pl:return{arc:"always"}}}function tI(t){switch(t){case En:case ur:case Mo:case Xu:case Y0:case _2:case ml:case Ex:case J0:case yl:case K0:case X0:case Po:case Ku:case gl:case pl:return;case sC:case dl:case hl:case zi:case Z0:case ry:case Ax:case uC:case aC:case lC:return"discrete";case qi:case ea:case ta:return"flexible";case Ju:case Zu:case jo:case Ks:case sy:case oC:case iy:return}}const lJe={argmax:1,argmin:1,average:1,count:1,distinct:1,product: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},cJe={count:1,min:1,max:1};function Al(t){return!!t&&!!t.argmin}function nc(t){return!!t&&!!t.argmax}function nI(t){return ze(t)&&!!lJe[t]}const fJe=new Set(["count","valid","missing","distinct"]);function Fse(t){return ze(t)&&fJe.has(t)}function xJe(t){return ze(t)&&Ot(["min","max"],t)}const dJe=new Set(["count","sum","distinct","valid","missing"]),hJe=new Set(["mean","average","median","q1","q3","min","max"]);function Lse(t){return yh(t)&&(t=wC(t,void 0)),"bin"+Re(t).map(e=>xC(t[e])?yn(`_${e}_${yx(t[e])}`):yn(`_${e}_${t[e]}`)).join("")}function en(t){return t===!0||_x(t)&&!t.binned}function yi(t){return t==="binned"||_x(t)&&t.binned===!0}function _x(t){return Qe(t)}function xC(t){return t==null?void 0:t.param}function Ise(t){switch(t){case dl:case hl:case ml:case qi:case ea:case ta:case J0:case yl:case K0:case X0:case zi:return 6;case Z0:return 4;default:return 10}}function oy(t){return t&&!!t.expr}function Qi(t){const e=Re(t||{}),n={};for(const r of e)n[r]=Es(t[r]);return n}var pJe=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function $se(t){const{anchor:e,frame:n,offset:r,orient:i,angle:s,limit:o,color:u,subtitleColor:a,subtitleFont:l,subtitleFontSize:c,subtitleFontStyle:f,subtitleFontWeight:x,subtitleLineHeight:d,subtitlePadding:p}=t,g=pJe(t,["anchor","frame","offset","orient","angle","limit","color","subtitleColor","subtitleFont","subtitleFontSize","subtitleFontStyle","subtitleFontWeight","subtitleLineHeight","subtitlePadding"]),m=Object.assign(Object.assign({},g),u?{fill:u}:{}),y=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e?{anchor:e}:{}),n?{frame:n}:{}),r?{offset:r}:{}),i?{orient:i}:{}),s!==void 0?{angle:s}:{}),o!==void 0?{limit:o}:{}),E=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a?{subtitleColor:a}:{}),l?{subtitleFont:l}:{}),c?{subtitleFontSize:c}:{}),f?{subtitleFontStyle:f}:{}),x?{subtitleFontWeight:x}:{}),d?{subtitleLineHeight:d}:{}),p?{subtitlePadding:p}:{}),A=ey(t,["align","baseline","dx","dy","limit"]);return{titleMarkConfig:m,subtitleMarkConfig:A,nonMarkTitleProperties:y,subtitle:E}}function rc(t){return ze(t)||be(t)&&ze(t[0])}function Ye(t){return t&&!!t.signal}function ic(t){return!!t.step}function gJe(t){return be(t)?!1:"fields"in t&&!("data"in t)}function mJe(t){return be(t)?!1:"fields"in t&&"data"in t}function vl(t){return be(t)?!1:"field"in t&&"data"in t}const yJe=Re({aria:1,description:1,ariaRole:1,ariaRoleDescription:1,blend:1,opacity:1,fill:1,fillOpacity:1,stroke:1,strokeCap:1,strokeWidth:1,strokeOpacity:1,strokeDash:1,strokeDashOffset:1,strokeJoin:1,strokeOffset:1,strokeMiterLimit:1,startAngle:1,endAngle:1,padAngle:1,innerRadius:1,outerRadius: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,lineBreak:1,lineHeight:1,cursor:1,href:1,tooltip:1,cornerRadius:1,cornerRadiusTopLeft:1,cornerRadiusTopRight:1,cornerRadiusBottomLeft:1,cornerRadiusBottomRight:1,aspect:1,width:1,height:1,url:1,smooth:1}),EJe={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},rI=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"];var iI=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Bse(t){const e=be(t.condition)?t.condition.map(kse):kse(t.condition);return Object.assign(Object.assign({},Es(t)),{condition:e})}function Es(t){if(oy(t)){const{expr:e}=t,n=iI(t,["expr"]);return Object.assign({signal:e},n)}return t}function kse(t){if(oy(t)){const{expr:e}=t,n=iI(t,["expr"]);return Object.assign({signal:e},n)}return t}function un(t){if(oy(t)){const{expr:e}=t,n=iI(t,["expr"]);return Object.assign({signal:e},n)}return Ye(t)?t:t!==void 0?{value:t}:void 0}function AJe(t){return Ye(t)?t.signal:Fe(t)}function Pse(t){return Ye(t)?t.signal:Fe(t.value)}function _l(t){return Ye(t)?t.signal:t==null?null:Fe(t)}function vJe(t,e,n){for(const r of n){const i=Sx(r,e.markDef,e.config);i!==void 0&&(t[r]=un(i))}return t}function Mse(t){var e;return[].concat(t.type,(e=t.style)!==null&&e!==void 0?e:[])}function jt(t,e,n,r={}){const{vgChannel:i,ignoreVgConfig:s}=r;return i&&e[i]!==void 0?e[i]:e[t]!==void 0?e[t]:s&&(!i||i===t)?void 0:Sx(t,e,n,r)}function Sx(t,e,n,{vgChannel:r}={}){return Qn(r?dC(t,e,n.style):void 0,dC(t,e,n.style),r?n[e.type][r]:void 0,n[e.type][t],r?n.mark[r]:n.mark[t])}function dC(t,e,n){return jse(t,Mse(e),n)}function jse(t,e,n){e=qe(e);let r;for(const i of e){const s=n[i];s&&s[t]!==void 0&&(r=s[t])}return r}function Use(t,e){return qe(t).reduce((n,r)=>{var i;return n.field.push(Ie(r,e)),n.order.push((i=r.sort)!==null&&i!==void 0?i:"ascending"),n},{field:[],order:[]})}function qse(t,e){const n=[...t];return e.forEach(r=>{for(const i of n)if(fl(i,r))return;n.push(r)}),n}function zse(t,e){return fl(t,e)||!e?t:t?[...qe(t),...qe(e)].join(", "):e}function Hse(t,e){const n=t.value,r=e.value;if(n==null||r===null)return{explicit:t.explicit,value:null};if((rc(n)||Ye(n))&&(rc(r)||Ye(r)))return{explicit:t.explicit,value:zse(n,r)};if(rc(n)||Ye(n))return{explicit:t.explicit,value:n};if(rc(r)||Ye(r))return{explicit:t.explicit,value:r};if(!rc(n)&&!Ye(n)&&!rc(r)&&!Ye(r))return{explicit:t.explicit,value:qse(n,r)};throw new Error("It should never reach here")}function sI(t){return`Invalid specification ${on(t)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}const _Je='Autosize "fit" only works for single views and layered views.';function Qse(t){return`${t=="width"?"Width":"Height"} "container" only works for single views and layered views.`}function Gse(t){const e=t=="width"?"Width":"Height",n=t=="width"?"x":"y";return`${e} "container" only works well with autosize "fit" or "fit-${n}".`}function Wse(t){return t?`Dropping "fit-${t}" because spec has discrete ${Hi(t)}.`:'Dropping "fit" because spec has discrete size.'}function oI(t){return`Unknown field for ${t}. Cannot calculate view size.`}function Vse(t){return`Cannot project a selection on encoding channel "${t}", which has no field.`}function SJe(t,e){return`Cannot project a selection on encoding channel "${t}" as it uses an aggregate function ("${e}").`}function bJe(t){return`The "nearest" transform is not supported for ${t} marks.`}function Yse(t){return`Selection not supported for ${t} yet.`}function CJe(t){return`Cannot find a selection named "${t}".`}const TJe="Scale bindings are currently only supported for scales with unbinned, continuous domains.",RJe="Legend bindings are only supported for selections over an individual field or encoding channel.";function OJe(t){return`Lookups can only be performed on selection parameters. "${t}" is a variable parameter.`}function DJe(t){return`Cannot define and lookup the "${t}" selection in the same view. Try moving the lookup into a second, layered view?`}const wJe="The same selection must be used to override scale domains in a layered view.",NJe='Interval selections should be initialized using "x" and/or "y" keys.';function FJe(t){return`Unknown repeated value "${t}".`}function Kse(t){return`The "columns" property cannot be used when "${t}" has nested row/column.`}const LJe="Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415).";function IJe(t){return`Unrecognized parse "${t}".`}function Xse(t,e,n){return`An ancestor parsed field "${t}" as ${n} but a child wants to parse the field as ${e}.`}const $Je="Attempt to add the same child twice.";function BJe(t){return`Ignoring an invalid transform: ${on(t)}.`}const kJe='If "from.fields" is not specified, "as" has to be a string that specifies the key to be used for the data from the secondary source.';function Jse(t){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${t} are dropped.`}function PJe(t){const{parentProjection:e,projection:n}=t;return`Layer's shared projection ${on(e)} is overridden by a child projection ${on(n)}.`}const MJe="Arc marks uses theta channel rather than angle, replacing angle with theta.";function jJe(t){return`${t}Offset dropped because ${t} is continuous`}function UJe(t){return`There is no ${t} encoding. Replacing ${t}Offset encoding as ${t}.`}function qJe(t,e,n){return`Channel ${t} is a ${e}. Converted to {value: ${on(n)}}.`}function Zse(t){return`Invalid field type "${t}".`}function zJe(t,e){return`Invalid field type "${t}" for aggregate: "${e}", using "quantitative" instead.`}function HJe(t){return`Invalid aggregation operator "${t}".`}function eoe(t,e){const{fill:n,stroke:r}=e;return`Dropping color ${t} as the plot also has ${n&&r?"fill and stroke":n?"fill":"stroke"}.`}function QJe(t){return`Position range does not support relative band size for ${t}.`}function uI(t,e){return`Dropping ${on(t)} from channel "${e}" since it does not contain any data field, datum, value, or signal.`}const GJe="Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.";function hC(t,e,n){return`${t} dropped as it is incompatible with "${e}".`}function WJe(t){return`${t} encoding has no scale, so specified scale is ignored.`}function VJe(t){return`${t}-encoding is dropped as ${t} is not a valid encoding channel.`}function YJe(t){return`${t} encoding should be discrete (ordinal / nominal / binned).`}function KJe(t){return`${t} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function XJe(t){return`Facet encoding dropped as ${t.join(" and ")} ${t.length>1?"are":"is"} also specified.`}function aI(t,e){return`Using discrete channel "${t}" to encode "${e}" field can be misleading as it does not encode ${e==="ordinal"?"order":"magnitude"}.`}function JJe(t){return`The ${t} for range marks cannot be an expression`}function ZJe(t,e){return`Line mark is for continuous lines and thus cannot be used with ${t&&e?"x2 and y2":t?"x2":"y2"}. We will use the rule mark (line segments) instead.`}function eZe(t,e){return`Specified orient "${t}" overridden with "${e}".`}function tZe(t){return`Cannot use the scale property "${t}" with non-color channel.`}function nZe(t){return`Cannot use the relative band size with ${t} scale.`}function rZe(t){return`Using unaggregated domain with raw field has no effect (${on(t)}).`}function iZe(t){return`Unaggregated domain not applicable for "${t}" since it produces values outside the origin domain of the source data.`}function sZe(t){return`Unaggregated domain is currently unsupported for log scale (${on(t)}).`}function oZe(t){return`Cannot apply size to non-oriented mark "${t}".`}function uZe(t,e,n){return`Channel "${t}" does not work with "${e}" scale. We are using "${n}" scale instead.`}function aZe(t,e){return`FieldDef does not work with "${t}" scale. We are using "${e}" scale instead.`}function toe(t,e,n){return`${n}-scale's "${e}" is dropped as it does not work with ${t} scale.`}function noe(t){return`The step for "${t}" is dropped because the ${t==="width"?"x":"y"} is continuous.`}function lZe(t,e,n,r){return`Conflicting ${e.toString()} property "${t.toString()}" (${on(n)} and ${on(r)}). Using ${on(n)}.`}function cZe(t,e,n,r){return`Conflicting ${e.toString()} property "${t.toString()}" (${on(n)} and ${on(r)}). Using the union of the two domains.`}function fZe(t){return`Setting the scale to be independent for "${t}" means we also have to set the guide (axis or legend) to be independent.`}function xZe(t){return`Dropping sort property ${on(t)} as unioned domains only support boolean or op "count", "min", and "max".`}const roe="Domains that should be unioned has conflicting sort properties. Sort will be set to true.",dZe="Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect.",hZe="Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect.",pZe="Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.";function gZe(t){return`Cannot stack "${t}" if there is already "${t}2".`}function mZe(t){return`Cannot stack non-linear scale (${t}).`}function yZe(t){return`Stacking is applied even though the aggregate function is non-summative ("${t}").`}function pC(t,e){return`Invalid ${t}: ${on(e)}.`}function EZe(t){return`Dropping day from datetime ${on(t)} as day cannot be combined with other units.`}function AZe(t,e){return`${e?"extent ":""}${e&&t?"and ":""}${t?"center ":""}${e&&t?"are ":"is "}not needed when data are aggregated.`}function vZe(t,e,n){return`${t} is not usually used with ${e} for ${n}.`}function _Ze(t,e){return`Continuous axis should not have customized aggregation function ${t}; ${e} already agregates the axis.`}function ioe(t){return`1D error band does not support ${t}.`}function soe(t){return`Channel ${t} is required for "binned" bin.`}function SZe(t){return`Channel ${t} should not be used with "binned" bin.`}function bZe(t){return`Domain for ${t} is required for threshold scale.`}const ooe=DW(OW);let C2=ooe;function CZe(t){return C2=t,C2}function TZe(){return C2=ooe,C2}function Oe(...t){C2.warn(...t)}function RZe(...t){C2.debug(...t)}function bx(t){if(t&&Qe(t)){for(const e of cI)if(e in t)return!0}return!1}const uoe=["january","february","march","april","may","june","july","august","september","october","november","december"],OZe=uoe.map(t=>t.substr(0,3)),aoe=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],DZe=aoe.map(t=>t.substr(0,3));function wZe(t){if(VL(t)&&(t=+t),rn(t))return t>4&&Oe(pC("quarter",t)),t-1;throw new Error(pC("quarter",t))}function NZe(t){if(VL(t)&&(t=+t),rn(t))return t-1;{const e=t.toLowerCase(),n=uoe.indexOf(e);if(n!==-1)return n;const r=e.substr(0,3),i=OZe.indexOf(r);if(i!==-1)return i;throw new Error(pC("month",t))}}function FZe(t){if(VL(t)&&(t=+t),rn(t))return t%7;{const e=t.toLowerCase(),n=aoe.indexOf(e);if(n!==-1)return n;const r=e.substr(0,3),i=DZe.indexOf(r);if(i!==-1)return i;throw new Error(pC("day",t))}}function lI(t,e){const n=[];if(e&&t.day!==void 0&&Re(t).length>1&&(Oe(EZe(t)),t=ct(t),delete t.day),t.year!==void 0?n.push(t.year):n.push(2012),t.month!==void 0){const r=e?NZe(t.month):t.month;n.push(r)}else if(t.quarter!==void 0){const r=e?wZe(t.quarter):t.quarter;n.push(rn(r)?r*3:`${r}*3`)}else n.push(0);if(t.date!==void 0)n.push(t.date);else if(t.day!==void 0){const r=e?FZe(t.day):t.day;n.push(rn(r)?r+1:`${r}+1`)}else n.push(1);for(const r of["hours","minutes","seconds","milliseconds"]){const i=t[r];n.push(typeof i>"u"?0:i)}return n}function uy(t){const n=lI(t,!0).join(", ");return t.utc?`utc(${n})`:`datetime(${n})`}function LZe(t){const n=lI(t,!1).join(", ");return t.utc?`utc(${n})`:`datetime(${n})`}function IZe(t){const e=lI(t,!0);return t.utc?+new Date(Date.UTC(...e)):+new Date(...e)}var $Ze=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const loe={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},cI=Re(loe);function BZe(t){return!!loe[t]}function fI(t){return t.startsWith("utc")}function kZe(t){return t.substr(3)}const PZe={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function xI(t){return cI.filter(e=>coe(t,e))}function coe(t,e){const n=t.indexOf(e);return!(n<0||n>0&&e==="seconds"&&t.charAt(n-1)==="i"||t.length>n+3&&e==="day"&&t.charAt(n+3)==="o"||n>0&&e==="year"&&t.charAt(n-1)==="f")}function MZe(t,e,{end:n}={end:!1}){const r=Ese(e),i=fI(t)?"utc":"";function s(a){return a==="quarter"?`(${i}quarter(${r})-1)`:`${i}${a}(${r})`}let o;const u={};for(const a of cI)coe(t,a)&&(u[a]=s(a),o=a);return n&&(u[o]+="+1"),LZe(u)}function foe(t){if(!t)return;const e=xI(t);return`timeUnitSpecifier(${on(e)}, ${on(PZe)})`}function jZe(t,e,n){if(!t)return;const r=foe(t);return`${n||fI(t)?"utc":"time"}Format(${e}, ${r})`}function Ei(t){if(!t)return;let e;return ze(t)?e={unit:t}:Qe(t)&&(e=Object.assign(Object.assign({},t),t.unit?{unit:t.unit}:{})),fI(e.unit)&&(e.utc=!0,e.unit=kZe(e.unit)),e}function UZe(t){const e=Ei(t),{utc:n}=e,r=$Ze(e,["utc"]);return r.unit?(n?"utc":"")+Re(r).map(i=>yn(`${i==="unit"?"":`_${i}_`}${r[i]}`)).join(""):(n?"utc":"")+"timeunit"+Re(r).map(i=>yn(`_${i}_${r[i]}`)).join("")}function qZe(t){return t==null?void 0:t.param}function dI(t){return t&&!!t.field&&t.equal!==void 0}function hI(t){return t&&!!t.field&&t.lt!==void 0}function pI(t){return t&&!!t.field&&t.lte!==void 0}function gI(t){return t&&!!t.field&&t.gt!==void 0}function mI(t){return t&&!!t.field&&t.gte!==void 0}function yI(t){if(t!=null&&t.field){if(be(t.range)&&t.range.length===2)return!0;if(Ye(t.range))return!0}return!1}function EI(t){return t&&!!t.field&&(be(t.oneOf)||be(t.in))}function zZe(t){return t&&!!t.field&&t.valid!==void 0}function xoe(t){return EI(t)||dI(t)||yI(t)||hI(t)||gI(t)||pI(t)||mI(t)}function ra(t,e){return NC(t,{timeUnit:e,wrapTime:!0})}function HZe(t,e){return t.map(n=>ra(n,e))}function doe(t,e=!0){var n;const{field:r}=t,i=(n=Ei(t.timeUnit))===null||n===void 0?void 0:n.unit,s=i?`time(${MZe(i,r)})`:Ie(t,{expr:"datum"});if(dI(t))return`${s}===${ra(t.equal,i)}`;if(hI(t)){const o=t.lt;return`${s}<${ra(o,i)}`}else if(gI(t)){const o=t.gt;return`${s}>${ra(o,i)}`}else if(pI(t)){const o=t.lte;return`${s}<=${ra(o,i)}`}else if(mI(t)){const o=t.gte;return`${s}>=${ra(o,i)}`}else{if(EI(t))return`indexof([${HZe(t.oneOf,i).join(",")}], ${s}) !== -1`;if(zZe(t))return AI(s,t.valid);if(yI(t)){const{range:o}=t,u=Ye(o)?{signal:`${o.signal}[0]`}:o[0],a=Ye(o)?{signal:`${o.signal}[1]`}:o[1];if(u!==null&&a!==null&&e)return"inrange("+s+", ["+ra(u,i)+", "+ra(a,i)+"])";const l=[];return u!==null&&l.push(`${s} >= ${ra(u,i)}`),a!==null&&l.push(`${s} <= ${ra(a,i)}`),l.length>0?l.join(" && "):"true"}}throw new Error(`Invalid field predicate: ${on(t)}`)}function AI(t,e=!0){return e?`isValid(${t}) && isFinite(+${t})`:`!isValid(${t}) || !isFinite(+${t})`}function QZe(t){var e;return xoe(t)&&t.timeUnit?Object.assign(Object.assign({},t),{timeUnit:(e=Ei(t.timeUnit))===null||e===void 0?void 0:e.unit}):t}const ay={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"};function GZe(t){return t==="quantitative"||t==="temporal"}function hoe(t){return t==="ordinal"||t==="nominal"}const Cx=ay.quantitative,vI=ay.ordinal,T2=ay.temporal,_I=ay.nominal,R2=ay.geojson;function WZe(t){if(t)switch(t=t.toLowerCase(),t){case"q":case Cx:return"quantitative";case"t":case T2:return"temporal";case"o":case vI:return"ordinal";case"n":case _I:return"nominal";case R2:return"geojson"}}var VZe=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Gi={LINEAR:"linear",LOG:"log",POW:"pow",SQRT:"sqrt",SYMLOG:"symlog",IDENTITY:"identity",SEQUENTIAL:"sequential",TIME:"time",UTC:"utc",QUANTILE:"quantile",QUANTIZE:"quantize",THRESHOLD:"threshold",BIN_ORDINAL:"bin-ordinal",ORDINAL:"ordinal",POINT:"point",BAND:"band"},SI={linear:"numeric",log:"numeric",pow:"numeric",sqrt:"numeric",symlog:"numeric",identity:"numeric",sequential:"numeric",time:"time",utc:"time",ordinal:"ordinal","bin-ordinal":"bin-ordinal",point:"ordinal-position",band:"ordinal-position",quantile:"discretizing",quantize:"discretizing",threshold:"discretizing"};function YZe(t,e){const n=SI[t],r=SI[e];return n===r||n==="ordinal-position"&&r==="time"||r==="ordinal-position"&&n==="time"}const KZe={linear:0,log:1,pow:1,sqrt:1,symlog:1,identity:1,sequential:1,time:0,utc:0,point:10,band:11,ordinal:0,"bin-ordinal":0,quantile:0,quantize:0,threshold:0};function poe(t){return KZe[t]}const goe=new Set(["linear","log","pow","sqrt","symlog"]),moe=new Set([...goe,"time","utc"]);function yoe(t){return goe.has(t)}const Eoe=new Set(["quantile","quantize","threshold"]),XZe=new Set([...moe,...Eoe,"sequential","identity"]),JZe=new Set(["ordinal","bin-ordinal","point","band"]);function ar(t){return JZe.has(t)}function As(t){return XZe.has(t)}function Uo(t){return moe.has(t)}function O2(t){return Eoe.has(t)}const ZZe={pointPadding:.5,barBandPaddingInner:.1,rectBandPaddingInner:0,bandWithNestedOffsetPaddingInner:.2,bandWithNestedOffsetPaddingOuter:.2,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:9,minStrokeWidth:1,maxStrokeWidth:4,quantileCount:4,quantizeCount:4};function eet(t){return!ze(t)&&!!t.name}function Aoe(t){return t==null?void 0:t.param}function tet(t){return t&&t.unionWith}function net(t){return Qe(t)&&"field"in t}const ret=VZe({type:1,domain:1,domainMax:1,domainMin:1,domainMid:1,align:1,range:1,rangeMax:1,rangeMin:1,scheme:1,bins:1,reverse:1,round:1,clamp:1,nice:1,base:1,exponent:1,constant:1,interpolate:1,zero:1,padding:1,paddingInner:1,paddingOuter:1},["type","domain","range","rangeMax","rangeMin","scheme"]),iet=Re(ret);function bI(t,e){switch(e){case"type":case"domain":case"reverse":case"range":return!0;case"scheme":case"interpolate":return!["point","band","identity"].includes(t);case"bins":return!["point","band","identity","ordinal"].includes(t);case"round":return Uo(t)||t==="band"||t==="point";case"padding":case"rangeMin":case"rangeMax":return Uo(t)||["point","band"].includes(t);case"paddingOuter":case"align":return["point","band"].includes(t);case"paddingInner":return t==="band";case"domainMax":case"domainMid":case"domainMin":case"clamp":return Uo(t);case"nice":return Uo(t)||t==="quantize"||t==="threshold";case"exponent":return t==="pow";case"base":return t==="log";case"constant":return t==="symlog";case"zero":return As(t)&&!Ot(["log","time","utc","threshold","quantile"],t)}}function voe(t,e){switch(e){case"interpolate":case"scheme":case"domainMid":return S2(t)?void 0:tZe(t);case"align":case"type":case"bins":case"domain":case"domainMax":case"domainMin":case"range":case"base":case"exponent":case"constant":case"nice":case"padding":case"paddingInner":case"paddingOuter":case"rangeMax":case"rangeMin":case"reverse":case"round":case"clamp":case"zero":return}}function set(t,e){return Ot([vI,_I],e)?t===void 0||ar(t):e===T2?Ot([Gi.TIME,Gi.UTC,void 0],t):e===Cx?yoe(t)||O2(t)||t===void 0:!0}function oet(t,e,n=!1){if(!tc(t))return!1;switch(t){case En:case ur:case Y0:case _2:case Mo:case Xu:return Uo(e)||e==="band"?!0:e==="point"?!n:!1;case ml:case J0:case yl:case K0:case X0:case Ex:return Uo(e)||O2(e)||Ot(["band","point","ordinal"],e);case qi:case ea:case ta:return e!=="band";case Z0:case zi:return e==="ordinal"||O2(e)}}const Ai={arc:"arc",area:"area",bar:"bar",image:"image",line:"line",point:"point",rect:"rect",rule:"rule",text:"text",tick:"tick",trail:"trail",circle:"circle",square:"square",geoshape:"geoshape"},_oe=Ai.arc,gC=Ai.area,mC=Ai.bar,uet=Ai.image,yC=Ai.line,EC=Ai.point,aet=Ai.rect,AC=Ai.rule,Soe=Ai.text,CI=Ai.tick,cet=Ai.trail,TI=Ai.circle,RI=Ai.square,boe=Ai.geoshape;function sc(t){return["line","area","trail"].includes(t)}function Coe(t){return["rect","bar","image","arc"].includes(t)}const fet=new Set(Re(Ai));function ia(t){return t.type}const xet=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit"],det=["fill","fillOpacity"],het=[...xet,...det],Toe=Re({color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBandSize:1,timeUnitBandPosition:1}),pet={area:["line","point"],bar:["binSpacing","continuousBandSize","discreteBandSize"],rect:["binSpacing","continuousBandSize","discreteBandSize"],line:["point"],tick:["bandSize","thickness"]},get={color:"#4c78a8",invalid:"filter",timeUnitBandSize:1},Roe=Re({mark:1,arc:1,area:1,bar:1,circle:1,image:1,line:1,point:1,rect:1,rule:1,square:1,text:1,tick:1,trail:1,geoshape:1});function D2(t){return t&&t.band!=null}const met={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]},Ooe=5,yet={binSpacing:1,continuousBandSize:Ooe,timeUnitBandPosition:.5},Eet={binSpacing:0,continuousBandSize:Ooe,timeUnitBandPosition:.5},Aet={thickness:1};function vet(t){return ia(t)?t.type:t}function OI(t){const{channel:e,channelDef:n,markDef:r,scale:i,config:s}=t,o=wI(t);return Le(n)&&!Fse(n.aggregate)&&i&&Uo(i.get("type"))?_et({fieldDef:n,channel:e,markDef:r,ref:o,config:s}):o}function _et({fieldDef:t,channel:e,markDef:n,ref:r,config:i}){return sc(n.type)?r:jt("invalid",n,i)===null?[bet(t,e),r]:r}function bet(t,e){const n=DI(t,!0),i=vx(e)==="y"?{field:{group:"height"}}:{value:0};return Object.assign({test:n},i)}function DI(t,e=!0){return AI(ze(t)?t:Ie(t,{expr:"datum"}),!e)}function Cet(t){const{datum:e}=t;return bx(e)?uy(e):`${on(e)}`}function Tx(t,e,n,r){const i={};if(e&&(i.scale=e),oa(t)){const{datum:s}=t;bx(s)?i.signal=uy(s):Ye(s)?i.signal=s.signal:oy(s)?i.signal=s.expr:i.value=s}else i.field=Ie(t,n);if(r){const{offset:s,band:o}=r;s&&(i.offset=s),o&&(i.band=o)}return i}function vC({scaleName:t,fieldOrDatumDef:e,fieldOrDatumDef2:n,offset:r,startSuffix:i,bandPosition:s=.5}){const o=0<s&&s<1?"datum":void 0,u=Ie(e,{expr:o,suffix:i}),a=n!==void 0?Ie(n,{expr:o}):Ie(e,{suffix:"end",expr:o}),l={};if(s===0||s===1){l.scale=t;const c=s===0?u:a;l.field=c}else{const c=Ye(s)?`${s.signal} * ${u} + (1-${s.signal}) * ${a}`:`${s} * ${u} + ${1-s} * ${a}`;l.signal=`scale("${t}", ${c})`}return r&&(l.offset=r),l}function wI({channel:t,channelDef:e,channel2Def:n,markDef:r,config:i,scaleName:s,scale:o,stack:u,offset:a,defaultRef:l,bandPosition:c}){var f;if(e){if(ut(e)){const x=o==null?void 0:o.get("type");if(Js(e)){c??(c=joe({fieldDef:e,fieldDef2:n,markDef:r,config:i}));const{bin:d,timeUnit:p,type:g}=e;if(en(d)||c&&p&&g===T2)return u!=null&&u.impute?Tx(e,s,{binSuffix:"mid"},{offset:a}):c&&!ar(x)?vC({scaleName:s,fieldOrDatumDef:e,bandPosition:c,offset:a}):Tx(e,s,xy(e,t)?{binSuffix:"range"}:{},{offset:a});if(yi(d)){if(Le(n))return vC({scaleName:s,fieldOrDatumDef:e,fieldOrDatumDef2:n,bandPosition:c,offset:a});Oe(soe(t===En?Po:Ku))}}return Tx(e,s,ar(x)?{binSuffix:"range"}:{},{offset:a,band:x==="band"?(f=c??e.bandPosition)!==null&&f!==void 0?f:.5:void 0})}else if(qo(e)){const x=e.value,d=a?{offset:a}:{};return Object.assign(Object.assign({},ly(t,x)),d)}}return dt(l)&&(l=l()),l&&Object.assign(Object.assign({},l),a?{offset:a}:{})}function ly(t,e){return Ot(["x","x2"],t)&&e==="width"?{field:{group:"width"}}:Ot(["y","y2"],t)&&e==="height"?{field:{group:"height"}}:un(e)}function Rx(t){return t&&t!=="number"&&t!=="time"}function Doe(t,e,n){return`${t}(${e}${n?`, ${on(n)}`:""})`}const Tet=" – ";function NI({fieldOrDatumDef:t,format:e,formatType:n,expr:r,normalizeStack:i,config:s}){var o,u;if(Rx(n))return FI({fieldOrDatumDef:t,format:e,formatType:n,expr:r,config:s});const a=woe(t,r,i);if(F2(t)){const l=Oet(a,Le(t)?(o=Ei(t.timeUnit))===null||o===void 0?void 0:o.unit:void 0,e,s.timeFormat,Ox(t)&&((u=t.scale)===null||u===void 0?void 0:u.type)===Gi.UTC);return l?{signal:l}:void 0}if(e=Loe(BI(t),e,s),Le(t)&&en(t.bin)){const l=Ie(t,{expr:r,binSuffix:"end"});return{signal:_C(a,l,e,n,s)}}else return e||BI(t)==="quantitative"?{signal:`${Ioe(a,e)}`}:{signal:`isValid(${a}) ? ${a} : ""+${a}`}}function woe(t,e,n){return Le(t)?n?`${Ie(t,{expr:e,suffix:"end"})}-${Ie(t,{expr:e,suffix:"start"})}`:Ie(t,{expr:e}):Cet(t)}function FI({fieldOrDatumDef:t,format:e,formatType:n,expr:r,normalizeStack:i,config:s,field:o}){if(o??(o=woe(t,r,i)),Le(t)&&en(t.bin)){const u=Ie(t,{expr:r,binSuffix:"end"});return{signal:_C(o,u,e,n,s)}}return{signal:Doe(n,o,e)}}function Noe(t,e,n,r,i,s){var o;if(!Rx(r)){if(F2(t)){const u=Le(t)?(o=Ei(t.timeUnit))===null||o===void 0?void 0:o.unit:void 0;return Ret(n,u,i,s)}return Loe(e,n,i)}}function Foe(t,e,n){if(t&&(Ye(t)||t==="number"||t==="time"))return t;if(F2(e)&&n!=="time"&&n!=="utc")return"time"}function Loe(t,e,n){if(ze(e))return e;if(t===Cx)return n.numberFormat}function Ret(t,e,n,r){return t||(e?{signal:foe(e)}:r?void 0:n.timeFormat)}function Ioe(t,e){return`format(${t}, "${e||""}")`}function $oe(t,e,n,r){var i;return Rx(n)?Doe(n,t,e):Ioe(t,(i=ze(e)?e:void 0)!==null&&i!==void 0?i:r.numberFormat)}function _C(t,e,n,r,i){const s=$oe(t,n,r,i),o=$oe(e,n,r,i);return`${AI(t,!1)} ? "null" : ${s} + "${Tet}" + ${o}`}function Oet(t,e,n,r,i){return!e||n?(n=ze(n)?n:r,`${i?"utc":"time"}Format(${t}, '${n}')`):jZe(e,t,i)}const SC="min",Det={x:1,y:1,color:1,fill:1,stroke:1,strokeWidth:1,size:1,shape:1,fillOpacity:1,strokeOpacity:1,opacity:1,text:1};function Boe(t){return t in Det}function koe(t){return!!t&&!!t.encoding}function sa(t){return!!t&&(t.op==="count"||!!t.field)}function Poe(t){return!!t&&be(t)}function cy(t){return"row"in t||"column"in t}function LI(t){return!!t&&"header"in t}function bC(t){return"facet"in t}var II=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function wet(t){return t.param}function Net(t){return t&&!ze(t)&&"repeat"in t}function Moe(t){const{field:e,timeUnit:n,bin:r,aggregate:i}=t;return Object.assign(Object.assign(Object.assign(Object.assign({},n?{timeUnit:n}:{}),r?{bin:r}:{}),i?{aggregate:i}:{}),{field:e})}function $I(t){return"sort"in t}function joe({fieldDef:t,fieldDef2:e,markDef:n,config:r}){if(ut(t)&&t.bandPosition!==void 0)return t.bandPosition;if(Le(t)){const{timeUnit:i,bin:s}=t;if(i&&!e)return Coe(n.type)?0:Sx("timeUnitBandPosition",n,r);if(en(s))return .5}}function Uoe({channel:t,fieldDef:e,fieldDef2:n,markDef:r,config:i,scaleType:s,useVlSizeChannel:o}){var u,a,l;const c=Hi(t),f=jt(o?"size":c,r,i,{vgChannel:c});if(f!==void 0)return f;if(Le(e)){const{timeUnit:x,bin:d}=e;if(x&&!n)return{band:Sx("timeUnitBandSize",r,i)};if(en(d)&&!ar(s))return{band:1}}if(Coe(r.type))return s?ar(s)?((u=i[r.type])===null||u===void 0?void 0:u.discreteBandSize)||{band:1}:(a=i[r.type])===null||a===void 0?void 0:a.continuousBandSize:(l=i[r.type])===null||l===void 0?void 0:l.discreteBandSize}function qoe(t,e,n,r){return en(t.bin)||t.timeUnit&&Js(t)&&t.type==="temporal"?joe({fieldDef:t,fieldDef2:e,markDef:n,config:r})!==void 0:!1}function CC(t){return t&&"condition"in t}function TC(t){const e=t&&t.condition;return!!e&&!be(e)&&Le(e)}function fy(t){const e=t&&t.condition;return!!e&&!be(e)&&ut(e)}function Fet(t){const e=t&&t.condition;return!!e&&(be(e)||qo(e))}function Le(t){return t&&(!!t.field||t.aggregate==="count")}function BI(t){return t&&t.type}function oa(t){return t&&"datum"in t}function ua(t){return Js(t)&&!RC(t)||kI(t)}function kI(t){return oa(t)&&rn(t.datum)}function ut(t){return Le(t)||oa(t)}function Js(t){return t&&("field"in t||t.aggregate==="count")&&"type"in t}function qo(t){return t&&"value"in t&&"value"in t}function Ox(t){return t&&("scale"in t||"sort"in t)}function PI(t){return t&&("axis"in t||"stack"in t||"impute"in t)}function zoe(t){return t&&"legend"in t}function Hoe(t){return t&&("format"in t||"formatType"in t)}function Let(t){return Ys(t,["legend","axis","header","scale"])}function Iet(t){return"op"in t}function Ie(t,e={}){var n,r,i;let s=t.field;const o=e.prefix;let u=e.suffix,a="";if(Bet(t))s=qXe("count");else{let l;if(!e.nofn)if(Iet(t))l=t.op;else{const{bin:c,aggregate:f,timeUnit:x}=t;en(c)?(l=Lse(c),u=((n=e.binSuffix)!==null&&n!==void 0?n:"")+((r=e.suffix)!==null&&r!==void 0?r:"")):f?nc(f)?(a=`["${s}"]`,s=`argmax_${f.argmax}`):Al(f)?(a=`["${s}"]`,s=`argmin_${f.argmin}`):l=String(f):x&&(l=UZe(x),u=(!["range","mid"].includes(e.binSuffix)&&e.binSuffix||"")+((i=e.suffix)!==null&&i!==void 0?i:""))}l&&(s=s?`${l}_${s}`:l)}return u&&(s=`${s}_${u}`),o&&(s=`${o}_${s}`),e.forAs?Ase(s):e.expr?PXe(s,e.expr)+a:ko(s)+a}function RC(t){switch(t.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return Le(t)&&!!t.bin;case"temporal":return!1}throw new Error(Zse(t.type))}function $et(t){var e;return Ox(t)&&O2((e=t.scale)===null||e===void 0?void 0:e.type)}function Bet(t){return t.aggregate==="count"}function ket(t,e){var n;const{field:r,bin:i,timeUnit:s,aggregate:o}=t;if(o==="count")return e.countTitle;if(en(i))return`${r} (binned)`;if(s){const u=(n=Ei(s))===null||n===void 0?void 0:n.unit;if(u)return`${r} (${xI(u).join("-")})`}else if(o)return nc(o)?`${r} for max ${o.argmax}`:Al(o)?`${r} for min ${o.argmin}`:`${rC(o)} of ${r}`;return r}function Pet(t){const{aggregate:e,bin:n,timeUnit:r,field:i}=t;if(nc(e))return`${i} for argmax(${e.argmax})`;if(Al(e))return`${i} for argmin(${e.argmin})`;const s=Ei(r),o=e||(s==null?void 0:s.unit)||(s==null?void 0:s.maxbins)&&"timeunit"||en(n)&&"bin";return o?`${o.toUpperCase()}(${i})`:i}const Qoe=(t,e)=>{switch(e.fieldTitle){case"plain":return t.field;case"functional":return Pet(t);default:return ket(t,e)}};let Goe=Qoe;function Woe(t){Goe=t}function Met(){Woe(Qoe)}function w2(t,e,{allowDisabling:n,includeDefault:r=!0}){var i,s;const o=(i=MI(t))===null||i===void 0?void 0:i.title;if(!Le(t))return o??t.title;const u=t,a=r?jI(u,e):void 0;return n?Qn(o,u.title,a):(s=o??u.title)!==null&&s!==void 0?s:a}function MI(t){if(PI(t)&&t.axis)return t.axis;if(zoe(t)&&t.legend)return t.legend;if(LI(t)&&t.header)return t.header}function jI(t,e){return Goe(t,e)}function OC(t){var e;if(Hoe(t)){const{format:n,formatType:r}=t;return{format:n,formatType:r}}else{const n=(e=MI(t))!==null&&e!==void 0?e:{},{format:r,formatType:i}=n;return{format:r,formatType:i}}}function jet(t,e){var n;switch(e){case"latitude":case"longitude":return"quantitative";case"row":case"column":case"facet":case"shape":case"strokeDash":return"nominal";case"order":return"ordinal"}if($I(t)&&be(t.sort))return"ordinal";const{aggregate:r,bin:i,timeUnit:s}=t;if(s)return"temporal";if(i||r&&!nc(r)&&!Al(r))return"quantitative";if(Ox(t)&&(!((n=t.scale)===null||n===void 0)&&n.type))switch(SI[t.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}function aa(t){if(Le(t))return t;if(TC(t))return t.condition}function Gn(t){if(ut(t))return t;if(fy(t))return t.condition}function Voe(t,e,n,r={}){if(ze(t)||rn(t)||yh(t)){const i=ze(t)?"string":rn(t)?"number":"boolean";return Oe(qJe(e,i,t)),{value:t}}return ut(t)?DC(t,e,n,r):fy(t)?Object.assign(Object.assign({},t),{condition:DC(t.condition,e,n,r)}):t}function DC(t,e,n,r){if(Hoe(t)){const{format:i,formatType:s}=t,o=II(t,["format","formatType"]);if(Rx(s)&&!n.customFormatTypes)return Oe(Jse(e)),DC(o,e,n,r)}else{const i=PI(t)?"axis":zoe(t)?"legend":LI(t)?"header":null;if(i&&t[i]){const s=t[i],{format:o,formatType:u}=s,a=II(s,["format","formatType"]);if(Rx(u)&&!n.customFormatTypes)return Oe(Jse(e)),DC(Object.assign(Object.assign({},t),{[i]:a}),e,n,r)}}return Le(t)?UI(t,e,r):Uet(t)}function Uet(t){let e=t.type;if(e)return t;const{datum:n}=t;return e=rn(n)?"quantitative":ze(n)?"nominal":bx(n)?"temporal":void 0,Object.assign(Object.assign({},t),{type:e})}function UI(t,e,{compositeMark:n=!1}={}){const{aggregate:r,timeUnit:i,bin:s,field:o}=t,u=Object.assign({},t);if(!n&&r&&!nI(r)&&!nc(r)&&!Al(r)&&(Oe(HJe(r)),delete u.aggregate),i&&(u.timeUnit=Ei(i)),o&&(u.field=`${o}`),en(s)&&(u.bin=wC(s,e)),yi(s)&&!Sr(e)&&Oe(SZe(e)),Js(u)){const{type:a}=u,l=WZe(a);a!==l&&(u.type=l),a!=="quantitative"&&Fse(r)&&(Oe(zJe(a,r)),u.type="quantitative")}else if(!Cse(e)){const a=jet(u,e);u.type=a}if(Js(u)){const{compatible:a,warning:l}=qet(u,e)||{};a===!1&&Oe(l)}if($I(u)&&ze(u.sort)){const{sort:a}=u;if(Boe(a))return Object.assign(Object.assign({},u),{sort:{encoding:a}});const l=a.substr(1);if(a.charAt(0)==="-"&&Boe(l))return Object.assign(Object.assign({},u),{sort:{encoding:l,order:"descending"}})}if(LI(u)){const{header:a}=u;if(a){const{orient:l}=a,c=II(a,["orient"]);if(l)return Object.assign(Object.assign({},u),{header:Object.assign(Object.assign({},c),{labelOrient:a.labelOrient||l,titleOrient:a.titleOrient||l})})}}return u}function wC(t,e){return yh(t)?{maxbins:Ise(e)}:t==="binned"?{binned:!0}:!t.maxbins&&!t.step?Object.assign(Object.assign({},t),{maxbins:Ise(e)}):t}const N2={compatible:!0};function qet(t,e){const n=t.type;if(n==="geojson"&&e!=="shape")return{compatible:!1,warning:`Channel ${e} should not be used with a geojson data.`};switch(e){case dl:case hl:case sC:return RC(t)?N2:{compatible:!1,warning:YJe(e)};case En:case ur:case Y0:case _2:case qi:case ea:case ta:case ry:case sy:case oC:case Ax:case uC:case aC:case Ex:case Mo:case Xu:case lC:return N2;case Zu:case Ks:case Ju:case jo:return n!==Cx?{compatible:!1,warning:`Channel ${e} should be used with a quantitative field only, not ${t.type} field.`}:N2;case yl:case K0:case X0:case J0:case ml:case gl:case pl:case Po:case Ku:return n==="nominal"&&!t.sort?{compatible:!1,warning:`Channel ${e} should not be used with an unsorted discrete field.`}:N2;case zi:case Z0:return!RC(t)&&!$et(t)?{compatible:!1,warning:KJe(e)}:N2;case iy:return t.type==="nominal"&&!("sort"in t)?{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}:N2}}function F2(t){const{formatType:e}=OC(t);return e==="time"||!e&&zet(t)}function zet(t){return t&&(t.type==="temporal"||Le(t)&&!!t.timeUnit)}function NC(t,{timeUnit:e,type:n,wrapTime:r,undefinedIfExprNotRequired:i}){var s;const o=e&&((s=Ei(e))===null||s===void 0?void 0:s.unit);let u=o||n==="temporal",a;return oy(t)?a=t.expr:Ye(t)?a=t.signal:bx(t)?(u=!0,a=uy(t)):(ze(t)||rn(t))&&u&&(a=`datetime(${on(t)})`,BZe(o)&&(rn(t)&&t<1e4||ze(t)&&isNaN(Date.parse(t)))&&(a=uy({[o]:t}))),a?r&&u?`time(${a})`:a:i?void 0:on(t)}function Yoe(t,e){const{type:n}=t;return e.map(r=>{const i=NC(r,{timeUnit:Le(t)?t.timeUnit:void 0,type:n,undefinedIfExprNotRequired:!0});return i!==void 0?{signal:i}:r})}function xy(t,e){return en(t.bin)?tc(e)&&["ordinal","nominal"].includes(t.type):(console.warn("Only call this method for binned field defs."),!1)}const Koe={labelAlign:{part:"labels",vgProp:"align"},labelBaseline:{part:"labels",vgProp:"baseline"},labelColor:{part:"labels",vgProp:"fill"},labelFont:{part:"labels",vgProp:"font"},labelFontSize:{part:"labels",vgProp:"fontSize"},labelFontStyle:{part:"labels",vgProp:"fontStyle"},labelFontWeight:{part:"labels",vgProp:"fontWeight"},labelOpacity:{part:"labels",vgProp:"opacity"},labelOffset:null,labelPadding:null,gridColor:{part:"grid",vgProp:"stroke"},gridDash:{part:"grid",vgProp:"strokeDash"},gridDashOffset:{part:"grid",vgProp:"strokeDashOffset"},gridOpacity:{part:"grid",vgProp:"opacity"},gridWidth:{part:"grid",vgProp:"strokeWidth"},tickColor:{part:"ticks",vgProp:"stroke"},tickDash:{part:"ticks",vgProp:"strokeDash"},tickDashOffset:{part:"ticks",vgProp:"strokeDashOffset"},tickOpacity:{part:"ticks",vgProp:"opacity"},tickSize:null,tickWidth:{part:"ticks",vgProp:"strokeWidth"}};function dy(t){return t&&t.condition}const Xoe=["domain","grid","labels","ticks","title"],Het={grid:"grid",gridCap:"grid",gridColor:"grid",gridDash:"grid",gridDashOffset:"grid",gridOpacity:"grid",gridScale:"grid",gridWidth:"grid",orient:"main",bandPosition:"both",aria:"main",description:"main",domain:"main",domainCap:"main",domainColor:"main",domainDash:"main",domainDashOffset:"main",domainOpacity:"main",domainWidth:"main",format:"main",formatType:"main",labelAlign:"main",labelAngle:"main",labelBaseline:"main",labelBound:"main",labelColor:"main",labelFlush:"main",labelFlushOffset:"main",labelFont:"main",labelFontSize:"main",labelFontStyle:"main",labelFontWeight:"main",labelLimit:"main",labelLineHeight:"main",labelOffset:"main",labelOpacity:"main",labelOverlap:"main",labelPadding:"main",labels:"main",labelSeparation:"main",maxExtent:"main",minExtent:"main",offset:"both",position:"main",tickCap:"main",tickColor:"main",tickDash:"main",tickDashOffset:"main",tickMinStep:"both",tickOffset:"both",tickOpacity:"main",tickRound:"both",ticks:"main",tickSize:"main",tickWidth:"both",title:"main",titleAlign:"main",titleAnchor:"main",titleAngle:"main",titleBaseline:"main",titleColor:"main",titleFont:"main",titleFontSize:"main",titleFontStyle:"main",titleFontWeight:"main",titleLimit:"main",titleLineHeight:"main",titleOpacity:"main",titlePadding:"main",titleX:"main",titleY:"main",encode:"both",scale:"both",tickBand:"both",tickCount:"both",tickExtra:"both",translate:"both",values:"both",zindex:"both"},Joe={orient:1,aria:1,bandPosition:1,description:1,domain:1,domainCap:1,domainColor:1,domainDash:1,domainDashOffset:1,domainOpacity:1,domainWidth:1,format:1,formatType:1,grid:1,gridCap:1,gridColor:1,gridDash:1,gridDashOffset:1,gridOpacity:1,gridWidth:1,labelAlign:1,labelAngle:1,labelBaseline:1,labelBound:1,labelColor:1,labelFlush:1,labelFlushOffset:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelLineHeight:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labels:1,labelSeparation:1,maxExtent:1,minExtent:1,offset:1,position:1,tickBand:1,tickCap:1,tickColor:1,tickCount:1,tickDash:1,tickDashOffset:1,tickExtra:1,tickMinStep:1,tickOffset:1,tickOpacity:1,tickRound:1,ticks:1,tickSize:1,tickWidth:1,title:1,titleAlign:1,titleAnchor:1,titleAngle:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titlePadding:1,titleX:1,titleY:1,translate:1,values:1,zindex:1},Qet=Object.assign(Object.assign({},Joe),{style:1,labelExpr:1,encoding:1});function Zoe(t){return!!Qet[t]}const eue=Re({axis:1,axisBand:1,axisBottom:1,axisDiscrete:1,axisLeft:1,axisPoint:1,axisQuantitative:1,axisRight:1,axisTemporal:1,axisTop:1,axisX:1,axisXBand:1,axisXDiscrete:1,axisXPoint:1,axisXQuantitative:1,axisXTemporal:1,axisY:1,axisYBand:1,axisYDiscrete:1,axisYPoint:1,axisYQuantitative:1,axisYTemporal:1});function Sl(t){return"mark"in t}class FC{constructor(e,n){this.name=e,this.run=n}hasMatchingType(e){return Sl(e)?vet(e.mark)===this.name:!1}}var Get=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Dx(t,e){const n=t&&t[e];return n?be(n)?A2(n,r=>!!r.field):Le(n)||TC(n):!1}function tue(t,e){const n=t&&t[e];return n?be(n)?A2(n,r=>!!r.field):Le(n)||oa(n)||fy(n):!1}function qI(t,e){if(Sr(e)){const n=t[e];if((Le(n)||oa(n))&&hoe(n.type)){const r=Tse(e);return tue(t,r)}}return!1}function zI(t){return A2(VXe,e=>{if(Dx(t,e)){const n=t[e];if(be(n))return A2(n,r=>!!r.aggregate);{const r=aa(n);return r&&!!r.aggregate}}return!1})}function nue(t,e){const n=[],r=[],i=[],s=[],o={};return HI(t,(u,a)=>{if(Le(u)){const{field:l,aggregate:c,bin:f,timeUnit:x}=u,d=Get(u,["field","aggregate","bin","timeUnit"]);if(c||x||f){const p=MI(u),g=p==null?void 0:p.title;let m=Ie(u,{forAs:!0});const y=Object.assign(Object.assign(Object.assign({},g?[]:{title:w2(u,e,{allowDisabling:!0})}),d),{field:m});if(c){let E;if(nc(c)?(E="argmax",m=Ie({op:"argmax",field:c.argmax},{forAs:!0}),y.field=`${m}.${l}`):Al(c)?(E="argmin",m=Ie({op:"argmin",field:c.argmin},{forAs:!0}),y.field=`${m}.${l}`):c!=="boxplot"&&c!=="errorbar"&&c!=="errorband"&&(E=c),E){const A={op:E,as:m};l&&(A.field=l),s.push(A)}}else if(n.push(m),Js(u)&&en(f)){if(r.push({bin:f,field:l,as:m}),n.push(Ie(u,{binSuffix:"end"})),xy(u,a)&&n.push(Ie(u,{binSuffix:"range"})),Sr(a)){const E={field:`${m}_end`};o[`${a}2`]=E}y.bin="binned",Cse(a)||(y.type=Cx)}else if(x){i.push({timeUnit:x,field:l,as:m});const E=Js(u)&&u.type!==T2&&"time";E&&(a===ry||a===Ax?y.formatType=E:iJe(a)?y.legend=Object.assign({formatType:E},y.legend):Sr(a)&&(y.axis=Object.assign({formatType:E},y.axis)))}o[a]=y}else n.push(l),o[a]=t[a]}else o[a]=t[a]}),{bins:r,timeUnits:i,aggregate:s,groupby:n,encoding:o}}function Wet(t,e,n){const r=oJe(e,n);if(r){if(r==="binned"){const i=t[e===Po?En:ur];return!!(Le(i)&&Le(t[e])&&yi(i.bin))}}else return!1;return!0}function Vet(t,e,n,r){const i={};for(const s of Re(t))bse(s)||Oe(VJe(s));for(let s of eJe){if(!t[s])continue;const o=t[s];if(b2(s)){const u=Rse(s),a=i[u];if(Le(a)){if(GZe(a.type)&&Le(o)){Oe(jJe(u));continue}}else s=u,Oe(UJe(u))}if(s==="angle"&&e==="arc"&&!t.theta&&(Oe(MJe),s=Mo),!Wet(t,s,e)){Oe(hC(s,e));continue}if(s===ml&&e==="line"){const u=aa(t[s]);if(u!=null&&u.aggregate){Oe(GJe);continue}}if(s===qi&&(n?"fill"in t:"stroke"in t)){Oe(eoe("encoding",{fill:"fill"in t,stroke:"stroke"in t}));continue}if(s===sy||s===iy&&!be(o)&&!qo(o)||s===Ax&&be(o))o&&(i[s]=qe(o).reduce((u,a)=>(Le(a)?u.push(UI(a,s)):Oe(uI(a,s)),u),[]));else{if(s===Ax&&o===null)i[s]=null;else if(!Le(o)&&!oa(o)&&!qo(o)&&!CC(o)&&!Ye(o)){Oe(uI(o,s));continue}i[s]=Voe(o,s,r)}}return i}function LC(t,e){const n={};for(const r of Re(t)){const i=Voe(t[r],r,e,{compositeMark:!0});n[r]=i}return n}function Yet(t){const e=[];for(const n of Re(t))if(Dx(t,n)){const r=t[n],i=qe(r);for(const s of i)Le(s)?e.push(s):TC(s)&&e.push(s.condition)}return e}function HI(t,e,n){if(t)for(const r of Re(t)){const i=t[r];if(be(i))for(const s of i)e.call(n,s,r);else e.call(n,i,r)}}function Ket(t,e,n,r){return t?Re(t).reduce((i,s)=>{const o=t[s];return be(o)?o.reduce((u,a)=>e.call(r,u,a,s),i):e.call(r,i,o,s)},n):n}function rue(t,e){return Re(e).reduce((n,r)=>{switch(r){case En:case ur:case uC:case lC:case aC:case Po:case Ku:case Y0:case _2:case Mo:case gl:case Xu:case pl:case Ju:case Zu:case jo:case Ks:case ry:case zi:case Ex:case Ax:return n;case iy:if(t==="line"||t==="trail")return n;case sy:case oC:{const i=e[r];if(be(i)||Le(i))for(const s of qe(i))s.aggregate||n.push(Ie(s,{}));return n}case ml:if(t==="trail")return n;case qi:case ea:case ta:case yl:case K0:case X0:case Z0:case J0:{const i=aa(e[r]);return i&&!i.aggregate&&n.push(Ie(i,{})),n}}},[])}var iue=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Xet(t){const{tooltip:e}=t,n=iue(t,["tooltip"]);if(!e)return{filteredEncoding:n};let r,i;if(be(e)){for(const s of e)s.aggregate?(r||(r=[]),r.push(s)):(i||(i=[]),i.push(s));r&&(n.tooltip=r)}else e.aggregate?n.tooltip=e:i=e;return be(i)&&i.length===1&&(i=i[0]),{customTooltipWithoutAggregatedField:i,filteredEncoding:n}}function QI(t,e,n,r=!0){if("tooltip"in n)return{tooltip:n.tooltip};const i=t.map(({fieldPrefix:o,titlePrefix:u})=>{const a=r?` of ${GI(e)}`:"";return{field:o+e.field,type:e.type,title:Ye(u)?{signal:`${u}"${escape(a)}"`}:u+a}}),s=Yet(n).map(Let);return{tooltip:[...i,...xl(s,Rt)]}}function GI(t){const{title:e,field:n}=t;return Qn(e,n)}function WI(t,e,n,r,i){const{scale:s,axis:o}=n;return({partName:u,mark:a,positionPrefix:l,endPositionPrefix:c=void 0,extraEncoding:f={}})=>{const x=GI(n);return sue(t,u,i,{mark:a,encoding:Object.assign(Object.assign(Object.assign({[e]:Object.assign(Object.assign(Object.assign({field:`${l}_${n.field}`,type:n.type},x!==void 0?{title:x}:{}),s!==void 0?{scale:s}:{}),o!==void 0?{axis:o}:{})},ze(c)?{[`${e}2`]:{field:`${c}_${n.field}`}}:{}),r),f)})}}function sue(t,e,n,r){const{clip:i,color:s,opacity:o}=t,u=t.type;return t[e]||t[e]===void 0&&n[e]?[Object.assign(Object.assign({},r),{mark:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n[e]),i?{clip:i}:{}),s?{color:s}:{}),o?{opacity:o}:{}),ia(r.mark)?r.mark:{type:r.mark}),{style:`${u}-${e}`}),yh(t[e])?{}:t[e])})]:[]}function oue(t,e,n){const{encoding:r}=t,i=e==="vertical"?"y":"x",s=r[i],o=r[`${i}2`],u=r[`${i}Error`],a=r[`${i}Error2`];return{continuousAxisChannelDef:IC(s,n),continuousAxisChannelDef2:IC(o,n),continuousAxisChannelDefError:IC(u,n),continuousAxisChannelDefError2:IC(a,n),continuousAxis:i}}function IC(t,e){if(t!=null&&t.aggregate){const{aggregate:n}=t,r=iue(t,["aggregate"]);return n!==e&&Oe(_Ze(n,e)),r}else return t}function uue(t,e){const{mark:n,encoding:r}=t,{x:i,y:s}=r;if(ia(n)&&n.orient)return n.orient;if(ua(i)){if(ua(s)){const o=Le(i)&&i.aggregate,u=Le(s)&&s.aggregate;if(!o&&u===e)return"vertical";if(!u&&o===e)return"horizontal";if(o===e&&u===e)throw new Error("Both x and y cannot have aggregate");return F2(s)&&!F2(i)?"horizontal":"vertical"}return"horizontal"}else{if(ua(s))return"vertical";throw new Error(`Need a valid continuous axis for ${e}s`)}}var $C=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const BC="boxplot",Jet=["box","median","outliers","rule","ticks"],Zet=new FC(BC,lue);function aue(t){return rn(t)?"tukey":t}function lue(t,{config:e}){var n,r;t=Object.assign(Object.assign({},t),{encoding:LC(t.encoding,e)});const{mark:i,encoding:s,params:o,projection:u}=t,a=$C(t,["mark","encoding","params","projection"]),l=ia(i)?i:{type:i};o&&Oe(Yse("boxplot"));const c=(n=l.extent)!==null&&n!==void 0?n:e.boxplot.extent,f=jt("size",l,e),x=aue(c),{bins:d,timeUnits:p,transform:g,continuousAxisChannelDef:m,continuousAxis:y,groupby:E,aggregate:A,encodingWithoutContinuousAxis:v,ticksOrient:_,boxOrient:S,customTooltipWithoutAggregatedField:b}=ett(t,c,e),{color:C,size:R}=v,L=$C(v,["color","size"]),$=Z=>WI(l,y,m,Z,e.boxplot),U=$(L),z=$(v),ee=$(Object.assign(Object.assign({},L),R?{size:R}:{})),G=QI([{fieldPrefix:x==="min-max"?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:x==="min-max"?"lower_whisker_":"min_",titlePrefix:"Min"}],m,v),fe={type:"tick",color:"black",opacity:1,orient:_,invalid:null,aria:!1},pe=x==="min-max"?G:QI([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],m,v),ae=[...U({partName:"rule",mark:{type:"rule",invalid:null,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:pe}),...U({partName:"rule",mark:{type:"rule",invalid:null,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:pe}),...U({partName:"ticks",mark:fe,positionPrefix:"lower_whisker",extraEncoding:pe}),...U({partName:"ticks",mark:fe,positionPrefix:"upper_whisker",extraEncoding:pe})],V=[...x!=="tukey"?ae:[],...z({partName:"box",mark:Object.assign(Object.assign({type:"bar"},f?{size:f}:{}),{orient:S,invalid:null,ariaRoleDescription:"box"}),positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:G}),...ee({partName:"median",mark:Object.assign(Object.assign(Object.assign({type:"tick",invalid:null},Qe(e.boxplot.median)&&e.boxplot.median.color?{color:e.boxplot.median.color}:{}),f?{size:f}:{}),{orient:_,aria:!1}),positionPrefix:"mid_box",extraEncoding:G})];if(x==="min-max")return Object.assign(Object.assign({},a),{transform:((r=a.transform)!==null&&r!==void 0?r:[]).concat(g),layer:V});const te=`datum["lower_box_${m.field}"]`,se=`datum["upper_box_${m.field}"]`,he=`(${se} - ${te})`,D=`${te} - ${c} * ${he}`,O=`${se} + ${c} * ${he}`,N=`datum["${m.field}"]`,P={joinaggregate:cue(m.field),groupby:E},W={transform:[{filter:`(${D} <= ${N}) && (${N} <= ${O})`},{aggregate:[{op:"min",field:m.field,as:`lower_whisker_${m.field}`},{op:"max",field:m.field,as:`upper_whisker_${m.field}`},{op:"min",field:`lower_box_${m.field}`,as:`lower_box_${m.field}`},{op:"max",field:`upper_box_${m.field}`,as:`upper_box_${m.field}`},...A],groupby:E}],layer:ae},H=$C(L,["tooltip"]),{scale:w,axis:B}=m,k=GI(m),Q=Ys(B,["title"]),I=sue(l,"outliers",e.boxplot,{transform:[{filter:`(${N} < ${D}) || (${N} > ${O})`}],mark:"point",encoding:Object.assign(Object.assign(Object.assign({[y]:Object.assign(Object.assign(Object.assign({field:m.field,type:m.type},k!==void 0?{title:k}:{}),w!==void 0?{scale:w}:{}),Kt(Q)?{}:{axis:Q})},H),C?{color:C}:{}),b?{tooltip:b}:{})})[0];let q;const M=[...d,...p,P];return I?q={transform:M,layer:[I,W]}:(q=W,q.transform.unshift(...M)),Object.assign(Object.assign({},a),{layer:[q,{transform:g,layer:V}]})}function cue(t){return[{op:"q1",field:t,as:`lower_box_${t}`},{op:"q3",field:t,as:`upper_box_${t}`}]}function ett(t,e,n){const r=uue(t,BC),{continuousAxisChannelDef:i,continuousAxis:s}=oue(t,r,BC),o=i.field,u=aue(e),a=[...cue(o),{op:"median",field:o,as:`mid_box_${o}`},{op:"min",field:o,as:(u==="min-max"?"lower_whisker_":"min_")+o},{op:"max",field:o,as:(u==="min-max"?"upper_whisker_":"max_")+o}],l=u==="min-max"||u==="tukey"?[]:[{calculate:`datum["upper_box_${o}"] - datum["lower_box_${o}"]`,as:`iqr_${o}`},{calculate:`min(datum["upper_box_${o}"] + datum["iqr_${o}"] * ${e}, datum["max_${o}"])`,as:`upper_whisker_${o}`},{calculate:`max(datum["lower_box_${o}"] - datum["iqr_${o}"] * ${e}, datum["min_${o}"])`,as:`lower_whisker_${o}`}],c=t.encoding,f=s;c[f];const x=$C(c,[typeof f=="symbol"?f:f+""]),{customTooltipWithoutAggregatedField:d,filteredEncoding:p}=Xet(x),{bins:g,timeUnits:m,aggregate:y,groupby:E,encoding:A}=nue(p,n),v=r==="vertical"?"horizontal":"vertical",_=r,S=[...g,...m,{aggregate:[...y,...a],groupby:E},...l];return{bins:g,timeUnits:m,transform:S,groupby:E,aggregate:y,continuousAxisChannelDef:i,continuousAxis:s,encodingWithoutContinuousAxis:A,ticksOrient:v,boxOrient:_,customTooltipWithoutAggregatedField:d}}var fue=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const VI="errorbar",ttt=["ticks","rule"],ntt=new FC(VI,xue);function xue(t,{config:e}){t=Object.assign(Object.assign({},t),{encoding:LC(t.encoding,e)});const{transform:n,continuousAxisChannelDef:r,continuousAxis:i,encodingWithoutContinuousAxis:s,ticksOrient:o,markDef:u,outerSpec:a,tooltipEncoding:l}=due(t,VI,e);delete s.size;const c=WI(u,i,r,s,e.errorbar),f=u.thickness,x=u.size,d=Object.assign(Object.assign({type:"tick",orient:o,aria:!1},f!==void 0?{thickness:f}:{}),x!==void 0?{size:x}:{}),p=[...c({partName:"ticks",mark:d,positionPrefix:"lower",extraEncoding:l}),...c({partName:"ticks",mark:d,positionPrefix:"upper",extraEncoding:l}),...c({partName:"rule",mark:Object.assign({type:"rule",ariaRoleDescription:"errorbar"},f!==void 0?{size:f}:{}),positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:l})];return Object.assign(Object.assign(Object.assign({},a),{transform:n}),p.length>1?{layer:p}:Object.assign({},p[0]))}function rtt(t,e){const{encoding:n}=t;if(itt(n))return{orient:uue(t,e),inputType:"raw"};const r=stt(n),i=ott(n),s=n.x,o=n.y;if(r){if(i)throw new Error(`${e} cannot be both type aggregated-upper-lower and aggregated-error`);const u=n.x2,a=n.y2;if(ut(u)&&ut(a))throw new Error(`${e} cannot have both x2 and y2`);if(ut(u)){if(ua(s))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${e}`)}else if(ut(a)){if(ua(o))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${e}`)}throw new Error("No ranged axis")}else{const u=n.xError,a=n.xError2,l=n.yError,c=n.yError2;if(ut(a)&&!ut(u))throw new Error(`${e} cannot have xError2 without xError`);if(ut(c)&&!ut(l))throw new Error(`${e} cannot have yError2 without yError`);if(ut(u)&&ut(l))throw new Error(`${e} cannot have both xError and yError with both are quantiative`);if(ut(u)){if(ua(s))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}else if(ut(l)){if(ua(o))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}function itt(t){return(ut(t.x)||ut(t.y))&&!ut(t.x2)&&!ut(t.y2)&&!ut(t.xError)&&!ut(t.xError2)&&!ut(t.yError)&&!ut(t.yError2)}function stt(t){return ut(t.x2)||ut(t.y2)}function ott(t){return ut(t.xError)||ut(t.xError2)||ut(t.yError)||ut(t.yError2)}function due(t,e,n){var r;const{mark:i,encoding:s,params:o,projection:u}=t,a=fue(t,["mark","encoding","params","projection"]),l=ia(i)?i:{type:i};o&&Oe(Yse(e));const{orient:c,inputType:f}=rtt(t,e),{continuousAxisChannelDef:x,continuousAxisChannelDef2:d,continuousAxisChannelDefError:p,continuousAxisChannelDefError2:g,continuousAxis:m}=oue(t,c,e),{errorBarSpecificAggregate:y,postAggregateCalculates:E,tooltipSummary:A,tooltipTitleWithFieldName:v}=utt(l,x,d,p,g,f,e,n),_=s,S=m;_[S];const b=m==="x"?"x2":"y2";_[b];const C=m==="x"?"xError":"yError";_[C];const R=m==="x"?"xError2":"yError2";_[R];const L=fue(_,[typeof S=="symbol"?S:S+"",typeof b=="symbol"?b:b+"",typeof C=="symbol"?C:C+"",typeof R=="symbol"?R:R+""]),{bins:$,timeUnits:U,aggregate:z,groupby:ee,encoding:G}=nue(L,n),fe=[...z,...y],pe=f!=="raw"?[]:ee,ae=QI(A,x,G,v);return{transform:[...(r=a.transform)!==null&&r!==void 0?r:[],...$,...U,...fe.length===0?[]:[{aggregate:fe,groupby:pe}],...E],groupby:pe,continuousAxisChannelDef:x,continuousAxis:m,encodingWithoutContinuousAxis:G,ticksOrient:c==="vertical"?"horizontal":"vertical",markDef:l,outerSpec:a,tooltipEncoding:ae}}function utt(t,e,n,r,i,s,o,u){let a=[],l=[];const c=e.field;let f,x=!1;if(s==="raw"){const d=t.center?t.center:t.extent?t.extent==="iqr"?"median":"mean":u.errorbar.center,p=t.extent?t.extent:d==="mean"?"stderr":"iqr";if(d==="median"!=(p==="iqr")&&Oe(vZe(d,p,o)),p==="stderr"||p==="stdev")a=[{op:p,field:c,as:`extent_${c}`},{op:d,field:c,as:`center_${c}`}],l=[{calculate:`datum["center_${c}"] + datum["extent_${c}"]`,as:`upper_${c}`},{calculate:`datum["center_${c}"] - datum["extent_${c}"]`,as:`lower_${c}`}],f=[{fieldPrefix:"center_",titlePrefix:rC(d)},{fieldPrefix:"upper_",titlePrefix:hue(d,p,"+")},{fieldPrefix:"lower_",titlePrefix:hue(d,p,"-")}],x=!0;else{let g,m,y;p==="ci"?(g="mean",m="ci0",y="ci1"):(g="median",m="q1",y="q3"),a=[{op:m,field:c,as:`lower_${c}`},{op:y,field:c,as:`upper_${c}`},{op:g,field:c,as:`center_${c}`}],f=[{fieldPrefix:"upper_",titlePrefix:w2({field:c,aggregate:y,type:"quantitative"},u,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:w2({field:c,aggregate:m,type:"quantitative"},u,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:w2({field:c,aggregate:g,type:"quantitative"},u,{allowDisabling:!1})}]}}else{(t.center||t.extent)&&Oe(AZe(t.center,t.extent)),s==="aggregated-upper-lower"?(f=[],l=[{calculate:`datum["${n.field}"]`,as:`upper_${c}`},{calculate:`datum["${c}"]`,as:`lower_${c}`}]):s==="aggregated-error"&&(f=[{fieldPrefix:"",titlePrefix:c}],l=[{calculate:`datum["${c}"] + datum["${r.field}"]`,as:`upper_${c}`}],i?l.push({calculate:`datum["${c}"] + datum["${i.field}"]`,as:`lower_${c}`}):l.push({calculate:`datum["${c}"] - datum["${r.field}"]`,as:`lower_${c}`}));for(const d of l)f.push({fieldPrefix:d.as.substring(0,6),titlePrefix:v2(v2(d.calculate,'datum["',""),'"]',"")})}return{postAggregateCalculates:l,errorBarSpecificAggregate:a,tooltipSummary:f,tooltipTitleWithFieldName:x}}function hue(t,e,n){return`${rC(t)} ${n} ${e}`}const YI="errorband",att=["band","borders"],ltt=new FC(YI,pue);function pue(t,{config:e}){t=Object.assign(Object.assign({},t),{encoding:LC(t.encoding,e)});const{transform:n,continuousAxisChannelDef:r,continuousAxis:i,encodingWithoutContinuousAxis:s,markDef:o,outerSpec:u,tooltipEncoding:a}=due(t,YI,e),l=o,c=WI(l,i,r,s,e.errorband),f=t.encoding.x!==void 0&&t.encoding.y!==void 0;let x={type:f?"area":"rect"},d={type:f?"line":"rule"};const p=Object.assign(Object.assign({},l.interpolate?{interpolate:l.interpolate}:{}),l.tension&&l.interpolate?{tension:l.tension}:{});return f?(x=Object.assign(Object.assign(Object.assign({},x),p),{ariaRoleDescription:"errorband"}),d=Object.assign(Object.assign(Object.assign({},d),p),{aria:!1})):l.interpolate?Oe(ioe("interpolate")):l.tension&&Oe(ioe("tension")),Object.assign(Object.assign({},u),{transform:n,layer:[...c({partName:"band",mark:x,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:a}),...c({partName:"borders",mark:d,positionPrefix:"lower",extraEncoding:a}),...c({partName:"borders",mark:d,positionPrefix:"upper",extraEncoding:a})]})}const gue={};function KI(t,e,n){const r=new FC(t,e);gue[t]={normalizer:r,parts:n}}function ctt(){return Re(gue)}KI(BC,lue,Jet),KI(VI,xue,ttt),KI(YI,pue,att);const ftt=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],mue={titleAlign:"align",titleAnchor:"anchor",titleAngle:"angle",titleBaseline:"baseline",titleColor:"color",titleFont:"font",titleFontSize:"fontSize",titleFontStyle:"fontStyle",titleFontWeight:"fontWeight",titleLimit:"limit",titleLineHeight:"lineHeight",titleOrient:"orient",titlePadding:"offset"},yue={labelAlign:"align",labelAnchor:"anchor",labelAngle:"angle",labelBaseline:"baseline",labelColor:"color",labelFont:"font",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelLimit:"limit",labelLineHeight:"lineHeight",labelOrient:"orient",labelPadding:"offset"},xtt=Re(mue),dtt=Re(yue),Eue=Re({header:1,headerRow:1,headerColumn:1,headerFacet:1}),Aue=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],htt={gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},ptt={aria:1,clipHeight:1,columnPadding:1,columns:1,cornerRadius:1,description:1,direction:1,fillColor:1,format:1,formatType:1,gradientLength:1,gradientOpacity:1,gradientStrokeColor:1,gradientStrokeWidth:1,gradientThickness:1,gridAlign:1,labelAlign:1,labelBaseline:1,labelColor:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labelSeparation:1,legendX:1,legendY:1,offset:1,orient:1,padding:1,rowPadding:1,strokeColor:1,symbolDash:1,symbolDashOffset:1,symbolFillColor:1,symbolLimit:1,symbolOffset:1,symbolOpacity:1,symbolSize:1,symbolStrokeColor:1,symbolStrokeWidth:1,symbolType:1,tickCount:1,tickMinStep:1,title:1,titleAlign:1,titleAnchor:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titleOrient:1,titlePadding:1,type:1,values:1,zindex:1},hy="_vgsid_",gtt={point:{on:"click",fields:[hy],toggle:"event.shiftKey",resolve:"global",clear:"dblclick"},interval:{on:"[mousedown, window:mouseup] > window:mousemove!",encodings:["x","y"],translate:"[mousedown, window:mouseup] > window:mousemove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}};function XI(t){return!!t&&(t==="legend"||!!t.legend)}function JI(t){return XI(t)&&Qe(t)}function ZI(t){return!!t.select}var mtt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function vue(t){const e=[];for(const n of t||[]){if(ZI(n))continue;const{expr:r,bind:i}=n,s=mtt(n,["expr","bind"]);if(i&&r){const o=Object.assign(Object.assign({},s),{bind:i,init:r});e.push(o)}else{const o=Object.assign(Object.assign(Object.assign({},s),r?{update:r}:{}),i?{bind:i}:{});e.push(o)}}return e}function ytt(t){return kC(t)||t$(t)||e$(t)}function e$(t){return"concat"in t}function kC(t){return"vconcat"in t}function t$(t){return"hconcat"in t}function _ue({step:t,offsetIsDiscrete:e}){var n;return e?(n=t.for)!==null&&n!==void 0?n:"offset":"position"}function la(t){return Qe(t)&&t.step!==void 0}function Sue(t){return t.view||t.width||t.height}const bue=20,Ett=Re({align:1,bounds:1,center:1,columns:1,spacing:1});function Att(t,e,n){var r,i;const s=n[e],o={},{spacing:u,columns:a}=s;u!==void 0&&(o.spacing=u),a!==void 0&&(bC(t)&&!cy(t.facet)||e$(t))&&(o.columns=a),kC(t)&&(o.columns=1);for(const l of Ett)if(t[l]!==void 0)if(l==="spacing"){const c=t[l];o[l]=rn(c)?c:{row:(r=c.row)!==null&&r!==void 0?r:u,column:(i=c.column)!==null&&i!==void 0?i:u}}else o[l]=t[l];return o}var vtt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function n$(t,e){var n;return(n=t[e])!==null&&n!==void 0?n:t[e==="width"?"continuousWidth":"continuousHeight"]}function PC(t,e){const n=MC(t,e);return la(n)?n.step:Cue}function MC(t,e){var n;const r=(n=t[e])!==null&&n!==void 0?n:t[e==="width"?"discreteWidth":"discreteHeight"];return Qn(r,{step:t.step})}const Cue=20,_tt={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:{continuousWidth:200,continuousHeight:200,step:Cue},mark:get,arc:{},area:{},bar:yet,circle:{},geoshape:{},image:{},line:{},point:{},rect:Eet,rule:{color:"black"},square:{},text:{color:"black"},tick:Aet,trail:{},boxplot:{size:14,extent:1.5,box:{},median:{color:"white"},outliers:{},rule:{},ticks:null},errorbar:{center:"mean",rule:!0,ticks:!1},errorband:{band:{opacity:.3},borders:!1},scale:ZZe,projection:{},legend:htt,header:{titlePadding:10,labelPadding:10},headerColumn:{},headerRow:{},headerFacet:{},selection:gtt,style:{},title:{},facet:{spacing:bue},concat:{spacing:bue}},bl=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],Tue={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},Rue={blue:bl[0],orange:bl[1],red:bl[2],teal:bl[3],green:bl[4],yellow:bl[5],purple:bl[6],pink:bl[7],brown:bl[8],gray0:"#000",gray1:"#111",gray2:"#222",gray3:"#333",gray4:"#444",gray5:"#555",gray6:"#666",gray7:"#777",gray8:"#888",gray9:"#999",gray10:"#aaa",gray11:"#bbb",gray12:"#ccc",gray13:"#ddd",gray14:"#eee",gray15:"#fff"};function Stt(t={}){return{signals:[{name:"color",value:Qe(t)?Object.assign(Object.assign({},Rue),t):Rue}],mark:{color:{signal:"color.blue"}},rule:{color:{signal:"color.gray0"}},text:{color:{signal:"color.gray0"}},style:{"guide-label":{fill:{signal:"color.gray0"}},"guide-title":{fill:{signal:"color.gray0"}},"group-title":{fill:{signal:"color.gray0"}},"group-subtitle":{fill:{signal:"color.gray0"}},cell:{stroke:{signal:"color.gray8"}}},axis:{domainColor:{signal:"color.gray13"},gridColor:{signal:"color.gray8"},tickColor:{signal:"color.gray13"}},range:{category:[{signal:"color.blue"},{signal:"color.orange"},{signal:"color.red"},{signal:"color.teal"},{signal:"color.green"},{signal:"color.yellow"},{signal:"color.purple"},{signal:"color.pink"},{signal:"color.brown"},{signal:"color.grey8"}]}}}function btt(t){return{signals:[{name:"fontSize",value:Qe(t)?Object.assign(Object.assign({},Tue),t):Tue}],text:{fontSize:{signal:"fontSize.text"}},style:{"guide-label":{fontSize:{signal:"fontSize.guideLabel"}},"guide-title":{fontSize:{signal:"fontSize.guideTitle"}},"group-title":{fontSize:{signal:"fontSize.groupTitle"}},"group-subtitle":{fontSize:{signal:"fontSize.groupSubtitle"}}}}}function Ctt(t){return{text:{font:t},style:{"guide-label":{font:t},"guide-title":{font:t},"group-title":{font:t},"group-subtitle":{font:t}}}}function Oue(t){const e=Re(t||{}),n={};for(const r of e){const i=t[r];n[r]=dy(i)?Bse(i):Es(i)}return n}function Ttt(t){const e=Re(t),n={};for(const r of e)n[r]=Oue(t[r]);return n}const Rtt=[...Roe,...eue,...Eue,"background","padding","legend","lineBreak","scale","style","title","view"];function Due(t={}){const{color:e,font:n,fontSize:r,selection:i}=t,s=vtt(t,["color","font","fontSize","selection"]),o=I7({},ct(_tt),n?Ctt(n):{},e?Stt(e):{},r?btt(r):{},s||{});i&&BS(o,"selection",i,!0);const u=Ys(o,Rtt);for(const a of["background","lineBreak","padding"])o[a]&&(u[a]=Es(o[a]));for(const a of Roe)o[a]&&(u[a]=Qi(o[a]));for(const a of eue)o[a]&&(u[a]=Oue(o[a]));for(const a of Eue)o[a]&&(u[a]=Qi(o[a]));return o.legend&&(u.legend=Qi(o.legend)),o.scale&&(u.scale=Qi(o.scale)),o.style&&(u.style=Ttt(o.style)),o.title&&(u.title=Qi(o.title)),o.view&&(u.view=Qi(o.view)),u}const Ott=new Set(["view",...fet]),Dtt=["color","fontSize","background","padding","facet","concat","numberFormat","timeFormat","countTitle","header","axisQuantitative","axisTemporal","axisDiscrete","axisPoint","axisXBand","axisXPoint","axisXDiscrete","axisXQuantitative","axisXTemporal","axisYBand","axisYPoint","axisYDiscrete","axisYQuantitative","axisYTemporal","scale","selection","overlay"],wtt=Object.assign({view:["continuousWidth","continuousHeight","discreteWidth","discreteHeight","step"]},pet);function Ntt(t){t=ct(t);for(const e of Dtt)delete t[e];if(t.axis)for(const e in t.axis)dy(t.axis[e])&&delete t.axis[e];if(t.legend)for(const e of ftt)delete t.legend[e];if(t.mark){for(const e of Toe)delete t.mark[e];t.mark.tooltip&&Qe(t.mark.tooltip)&&delete t.mark.tooltip}t.params&&(t.signals=(t.signals||[]).concat(vue(t.params)),delete t.params);for(const e of Ott){for(const r of Toe)delete t[e][r];const n=wtt[e];if(n)for(const r of n)delete t[e][r];Ltt(t,e)}for(const e of ctt())delete t[e];Ftt(t);for(const e in t)Qe(t[e])&&Kt(t[e])&&delete t[e];return Kt(t)?void 0:t}function Ftt(t){const{titleMarkConfig:e,subtitleMarkConfig:n,subtitle:r}=$se(t.title);Kt(e)||(t.style["group-title"]=Object.assign(Object.assign({},t.style["group-title"]),e)),Kt(n)||(t.style["group-subtitle"]=Object.assign(Object.assign({},t.style["group-subtitle"]),n)),Kt(r)?delete t.title:t.title=r}function Ltt(t,e,n,r){const i=t[e];e==="view"&&(n="cell");const s=Object.assign(Object.assign({},i),t.style[n??e]);Kt(s)||(t.style[n??e]=s),delete t[e]}function jC(t){return"layer"in t}function Itt(t){return"repeat"in t}function $tt(t){return!be(t.repeat)&&t.repeat.layer}var Btt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};class r${map(e,n){return bC(e)?this.mapFacet(e,n):Itt(e)?this.mapRepeat(e,n):t$(e)?this.mapHConcat(e,n):kC(e)?this.mapVConcat(e,n):e$(e)?this.mapConcat(e,n):this.mapLayerOrUnit(e,n)}mapLayerOrUnit(e,n){if(jC(e))return this.mapLayer(e,n);if(Sl(e))return this.mapUnit(e,n);throw new Error(sI(e))}mapLayer(e,n){return Object.assign(Object.assign({},e),{layer:e.layer.map(r=>this.mapLayerOrUnit(r,n))})}mapHConcat(e,n){return Object.assign(Object.assign({},e),{hconcat:e.hconcat.map(r=>this.map(r,n))})}mapVConcat(e,n){return Object.assign(Object.assign({},e),{vconcat:e.vconcat.map(r=>this.map(r,n))})}mapConcat(e,n){const{concat:r}=e,i=Btt(e,["concat"]);return Object.assign(Object.assign({},i),{concat:r.map(s=>this.map(s,n))})}mapFacet(e,n){return Object.assign(Object.assign({},e),{spec:this.map(e.spec,n)})}mapRepeat(e,n){return Object.assign(Object.assign({},e),{spec:this.map(e.spec,n)})}}const ktt={zero:1,center:1,normalize:1};function Ptt(t){return t in ktt}const Mtt=new Set([_oe,mC,gC,AC,EC,TI,RI,yC,Soe,CI]),jtt=new Set([mC,gC,_oe]);function L2(t){return Le(t)&&BI(t)==="quantitative"&&!t.bin}function wue(t,e){var n,r;const i=e==="x"?"y":"radius",s=t[e],o=t[i];if(Le(s)&&Le(o))if(L2(s)&&L2(o)){if(s.stack)return e;if(o.stack)return i;const u=Le(s)&&!!s.aggregate,a=Le(o)&&!!o.aggregate;if(u!==a)return u?e:i;{const l=(n=s.scale)===null||n===void 0?void 0:n.type,c=(r=o.scale)===null||r===void 0?void 0:r.type;if(l&&l!=="linear")return i;if(c&&c!=="linear")return e}}else{if(L2(s))return e;if(L2(o))return i}else{if(L2(s))return e;if(L2(o))return i}}function Utt(t){switch(t){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}function Nue(t,e,n={}){var r,i;const s=ia(t)?t.type:t;if(!Mtt.has(s))return null;const o=wue(e,"x")||wue(e,"theta");if(!o)return null;const u=e[o],a=Le(u)?Ie(u,{}):void 0,l=Utt(o),c=[],f=new Set;if(e[l]){const p=e[l],g=Le(p)?Ie(p,{}):void 0;g&&g!==a&&(c.push(l),f.add(g));const m=l==="x"?"xOffset":"yOffset",y=e[m],E=Le(y)?Ie(y,{}):void 0;E&&E!==a&&(c.push(m),f.add(E))}const x=tJe.reduce((p,g)=>{if(g!=="tooltip"&&Dx(e,g)){const m=e[g];for(const y of qe(m)){const E=aa(y);if(E.aggregate)continue;const A=Ie(E,{});(!A||!f.has(A))&&p.push({channel:g,fieldDef:E})}}return p},[]);let d;if(u.stack!==void 0?yh(u.stack)?d=u.stack?"zero":null:d=u.stack:jtt.has(s)&&(d="zero"),!d||!Ptt(d)||zI(e)&&x.length===0)return null;if(!((r=u==null?void 0:u.scale)===null||r===void 0)&&r.type&&((i=u==null?void 0:u.scale)===null||i===void 0?void 0:i.type)!==Gi.LINEAR){if(n.disallowNonLinearStack)return null;Oe(mZe(u.scale.type))}return ut(e[El(o)])?(u.stack!==void 0&&Oe(gZe(o)),null):(Le(u)&&u.aggregate&&!dJe.has(u.aggregate)&&Oe(yZe(u.aggregate)),{groupbyChannels:c,groupbyFields:f,fieldChannel:o,impute:u.impute===null?!1:sc(s),stackBy:x,offset:d})}var Fue=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function qtt(t){const e=Fue(t,["point","line"]);return Re(e).length>1?e:e.type}function ztt(t){for(const e of["line","area","rule","trail"])t[e]&&(t=Object.assign(Object.assign({},t),{[e]:Ys(t[e],["point","line"])}));return t}function i$(t,e={},n){return t.point==="transparent"?{opacity:0}:t.point?Qe(t.point)?t.point:{}:t.point!==void 0?null:e.point||n.shape?Qe(e.point)?e.point:{}:void 0}function Lue(t,e={}){return t.line?t.line===!0?{}:t.line:t.line!==void 0?null:e.line?e.line===!0?{}:e.line:void 0}class Htt{constructor(){this.name="path-overlay"}hasMatchingType(e,n){if(Sl(e)){const{mark:r,encoding:i}=e,s=ia(r)?r:{type:r};switch(s.type){case"line":case"rule":case"trail":return!!i$(s,n[s.type],i);case"area":return!!i$(s,n[s.type],i)||!!Lue(s,n[s.type])}}return!1}run(e,n,r){const{config:i}=n,{params:s,projection:o,mark:u,encoding:a}=e,l=Fue(e,["params","projection","mark","encoding"]),c=LC(a,i),f=ia(u)?u:{type:u},x=i$(f,i[f.type],c),d=f.type==="area"&&Lue(f,i[f.type]),p=[Object.assign(Object.assign({},s?{params:s}:{}),{mark:qtt(Object.assign(Object.assign({},f.type==="area"&&f.opacity===void 0&&f.fillOpacity===void 0?{opacity:.7}:{}),f)),encoding:Ys(c,["shape"])})],g=Nue(f,c);let m=c;if(g){const{fieldChannel:y,offset:E}=g;m=Object.assign(Object.assign({},c),{[y]:Object.assign(Object.assign({},c[y]),E?{stack:E}:{})})}return d&&p.push(Object.assign(Object.assign({},o?{projection:o}:{}),{mark:Object.assign(Object.assign({type:"line"},ey(f,["clip","interpolate","tension","tooltip"])),d),encoding:m})),x&&p.push(Object.assign(Object.assign({},o?{projection:o}:{}),{mark:Object.assign(Object.assign({type:"point",opacity:1,filled:!0},ey(f,["clip","tooltip"])),x),encoding:m})),r(Object.assign(Object.assign({},l),{layer:p}),Object.assign(Object.assign({},n),{config:ztt(i)}))}}var Qtt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Gtt(t,e){return e?cy(t)?kue(t,e):Iue(t,e):t}function s$(t,e){return e?kue(t,e):t}function o$(t,e,n){const r=e[t];if(Net(r)){if(r.repeat in n)return Object.assign(Object.assign({},e),{[t]:n[r.repeat]});Oe(FJe(r.repeat));return}return e}function Iue(t,e){if(t=o$("field",t,e),t!==void 0){if(t===null)return null;if($I(t)&&sa(t.sort)){const n=o$("field",t.sort,e);t=Object.assign(Object.assign({},t),n?{sort:n}:{})}return t}}function $ue(t,e){if(Le(t))return Iue(t,e);{const n=o$("datum",t,e);return n!==t&&!n.type&&(n.type="nominal"),n}}function Bue(t,e){if(ut(t)){const n=$ue(t,e);if(n)return n;if(CC(t))return{condition:t.condition}}else{if(fy(t)){const n=$ue(t.condition,e);return n?Object.assign(Object.assign({},t),{condition:n}):Qtt(t,["condition"])}return t}}function kue(t,e){const n={};for(const r in t)if(Ze(t,r)){const i=t[r];if(be(i))n[r]=i.map(s=>Bue(s,e)).filter(s=>s);else{const s=Bue(i,e);s!==void 0&&(n[r]=s)}}return n}class Wtt{constructor(){this.name="RuleForRangedLine"}hasMatchingType(e){if(Sl(e)){const{encoding:n,mark:r}=e;if(r==="line"||ia(r)&&r.type==="line")for(const i of JXe){const s=vx(i),o=n[s];if(n[i]&&(Le(o)&&!yi(o.bin)||oa(o)))return!0}}return!1}run(e,n,r){const{encoding:i,mark:s}=e;return Oe(ZJe(!!i.x2,!!i.y2)),r(Object.assign(Object.assign({},e),{mark:Qe(s)?Object.assign(Object.assign({},s),{type:"rule"}):"rule"}),n)}}var oc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};class Vtt extends r${constructor(){super(...arguments),this.nonFacetUnitNormalizers=[Zet,ntt,ltt,new Htt,new Wtt]}map(e,n){if(Sl(e)){const r=Dx(e.encoding,dl),i=Dx(e.encoding,hl),s=Dx(e.encoding,sC);if(r||i||s)return this.mapFacetedUnit(e,n)}return super.map(e,n)}mapUnit(e,n){const{parentEncoding:r,parentProjection:i}=n,s=s$(e.encoding,n.repeater),o=Object.assign(Object.assign({},e),s?{encoding:s}:{});if(r||i)return this.mapUnitWithParentEncodingOrProjection(o,n);const u=this.mapLayerOrUnit.bind(this);for(const a of this.nonFacetUnitNormalizers)if(a.hasMatchingType(o,n.config))return a.run(o,n,u);return o}mapRepeat(e,n){return $tt(e)?this.mapLayerRepeat(e,n):this.mapNonLayerRepeat(e,n)}mapLayerRepeat(e,n){const{repeat:r,spec:i}=e,s=oc(e,["repeat","spec"]),{row:o,column:u,layer:a}=r,{repeater:l={},repeaterPrefix:c=""}=n;return o||u?this.mapRepeat(Object.assign(Object.assign({},e),{repeat:Object.assign(Object.assign({},o?{row:o}:{}),u?{column:u}:{}),spec:{repeat:{layer:a},spec:i}}),n):Object.assign(Object.assign({},s),{layer:a.map(f=>{const x=Object.assign(Object.assign({},l),{layer:f}),d=`${(i.name||"")+c}child__layer_${yn(f)}`,p=this.mapLayerOrUnit(i,Object.assign(Object.assign({},n),{repeater:x,repeaterPrefix:d}));return p.name=d,p})})}mapNonLayerRepeat(e,n){var r;const{repeat:i,spec:s,data:o}=e,u=oc(e,["repeat","spec","data"]);!be(i)&&e.columns&&(e=Ys(e,["columns"]),Oe(Kse("repeat")));const a=[],{repeater:l={},repeaterPrefix:c=""}=n,f=!be(i)&&i.row||[l?l.row:null],x=!be(i)&&i.column||[l?l.column:null],d=be(i)&&i||[l?l.repeat:null];for(const g of d)for(const m of f)for(const y of x){const E={repeat:g,row:m,column:y,layer:l.layer},A=(s.name||"")+c+"child__"+(be(i)?`${yn(g)}`:(i.row?`row_${yn(m)}`:"")+(i.column?`column_${yn(y)}`:"")),v=this.map(s,Object.assign(Object.assign({},n),{repeater:E,repeaterPrefix:A}));v.name=A,a.push(Ys(v,["data"]))}const p=be(i)?e.columns:i.column?i.column.length:1;return Object.assign(Object.assign({data:(r=s.data)!==null&&r!==void 0?r:o,align:"all"},u),{columns:p,concat:a})}mapFacet(e,n){const{facet:r}=e;return cy(r)&&e.columns&&(e=Ys(e,["columns"]),Oe(Kse("facet"))),super.mapFacet(e,n)}mapUnitWithParentEncodingOrProjection(e,n){const{encoding:r,projection:i}=e,{parentEncoding:s,parentProjection:o,config:u}=n,a=Mue({parentProjection:o,projection:i}),l=Pue({parentEncoding:s,encoding:s$(r,n.repeater)});return this.mapUnit(Object.assign(Object.assign(Object.assign({},e),a?{projection:a}:{}),l?{encoding:l}:{}),{config:u})}mapFacetedUnit(e,n){const r=e.encoding,{row:i,column:s,facet:o}=r,u=oc(r,["row","column","facet"]),{mark:a,width:l,projection:c,height:f,view:x,params:d,encoding:p}=e,g=oc(e,["mark","width","projection","height","view","params","encoding"]),{facetMapping:m,layout:y}=this.getFacetMappingAndLayout({row:i,column:s,facet:o},n),E=s$(u,n.repeater);return this.mapFacet(Object.assign(Object.assign(Object.assign({},g),y),{facet:m,spec:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},l?{width:l}:{}),f?{height:f}:{}),x?{view:x}:{}),c?{projection:c}:{}),{mark:a,encoding:E}),d?{params:d}:{})}),n)}getFacetMappingAndLayout(e,n){var r;const{row:i,column:s,facet:o}=e;if(i||s){o&&Oe(XJe([...i?[dl]:[],...s?[hl]:[]]));const u={},a={};for(const l of[dl,hl]){const c=e[l];if(c){const f=oc(c,["align","center","spacing","columns"]);u[l]=f;for(const x of["align","center","spacing"])c[x]!==void 0&&((r=a[x])!==null&&r!==void 0||(a[x]={}),a[x][l]=c[x])}}return{facetMapping:u,layout:a}}else{const{align:u,center:a,spacing:l,columns:c}=o,f=oc(o,["align","center","spacing","columns"]);return{facetMapping:Gtt(f,n.repeater),layout:Object.assign(Object.assign(Object.assign(Object.assign({},u?{align:u}:{}),a?{center:a}:{}),l?{spacing:l}:{}),c?{columns:c}:{})}}}mapLayer(e,n){var{parentEncoding:r,parentProjection:i}=n,s=oc(n,["parentEncoding","parentProjection"]);const{encoding:o,projection:u}=e,a=oc(e,["encoding","projection"]),l=Object.assign(Object.assign({},s),{parentEncoding:Pue({parentEncoding:r,encoding:o,layer:!0}),parentProjection:Mue({parentProjection:i,projection:u})});return super.mapLayer(a,l)}}function Pue({parentEncoding:t,encoding:e={},layer:n}){let r={};if(t){const i=new Set([...Re(t),...Re(e)]);for(const s of i){const o=e[s],u=t[s];if(ut(o)){const a=Object.assign(Object.assign({},u),o);r[s]=a}else fy(o)?r[s]=Object.assign(Object.assign({},o),{condition:Object.assign(Object.assign({},u),o.condition)}):o||o===null?r[s]=o:(n||qo(u)||Ye(u)||ut(u)||be(u))&&(r[s]=u)}}else r=e;return!r||Kt(r)?void 0:r}function Mue(t){const{parentProjection:e,projection:n}=t;return e&&n&&Oe(PJe({parentProjection:e,projection:n})),n??e}function u$(t){return"filter"in t}function Ytt(t){return(t==null?void 0:t.stop)!==void 0}function jue(t){return"lookup"in t}function Ktt(t){return"data"in t}function Xtt(t){return"param"in t}function Jtt(t){return"pivot"in t}function Ztt(t){return"density"in t}function ent(t){return"quantile"in t}function tnt(t){return"regression"in t}function nnt(t){return"loess"in t}function rnt(t){return"sample"in t}function int(t){return"window"in t}function snt(t){return"joinaggregate"in t}function ont(t){return"flatten"in t}function unt(t){return"calculate"in t}function Uue(t){return"bin"in t}function ant(t){return"impute"in t}function lnt(t){return"timeUnit"in t}function cnt(t){return"aggregate"in t}function fnt(t){return"stack"in t}function xnt(t){return"fold"in t}function dnt(t){return t.map(e=>u$(e)?{filter:E2(e.filter,QZe)}:e)}var uc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};class hnt extends r${map(e,n){var r,i;return(r=n.emptySelections)!==null&&r!==void 0||(n.emptySelections={}),(i=n.selectionPredicates)!==null&&i!==void 0||(n.selectionPredicates={}),e=que(e,n),super.map(e,n)}mapLayerOrUnit(e,n){if(e=que(e,n),e.encoding){const r={};for(const[i,s]of yx(e.encoding))r[i]=zue(s,n);e=Object.assign(Object.assign({},e),{encoding:r})}return super.mapLayerOrUnit(e,n)}mapUnit(e,n){const r=e,{selection:i}=r,s=uc(r,["selection"]);return i?Object.assign(Object.assign({},s),{params:yx(i).map(([o,u])=>{var a;const l=u,{init:c,bind:f,empty:x}=l,d=uc(l,["init","bind","empty"]);d.type==="single"?(d.type="point",d.toggle=!1):d.type==="multi"&&(d.type="point"),n.emptySelections[o]=x!=="none";for(const p of mi((a=n.selectionPredicates[o])!==null&&a!==void 0?a:{}))p.empty=x!=="none";return{name:o,value:c,select:d,bind:f}})}):e}}function que(t,e){const{transform:n}=t,r=uc(t,["transform"]);if(n){const i=n.map(s=>{if(u$(s))return{filter:a$(s,e)};if(Uue(s)&&_x(s.bin))return Object.assign(Object.assign({},s),{bin:Hue(s.bin)});if(jue(s)){const o=s.from,{selection:u}=o,a=uc(o,["selection"]);return u?Object.assign(Object.assign({},s),{from:Object.assign({param:u},a)}):s}return s});return Object.assign(Object.assign({},r),{transform:i})}return t}function zue(t,e){var n,r;const i=ct(t);if(Le(i)&&_x(i.bin)&&(i.bin=Hue(i.bin)),Ox(i)&&(!((r=(n=i.scale)===null||n===void 0?void 0:n.domain)===null||r===void 0)&&r.selection)){const s=i.scale.domain,{selection:o}=s,u=uc(s,["selection"]);i.scale.domain=Object.assign(Object.assign({},u),o?{param:o}:{})}if(CC(i))if(be(i.condition))i.condition=i.condition.map(s=>{const{selection:o,param:u,test:a}=s,l=uc(s,["selection","param","test"]);return u?s:Object.assign(Object.assign({},l),{test:a$(s,e)})});else{const s=zue(i.condition,e),{selection:o,param:u,test:a}=s,l=uc(s,["selection","param","test"]);i.condition=u?i.condition:Object.assign(Object.assign({},l),{test:a$(i.condition,e)})}return i}function Hue(t){const e=t.extent;if(e!=null&&e.selection){const{selection:n}=e,r=uc(e,["selection"]);return Object.assign(Object.assign({},t),{extent:Object.assign(Object.assign({},r),{param:n})})}return t}function a$(t,e){const n=r=>E2(r,i=>{var s,o,u;const a=(s=e.emptySelections[i])!==null&&s!==void 0?s:!0,l={param:i,empty:a};return(o=(u=e.selectionPredicates)[i])!==null&&o!==void 0||(u[i]=[]),e.selectionPredicates[i].push(l),l});return t.selection?n(t.selection):E2(t.test||t.filter,r=>r.selection?n(r.selection):r)}class l$ extends r${map(e,n){var r;const i=(r=n.selections)!==null&&r!==void 0?r:[];if(e.params&&!Sl(e)){const s=[];for(const o of e.params)ZI(o)?i.push(o):s.push(o);e.params=s}return n.selections=i,super.map(e,Que(e,n))}mapUnit(e,n){var r;const i=n.selections;if(!i||!i.length)return e;const s=((r=n.path)!==null&&r!==void 0?r:[]).concat(e.name),o=[];for(const u of i)if(!u.views||!u.views.length)o.push(u);else for(const a of u.views)(ze(a)&&(a===e.name||s.indexOf(a)>=0)||be(a)&&a.map(l=>s.indexOf(l)).every((l,c,f)=>l!==-1&&(c===0||l>f[c-1])))&&o.push(u);return o.length&&(e.params=o),e}}for(const t of["mapFacet","mapRepeat","mapHConcat","mapVConcat","mapLayer"]){const e=l$.prototype[t];l$.prototype[t]=function(n,r){return e.call(this,n,Que(n,r))}}function Que(t,e){var n;return t.name?Object.assign(Object.assign({},e),{path:((n=e.path)!==null&&n!==void 0?n:[]).concat(t.name)}):e}function pnt(t,e){e===void 0&&(e=Due(t.config));const n=Ent(t,e),{width:r,height:i}=t,s=Ant(n,{width:r,height:i,autosize:t.autosize},e);return Object.assign(Object.assign({},n),s?{autosize:s}:{})}const gnt=new Vtt,mnt=new hnt,ynt=new l$;function Ent(t,e={}){const n={config:e};return ynt.map(gnt.map(mnt.map(t,n),n),n)}function Gue(t){return ze(t)?{type:t}:t??{}}function Ant(t,e,n){let{width:r,height:i}=e;const s=Sl(t)||jC(t),o={};s?r=="container"&&i=="container"?(o.type="fit",o.contains="padding"):r=="container"?(o.type="fit-x",o.contains="padding"):i=="container"&&(o.type="fit-y",o.contains="padding"):(r=="container"&&(Oe(Qse("width")),r=void 0),i=="container"&&(Oe(Qse("height")),i=void 0));const u=Object.assign(Object.assign(Object.assign({type:"pad"},o),n?Gue(n.autosize):{}),Gue(t.autosize));if(u.type==="fit"&&!s&&(Oe(_Je),u.type="pad"),r=="container"&&!(u.type=="fit"||u.type=="fit-x")&&Oe(Gse("width")),i=="container"&&!(u.type=="fit"||u.type=="fit-y")&&Oe(Gse("height")),!fl(u,{type:"pad"}))return u}function vnt(t){return t==="fit"||t==="fit-x"||t==="fit-y"}function _nt(t){return t?`fit-${cC(t)}`:"fit"}const Snt=["background","padding"];function Wue(t,e){const n={};for(const r of Snt)t&&t[r]!==void 0&&(n[r]=Es(t[r]));return e&&(n.params=t.params),n}class Cl{constructor(e={},n={}){this.explicit=e,this.implicit=n}clone(){return new Cl(ct(this.explicit),ct(this.implicit))}combine(){return Object.assign(Object.assign({},this.explicit),this.implicit)}get(e){return Qn(this.explicit[e],this.implicit[e])}getWithExplicit(e){return this.explicit[e]!==void 0?{explicit:!0,value:this.explicit[e]}:this.implicit[e]!==void 0?{explicit:!1,value:this.implicit[e]}:{explicit:!1,value:void 0}}setWithExplicit(e,{value:n,explicit:r}){n!==void 0&&this.set(e,n,r)}set(e,n,r){return delete this[r?"implicit":"explicit"][e],this[r?"explicit":"implicit"][e]=n,this}copyKeyFromSplit(e,{explicit:n,implicit:r}){n[e]!==void 0?this.set(e,n[e],!0):r[e]!==void 0&&this.set(e,r[e],!1)}copyKeyFromObject(e,n){n[e]!==void 0&&this.set(e,n[e],!0)}copyAll(e){for(const n of Re(e.combine())){const r=e.getWithExplicit(n);this.setWithExplicit(n,r)}}}function ca(t){return{explicit:!0,value:t}}function vs(t){return{explicit:!1,value:t}}function Vue(t){return(e,n,r,i)=>{const s=t(e.value,n.value);return s>0?e:s<0?n:UC(e,n,r,i)}}function UC(t,e,n,r){return t.explicit&&e.explicit&&Oe(lZe(n,r,t.value,e.value)),t}function ac(t,e,n,r,i=UC){return t===void 0||t.value===void 0?e:t.explicit&&!e.explicit?t:e.explicit&&!t.explicit?e:fl(t.value,e.value)?t:i(t,e,n,r)}class bnt extends Cl{constructor(e={},n={},r=!1){super(e,n),this.explicit=e,this.implicit=n,this.parseNothing=r}clone(){const e=super.clone();return e.parseNothing=this.parseNothing,e}}function I2(t){return"url"in t}function py(t){return"values"in t}function Yue(t){return"name"in t&&!I2(t)&&!py(t)&&!lc(t)}function lc(t){return t&&(Kue(t)||Xue(t)||c$(t))}function Kue(t){return"sequence"in t}function Xue(t){return"sphere"in t}function c$(t){return"graticule"in t}var tn;(function(t){t[t.Raw=0]="Raw",t[t.Main=1]="Main",t[t.Row=2]="Row",t[t.Column=3]="Column",t[t.Lookup=4]="Lookup"})(tn||(tn={}));var Cnt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function $2(t,e=!0,n=Zr){if(be(t)){const r=t.map(i=>$2(i,e,n));return e?`[${r.join(", ")}]`:r}else if(bx(t))return n(e?uy(t):IZe(t));return e?n(on(t)):t}function Tnt(t,e){var n;for(const r of mi((n=t.component.selection)!==null&&n!==void 0?n:{})){const i=r.name;let s=`${i}${xc}, ${r.resolve==="global"?"true":`{unit: ${P2(t)}}`}`;for(const o of GC)o.defined(r)&&(o.signals&&(e=o.signals(t,r,e)),o.modifyExpr&&(s=o.modifyExpr(t,r,s)));e.push({name:i+srt,on:[{events:{signal:r.name+xc},update:`modify(${Fe(r.name+wx)}, ${s})`}]})}return f$(e)}function Rnt(t,e){if(t.component.selection&&Re(t.component.selection).length){const n=Fe(t.getName("cell"));e.unshift({name:"facet",value:{},on:[{events:cx("mousemove","scope"),update:`isTuple(facet) ? facet : group(${n}).datum`}]})}return f$(e)}function Ont(t,e){var n;let r=!1;for(const i of mi((n=t.component.selection)!==null&&n!==void 0?n:{})){const s=i.name,o=Fe(s+wx);if(e.filter(a=>a.name===s).length===0){const a=i.resolve==="global"?"union":i.resolve,l=i.type==="point"?", true, true)":")";e.push({name:i.name,update:`${Aae}(${o}, ${Fe(a)}${l}`})}r=!0;for(const a of GC)a.defined(i)&&a.topLevelSignals&&(e=a.topLevelSignals(t,i,e))}return r&&e.filter(s=>s.name==="unit").length===0&&e.unshift({name:"unit",value:{},on:[{events:"mousemove",update:"isTuple(group()) ? group() : unit"}]}),f$(e)}function Dnt(t,e){var n;const r=[...e];for(const i of mi((n=t.component.selection)!==null&&n!==void 0?n:{})){const s={name:i.name+wx};if(i.init){const u=i.project.items.map(a=>Cnt(a,["signals"]));s.values=i.init.map(a=>({unit:P2(t,{escape:!1}),fields:u,values:$2(a,!1)}))}r.filter(u=>u.name===i.name+wx).length||r.push(s)}return r}function Jue(t,e){var n;for(const r of mi((n=t.component.selection)!==null&&n!==void 0?n:{}))for(const i of GC)i.defined(r)&&i.marks&&(e=i.marks(t,r,e));return e}function wnt(t,e){for(const n of t.children)$n(n)&&(e=Jue(n,e));return e}function Nnt(t,e,n,r){const i=Cae(t,e.param,e);return{signal:As(n.get("type"))&&be(r)&&r[0]>r[1]?`isValid(${i}) && reverse(${i})`:i}}function f$(t){return t.map(e=>(e.on&&!e.on.length&&delete e.on,e))}class Ht{constructor(e,n){this.debugName=n,this._children=[],this._parent=null,e&&(this.parent=e)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(e){this._parent=e,e&&e.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(e,n){if(this._children.includes(e)){Oe($Je);return}n!==void 0?this._children.splice(n,0,e):this._children.push(e)}removeChild(e){const n=this._children.indexOf(e);return this._children.splice(n,1),n}remove(){let e=this._parent.removeChild(this);for(const n of this._children)n._parent=this._parent,this._parent.addChild(n,e++)}insertAsParentOf(e){const n=e.parent;n.removeChild(this),this.parent=n,e.parent=this}swapWithParent(){const e=this._parent,n=e.parent;for(const r of this._children)r.parent=e;this._children=[],e.removeChild(this),e.parent.removeChild(e),this.parent=n,e.parent=this}}class vi extends Ht{constructor(e,n,r,i){super(e,n),this.type=r,this.refCounts=i,this._source=this._name=n,this.refCounts&&!(this._name in this.refCounts)&&(this.refCounts[this._name]=0)}clone(){const e=new this.constructor;return e.debugName=`clone_${this.debugName}`,e._source=this._source,e._name=`clone_${this._name}`,e.type=this.type,e.refCounts=this.refCounts,e.refCounts[e._name]=0,e}dependentFields(){return new Set}producedFields(){return new Set}hash(){return this._hash===void 0&&(this._hash=`Output ${UXe()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(e){this._source=e}}var Zue=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};class fa extends Ht{constructor(e,n){super(e),this.formula=n}clone(){return new fa(null,ct(this.formula))}static makeFromEncoding(e,n){const r=n.reduceFieldDef((i,s)=>{const{field:o,timeUnit:u}=s;if(u){const a=Ie(s,{forAs:!0});i[Rt({as:a,field:o,timeUnit:u})]={as:a,field:o,timeUnit:u}}return i},{});return Kt(r)?null:new fa(e,r)}static makeFromTransform(e,n){const r=Object.assign({},n),{timeUnit:i}=r,s=Zue(r,["timeUnit"]),o=Ei(i),u=Object.assign(Object.assign({},s),{timeUnit:o});return new fa(e,{[Rt(u)]:u})}merge(e){this.formula=Object.assign({},this.formula);for(const n in e.formula)this.formula[n]||(this.formula[n]=e.formula[n]);for(const n of e.children)e.removeChild(n),n.parent=this;e.remove()}removeFormulas(e){const n={};for(const[r,i]of yx(this.formula))e.has(i.as)||(n[r]=i);this.formula=n}producedFields(){return new Set(mi(this.formula).map(e=>e.as))}dependentFields(){return new Set(mi(this.formula).map(e=>e.field))}hash(){return`TimeUnit ${Rt(this.formula)}`}assemble(){const e=[];for(const n of mi(this.formula)){const{field:r,as:i,timeUnit:s}=n,o=Ei(s),{unit:u,utc:a}=o,l=Zue(o,["unit","utc"]);e.push(Object.assign(Object.assign(Object.assign(Object.assign({field:ko(r),type:"timeunit"},u?{units:xI(u)}:{}),a?{timezone:"utc"}:{}),l),{as:[i,`${i}_end`]}))}return e}}var Fnt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const gy="_tuple_fields";class Lnt{constructor(...e){this.items=e,this.hasChannel={},this.hasField={}}}const Int={defined:()=>!0,parse:(t,e,n)=>{var r;const i=e.name,s=(r=e.project)!==null&&r!==void 0?r:e.project=new Lnt,o={},u={},a=new Set,l=(g,m)=>{const y=m==="visual"?g.channel:g.field;let E=yn(`${i}_${y}`);for(let A=1;a.has(E);A++)E=yn(`${i}_${y}_${A}`);return a.add(E),{[m]:E}},c=e.type,f=t.config.selection[c],x=n.value!==void 0?qe(n.value):null;let{fields:d,encodings:p}=Qe(n.select)?n.select:{};if(!d&&!p&&x){for(const g of x)if(Qe(g))for(const m of Re(g))XXe(m)?(p||(p=[])).push(m):c==="interval"?(Oe(NJe),p=f.encodings):(d||(d=[])).push(m)}!d&&!p&&(p=f.encodings,"fields"in f&&(d=f.fields));for(const g of p??[]){const m=t.fieldDef(g);if(m){let y=m.field;if(m.aggregate){Oe(SJe(g,m.aggregate));continue}else if(!y){Oe(Vse(g));continue}if(m.timeUnit){y=t.vgField(g);const E={timeUnit:m.timeUnit,as:y,field:m.field};u[Rt(E)]=E}if(!o[y]){let E="E";if(c==="interval"){const v=t.getScaleComponent(g).get("type");As(v)&&(E="R")}else m.bin&&(E="R-RE");const A={field:y,channel:g,type:E};A.signals=Object.assign(Object.assign({},l(A,"data")),l(A,"visual")),s.items.push(o[y]=A),s.hasField[y]=s.hasChannel[g]=o[y]}}else Oe(Vse(g))}for(const g of d??[]){if(s.hasField[g])continue;const m={type:"E",field:g};m.signals=Object.assign({},l(m,"data")),s.items.push(m),s.hasField[g]=m}x&&(e.init=x.map(g=>s.items.map(m=>Qe(g)?g[m.channel]!==void 0?g[m.channel]:g[m.field]:g))),Kt(u)||(s.timeUnit=new fa(null,u))},signals:(t,e,n)=>{const r=e.name+gy;return n.filter(s=>s.name===r).length>0?n:n.concat({name:r,value:e.project.items.map(s=>{const o=Fnt(s,["signals","hasLegend"]);return o.field=ko(o.field),o})})}},cc={defined:t=>t.type==="interval"&&t.resolve==="global"&&t.bind&&t.bind==="scales",parse:(t,e)=>{const n=e.scales=[];for(const r of e.project.items){const i=r.channel;if(!tc(i))continue;const s=t.getScaleComponent(i),o=s?s.get("type"):void 0;if(!s||!As(o)){Oe(TJe);continue}s.set("selectionExtent",{param:e.name,field:r.field},!0),n.push(r)}},topLevelSignals:(t,e,n)=>{const r=e.scales.filter(o=>n.filter(u=>u.name===o.signals.data).length===0);if(!t.parent||d$(t)||r.length===0)return n;const i=n.filter(o=>o.name===e.name)[0];let s=i.update;if(s.indexOf(Aae)>=0)i.update=`{${r.map(o=>`${Fe(ko(o.field))}: ${o.signals.data}`).join(", ")}}`;else{for(const o of r){const u=`${Fe(ko(o.field))}: ${o.signals.data}`;s.includes(u)||(s=`${s.substring(0,s.length-1)}, ${u}}`)}i.update=s}return n.concat(r.map(o=>({name:o.signals.data})))},signals:(t,e,n)=>{if(t.parent&&!d$(t))for(const r of e.scales){const i=n.filter(s=>s.name===r.signals.data)[0];i.push="outer",delete i.value,delete i.update}return n}};function x$(t,e){return`domain(${Fe(t.scaleName(e))})`}function d$(t){var e;return t.parent&&Q2(t.parent)&&((e=!t.parent.parent)!==null&&e!==void 0?e:d$(t.parent.parent))}var $nt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const B2="_brush",h$="_scale_trigger",Bnt={defined:t=>t.type==="interval",signals:(t,e,n)=>{const r=e.name,i=r+gy,s=cc.defined(e),o=e.init?e.init[0]:null,u=[],a=[];if(e.translate&&!s){const c=`!event.item || event.item.mark.name !== ${Fe(r+B2)}`;eae(e,(f,x)=>{var d,p;const g=qe((d=(p=x.between[0]).filter)!==null&&d!==void 0?d:p.filter=[]);return g.includes(c)||g.push(c),f})}e.project.items.forEach((c,f)=>{const x=c.channel;if(x!==En&&x!==ur){Oe("Interval selections only support x and y encoding channels.");return}const d=o?o[f]:null,p=knt(t,e,c,d),g=c.signals.data,m=c.signals.visual,y=Fe(t.scaleName(x)),E=t.getScaleComponent(x).get("type"),A=As(E)?"+":"";n.push(...p),u.push(g),a.push({scaleName:t.scaleName(x),expr:`(!isArray(${g}) || (${A}invert(${y}, ${m})[0] === ${A}${g}[0] && ${A}invert(${y}, ${m})[1] === ${A}${g}[1]))`})}),!s&&a.length&&n.push({name:r+h$,value:{},on:[{events:a.map(c=>({scale:c.scaleName})),update:`${a.map(c=>c.expr).join(" && ")} ? ${r+h$} : {}`}]});const l=`unit: ${P2(t)}, fields: ${i}, values`;return n.concat(Object.assign(Object.assign({name:r+xc},o?{init:`{${l}: ${$2(o)}}`}:{}),u.length?{on:[{events:[{signal:u.join(" || ")}],update:`${u.join(" && ")} ? {${l}: [${u}]} : null`}]}:{}))},marks:(t,e,n)=>{const r=e.name,{x:i,y:s}=e.project.hasChannel,o=i==null?void 0:i.signals.visual,u=s==null?void 0:s.signals.visual,a=`data(${Fe(e.name+wx)})`;if(cc.defined(e)||!i&&!s)return n;const l={x:i!==void 0?{signal:`${o}[0]`}:{value:0},y:s!==void 0?{signal:`${u}[0]`}:{value:0},x2:i!==void 0?{signal:`${o}[1]`}:{field:{group:"width"}},y2:s!==void 0?{signal:`${u}[1]`}:{field:{group:"height"}}};if(e.resolve==="global")for(const m of Re(l))l[m]=[Object.assign({test:`${a}.length && ${a}[0].unit === ${P2(t)}`},l[m]),{value:0}];const c=e.mark,{fill:f,fillOpacity:x,cursor:d}=c,p=$nt(c,["fill","fillOpacity","cursor"]),g=Re(p).reduce((m,y)=>(m[y]=[{test:[i!==void 0&&`${o}[0] !== ${o}[1]`,s!==void 0&&`${u}[0] !== ${u}[1]`].filter(E=>E).join(" && "),value:p[y]},{value:null}],m),{});return[{name:`${r+B2}_bg`,type:"rect",clip:!0,encode:{enter:{fill:{value:f},fillOpacity:{value:x}},update:l}},...n,{name:r+B2,type:"rect",clip:!0,encode:{enter:Object.assign(Object.assign({},d?{cursor:{value:d}}:{}),{fill:{value:"transparent"}}),update:Object.assign(Object.assign({},l),g)}}]}};function knt(t,e,n,r){const i=n.channel,s=n.signals.visual,o=n.signals.data,u=cc.defined(e),a=Fe(t.scaleName(i)),l=t.getScaleComponent(i),c=l?l.get("type"):void 0,f=g=>`scale(${a}, ${g})`,x=t.getSizeSignalRef(i===En?"width":"height").signal,d=`${i}(unit)`,p=eae(e,(g,m)=>[...g,{events:m.between[0],update:`[${d}, ${d}]`},{events:m,update:`[${s}[0], clamp(${d}, 0, ${x})]`}]);return p.push({events:{signal:e.name+h$},update:As(c)?`[${f(`${o}[0]`)}, ${f(`${o}[1]`)}]`:"[0, 0]"}),u?[{name:o,on:[]}]:[Object.assign(Object.assign({name:s},r?{init:$2(r,!0,f)}:{value:[]}),{on:p}),Object.assign(Object.assign({name:o},r?{init:$2(r)}:{}),{on:[{events:{signal:s},update:`${s}[0] === ${s}[1] ? null : invert(${a}, ${s})`}]})]}function eae(t,e){return t.events.reduce((n,r)=>r.between?e(n,r):(Oe(`${r} is not an ordered event stream for interval selections.`),n),[])}const Pnt={defined:t=>t.type==="point",signals:(t,e,n)=>{var r;const i=e.name,s=i+gy,o=e.project,u="(item().isVoronoi ? datum.datum : datum)",a=o.items.map(d=>{const p=t.fieldDef(d.channel);return p!=null&&p.bin?`[${u}[${Fe(t.vgField(d.channel,{}))}], ${u}[${Fe(t.vgField(d.channel,{binSuffix:"end"}))}]]`:`${u}[${Fe(d.field)}]`}).join(", "),l=`unit: ${P2(t)}, fields: ${s}, values`,c=e.events,f=mi((r=t.component.selection)!==null&&r!==void 0?r:{}).reduce((d,p)=>p.type==="interval"?d.concat(p.name+B2):d,[]).map(d=>`indexof(item().mark.name, '${d}') < 0`).join(" && "),x=`datum && item().mark.marktype !== 'group'${f?` && ${f}`:""}`;return n.concat([{name:i+xc,on:c?[{events:c,update:`${x} ? {${l}: [${a}]} : null`,force:!0}]:[]}])}};function k2(t,e,n,r){const i=CC(e)&&e.condition,s=r(e);if(i){const u=qe(i).map(a=>{const l=r(a);if(wet(a)){const{param:c,empty:f}=a,x=bae(t,{param:c,empty:f});return Object.assign({test:x},l)}else{const c=WC(t,a.test);return Object.assign({test:c},l)}});return{[n]:[...u,...s!==void 0?[s]:[]]}}else return s!==void 0?{[n]:s}:{}}function p$(t,e="text"){const n=t.encoding[e];return k2(t,n,e,r=>qC(r,t.config))}function qC(t,e,n="datum"){if(t){if(qo(t))return un(t.value);if(ut(t)){const{format:r,formatType:i}=OC(t);return NI({fieldOrDatumDef:t,format:r,formatType:i,expr:n,config:e})}}}function tae(t,e={}){const{encoding:n,markDef:r,config:i,stack:s}=t,o=n.tooltip;if(be(o))return{tooltip:rae({tooltip:o},s,i,e)};{const u=e.reactiveGeom?"datum.datum":"datum";return k2(t,o,"tooltip",a=>{const l=qC(a,i,u);if(l)return l;if(a===null)return;let c=jt("tooltip",r,i);if(c===!0&&(c={content:"encoding"}),ze(c))return{value:c};if(Qe(c))return Ye(c)?c:c.content==="encoding"?rae(n,s,i,e):{signal:u}})}}function nae(t,e,n,{reactiveGeom:r}={}){const i={},s=r?"datum.datum":"datum",o=[];function u(l,c){const f=vx(c),x=Js(l)?l:Object.assign(Object.assign({},l),{type:t[f].type}),d=x.title||jI(x,n),p=qe(d).join(", ");let g;if(Sr(c)){const m=c==="x"?"x2":"y2",y=aa(t[m]);if(yi(x.bin)&&y){const E=Ie(x,{expr:s}),A=Ie(y,{expr:s}),{format:v,formatType:_}=OC(x);g=_C(E,A,v,_,n),i[m]=!0}else if(e&&e.fieldChannel===c&&e.offset==="normalize"){const{format:E,formatType:A}=OC(x);g=NI({fieldOrDatumDef:x,format:E,formatType:A,expr:s,config:n,normalizeStack:!0}).signal}}g??(g=qC(x,n,s).signal),o.push({channel:c,key:p,value:g})}HI(t,(l,c)=>{Le(l)?u(l,c):TC(l)&&u(l.condition,c)});const a={};for(const{channel:l,key:c,value:f}of o)!i[l]&&!a[c]&&(a[c]=f);return a}function rae(t,e,n,{reactiveGeom:r}={}){const i=nae(t,e,n,{reactiveGeom:r}),s=yx(i).map(([o,u])=>`"${o}": ${u}`);return s.length>0?{signal:`{${s.join(", ")}}`}:void 0}function Mnt(t){const{markDef:e,config:n}=t,r=jt("aria",e,n);return r===!1?{}:Object.assign(Object.assign(Object.assign({},r?{aria:r}:{}),jnt(t)),Unt(t))}function jnt(t){const{mark:e,markDef:n,config:r}=t;if(r.aria===!1)return{};const i=jt("ariaRoleDescription",n,r);return i!=null?{ariaRoleDescription:{value:i}}:e in EJe?{}:{ariaRoleDescription:{value:e}}}function Unt(t){const{encoding:e,markDef:n,config:r,stack:i}=t,s=e.description;if(s)return k2(t,s,"description",a=>qC(a,t.config));const o=jt("description",n,r);if(o!=null)return{description:un(o)};if(r.aria===!1)return{};const u=nae(e,i,r);if(!Kt(u))return{description:{signal:yx(u).map(([a,l],c)=>`"${c>0?"; ":""}${a}: " + (${l})`).join(" + ")}}}function lr(t,e,n={}){const{markDef:r,encoding:i,config:s}=e,{vgChannel:o}=n;let{defaultRef:u,defaultValue:a}=n;u===void 0&&(a??(a=jt(t,r,s,{vgChannel:o,ignoreVgConfig:!0})),a!==void 0&&(u=un(a)));const l=i[t];return k2(e,l,o??t,c=>wI({channel:t,channelDef:c,markDef:r,config:s,scaleName:e.scaleName(t),scale:e.getScaleComponent(t),stack:null,defaultRef:u}))}function iae(t,e={filled:void 0}){var n,r,i,s;const{markDef:o,encoding:u,config:a}=t,{type:l}=o,c=(n=e.filled)!==null&&n!==void 0?n:jt("filled",o,a),f=Ot(["bar","point","circle","square","geoshape"],l)?"transparent":void 0,x=(i=(r=jt(c===!0?"color":void 0,o,a,{vgChannel:"fill"}))!==null&&r!==void 0?r:a.mark[c===!0&&"color"])!==null&&i!==void 0?i:f,d=(s=jt(c===!1?"color":void 0,o,a,{vgChannel:"stroke"}))!==null&&s!==void 0?s:a.mark[c===!1&&"color"],p=c?"fill":"stroke",g=Object.assign(Object.assign({},x?{fill:un(x)}:{}),d?{stroke:un(d)}:{});return o.color&&(c?o.fill:o.stroke)&&Oe(eoe("property",{fill:"fill"in o,stroke:"stroke"in o})),Object.assign(Object.assign(Object.assign(Object.assign({},g),lr("color",t,{vgChannel:p,defaultValue:c?x:d})),lr("fill",t,{defaultValue:u.fill?x:void 0})),lr("stroke",t,{defaultValue:u.stroke?d:void 0}))}function qnt(t){const{encoding:e,mark:n}=t,r=e.order;return!sc(n)&&qo(r)?k2(t,r,"zindex",i=>un(i.value)):{}}function my({channel:t,markDef:e,encoding:n={},model:r,bandPosition:i}){const s=`${t}Offset`,o=e[s],u=n[s];if((s==="xOffset"||s==="yOffset")&&u)return{offsetType:"encoding",offset:wI({channel:s,channelDef:u,markDef:e,config:r==null?void 0:r.config,scaleName:r.scaleName(s),scale:r.getScaleComponent(s),stack:null,defaultRef:un(o),bandPosition:i})};const a=e[s];return a?{offsetType:"visual",offset:a}:{}}function Qr(t,e,{defaultPos:n,vgChannel:r}){const{encoding:i,markDef:s,config:o,stack:u}=e,a=i[t],l=i[El(t)],c=e.scaleName(t),f=e.getScaleComponent(t),{offset:x,offsetType:d}=my({channel:t,markDef:s,encoding:i,model:e,bandPosition:.5}),p=g$({model:e,defaultPos:n,channel:t,scaleName:c,scale:f}),g=!a&&Sr(t)&&(i.latitude||i.longitude)?{field:e.getName(t)}:znt({channel:t,channelDef:a,channel2Def:l,markDef:s,config:o,scaleName:c,scale:f,stack:u,offset:x,defaultRef:p,bandPosition:d==="encoding"?0:void 0});return g?{[r||t]:g}:void 0}function znt(t){const{channel:e,channelDef:n,scaleName:r,stack:i,offset:s,markDef:o}=t;if(ut(n)&&i&&e===i.fieldChannel){if(Le(n)){let u=n.bandPosition;if(u===void 0&&o.type==="text"&&(e==="radius"||e==="theta")&&(u=.5),u!==void 0)return vC({scaleName:r,fieldOrDatumDef:n,startSuffix:"start",bandPosition:u,offset:s})}return Tx(n,r,{suffix:"end"},{offset:s})}return OI(t)}function g$({model:t,defaultPos:e,channel:n,scaleName:r,scale:i}){const{markDef:s,config:o}=t;return()=>{const u=vx(n),a=ec(n),l=jt(n,s,o,{vgChannel:a});if(l!==void 0)return ly(n,l);switch(e){case"zeroOrMin":case"zeroOrMax":if(r){const c=i.get("type");if(!Ot([Gi.LOG,Gi.TIME,Gi.UTC],c)){if(i.domainDefinitelyIncludesZero())return{scale:r,value:0}}}if(e==="zeroOrMin")return u==="y"?{field:{group:"height"}}:{value:0};switch(u){case"radius":return{signal:`min(${t.width.signal},${t.height.signal})/2`};case"theta":return{signal:"2*PI"};case"x":return{field:{group:"width"}};case"y":return{value:0}}break;case"mid":{const c=t[Hi(n)];return Object.assign(Object.assign({},c),{mult:.5})}}}}const Hnt={left:"x",center:"xc",right:"x2"},Qnt={top:"y",middle:"yc",bottom:"y2"};function sae(t,e,n,r="middle"){if(t==="radius"||t==="theta")return ec(t);const i=t==="x"?"align":"baseline",s=jt(i,e,n);let o;return Ye(s)?(Oe(JJe(i)),o=void 0):o=s,t==="x"?Hnt[o||(r==="top"?"left":"center")]:Qnt[o||r]}function zC(t,e,{defaultPos:n,defaultPos2:r,range:i}){return i?oae(t,e,{defaultPos:n,defaultPos2:r}):Qr(t,e,{defaultPos:n})}function oae(t,e,{defaultPos:n,defaultPos2:r}){const{markDef:i,config:s}=e,o=El(t),u=Hi(t),a=Gnt(e,r,o),l=a[u]?sae(t,i,s):ec(t);return Object.assign(Object.assign({},Qr(t,e,{defaultPos:n,vgChannel:l})),a)}function Gnt(t,e,n){const{encoding:r,mark:i,markDef:s,stack:o,config:u}=t,a=vx(n),l=Hi(n),c=ec(n),f=r[a],x=t.scaleName(a),d=t.getScaleComponent(a),{offset:p}=n in r||n in s?my({channel:n,markDef:s,encoding:r,model:t}):my({channel:a,markDef:s,encoding:r,model:t});if(!f&&(n==="x2"||n==="y2")&&(r.latitude||r.longitude)){const m=Hi(n),y=t.markDef[m];return y!=null?{[m]:{value:y}}:{[c]:{field:t.getName(n)}}}const g=Wnt({channel:n,channelDef:f,channel2Def:r[n],markDef:s,config:u,scaleName:x,scale:d,stack:o,offset:p,defaultRef:void 0});return g!==void 0?{[c]:g}:HC(n,s)||HC(n,{[n]:dC(n,s,u.style),[l]:dC(l,s,u.style)})||HC(n,u[i])||HC(n,u.mark)||{[c]:g$({model:t,defaultPos:e,channel:n,scaleName:x,scale:d})()}}function Wnt({channel:t,channelDef:e,channel2Def:n,markDef:r,config:i,scaleName:s,scale:o,stack:u,offset:a,defaultRef:l}){return ut(e)&&u&&t.charAt(0)===u.fieldChannel.charAt(0)?Tx(e,s,{suffix:"start"},{offset:a}):OI({channel:t,channelDef:n,scaleName:s,scale:o,stack:u,markDef:r,config:i,offset:a,defaultRef:l})}function HC(t,e){const n=Hi(t),r=ec(t);if(e[r]!==void 0)return{[r]:ly(t,e[r])};if(e[t]!==void 0)return{[r]:ly(t,e[t])};if(e[n]){const i=e[n];if(D2(i))Oe(QJe(n));else return{[n]:ly(t,i)}}}function fc(t,e){var n,r;const{config:i,encoding:s,markDef:o}=t,u=o.type,a=El(e),l=Hi(e),c=s[e],f=s[a],x=t.getScaleComponent(e),d=x?x.get("type"):void 0,p=o.orient,g=(r=(n=s[l])!==null&&n!==void 0?n:s.size)!==null&&r!==void 0?r:jt("size",o,i,{vgChannel:l}),m=u==="bar"&&(e==="x"?p==="vertical":p==="horizontal");return Le(c)&&(en(c.bin)||yi(c.bin)||c.timeUnit&&!f)&&!(g&&!D2(g))&&!ar(d)?Knt({fieldDef:c,fieldDef2:f,channel:e,model:t}):(ut(c)&&ar(d)||m)&&!f?Ynt(c,e,t):oae(e,t,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"})}function Vnt(t,e,n,r,i){if(D2(i))if(n){const o=n.get("type");if(o==="band")return{scale:e,band:i.band};i.band!==1&&(Oe(nZe(o)),i=void 0)}else return{mult:i.band,field:{group:t}};else{if(Ye(i))return i;if(i)return{value:i}}if(n){const o=n.get("range");if(ic(o)&&rn(o.step))return{value:o.step-2}}return{value:PC(r.view,t)-2}}function Ynt(t,e,n){const{markDef:r,encoding:i,config:s,stack:o}=n,u=r.orient,a=n.scaleName(e),l=n.getScaleComponent(e),c=Hi(e),f=El(e),x=ZXe(e),d=n.scaleName(x),p=u==="horizontal"&&e==="y"||u==="vertical"&&e==="x";let g;(i.size||r.size)&&(p?g=lr("size",n,{vgChannel:c,defaultRef:un(r.size)}):Oe(oZe(r.type)));const m=Uoe({channel:e,fieldDef:t,markDef:r,config:s,scaleType:l==null?void 0:l.get("type"),useVlSizeChannel:p});g=g||{[c]:Vnt(c,d||a,l,s,m)};const y=(l==null?void 0:l.get("type"))!=="band"||!("band"in g[c])?"middle":"top",E=sae(e,r,s,y),A=E==="xc"||E==="yc",{offset:v,offsetType:_}=my({channel:e,markDef:r,encoding:i,model:n,bandPosition:A?.5:0}),S=OI({channel:e,channelDef:t,markDef:r,config:s,scaleName:a,scale:l,stack:o,offset:v,defaultRef:g$({model:n,defaultPos:"mid",channel:e,scaleName:a,scale:l}),bandPosition:A?_==="encoding"?0:.5:Ye(m)?{signal:`(1-${m})/2`}:D2(m)?(1-m.band)/2:0});if(c)return Object.assign({[E]:S},g);{const b=ec(f),C=g[c],R=v?Object.assign(Object.assign({},C),{offset:v}):C;return{[E]:S,[b]:be(S)?[S[0],Object.assign(Object.assign({},S[1]),{offset:R})]:Object.assign(Object.assign({},S),{offset:R})}}}function yy(t,e,n,r,i){if(_se(t))return 0;const s=t==="x"||t==="y2"?-e/2:e/2;if(Ye(n)||Ye(i)||Ye(r)){const o=_l(n),u=_l(i),a=_l(r),l=a?`${a} + `:"",c=o?`(${o} ? -1 : 1) * `:"",f=u?`(${u} + ${s})`:s;return{signal:l+c+f}}else return i=i||0,r+(n?-i-s:+i+s)}function Knt({fieldDef:t,fieldDef2:e,channel:n,model:r}){var i,s,o;const{config:u,markDef:a,encoding:l}=r,c=r.getScaleComponent(n),f=r.scaleName(n),x=c?c.get("type"):void 0,d=c.get("reverse"),p=Uoe({channel:n,fieldDef:t,markDef:a,config:u,scaleType:x}),g=(i=r.component.axes[n])===null||i===void 0?void 0:i[0],m=(s=g==null?void 0:g.get("translate"))!==null&&s!==void 0?s:.5,y=Sr(n)&&(o=jt("binSpacing",a,u))!==null&&o!==void 0?o:0,E=El(n),A=ec(n),v=ec(E),{offset:_}=my({channel:n,markDef:a,encoding:l,model:r,bandPosition:0}),S=Ye(p)?{signal:`(1-${p.signal})/2`}:D2(p)?(1-p.band)/2:.5;if(en(t.bin)||t.timeUnit)return{[v]:uae({fieldDef:t,scaleName:f,bandPosition:S,offset:yy(E,y,d,m,_)}),[A]:uae({fieldDef:t,scaleName:f,bandPosition:Ye(S)?{signal:`1-${S.signal}`}:1-S,offset:yy(n,y,d,m,_)})};if(yi(t.bin)){const b=Tx(t,f,{},{offset:yy(E,y,d,m,_)});if(Le(e))return{[v]:b,[A]:Tx(e,f,{},{offset:yy(n,y,d,m,_)})};if(_x(t.bin)&&t.bin.step)return{[v]:b,[A]:{signal:`scale("${f}", ${Ie(t,{expr:"datum"})} + ${t.bin.step})`,offset:yy(n,y,d,m,_)}}}Oe(soe(E))}function uae({fieldDef:t,scaleName:e,bandPosition:n,offset:r}){return vC({scaleName:e,fieldOrDatumDef:t,bandPosition:n,offset:r})}const Xnt=new Set(["aria","width","height"]);function Zs(t,e){const{fill:n=void 0,stroke:r=void 0}=e.color==="include"?iae(t):{};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Jnt(t.markDef,e)),aae(t,"fill",n)),aae(t,"stroke",r)),lr("opacity",t)),lr("fillOpacity",t)),lr("strokeOpacity",t)),lr("strokeWidth",t)),lr("strokeDash",t)),qnt(t)),tae(t)),p$(t,"href")),Mnt(t))}function aae(t,e,n){const{config:r,mark:i,markDef:s}=t;if(jt("invalid",s,r)==="hide"&&n&&!sc(i)){const u=Znt(t,{invalid:!0,channels:fC});if(u)return{[e]:[{test:u,value:null},...qe(n)]}}return n?{[e]:n}:{}}function Jnt(t,e){return yJe.reduce((n,r)=>(!Xnt.has(r)&&t[r]!==void 0&&e[r]!=="ignore"&&(n[r]=un(t[r])),n),{})}function Znt(t,{invalid:e=!1,channels:n}){const r=n.reduce((s,o)=>{const u=t.getScaleComponent(o);if(u){const a=u.get("type"),l=t.vgField(o,{expr:"datum"});l&&As(a)&&(s[l]=!0)}return s},{}),i=Re(r);if(i.length>0){const s=e?"||":"&&";return i.map(o=>DI(o,e)).join(` ${s} `)}}function m$(t){const{config:e,markDef:n}=t;if(jt("invalid",n,e)){const i=ert(t,{channels:na});if(i)return{defined:{signal:i}}}return{}}function ert(t,{invalid:e=!1,channels:n}){const r=n.reduce((s,o)=>{const u=t.getScaleComponent(o);if(u){const a=u.get("type"),l=t.vgField(o,{expr:"datum"});l&&As(a)&&(s[l]=!0)}return s},{}),i=Re(r);if(i.length>0){const s=e?"||":"&&";return i.map(o=>DI(o,e)).join(` ${s} `)}}function lae(t,e){if(e!==void 0)return{[t]:un(e)}}const y$="voronoi",cae={defined:t=>t.type==="point"&&t.nearest,parse:(t,e)=>{if(e.events)for(const n of e.events)n.markname=t.getName(y$)},marks:(t,e,n)=>{const{x:r,y:i}=e.project.hasChannel,s=t.mark;if(sc(s))return Oe(bJe(s)),n;const o={name:t.getName(y$),type:"path",interactive:!0,from:{data:t.getName("marks")},encode:{update:Object.assign({fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0}},tae(t,{reactiveGeom:!0}))},transform:[{type:"voronoi",x:{expr:r||!i?"datum.datum.x || 0":"0"},y:{expr:i||!r?"datum.datum.y || 0":"0"},size:[t.getSizeSignalRef("width"),t.getSizeSignalRef("height")]}]};let u=0,a=!1;return n.forEach((l,c)=>{var f;const x=(f=l.name)!==null&&f!==void 0?f:"";x===t.component.mark[0].name?u=c:x.indexOf(y$)>=0&&(a=!0)}),a||n.splice(u+1,0,o),n}},fae={defined:t=>t.type==="point"&&t.resolve==="global"&&t.bind&&t.bind!=="scales"&&!XI(t.bind),parse:(t,e,n)=>vae(e,n),topLevelSignals:(t,e,n)=>{const r=e.name,i=e.project,s=e.bind,o=e.init&&e.init[0],u=cae.defined(e)?"(item().isVoronoi ? datum.datum : datum)":"datum";return i.items.forEach((a,l)=>{var c,f;const x=yn(`${r}_${a.field}`);n.filter(p=>p.name===x).length||n.unshift(Object.assign(Object.assign({name:x},o?{init:$2(o[l])}:{value:null}),{on:e.events?[{events:e.events,update:`datum && item().mark.marktype !== 'group' ? ${u}[${Fe(a.field)}] : null`}]:[],bind:(f=(c=s[a.field])!==null&&c!==void 0?c:s[a.channel])!==null&&f!==void 0?f:s}))}),n},signals:(t,e,n)=>{const r=e.name,i=e.project,s=n.filter(l=>l.name===r+xc)[0],o=r+gy,u=i.items.map(l=>yn(`${r}_${l.field}`)),a=u.map(l=>`${l} !== null`).join(" && ");return u.length&&(s.update=`${a} ? {fields: ${o}, values: [${u.join(", ")}]} : null`),delete s.value,delete s.on,n}},QC="_toggle",xae={defined:t=>t.type==="point"&&!!t.toggle,signals:(t,e,n)=>n.concat({name:e.name+QC,value:!1,on:[{events:e.events,update:e.toggle}]}),modifyExpr:(t,e)=>{const n=e.name+xc,r=e.name+QC;return`${r} ? null : ${n}, `+(e.resolve==="global"?`${r} ? null : true, `:`${r} ? null : {unit: ${P2(t)}}, `)+`${r} ? ${n} : null`}},trt={defined:t=>t.clear!==void 0&&t.clear!==!1,parse:(t,e)=>{e.clear&&(e.clear=ze(e.clear)?cx(e.clear,"view"):e.clear)},topLevelSignals:(t,e,n)=>{if(fae.defined(e))for(const r of e.project.items){const i=n.findIndex(s=>s.name===yn(`${e.name}_${r.field}`));i!==-1&&n[i].on.push({events:e.clear,update:"null"})}return n},signals:(t,e,n)=>{function r(i,s){i!==-1&&n[i].on&&n[i].on.push({events:e.clear,update:s})}if(e.type==="interval")for(const i of e.project.items){const s=n.findIndex(o=>o.name===i.signals.visual);if(r(s,"[0, 0]"),s===-1){const o=n.findIndex(u=>u.name===i.signals.data);r(o,"null")}}else{let i=n.findIndex(s=>s.name===e.name+xc);r(i,"null"),xae.defined(e)&&(i=n.findIndex(s=>s.name===e.name+QC),r(i,"false"))}return n}},dae={defined:t=>{const e=t.resolve==="global"&&t.bind&&XI(t.bind),n=t.project.items.length===1&&t.project.items[0].field!==hy;return e&&!n&&Oe(RJe),e&&n},parse:(t,e,n)=>{var r;const i=ct(n);if(i.select=ze(i.select)?{type:i.select,toggle:e.toggle}:Object.assign(Object.assign({},i.select),{toggle:e.toggle}),vae(e,i),Qe(n.select)&&(n.select.on||n.select.clear)){const u='event.item && indexof(event.item.mark.role, "legend") < 0';for(const a of e.events)a.filter=qe((r=a.filter)!==null&&r!==void 0?r:[]),a.filter.includes(u)||a.filter.push(u)}const s=JI(e.bind)?e.bind.legend:"click",o=ze(s)?cx(s,"view"):qe(s);e.bind={legend:{merge:o}}},topLevelSignals:(t,e,n)=>{const r=e.name,i=JI(e.bind)&&e.bind.legend,s=o=>u=>{const a=ct(u);return a.markname=o,a};for(const o of e.project.items){if(!o.hasLegend)continue;const u=`${yn(o.field)}_legend`,a=`${r}_${u}`;if(n.filter(c=>c.name===a).length===0){const c=i.merge.map(s(`${u}_symbols`)).concat(i.merge.map(s(`${u}_labels`))).concat(i.merge.map(s(`${u}_entries`)));n.unshift(Object.assign(Object.assign({name:a},e.init?{}:{value:null}),{on:[{events:c,update:"datum.value || item().items[0].items[0].datum.value",force:!0},{events:i.merge,update:`!event.item || !datum ? null : ${a}`,force:!0}]}))}}return n},signals:(t,e,n)=>{const r=e.name,i=e.project,s=n.find(x=>x.name===r+xc),o=r+gy,u=i.items.filter(x=>x.hasLegend).map(x=>yn(`${r}_${yn(x.field)}_legend`)),l=`${u.map(x=>`${x} !== null`).join(" && ")} ? {fields: ${o}, values: [${u.join(", ")}]} : null`;e.events&&u.length>0?s.on.push({events:u.map(x=>({signal:x})),update:l}):u.length>0&&(s.update=l,delete s.value,delete s.on);const c=n.find(x=>x.name===r+QC),f=JI(e.bind)&&e.bind.legend;return c&&(e.events?c.on.push(Object.assign(Object.assign({},c.on[0]),{events:f})):c.on[0].events=f),n}};function nrt(t,e,n){var r,i,s,o;const u=(r=t.fieldDef(e))===null||r===void 0?void 0:r.field;for(const a of mi((i=t.component.selection)!==null&&i!==void 0?i:{})){const l=(s=a.project.hasField[u])!==null&&s!==void 0?s:a.project.hasChannel[e];if(l&&dae.defined(a)){const c=(o=n.get("selections"))!==null&&o!==void 0?o:[];c.push(a.name),n.set("selections",c,!1),l.hasLegend=!0}}}const hae="_translate_anchor",pae="_translate_delta",rrt={defined:t=>t.type==="interval"&&t.translate,signals:(t,e,n)=>{const r=e.name,i=cc.defined(e),s=r+hae,{x:o,y:u}=e.project.hasChannel;let a=cx(e.translate,"scope");return i||(a=a.map(l=>(l.between[0].markname=r+B2,l))),n.push({name:s,value:{},on:[{events:a.map(l=>l.between[0]),update:"{x: x(unit), y: y(unit)"+(o!==void 0?`, extent_x: ${i?x$(t,En):`slice(${o.signals.visual})`}`:"")+(u!==void 0?`, extent_y: ${i?x$(t,ur):`slice(${u.signals.visual})`}`:"")+"}"}]},{name:r+pae,value:{},on:[{events:a,update:`{x: ${s}.x - x(unit), y: ${s}.y - y(unit)}`}]}),o!==void 0&&gae(t,e,o,"width",n),u!==void 0&&gae(t,e,u,"height",n),n}};function gae(t,e,n,r,i){var s,o;const u=e.name,a=u+hae,l=u+pae,c=n.channel,f=cc.defined(e),x=i.filter(b=>b.name===n.signals[f?"data":"visual"])[0],d=t.getSizeSignalRef(r).signal,p=t.getScaleComponent(c),g=p.get("type"),m=p.get("reverse"),y=f?c===En?m?"":"-":m?"-":"":"",E=`${a}.extent_${c}`,A=`${y}${l}.${c} / ${f?`${d}`:`span(${E})`}`,v=f?g==="log"?"panLog":g==="symlog"?"panSymlog":g==="pow"?"panPow":"panLinear":"panLinear",_=f?g==="pow"?`, ${(s=p.get("exponent"))!==null&&s!==void 0?s:1}`:g==="symlog"?`, ${(o=p.get("constant"))!==null&&o!==void 0?o:1}`:"":"",S=`${v}(${E}, ${A}${_})`;x.on.push({events:{signal:l},update:f?S:`clampRange(${S}, 0, ${d})`})}const mae="_zoom_anchor",yae="_zoom_delta",irt={defined:t=>t.type==="interval"&&t.zoom,signals:(t,e,n)=>{const r=e.name,i=cc.defined(e),s=r+yae,{x:o,y:u}=e.project.hasChannel,a=Fe(t.scaleName(En)),l=Fe(t.scaleName(ur));let c=cx(e.zoom,"scope");return i||(c=c.map(f=>(f.markname=r+B2,f))),n.push({name:r+mae,on:[{events:c,update:i?"{"+[a?`x: invert(${a}, x(unit))`:"",l?`y: invert(${l}, y(unit))`:""].filter(f=>!!f).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:s,on:[{events:c,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),o!==void 0&&Eae(t,e,o,"width",n),u!==void 0&&Eae(t,e,u,"height",n),n}};function Eae(t,e,n,r,i){var s,o;const u=e.name,a=n.channel,l=cc.defined(e),c=i.filter(v=>v.name===n.signals[l?"data":"visual"])[0],f=t.getSizeSignalRef(r).signal,x=t.getScaleComponent(a),d=x.get("type"),p=l?x$(t,a):c.name,g=u+yae,m=`${u}${mae}.${a}`,y=l?d==="log"?"zoomLog":d==="symlog"?"zoomSymlog":d==="pow"?"zoomPow":"zoomLinear":"zoomLinear",E=l?d==="pow"?`, ${(s=x.get("exponent"))!==null&&s!==void 0?s:1}`:d==="symlog"?`, ${(o=x.get("constant"))!==null&&o!==void 0?o:1}`:"":"",A=`${y}(${p}, ${m}, ${g}${E})`;c.on.push({events:{signal:g},update:l?A:`clampRange(${A}, 0, ${f})`})}const wx="_store",xc="_tuple",srt="_modify",Aae="vlSelectionResolve",GC=[Pnt,Bnt,Int,xae,fae,cc,dae,trt,rrt,irt,cae];function ort(t){let e=t.parent;for(;e&&!Qo(e);)e=e.parent;return e}function P2(t,{escape:e}={escape:!0}){let n=e?Fe(t.name):t.name;const r=ort(t);if(r){const{facet:i}=r;for(const s of Xs)i[s]&&(n+=` + '__facet_${s}_' + (facet[${Fe(r.vgField(s))}])`)}return n}function E$(t){var e;return mi((e=t.component.selection)!==null&&e!==void 0?e:{}).reduce((n,r)=>n||r.project.items.some(i=>i.field===hy),!1)}function vae(t,e){(ze(e.select)||!e.select.on)&&delete t.events,(ze(e.select)||!e.select.clear)&&delete t.clear,(ze(e.select)||!e.select.toggle)&&delete t.toggle}function A$(t){const e=[];return t.type==="Identifier"?[t.name]:t.type==="Literal"?[t.value]:(t.type==="MemberExpression"&&(e.push(...A$(t.object)),e.push(...A$(t.property))),e)}function _ae(t){return t.object.type==="MemberExpression"?_ae(t.object):t.object.name==="datum"}function Sae(t){const e=Zne(t),n=new Set;return e.visit(r=>{r.type==="MemberExpression"&&_ae(r)&&n.add(A$(r).slice(1).join("."))}),n}class M2 extends Ht{constructor(e,n,r){super(e),this.model=n,this.filter=r,this.expr=WC(this.model,this.filter,this),this._dependentFields=Sae(this.expr)}clone(){return new M2(null,this.model,ct(this.filter))}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}function urt(t,e){var n;const r={},i=t.config.selection;if(!e||!e.length)return r;for(const s of e){const o=yn(s.name),u=s.select,a=ze(u)?u:u.type,l=Qe(u)?ct(u):{type:a},c=i[a];for(const x in c)x==="fields"||x==="encodings"||(x==="mark"&&(l[x]=Object.assign(Object.assign({},c[x]),l[x])),(l[x]===void 0||l[x]===!0)&&(l[x]=(n=c[x])!==null&&n!==void 0?n:l[x]));const f=r[o]=Object.assign(Object.assign({},l),{name:o,type:a,init:s.value,bind:s.bind,events:ze(l.on)?cx(l.on,"scope"):qe(ct(l.on))});for(const x of GC)x.defined(f)&&x.parse&&x.parse(t,f,s)}return r}function bae(t,e,n,r="datum"){const i=ze(e)?e:e.param,s=yn(i),o=Fe(s+wx);let u;try{u=t.getSelectionComponent(s,i)}catch{return`!!${s}`}if(u.project.timeUnit){const c=n??t.component.data.raw,f=u.project.timeUnit.clone();c.parent?f.insertAsParentOf(c):c.parent=f}const a=`vlSelectionTest(${o}, ${r}${u.resolve==="global"?")":`, ${Fe(u.resolve)})`}`,l=`length(data(${o}))`;return e.empty===!1?`${l} && ${a}`:`!${l} || ${a}`}function Cae(t,e,n){const r=yn(e),i=n.encoding;let s=n.field,o;try{o=t.getSelectionComponent(r,e)}catch{return r}if(!i&&!s)s=o.project.items[0].field,o.project.items.length>1&&Oe(`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${Fe(s)}.`);else if(i&&!s){const u=o.project.items.filter(a=>a.channel===i);!u.length||u.length>1?(s=o.project.items[0].field,Oe((u.length?"Multiple ":"No ")+`matching ${Fe(i)} encoding found for selection ${Fe(n.param)}. Using "field": ${Fe(s)}.`)):s=u[0].field}return`${o.name}[${Fe(ko(s))}]`}function art(t,e){var n;for(const[r,i]of yx((n=t.component.selection)!==null&&n!==void 0?n:{})){const s=t.getName(`lookup_${r}`);t.component.data.outputNodes[s]=i.materialized=new vi(new M2(e,t,{param:r}),s,tn.Lookup,t.component.data.outputNodeRefCounts)}}function WC(t,e,n){return nC(e,r=>ze(r)?r:qZe(r)?bae(t,r,n):doe(r))}var VC=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function lrt(t,e){if(t)return be(t)&&!rc(t)?t.map(n=>jI(n,e)).join(", "):t}function v$(t,e,n,r){var i,s,o,u,a;(i=t.encode)!==null&&i!==void 0||(t.encode={}),(s=(u=t.encode)[e])!==null&&s!==void 0||(u[e]={}),(o=(a=t.encode[e]).update)!==null&&o!==void 0||(a.update={}),t.encode[e].update[n]=r}function Ey(t,e,n,r={header:!1}){var i,s;const o=t.combine(),{disable:u,orient:a,scale:l,labelExpr:c,title:f,zindex:x}=o,d=VC(o,["disable","orient","scale","labelExpr","title","zindex"]);if(!u){for(const p in d){const g=Het[p],m=d[p];if(g&&g!==e&&g!=="both")delete d[p];else if(dy(m)){const{condition:y}=m,E=VC(m,["condition"]),A=qe(y),v=Koe[p];if(v){const{vgProp:_,part:S}=v,b=[...A.map(C=>{const{test:R}=C,L=VC(C,["test"]);return Object.assign({test:WC(null,R)},L)}),E];v$(d,S,_,b),delete d[p]}else if(v===null){const _={signal:A.map(S=>{const{test:b}=S,C=VC(S,["test"]);return`${WC(null,b)} ? ${Pse(C)} : `}).join("")+Pse(E)};d[p]=_}}else if(Ye(m)){const y=Koe[p];if(y){const{vgProp:E,part:A}=y;v$(d,A,E,m),delete d[p]}}Ot(["labelAlign","labelBaseline"],p)&&d[p]===null&&delete d[p]}if(e==="grid"){if(!d.grid)return;if(d.encode){const{grid:p}=d.encode;d.encode=Object.assign({},p?{grid:p}:{}),Kt(d.encode)&&delete d.encode}return Object.assign(Object.assign({scale:l,orient:a},d),{domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:Qn(x,0)})}else{if(!r.header&&t.mainExtracted)return;if(c!==void 0){let g=c;!((s=(i=d.encode)===null||i===void 0?void 0:i.labels)===null||s===void 0)&&s.update&&Ye(d.encode.labels.update.text)&&(g=v2(c,"datum.label",d.encode.labels.update.text.signal)),v$(d,"labels","text",{signal:g})}if(d.labelAlign===null&&delete d.labelAlign,d.encode){for(const g of Xoe)t.hasAxisPart(g)||delete d.encode[g];Kt(d.encode)&&delete d.encode}const p=lrt(f,n);return Object.assign(Object.assign(Object.assign(Object.assign({scale:l,orient:a,grid:!1},p?{title:p}:{}),d),n.aria===!1?{aria:!1}:{}),{zindex:Qn(x,0)})}}}function Tae(t){const{axes:e}=t.component,n=[];for(const r of na)if(e[r]){for(const i of e[r])if(!i.get("disable")&&!i.get("gridScale")){const s=r==="x"?"height":"width",o=t.getSizeSignalRef(s).signal;s!==o&&n.push({name:s,update:o})}}return n}function crt(t,e){const{x:n=[],y:r=[]}=t;return[...n.map(i=>Ey(i,"grid",e)),...r.map(i=>Ey(i,"grid",e)),...n.map(i=>Ey(i,"main",e)),...r.map(i=>Ey(i,"main",e))].filter(i=>i)}function Rae(t,e,n,r){return Object.assign.apply(null,[{},...t.map(i=>{if(i==="axisOrient"){const s=n==="x"?"bottom":"left",o=e[n==="x"?"axisBottom":"axisLeft"]||{},u=e[n==="x"?"axisTop":"axisRight"]||{},a=new Set([...Re(o),...Re(u)]),l={};for(const c of a.values())l[c]={signal:`${r.signal} === "${s}" ? ${_l(o[c])} : ${_l(u[c])}`};return l}return e[i]})])}function frt(t,e,n,r){const i=e==="band"?["axisDiscrete","axisBand"]:e==="point"?["axisDiscrete","axisPoint"]:yoe(e)?["axisQuantitative"]:e==="time"||e==="utc"?["axisTemporal"]:[],s=t==="x"?"axisX":"axisY",o=Ye(n)?"axisOrient":`axis${rC(n)}`,u=[...i,...i.map(l=>s+l.substr(4))],a=["axis",o,s];return{vlOnlyAxisConfig:Rae(u,r,t,n),vgAxisConfig:Rae(a,r,t,n),axisConfigStyle:xrt([...a,...u],r)}}function xrt(t,e){var n;const r=[{}];for(const i of t){let s=(n=e[i])===null||n===void 0?void 0:n.style;if(s){s=qe(s);for(const o of s)r.push(e.style[o])}}return Object.assign.apply(null,r)}function _$(t,e,n,r={}){var i;const s=jse(t,n,e);if(s!==void 0)return{configFrom:"style",configValue:s};for(const o of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(((i=r[o])===null||i===void 0?void 0:i[t])!==void 0)return{configFrom:o,configValue:r[o][t]};return{}}const Oae={scale:({model:t,channel:e})=>t.scaleName(e),format:({fieldOrDatumDef:t,config:e,axis:n})=>{const{format:r,formatType:i}=n;return Noe(t,t.type,r,i,e,!0)},formatType:({axis:t,fieldOrDatumDef:e,scaleType:n})=>{const{formatType:r}=t;return Foe(r,e,n)},grid:({fieldOrDatumDef:t,axis:e,scaleType:n})=>{var r;return(r=e.grid)!==null&&r!==void 0?r:drt(n,t)},gridScale:({model:t,channel:e})=>hrt(t,e),labelAlign:({axis:t,labelAngle:e,orient:n,channel:r})=>t.labelAlign||wae(e,n,r),labelAngle:({labelAngle:t})=>t,labelBaseline:({axis:t,labelAngle:e,orient:n,channel:r})=>t.labelBaseline||Dae(e,n,r),labelFlush:({axis:t,fieldOrDatumDef:e,channel:n})=>{var r;return(r=t.labelFlush)!==null&&r!==void 0?r:grt(e.type,n)},labelOverlap:({axis:t,fieldOrDatumDef:e,scaleType:n})=>{var r;return(r=t.labelOverlap)!==null&&r!==void 0?r:mrt(e.type,n,Le(e)&&!!e.timeUnit,Le(e)?e.sort:void 0)},orient:({orient:t})=>t,tickCount:({channel:t,model:e,axis:n,fieldOrDatumDef:r,scaleType:i})=>{var s;const o=t==="x"?"width":t==="y"?"height":void 0,u=o?e.getSizeSignalRef(o):void 0;return(s=n.tickCount)!==null&&s!==void 0?s:Ert({fieldOrDatumDef:r,scaleType:i,size:u,values:n.values})},title:({axis:t,model:e,channel:n})=>{if(t.title!==void 0)return t.title;const r=Nae(e,n);if(r!==void 0)return r;const i=e.typedFieldDef(n),s=n==="x"?"x2":"y2",o=e.fieldDef(s);return qse(i?[Moe(i)]:[],Le(o)?[Moe(o)]:[])},values:({axis:t,fieldOrDatumDef:e})=>Art(t,e),zindex:({axis:t,fieldOrDatumDef:e,mark:n})=>{var r;return(r=t.zindex)!==null&&r!==void 0?r:vrt(n,e)}};function drt(t,e){return!ar(t)&&Le(e)&&!en(e==null?void 0:e.bin)&&!yi(e==null?void 0:e.bin)}function hrt(t,e){const n=e==="x"?"y":"x";if(t.getScaleComponent(n))return t.scaleName(n)}function prt(t,e,n,r,i){const s=e==null?void 0:e.labelAngle;if(s!==void 0)return Ye(s)?s:iC(s);{const{configValue:o}=_$("labelAngle",r,e==null?void 0:e.style,i);return o!==void 0?iC(o):n===En&&Ot([_I,vI],t.type)&&!(Le(t)&&t.timeUnit)?270:void 0}}function S$(t){return`(((${t.signal} % 360) + 360) % 360)`}function Dae(t,e,n,r){if(t!==void 0)if(n==="x"){if(Ye(t)){const i=S$(t),s=Ye(e)?`(${e.signal} === "top")`:e==="top";return{signal:`(45 < ${i} && ${i} < 135) || (225 < ${i} && ${i} < 315) ? "middle" :(${i} <= 45 || 315 <= ${i}) === ${s} ? "bottom" : "top"`}}if(45<t&&t<135||225<t&&t<315)return"middle";if(Ye(e)){const i=t<=45||315<=t?"===":"!==";return{signal:`${e.signal} ${i} "top" ? "bottom" : "top"`}}return(t<=45||315<=t)==(e==="top")?"bottom":"top"}else{if(Ye(t)){const i=S$(t),s=Ye(e)?`(${e.signal} === "left")`:e==="left";return{signal:`${i} <= 45 || 315 <= ${i} || (135 <= ${i} && ${i} <= 225) ? ${r?'"middle"':"null"} : (45 <= ${i} && ${i} <= 135) === ${s} ? "top" : "bottom"`}}if(t<=45||315<=t||135<=t&&t<=225)return r?"middle":null;if(Ye(e)){const i=45<=t&&t<=135?"===":"!==";return{signal:`${e.signal} ${i} "left" ? "top" : "bottom"`}}return(45<=t&&t<=135)==(e==="left")?"top":"bottom"}}function wae(t,e,n){if(t===void 0)return;const r=n==="x",i=r?0:90,s=r?"bottom":"left";if(Ye(t)){const o=S$(t),u=Ye(e)?`(${e.signal} === "${s}")`:e===s;return{signal:`(${i?`(${o} + 90)`:o} % 180 === 0) ? ${r?null:'"center"'} :(${i} < ${o} && ${o} < ${180+i}) === ${u} ? "left" : "right"`}}if((t+i)%180===0)return r?null:"center";if(Ye(e)){const o=i<t&&t<180+i?"===":"!==";return{signal:`${`${e.signal} ${o} "${s}"`} ? "left" : "right"`}}return(i<t&&t<180+i)==(e===s)?"left":"right"}function grt(t,e){if(e==="x"&&Ot(["quantitative","temporal"],t))return!0}function mrt(t,e,n,r){if(n&&!Qe(r)||t!=="nominal"&&t!=="ordinal")return e==="log"||e==="symlog"?"greedy":!0}function yrt(t){return t==="x"?"bottom":"left"}function Ert({fieldOrDatumDef:t,scaleType:e,size:n,values:r}){var i;if(!r&&!ar(e)&&e!=="log"){if(Le(t)){if(en(t.bin))return{signal:`ceil(${n.signal}/10)`};if(t.timeUnit&&Ot(["month","hours","day","quarter"],(i=Ei(t.timeUnit))===null||i===void 0?void 0:i.unit))return}return{signal:`ceil(${n.signal}/40)`}}}function Nae(t,e){const n=e==="x"?"x2":"y2",r=t.fieldDef(e),i=t.fieldDef(n),s=r?r.title:void 0,o=i?i.title:void 0;if(s&&o)return zse(s,o);if(s)return s;if(o)return o;if(s!==void 0)return s;if(o!==void 0)return o}function Art(t,e){const n=t.values;if(be(n))return Yoe(e,n);if(Ye(n))return n}function vrt(t,e){return t==="rect"&&RC(e)?1:0}class j2 extends Ht{constructor(e,n){super(e),this.transform=n,this._dependentFields=Sae(this.transform.calculate)}clone(){return new j2(null,ct(this.transform))}static parseAllForSortIndex(e,n){return n.forEachFieldDef((r,i)=>{if(Ox(r)&&Poe(r.sort)){const{field:s,timeUnit:o}=r,u=r.sort,a=u.map((l,c)=>`${doe({field:s,timeUnit:o,equal:l})} ? ${c} : `).join("")+u.length;e=new j2(e,{calculate:a,as:U2(r,i,{forAs:!0})})}}),e}producedFields(){return new Set([this.transform.as])}dependentFields(){return this._dependentFields}assemble(){return{type:"formula",expr:this.transform.calculate,as:this.transform.as}}hash(){return`Calculate ${Rt(this.transform)}`}}function U2(t,e,n){return Ie(t,Object.assign({prefix:e,suffix:"sort_index"},n??{}))}function YC(t,e){return Ot(["top","bottom"],e)?"column":Ot(["left","right"],e)||t==="row"?"row":"column"}function q2(t,e,n,r){const i=r==="row"?n.headerRow:r==="column"?n.headerColumn:n.headerFacet;return Qn((e||{})[t],i[t],n.header[t])}function KC(t,e,n,r){const i={};for(const s of t){const o=q2(s,e||{},n,r);o!==void 0&&(i[s]=o)}return i}const b$=["row","column"],C$=["header","footer"];function _rt(t,e){const n=t.component.layoutHeaders[e].title,r=t.config?t.config:void 0,i=t.component.layoutHeaders[e].facetFieldDef?t.component.layoutHeaders[e].facetFieldDef:void 0,{titleAnchor:s,titleAngle:o,titleOrient:u}=KC(["titleAnchor","titleAngle","titleOrient"],i.header,r,e),a=YC(e,u),l=iC(o);return{name:`${e}-title`,type:"group",role:`${a}-title`,title:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({text:n},e==="row"?{orient:"left"}:{}),{style:"guide-title"}),Lae(l,a)),Fae(a,l,s)),Iae(r,i,e,xtt,mue))}}function Fae(t,e,n="middle"){switch(n){case"start":return{align:"left"};case"end":return{align:"right"}}const r=wae(e,t==="row"?"left":"top",t==="row"?"y":"x");return r?{align:r}:{}}function Lae(t,e){const n=Dae(t,e==="row"?"left":"top",e==="row"?"y":"x",!0);return n?{baseline:n}:{}}function Srt(t,e){const n=t.component.layoutHeaders[e],r=[];for(const i of C$)if(n[i])for(const s of n[i]){const o=Crt(t,e,i,n,s);o!=null&&r.push(o)}return r}function brt(t,e){var n;const{sort:r}=t;return sa(r)?{field:Ie(r,{expr:"datum"}),order:(n=r.order)!==null&&n!==void 0?n:"ascending"}:be(r)?{field:U2(t,e,{expr:"datum"}),order:"ascending"}:{field:Ie(t,{expr:"datum"}),order:r??"ascending"}}function T$(t,e,n){const{format:r,formatType:i,labelAngle:s,labelAnchor:o,labelOrient:u,labelExpr:a}=KC(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],t.header,n,e),l=NI({fieldOrDatumDef:t,format:r,formatType:i,expr:"parent",config:n}).signal,c=YC(e,u);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({text:{signal:a?v2(v2(a,"datum.label",l),"datum.value",Ie(t,{expr:"parent"})):l}},e==="row"?{orient:"left"}:{}),{style:"guide-label",frame:"group"}),Lae(s,c)),Fae(c,s,o)),Iae(n,t,e,dtt,yue))}function Crt(t,e,n,r,i){if(i){let s=null;const{facetFieldDef:o}=r,u=t.config?t.config:void 0;if(o&&i.labels){const{labelOrient:f}=KC(["labelOrient"],o.header,u,e);(e==="row"&&!Ot(["top","bottom"],f)||e==="column"&&!Ot(["left","right"],f))&&(s=T$(o,e,u))}const a=Qo(t)&&!cy(t.facet),l=i.axes,c=(l==null?void 0:l.length)>0;if(s||c){const f=e==="row"?"height":"width";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:t.getName(`${e}_${n}`),type:"group",role:`${e}-${n}`},r.facetFieldDef?{from:{data:t.getName(`${e}_domain`)},sort:brt(o,e)}:{}),c&&a?{from:{data:t.getName(`facet_domain_${e}`)}}:{}),s?{title:s}:{}),i.sizeSignal?{encode:{update:{[f]:i.sizeSignal}}}:{}),c?{axes:l}:{})}}return null}const Trt={column:{start:0,end:1},row:{start:1,end:0}};function Rrt(t,e){return Trt[e][t]}function Ort(t,e){const n={};for(const r of Xs){const i=t[r];if(i!=null&&i.facetFieldDef){const{titleAnchor:s,titleOrient:o}=KC(["titleAnchor","titleOrient"],i.facetFieldDef.header,e,r),u=YC(r,o),a=Rrt(s,u);a!==void 0&&(n[u]=a)}}return Kt(n)?void 0:n}function Iae(t,e,n,r,i){const s={};for(const o of r){if(!i[o])continue;const u=q2(o,e==null?void 0:e.header,t,n);u!==void 0&&(s[i[o]]=u)}return s}function R$(t){return[...XC(t,"width"),...XC(t,"height"),...XC(t,"childWidth"),...XC(t,"childHeight")]}function XC(t,e){const n=e==="width"?"x":"y",r=t.component.layoutSize.get(e);if(!r||r==="merged")return[];const i=t.getSizeSignalRef(e).signal;if(r==="step"){const s=t.getScaleComponent(n);if(s){const o=s.get("type"),u=s.get("range");if(ar(o)&&ic(u)){const a=t.scaleName(n);return Qo(t.parent)&&t.parent.component.resolve.scale[n]==="independent"?[$ae(a,u)]:[$ae(a,u),{name:i,update:Bae(a,s,`domain('${a}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}else if(r=="container"){const s=i.endsWith("width"),o=s?"containerSize()[0]":"containerSize()[1]",u=n$(t.config.view,s?"width":"height"),a=`isFinite(${o}) ? ${o} : ${u}`;return[{name:i,init:a,on:[{update:a,events:"window:resize"}]}]}else return[{name:i,value:r}]}function $ae(t,e){const n=`${t}_step`;return Ye(e.step)?{name:n,update:e.step.signal}:{name:n,value:e.step}}function Bae(t,e,n){const r=e.get("type"),i=e.get("padding"),s=Qn(e.get("paddingOuter"),i);let o=e.get("paddingInner");return o=r==="band"?o!==void 0?o:i:1,`bandspace(${n}, ${_l(o)}, ${_l(s)}) * ${t}_step`}function kae(t){return t==="childWidth"?"width":t==="childHeight"?"height":t}function Pae(t,e){return Re(t).reduce((n,r)=>{const i=t[r];return Object.assign(Object.assign({},n),k2(e,i,r,s=>un(s.value)))},{})}function Mae(t,e){if(Qo(e))return t==="theta"?"independent":"shared";if(Q2(e))return"shared";if(z$(e))return Sr(t)||t==="theta"||t==="radius"?"independent":"shared";throw new Error("invalid model type for resolve")}function O$(t,e){const n=t.scale[e],r=Sr(e)?"axis":"legend";return n==="independent"?(t[r][e]==="shared"&&Oe(fZe(e)),"independent"):t[r][e]||"shared"}const Drt=Object.assign(Object.assign({},ptt),{disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1}),jae=Re(Drt);class wrt extends Cl{}const Uae={symbols:Nrt,gradient:Frt,labels:Lrt,entries:Irt};function Nrt(t,{fieldOrDatumDef:e,model:n,channel:r,legendCmpt:i,legendType:s}){var o,u,a,l,c,f,x,d;if(s!=="symbol")return;const{markDef:p,encoding:g,config:m,mark:y}=n,E=p.filled&&y!=="trail";let A=Object.assign(Object.assign({},vJe({},n,het)),iae(n,{filled:E}));const v=(o=i.get("symbolOpacity"))!==null&&o!==void 0?o:m.legend.symbolOpacity,_=(u=i.get("symbolFillColor"))!==null&&u!==void 0?u:m.legend.symbolFillColor,S=(a=i.get("symbolStrokeColor"))!==null&&a!==void 0?a:m.legend.symbolStrokeColor,b=v===void 0?(l=qae(g.opacity))!==null&&l!==void 0?l:p.opacity:void 0;if(A.fill){if(r==="fill"||E&&r===qi)delete A.fill;else if(A.fill.field)_?delete A.fill:(A.fill=un((c=m.legend.symbolBaseFillColor)!==null&&c!==void 0?c:"black"),A.fillOpacity=un(b??1));else if(be(A.fill)){const C=(d=(x=D$((f=g.fill)!==null&&f!==void 0?f:g.color))!==null&&x!==void 0?x:p.fill)!==null&&d!==void 0?d:E&&p.color;C&&(A.fill=un(C))}}if(A.stroke){if(r==="stroke"||!E&&r===qi)delete A.stroke;else if(A.stroke.field||S)delete A.stroke;else if(be(A.stroke)){const C=Qn(D$(g.stroke||g.color),p.stroke,E?p.color:void 0);C&&(A.stroke={value:C})}}if(r!==yl){const C=Le(e)&&Hae(n,i,e);C?A.opacity=[Object.assign({test:C},un(b??1)),un(m.legend.unselectedOpacity)]:b&&(A.opacity=un(b))}return A=Object.assign(Object.assign({},A),t),Kt(A)?void 0:A}function Frt(t,{model:e,legendType:n,legendCmpt:r}){var i;if(n!=="gradient")return;const{config:s,markDef:o,encoding:u}=e;let a={};const c=((i=r.get("gradientOpacity"))!==null&&i!==void 0?i:s.legend.gradientOpacity)===void 0?qae(u.opacity)||o.opacity:void 0;return c&&(a.opacity=un(c)),a=Object.assign(Object.assign({},a),t),Kt(a)?void 0:a}function Lrt(t,{fieldOrDatumDef:e,model:n,channel:r,legendCmpt:i}){const s=n.legend(r)||{},o=n.config,u=Le(e)?Hae(n,i,e):void 0,a=u?[{test:u,value:1},{value:o.legend.unselectedOpacity}]:void 0,{format:l,formatType:c}=s,f=Rx(c)?FI({fieldOrDatumDef:e,field:"datum.value",format:l,formatType:c,config:o}):void 0,x=Object.assign(Object.assign(Object.assign({},a?{opacity:a}:{}),f?{text:f}:{}),t);return Kt(x)?void 0:x}function Irt(t,{legendCmpt:e}){const n=e.get("selections");return n!=null&&n.length?Object.assign(Object.assign({},t),{fill:{value:"transparent"}}):t}function qae(t){return zae(t,(e,n)=>Math.max(e,n.value))}function D$(t){return zae(t,(e,n)=>Qn(e,n.value))}function zae(t,e){if(Fet(t))return qe(t.condition).reduce(e,t.value);if(qo(t))return t.value}function Hae(t,e,n){const r=e.get("selections");if(!(r!=null&&r.length))return;const i=Fe(n.field);return r.map(s=>`(!length(data(${Fe(yn(s)+wx)})) || (${s}[${i}] && indexof(${s}[${i}], datum.value) >= 0))`).join(" || ")}const Qae={direction:({direction:t})=>t,format:({fieldOrDatumDef:t,legend:e,config:n})=>{const{format:r,formatType:i}=e;return Noe(t,t.type,r,i,n,!1)},formatType:({legend:t,fieldOrDatumDef:e,scaleType:n})=>{const{formatType:r}=t;return Foe(r,e,n)},gradientLength:t=>{var e,n;const{legend:r,legendConfig:i}=t;return(n=(e=r.gradientLength)!==null&&e!==void 0?e:i.gradientLength)!==null&&n!==void 0?n:Urt(t)},labelOverlap:({legend:t,legendConfig:e,scaleType:n})=>{var r,i;return(i=(r=t.labelOverlap)!==null&&r!==void 0?r:e.labelOverlap)!==null&&i!==void 0?i:qrt(n)},symbolType:({legend:t,markDef:e,channel:n,encoding:r})=>{var i;return(i=t.symbolType)!==null&&i!==void 0?i:Brt(e.type,n,r.shape,e.shape)},title:({fieldOrDatumDef:t,config:e})=>w2(t,e,{allowDisabling:!0}),type:({legendType:t,scaleType:e,channel:n})=>{if(S2(n)&&Uo(e)){if(t==="gradient")return}else if(t==="symbol")return;return t},values:({fieldOrDatumDef:t,legend:e})=>$rt(e,t)};function $rt(t,e){const n=t.values;if(be(n))return Yoe(e,n);if(Ye(n))return n}function Brt(t,e,n,r){var i;if(e!=="shape"){const s=(i=D$(n))!==null&&i!==void 0?i:r;if(s)return s}switch(t){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}function krt(t){const{legend:e}=t;return Qn(e.type,Prt(t))}function Prt({channel:t,timeUnit:e,scaleType:n}){if(S2(t)){if(Ot(["quarter","month","day"],e))return"symbol";if(Uo(n))return"gradient"}return"symbol"}function Mrt({legendConfig:t,legendType:e,orient:n,legend:r}){var i,s;return(s=(i=r.direction)!==null&&i!==void 0?i:t[e?"gradientDirection":"symbolDirection"])!==null&&s!==void 0?s:jrt(n,e)}function jrt(t,e){switch(t){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return e==="gradient"?"horizontal":void 0}}function Urt({legendConfig:t,model:e,direction:n,orient:r,scaleType:i}){const{gradientHorizontalMaxLength:s,gradientHorizontalMinLength:o,gradientVerticalMaxLength:u,gradientVerticalMinLength:a}=t;if(Uo(i))return n==="horizontal"?r==="top"||r==="bottom"?Gae(e,"width",o,s):o:Gae(e,"height",a,u)}function Gae(t,e,n,r){return{signal:`clamp(${t.getSizeSignalRef(e).signal}, ${n}, ${r})`}}function qrt(t){if(Ot(["quantile","threshold","log","symlog"],t))return"greedy"}function Wae(t){const e=$n(t)?zrt(t):Wrt(t);return t.component.legends=e,e}function zrt(t){const{encoding:e}=t,n={};for(const r of[qi,...Aue]){const i=Gn(e[r]);!i||!t.getScaleComponent(r)||r===zi&&Le(i)&&i.type===R2||(n[r]=Grt(t,r))}return n}function Hrt(t,e){const n=t.scaleName(e);if(t.mark==="trail"){if(e==="color")return{stroke:n};if(e==="size")return{strokeWidth:n}}return e==="color"?t.markDef.filled?{fill:n}:{stroke:n}:{[e]:n}}function Qrt(t,e,n,r){switch(e){case"disable":return n!==void 0;case"values":return!!(n!=null&&n.values);case"title":if(e==="title"&&t===(r==null?void 0:r.title))return!0}return t===(n||{})[e]}function Grt(t,e){var n,r,i;let s=t.legend(e);const{markDef:o,encoding:u,config:a}=t,l=a.legend,c=new wrt({},Hrt(t,e));nrt(t,e,c);const f=s!==void 0?!s:l.disable;if(c.set("disable",f,s!==void 0),f)return c;s=s||{};const x=t.getScaleComponent(e).get("type"),d=Gn(u[e]),p=Le(d)?(n=Ei(d.timeUnit))===null||n===void 0?void 0:n.unit:void 0,g=s.orient||a.legend.orient||"right",m=krt({legend:s,channel:e,timeUnit:p,scaleType:x}),y=Mrt({legend:s,legendType:m,orient:g,legendConfig:l}),E={legend:s,channel:e,model:t,markDef:o,encoding:u,fieldOrDatumDef:d,legendConfig:l,config:a,scaleType:x,orient:g,legendType:m,direction:y};for(const b of jae){if(m==="gradient"&&b.startsWith("symbol")||m==="symbol"&&b.startsWith("gradient"))continue;const C=b in Qae?Qae[b](E):s[b];if(C!==void 0){const R=Qrt(C,b,s,t.fieldDef(e));(R||a.legend[b]===void 0)&&c.set(b,C,R)}}const A=(r=s==null?void 0:s.encoding)!==null&&r!==void 0?r:{},v=c.get("selections"),_={},S={fieldOrDatumDef:d,model:t,channel:e,legendCmpt:c,legendType:m};for(const b of["labels","legend","title","symbols","gradient","entries"]){const C=Pae((i=A[b])!==null&&i!==void 0?i:{},t),R=b in Uae?Uae[b](C,S):C;R!==void 0&&!Kt(R)&&(_[b]=Object.assign(Object.assign(Object.assign({},v!=null&&v.length&&Le(d)?{name:`${yn(d.field)}_legend_${b}`}:{}),v!=null&&v.length?{interactive:!!v}:{}),{update:R}))}return Kt(_)||c.set("encode",_,!!(s!=null&&s.encoding)),c}function Wrt(t){const{legends:e,resolve:n}=t.component;for(const r of t.children){Wae(r);for(const i of Re(r.component.legends))n.legend[i]=O$(t.component.resolve,i),n.legend[i]==="shared"&&(e[i]=Vae(e[i],r.component.legends[i]),e[i]||(n.legend[i]="independent",delete e[i]))}for(const r of Re(e))for(const i of t.children)i.component.legends[r]&&n.legend[r]==="shared"&&delete i.component.legends[r];return e}function Vae(t,e){var n,r,i,s;if(!t)return e.clone();const o=t.getWithExplicit("orient"),u=e.getWithExplicit("orient");if(o.explicit&&u.explicit&&o.value!==u.value)return;let a=!1;for(const l of jae){const c=ac(t.getWithExplicit(l),e.getWithExplicit(l),l,"legend",(f,x)=>{switch(l){case"symbolType":return Vrt(f,x);case"title":return Hse(f,x);case"type":return a=!0,vs("symbol")}return UC(f,x,l,"legend")});t.setWithExplicit(l,c)}return a&&(!((r=(n=t.implicit)===null||n===void 0?void 0:n.encode)===null||r===void 0)&&r.gradient&&WL(t.implicit,["encode","gradient"]),!((s=(i=t.explicit)===null||i===void 0?void 0:i.encode)===null||s===void 0)&&s.gradient&&WL(t.explicit,["encode","gradient"])),t}function Vrt(t,e){return e.value==="circle"?e:t}var Yrt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Krt(t,e,n,r){var i,s,o,u,a;(i=t.encode)!==null&&i!==void 0||(t.encode={}),(s=(u=t.encode)[e])!==null&&s!==void 0||(u[e]={}),(o=(a=t.encode[e]).update)!==null&&o!==void 0||(a.update={}),t.encode[e].update[n]=r}function Yae(t){const e=t.component.legends,n={};for(const i of Re(e)){const s=t.getScaleComponent(i),o=on(s.get("domains"));if(n[o])for(const u of n[o])Vae(u,e[i])||n[o].push(e[i]);else n[o]=[e[i].clone()]}return mi(n).flat().map(i=>Xrt(i,t.config)).filter(i=>i!==void 0)}function Xrt(t,e){var n,r,i;const s=t.combine(),{disable:o,labelExpr:u,selections:a}=s,l=Yrt(s,["disable","labelExpr","selections"]);if(!o){if(e.aria===!1&&l.aria==null&&(l.aria=!1),!((n=l.encode)===null||n===void 0)&&n.symbols){const c=l.encode.symbols.update;c.fill&&c.fill.value!=="transparent"&&!c.stroke&&!l.stroke&&(c.stroke={value:"transparent"});for(const f of Aue)l[f]&&delete c[f]}if(l.title||delete l.title,u!==void 0){let c=u;!((i=(r=l.encode)===null||r===void 0?void 0:r.labels)===null||i===void 0)&&i.update&&Ye(l.encode.labels.update.text)&&(c=v2(u,"datum.label",l.encode.labels.update.text.signal)),Krt(l,"labels","text",{signal:c})}return l}}function Jrt(t){return Q2(t)||z$(t)?Zrt(t):Kae(t)}function Zrt(t){return t.children.reduce((e,n)=>e.concat(n.assembleProjections()),Kae(t))}function Kae(t){const e=t.component.projection;if(!e||e.merged)return[];const n=e.combine(),{name:r}=n;if(e.data){const i={signal:`[${e.size.map(o=>o.signal).join(", ")}]`},s=e.data.reduce((o,u)=>{const a=Ye(u)?u.signal:`data('${t.lookupDataSource(u)}')`;return Ot(o,a)||o.push(a),o},[]);if(s.length<=0)throw new Error("Projection's fit didn't find any data sources");return[Object.assign({name:r,size:i,fit:{signal:s.length>1?`[${s.join(", ")}]`:s[0]}},n)]}else return[Object.assign(Object.assign({name:r},{translate:{signal:"[width / 2, height / 2]"}}),n)]}const eit=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];class Xae extends Cl{constructor(e,n,r,i){super(Object.assign({},n),{name:e}),this.specifiedProjection=n,this.size=r,this.data=i,this.merged=!1}get isFit(){return!!this.data}}function Jae(t){t.component.projection=$n(t)?tit(t):iit(t)}function tit(t){var e;if(t.hasProjection){const n=Qi(t.specifiedProjection),r=!(n&&(n.scale!=null||n.translate!=null)),i=r?[t.getSizeSignalRef("width"),t.getSizeSignalRef("height")]:void 0,s=r?nit(t):void 0,o=new Xae(t.projectionName(!0),Object.assign(Object.assign({},(e=Qi(t.config.projection))!==null&&e!==void 0?e:{}),n??{}),i,s);return o.get("type")||o.set("type","equalEarth",!1),o}}function nit(t){const e=[],{encoding:n}=t;for(const r of[[Zu,Ju],[Ks,jo]])(Gn(n[r[0]])||Gn(n[r[1]]))&&e.push({signal:t.getName(`geojson_${e.length}`)});return t.channelHasField(zi)&&t.typedFieldDef(zi).type===R2&&e.push({signal:t.getName(`geojson_${e.length}`)}),e.length===0&&e.push(t.requestDataName(tn.Main)),e}function rit(t,e){const n=pse(eit,i=>!!(!Ze(t.explicit,i)&&!Ze(e.explicit,i)||Ze(t.explicit,i)&&Ze(e.explicit,i)&&fl(t.get(i),e.get(i))));if(fl(t.size,e.size)){if(n)return t;if(fl(t.explicit,{}))return e;if(fl(e.explicit,{}))return t}return null}function iit(t){if(t.children.length===0)return;let e;for(const r of t.children)Jae(r);const n=pse(t.children,r=>{const i=r.component.projection;if(i)if(e){const s=rit(e,i);return s&&(e=s),!!s}else return e=i,!0;else return!0});if(e&&n){const r=t.projectionName(!0),i=new Xae(r,e.specifiedProjection,e.size,ct(e.data));for(const s of t.children){const o=s.component.projection;o&&(o.isFit&&i.data.push(...s.component.projection.data),s.renameProjection(o.get("name"),r),o.merged=!0)}return i}}var sit=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function oit(t,e,n,r){var i,s;if(xy(e,n)){const o=$n(t)?(s=(i=t.axis(n))!==null&&i!==void 0?i:t.legend(n))!==null&&s!==void 0?s:{}:{},u=Ie(e,{expr:"datum"}),a=Ie(e,{expr:"datum",binSuffix:"end"});return{formulaAs:Ie(e,{binSuffix:"range",forAs:!0}),formula:_C(u,a,o.format,o.formatType,r)}}return{}}function Zae(t,e){return`${Lse(t)}_${e}`}function uit(t,e){return{signal:t.getName(`${e}_bins`),extentSignal:t.getName(`${e}_extent`)}}function w$(t,e,n){var r;const i=(r=wC(n,void 0))!==null&&r!==void 0?r:{},s=Zae(i,e);return t.getName(`${s}_bins`)}function ait(t){return"as"in t}function ele(t,e,n){let r,i;ait(t)?r=ze(t.as)?[t.as,`${t.as}_end`]:[t.as[0],t.as[1]]:r=[Ie(t,{forAs:!0}),Ie(t,{binSuffix:"end",forAs:!0})];const s=Object.assign({},wC(e,void 0)),o=Zae(s,t.field),{signal:u,extentSignal:a}=uit(n,o);if(xC(s.extent)){const c=s.extent;i=Cae(n,c.param,c),delete s.extent}const l=Object.assign(Object.assign(Object.assign({bin:s,field:t.field,as:[r]},u?{signal:u}:{}),a?{extentSignal:a}:{}),i?{span:i}:{});return{key:o,binComponent:l}}class xa extends Ht{constructor(e,n){super(e),this.bins=n}clone(){return new xa(null,ct(this.bins))}static makeFromEncoding(e,n){const r=n.reduceFieldDef((i,s,o)=>{if(Js(s)&&en(s.bin)){const{key:u,binComponent:a}=ele(s,s.bin,n);i[u]=Object.assign(Object.assign(Object.assign({},a),i[u]),oit(n,s,o,n.config))}return i},{});return Kt(r)?null:new xa(e,r)}static makeFromTransform(e,n,r){const{key:i,binComponent:s}=ele(n,n.bin,r);return new xa(e,{[i]:s})}merge(e,n){for(const r of Re(e.bins))r in this.bins?(n(e.bins[r].signal,this.bins[r].signal),this.bins[r].as=xl([...this.bins[r].as,...e.bins[r].as],Rt)):this.bins[r]=e.bins[r];for(const r of e.children)e.removeChild(r),r.parent=this;e.remove()}producedFields(){return new Set(mi(this.bins).map(e=>e.as).flat(2))}dependentFields(){return new Set(mi(this.bins).map(e=>e.field))}hash(){return`Bin ${Rt(this.bins)}`}assemble(){return mi(this.bins).flatMap(e=>{const n=[],[r,...i]=e.as,s=e.bin,{extent:o}=s,u=sit(s,["extent"]),a=Object.assign(Object.assign(Object.assign({type:"bin",field:ko(e.field),as:r,signal:e.signal},xC(o)?{extent:null}:{extent:o}),e.span?{span:{signal:`span(${e.span})`}}:{}),u);!o&&e.extentSignal&&(n.push({type:"extent",field:ko(e.field),signal:e.extentSignal}),a.extent={signal:e.extentSignal}),n.push(a);for(const l of i)for(let c=0;c<2;c++)n.push({type:"formula",expr:Ie({field:r[c]},{expr:"datum"}),as:l[c]});return e.formula&&n.push({type:"formula",expr:e.formula,as:e.formulaAs}),n})}}function lit(t,e,n,r){var i;const s=$n(r)?r.encoding[El(e)]:void 0;if(Js(n)&&$n(r)&&qoe(n,s,r.markDef,r.config))t.add(Ie(n,{})),t.add(Ie(n,{suffix:"end"})),n.bin&&xy(n,e)&&t.add(Ie(n,{binSuffix:"range"}));else if(GXe(e)){const o=QXe(e);t.add(r.getName(o))}else t.add(Ie(n));return Ox(n)&&net((i=n.scale)===null||i===void 0?void 0:i.range)&&t.add(n.scale.range.field),t}function cit(t,e){var n;for(const r of Re(e)){const i=e[r];for(const s of Re(i))r in t?t[r][s]=new Set([...(n=t[r][s])!==null&&n!==void 0?n:[],...i[s]]):t[r]={[s]:i[s]}}}class zo extends Ht{constructor(e,n,r){super(e),this.dimensions=n,this.measures=r}clone(){return new zo(null,new Set(this.dimensions),ct(this.measures))}get groupBy(){return this.dimensions}static makeFromEncoding(e,n){let r=!1;n.forEachFieldDef(o=>{o.aggregate&&(r=!0)});const i={},s=new Set;return!r||(n.forEachFieldDef((o,u)=>{var a,l,c,f;const{aggregate:x,field:d}=o;if(x)if(x==="count")(a=i["*"])!==null&&a!==void 0||(i["*"]={}),i["*"].count=new Set([Ie(o,{forAs:!0})]);else{if(Al(x)||nc(x)){const p=Al(x)?"argmin":"argmax",g=x[p];(l=i[g])!==null&&l!==void 0||(i[g]={}),i[g][p]=new Set([Ie({op:p,field:g},{forAs:!0})])}else(c=i[d])!==null&&c!==void 0||(i[d]={}),i[d][x]=new Set([Ie(o,{forAs:!0})]);tc(u)&&n.scaleDomain(u)==="unaggregated"&&((f=i[d])!==null&&f!==void 0||(i[d]={}),i[d].min=new Set([Ie({field:d,aggregate:"min"},{forAs:!0})]),i[d].max=new Set([Ie({field:d,aggregate:"max"},{forAs:!0})]))}else lit(s,u,o,n)}),s.size+Re(i).length===0)?null:new zo(e,s,i)}static makeFromTransform(e,n){var r,i,s;const o=new Set,u={};for(const a of n.aggregate){const{op:l,field:c,as:f}=a;l&&(l==="count"?((r=u["*"])!==null&&r!==void 0||(u["*"]={}),u["*"].count=new Set([f||Ie(a,{forAs:!0})])):((i=u[c])!==null&&i!==void 0||(u[c]={}),u[c][l]=new Set([f||Ie(a,{forAs:!0})])))}for(const a of(s=n.groupby)!==null&&s!==void 0?s:[])o.add(a);return o.size+Re(u).length===0?null:new zo(e,o,u)}merge(e){return kXe(this.dimensions,e.dimensions)?(cit(this.measures,e.measures),!0):(RZe("different dimensions, cannot merge"),!1)}addDimensions(e){e.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...Re(this.measures)])}producedFields(){const e=new Set;for(const n of Re(this.measures))for(const r of Re(this.measures[n])){const i=this.measures[n][r];i.size===0?e.add(`${r}_${n}`):i.forEach(e.add,e)}return e}hash(){return`Aggregate ${Rt({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const e=[],n=[],r=[];for(const s of Re(this.measures))for(const o of Re(this.measures[s]))for(const u of this.measures[s][o])r.push(u),e.push(o),n.push(s==="*"?null:ko(s));return{type:"aggregate",groupby:[...this.dimensions].map(ko),ops:e,fields:n,as:r}}}class z2 extends Ht{constructor(e,n,r,i){super(e),this.model=n,this.name=r,this.data=i;for(const s of Xs){const o=n.facet[s];if(o){const{bin:u,sort:a}=o;this[s]=Object.assign({name:n.getName(`${s}_domain`),fields:[Ie(o),...en(u)?[Ie(o,{binSuffix:"end"})]:[]]},sa(a)?{sortField:a}:be(a)?{sortIndexField:U2(o,s)}:{})}}this.childModel=n.child}hash(){let e="Facet";for(const n of Xs)this[n]&&(e+=` ${n.charAt(0)}:${Rt(this[n])}`);return e}get fields(){var e;const n=[];for(const r of Xs)!((e=this[r])===null||e===void 0)&&e.fields&&n.push(...this[r].fields);return n}dependentFields(){const e=new Set(this.fields);for(const n of Xs)this[n]&&(this[n].sortField&&e.add(this[n].sortField.field),this[n].sortIndexField&&e.add(this[n].sortIndexField));return e}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const e={};for(const n of na){const r=this.childModel.component.scales[n];if(r&&!r.merged){const i=r.get("type"),s=r.get("range");if(ar(i)&&ic(s)){const o=ZC(this.childModel,n),u=j$(o);u?e[n]=u:Oe(oI(n))}}}return e}assembleRowColumnHeaderData(e,n,r){const i={row:"y",column:"x",facet:void 0}[e],s=[],o=[],u=[];i&&r&&r[i]&&(n?(s.push(`distinct_${r[i]}`),o.push("max")):(s.push(r[i]),o.push("distinct")),u.push(`distinct_${r[i]}`));const{sortField:a,sortIndexField:l}=this[e];if(a){const{op:c=SC,field:f}=a;s.push(f),o.push(c),u.push(Ie(a,{forAs:!0}))}else l&&(s.push(l),o.push("max"),u.push(l));return{name:this[e].name,source:n??this.data,transform:[Object.assign({type:"aggregate",groupby:this[e].fields},s.length?{fields:s,ops:o,as:u}:{})]}}assembleFacetHeaderData(e){var n,r;const{columns:i}=this.model.layout,{layoutHeaders:s}=this.model.component,o=[],u={};for(const c of b$){for(const f of C$){const x=(n=s[c]&&s[c][f])!==null&&n!==void 0?n:[];for(const d of x)if(((r=d.axes)===null||r===void 0?void 0:r.length)>0){u[c]=!0;break}}if(u[c]){const f=`length(data("${this.facet.name}"))`,x=c==="row"?i?{signal:`ceil(${f} / ${i})`}:1:i?{signal:`min(${f}, ${i})`}:{signal:f};o.push({name:`${this.facet.name}_${c}`,transform:[{type:"sequence",start:0,stop:x}]})}}const{row:a,column:l}=u;return(a||l)&&o.unshift(this.assembleRowColumnHeaderData("facet",null,e)),o}assemble(){var e,n;const r=[];let i=null;const s=this.getChildIndependentFieldsWithStep(),{column:o,row:u,facet:a}=this;if(o&&u&&(s.x||s.y)){i=`cross_${this.column.name}_${this.row.name}`;const l=[].concat((e=s.x)!==null&&e!==void 0?e:[],(n=s.y)!==null&&n!==void 0?n:[]),c=l.map(()=>"distinct");r.push({name:i,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:l,ops:c}]})}for(const l of[hl,dl])this[l]&&r.push(this.assembleRowColumnHeaderData(l,i,s));if(a){const l=this.assembleFacetHeaderData(s);l&&r.push(...l)}return r}}function tle(t){return t.startsWith("'")&&t.endsWith("'")||t.startsWith('"')&&t.endsWith('"')?t.slice(1,-1):t}function fit(t,e){const n=Ese(t);if(e==="number")return`toNumber(${n})`;if(e==="boolean")return`toBoolean(${n})`;if(e==="string")return`toString(${n})`;if(e==="date")return`toDate(${n})`;if(e==="flatten")return n;if(e.startsWith("date:")){const r=tle(e.slice(5,e.length));return`timeParse(${n},'${r}')`}else if(e.startsWith("utc:")){const r=tle(e.slice(4,e.length));return`utcParse(${n},'${r}')`}else return Oe(IJe(e)),null}function xit(t){const e={};return eC(t.filter,n=>{var r;if(xoe(n)){let i=null;dI(n)?i=Es(n.equal):pI(n)?i=Es(n.lte):hI(n)?i=Es(n.lt):gI(n)?i=Es(n.gt):mI(n)?i=Es(n.gte):yI(n)?i=n.range[0]:EI(n)&&(i=((r=n.oneOf)!==null&&r!==void 0?r:n.in)[0]),i&&(bx(i)?e[n.field]="date":rn(i)?e[n.field]="number":ze(i)&&(e[n.field]="string")),n.timeUnit&&(e[n.field]="date")}}),e}function dit(t){const e={};function n(r){F2(r)?e[r.field]="date":r.type==="quantitative"&&xJe(r.aggregate)?e[r.field]="number":ty(r.field)>1?r.field in e||(e[r.field]="flatten"):Ox(r)&&sa(r.sort)&&ty(r.sort.field)>1&&(r.sort.field in e||(e[r.sort.field]="flatten"))}if(($n(t)||Qo(t))&&t.forEachFieldDef((r,i)=>{if(Js(r))n(r);else{const s=vx(i),o=t.fieldDef(s);n(Object.assign(Object.assign({},r),{type:o.type}))}}),$n(t)){const{mark:r,markDef:i,encoding:s}=t;if(sc(r)&&!t.encoding.order){const o=i.orient==="horizontal"?"y":"x",u=s[o];Le(u)&&u.type==="quantitative"&&!(u.field in e)&&(e[u.field]="number")}}return e}function hit(t){const e={};if($n(t)&&t.component.selection)for(const n of Re(t.component.selection)){const r=t.component.selection[n];for(const i of r.project.items)!i.channel&&ty(i.field)>1&&(e[i.field]="flatten")}return e}class Gr extends Ht{constructor(e,n){super(e),this._parse=n}clone(){return new Gr(null,ct(this._parse))}hash(){return`Parse ${Rt(this._parse)}`}static makeExplicit(e,n,r){var i;let s={};const o=n.data;return!lc(o)&&(!((i=o==null?void 0:o.format)===null||i===void 0)&&i.parse)&&(s=o.format.parse),this.makeWithAncestors(e,s,{},r)}static makeWithAncestors(e,n,r,i){for(const u of Re(r)){const a=i.getWithExplicit(u);a.value!==void 0&&(a.explicit||a.value===r[u]||a.value==="derived"||r[u]==="flatten"?delete r[u]:Oe(Xse(u,r[u],a.value)))}for(const u of Re(n)){const a=i.get(u);a!==void 0&&(a===n[u]?delete n[u]:Oe(Xse(u,n[u],a)))}const s=new Cl(n,r);i.copyAll(s);const o={};for(const u of Re(s.combine())){const a=s.get(u);a!==null&&(o[u]=a)}return Re(o).length===0||i.parseNothing?null:new Gr(e,o)}get parse(){return this._parse}merge(e){this._parse=Object.assign(Object.assign({},this._parse),e.parse),e.remove()}assembleFormatParse(){const e={};for(const n of Re(this._parse)){const r=this._parse[n];ty(n)===1&&(e[n]=r)}return e}producedFields(){return new Set(Re(this._parse))}dependentFields(){return new Set(Re(this._parse))}assembleTransforms(e=!1){return Re(this._parse).filter(n=>e?ty(n)>1:!0).map(n=>{const r=fit(n,this._parse[n]);return r?{type:"formula",expr:r,as:Ase(n)}:null}).filter(n=>n!==null)}}class dc extends Ht{clone(){return new dc(null)}constructor(e){super(e)}dependentFields(){return new Set}producedFields(){return new Set([hy])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:hy}}}class Ay extends Ht{constructor(e,n){super(e),this.params=n}clone(){return new Ay(null,this.params)}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${Rt(this.params)}`}assemble(){return Object.assign({type:"graticule"},this.params===!0?{}:this.params)}}class vy extends Ht{constructor(e,n){super(e),this.params=n}clone(){return new vy(null,this.params)}dependentFields(){return new Set}producedFields(){var e;return new Set([(e=this.params.as)!==null&&e!==void 0?e:"data"])}hash(){return`Hash ${Rt(this.params)}`}assemble(){return Object.assign({type:"sequence"},this.params)}}class Nx extends Ht{constructor(e){super(null),e??(e={name:"source"});let n;if(lc(e)||(n=e.format?Object.assign({},Ys(e.format,["parse"])):{}),py(e))this._data={values:e.values};else if(I2(e)){if(this._data={url:e.url},!n.type){let r=/(?:\.([^.]+))?$/.exec(e.url)[1];Ot(["json","csv","tsv","dsv","topojson"],r)||(r="json"),n.type=r}}else Xue(e)?this._data={values:[{type:"Sphere"}]}:(Yue(e)||lc(e))&&(this._data={});this._generator=lc(e),e.name&&(this._name=e.name),n&&!Kt(n)&&(this._data.format=n)}dependentFields(){return new Set}producedFields(){}get data(){return this._data}hasName(){return!!this._name}get isGenerator(){return this._generator}get dataName(){return this._name}set dataName(e){this._name=e}set parent(e){throw new Error("Source nodes have to be roots.")}remove(){throw new Error("Source nodes are roots and cannot be removed.")}hash(){throw new Error("Cannot hash sources")}assemble(){return Object.assign(Object.assign({name:this._name},this._data),{transform:[]})}}var nle=function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},pit=function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},_y;function N$(t){return t instanceof Nx||t instanceof Ay||t instanceof vy}class F${constructor(){_y.set(this,void 0),nle(this,_y,!1,"f")}setModified(){nle(this,_y,!0,"f")}get modifiedFlag(){return pit(this,_y,"f")}}_y=new WeakMap;class Fx extends F${getNodeDepths(e,n,r){r.set(e,n);for(const i of e.children)this.getNodeDepths(i,n+1,r);return r}optimize(e){const r=[...this.getNodeDepths(e,0,new Map).entries()].sort((i,s)=>s[1]-i[1]);for(const i of r)this.run(i[0]);return this.modifiedFlag}}class L$ extends F${optimize(e){this.run(e);for(const n of e.children)this.optimize(n);return this.modifiedFlag}}class git extends L${mergeNodes(e,n){const r=n.shift();for(const i of n)e.removeChild(i),i.parent=r,i.remove()}run(e){const n=e.children.map(i=>i.hash()),r={};for(let i=0;i<n.length;i++)r[n[i]]===void 0?r[n[i]]=[e.children[i]]:r[n[i]].push(e.children[i]);for(const i of Re(r))r[i].length>1&&(this.setModified(),this.mergeNodes(e,r[i]))}}class mit extends L${constructor(e){super(),this.requiresSelectionId=e&&E$(e)}run(e){e instanceof dc&&(this.requiresSelectionId&&(N$(e.parent)||e.parent instanceof zo||e.parent instanceof Gr)||(this.setModified(),e.remove()))}}class yit extends F${optimize(e){return this.run(e,new Set),this.modifiedFlag}run(e,n){let r=new Set;e instanceof fa&&(r=e.producedFields(),gse(r,n)&&(this.setModified(),e.removeFormulas(n),e.producedFields.length===0&&e.remove()));for(const i of e.children)this.run(i,new Set([...n,...r]))}}class Eit extends L${constructor(){super()}run(e){e instanceof vi&&!e.isRequired()&&(this.setModified(),e.remove())}}class Ait extends Fx{run(e){if(!N$(e)&&!(e.numChildren()>1)){for(const n of e.children)if(n instanceof Gr)if(e instanceof Gr)this.setModified(),e.merge(n);else{if(yse(e.producedFields(),n.dependentFields()))continue;this.setModified(),n.swapWithParent()}}}}class vit extends Fx{run(e){const n=[...e.children],r=e.children.filter(i=>i instanceof Gr);if(e.numChildren()>1&&r.length>=1){const i={},s=new Set;for(const o of r){const u=o.parse;for(const a of Re(u))a in i?i[a]!==u[a]&&s.add(a):i[a]=u[a]}for(const o of s)delete i[o];if(!Kt(i)){this.setModified();const o=new Gr(e,i);for(const u of n){if(u instanceof Gr)for(const a of Re(i))delete u.parse[a];e.removeChild(u),u.parent=o,u instanceof Gr&&Re(u.parse).length===0&&u.remove()}}}}}class _it extends Fx{run(e){e instanceof vi||e.numChildren()>0||e instanceof z2||e instanceof Nx||(this.setModified(),e.remove())}}class Sit extends Fx{run(e){const n=e.children.filter(i=>i instanceof fa),r=n.pop();for(const i of n)this.setModified(),r.merge(i)}}class bit extends Fx{run(e){const n=e.children.filter(i=>i instanceof zo),r={};for(const i of n){const s=Rt(i.groupBy);s in r||(r[s]=[]),r[s].push(i)}for(const i of Re(r)){const s=r[i];if(s.length>1){const o=s.pop();for(const u of s)o.merge(u)&&(e.removeChild(u),u.parent=o,u.remove(),this.setModified())}}}}class Cit extends Fx{constructor(e){super(),this.model=e}run(e){const n=!(N$(e)||e instanceof M2||e instanceof Gr||e instanceof dc),r=[],i=[];for(const s of e.children)s instanceof xa&&(n&&!yse(e.producedFields(),s.dependentFields())?r.push(s):i.push(s));if(r.length>0){const s=r.pop();for(const o of r)s.merge(o,this.model.renameSignal.bind(this.model));this.setModified(),e instanceof xa?e.merge(s,this.model.renameSignal.bind(this.model)):s.swapWithParent()}if(i.length>1){const s=i.pop();for(const o of i)s.merge(o,this.model.renameSignal.bind(this.model));this.setModified()}}}class Tit extends Fx{run(e){const n=[...e.children];if(!A2(n,o=>o instanceof vi)||e.numChildren()<=1)return;const i=[];let s;for(const o of n)if(o instanceof vi){let u=o;for(;u.numChildren()===1;){const[a]=u.children;if(a instanceof vi)u=a;else break}i.push(...u.children),s?(e.removeChild(o),o.parent=s.parent,s.parent.removeChild(s),s.parent=u,this.setModified()):s=u}else i.push(o);if(i.length){this.setModified();for(const o of i)o.parent.removeChild(o),o.parent=s}}}class Lx extends Ht{constructor(e,n){super(e),this.transform=n}clone(){return new Lx(null,ct(this.transform))}addDimensions(e){this.transform.groupby=xl(this.transform.groupby.concat(e),n=>n)}dependentFields(){const e=new Set;return this.transform.groupby&&this.transform.groupby.forEach(e.add,e),this.transform.joinaggregate.map(n=>n.field).filter(n=>n!==void 0).forEach(e.add,e),e}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(e){var n;return(n=e.as)!==null&&n!==void 0?n:Ie(e)}hash(){return`JoinAggregateTransform ${Rt(this.transform)}`}assemble(){const e=[],n=[],r=[];for(const s of this.transform.joinaggregate)n.push(s.op),r.push(this.getDefaultName(s)),e.push(s.field===void 0?null:s.field);const i=this.transform.groupby;return Object.assign({type:"joinaggregate",as:r,ops:n,fields:e},i!==void 0?{groupby:i}:{})}}function Rit(t){return t.stack.stackBy.reduce((e,n)=>{const r=n.fieldDef,i=Ie(r);return i&&e.push(i),e},[])}function Oit(t){return be(t)&&t.every(e=>ze(e))&&t.length>1}class Tl extends Ht{constructor(e,n){super(e),this._stack=n}clone(){return new Tl(null,ct(this._stack))}static makeFromTransform(e,n){const{stack:r,groupby:i,as:s,offset:o="zero"}=n,u=[],a=[];if(n.sort!==void 0)for(const f of n.sort)u.push(f.field),a.push(Qn(f.order,"ascending"));const l={field:u,order:a};let c;return Oit(s)?c=s:ze(s)?c=[s,`${s}_end`]:c=[`${n.stack}_start`,`${n.stack}_end`],new Tl(e,{dimensionFieldDefs:[],stackField:r,groupby:i,offset:o,sort:l,facetby:[],as:c})}static makeFromEncoding(e,n){const r=n.stack,{encoding:i}=n;if(!r)return null;const{groupbyChannels:s,fieldChannel:o,offset:u,impute:a}=r,l=s.map(d=>{const p=i[d];return aa(p)}).filter(d=>!!d),c=Rit(n),f=n.encoding.order;let x;return be(f)||Le(f)?x=Use(f):x=c.reduce((d,p)=>(d.field.push(p),d.order.push(o==="y"?"descending":"ascending"),d),{field:[],order:[]}),new Tl(e,{dimensionFieldDefs:l,stackField:n.vgField(o),facetby:[],stackby:c,sort:x,offset:u,impute:a,as:[n.vgField(o,{suffix:"start",forAs:!0}),n.vgField(o,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(e){this._stack.facetby.push(...e)}dependentFields(){const e=new Set;return e.add(this._stack.stackField),this.getGroupbyFields().forEach(e.add,e),this._stack.facetby.forEach(e.add,e),this._stack.sort.field.forEach(e.add,e),e}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${Rt(this._stack)}`}getGroupbyFields(){const{dimensionFieldDefs:e,impute:n,groupby:r}=this._stack;return e.length>0?e.map(i=>i.bin?n?[Ie(i,{binSuffix:"mid"})]:[Ie(i,{}),Ie(i,{binSuffix:"end"})]:[Ie(i)]).flat():r??[]}assemble(){const e=[],{facetby:n,dimensionFieldDefs:r,stackField:i,stackby:s,sort:o,offset:u,impute:a,as:l}=this._stack;if(a)for(const c of r){const{bandPosition:f=.5,bin:x}=c;if(x){const d=Ie(c,{expr:"datum"}),p=Ie(c,{expr:"datum",binSuffix:"end"});e.push({type:"formula",expr:`${f}*${d}+${1-f}*${p}`,as:Ie(c,{binSuffix:"mid",forAs:!0})})}e.push({type:"impute",field:i,groupby:[...s,...n],key:Ie(c,{binSuffix:"mid"}),method:"value",value:0})}return e.push({type:"stack",groupby:[...this.getGroupbyFields(),...n],field:i,sort:o,as:l,offset:u}),e}}class H2 extends Ht{constructor(e,n){super(e),this.transform=n}clone(){return new H2(null,ct(this.transform))}addDimensions(e){this.transform.groupby=xl(this.transform.groupby.concat(e),n=>n)}dependentFields(){var e,n;const r=new Set;return((e=this.transform.groupby)!==null&&e!==void 0?e:[]).forEach(r.add,r),((n=this.transform.sort)!==null&&n!==void 0?n:[]).forEach(i=>r.add(i.field)),this.transform.window.map(i=>i.field).filter(i=>i!==void 0).forEach(r.add,r),r}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(e){var n;return(n=e.as)!==null&&n!==void 0?n:Ie(e)}hash(){return`WindowTransform ${Rt(this.transform)}`}assemble(){var e;const n=[],r=[],i=[],s=[];for(const x of this.transform.window)r.push(x.op),i.push(this.getDefaultName(x)),s.push(x.param===void 0?null:x.param),n.push(x.field===void 0?null:x.field);const o=this.transform.frame,u=this.transform.groupby;if(o&&o[0]===null&&o[1]===null&&r.every(x=>nI(x)))return Object.assign({type:"joinaggregate",as:i,ops:r,fields:n},u!==void 0?{groupby:u}:{});const a=[],l=[];if(this.transform.sort!==void 0)for(const x of this.transform.sort)a.push(x.field),l.push((e=x.order)!==null&&e!==void 0?e:"ascending");const c={field:a,order:l},f=this.transform.ignorePeers;return Object.assign(Object.assign(Object.assign({type:"window",params:s,as:i,ops:r,fields:n,sort:c},f!==void 0?{ignorePeers:f}:{}),u!==void 0?{groupby:u}:{}),o!==void 0?{frame:o}:{})}}function Dit(t){function e(n){if(!(n instanceof z2)){const r=n.clone();if(r instanceof vi){const i=$$+r.getSource();r.setSource(i),t.model.component.data.outputNodes[i]=r}else(r instanceof zo||r instanceof Tl||r instanceof H2||r instanceof Lx)&&r.addDimensions(t.fields);for(const i of n.children.flatMap(e))i.parent=r;return[r]}return n.children.flatMap(e)}return e}function I$(t){if(t instanceof z2)if(t.numChildren()===1&&!(t.children[0]instanceof vi)){const e=t.children[0];(e instanceof zo||e instanceof Tl||e instanceof H2||e instanceof Lx)&&e.addDimensions(t.fields),e.swapWithParent(),I$(t)}else{const e=t.model.component.data.main;rle(e);const n=Dit(t),r=t.children.map(n).flat();for(const i of r)i.parent=e}else t.children.map(I$)}function rle(t){if(t instanceof vi&&t.type===tn.Main&&t.numChildren()===1){const e=t.children[0];e instanceof z2||(e.swapWithParent(),rle(t))}}const $$="scale_",JC=5;function B$(t){for(const e of t){for(const n of e.children)if(n.parent!==e)return!1;if(!B$(e.children))return!1}return!0}function Ho(t,e){let n=!1;for(const r of e)n=t.optimize(r)||n;return n}function ile(t,e,n){let r=t.sources,i=!1;return i=Ho(new Eit,r)||i,i=Ho(new mit(e),r)||i,r=r.filter(s=>s.numChildren()>0),i=Ho(new _it,r)||i,r=r.filter(s=>s.numChildren()>0),n||(i=Ho(new Ait,r)||i,i=Ho(new Cit(e),r)||i,i=Ho(new yit,r)||i,i=Ho(new vit,r)||i,i=Ho(new bit,r)||i,i=Ho(new Sit,r)||i,i=Ho(new git,r)||i,i=Ho(new Tit,r)||i),t.sources=r,i}function wit(t,e){B$(t.sources);let n=0,r=0;for(let i=0;i<JC&&ile(t,e,!0);i++)n++;t.sources.map(I$);for(let i=0;i<JC&&ile(t,e,!1);i++)r++;B$(t.sources),Math.max(n,r)===JC&&Oe(`Maximum optimization runs(${JC}) reached.`)}class Wi{constructor(e){Object.defineProperty(this,"signal",{enumerable:!0,get:e})}static fromName(e,n){return new Wi(()=>e(n))}}var Nit=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function sle(t){$n(t)?Fit(t):Lit(t)}function Fit(t){const e=t.component.scales;for(const n of Re(e)){const r=$it(t,n);if(e[n].setWithExplicit("domains",r),kit(t,n),t.component.data.isFaceted){let s=t;for(;!Qo(s)&&s.parent;)s=s.parent;if(s.component.resolve.scale[n]==="shared")for(const u of r.value)vl(u)&&(u.data=$$+u.data.replace($$,""))}}}function Lit(t){for(const n of t.children)sle(n);const e=t.component.scales;for(const n of Re(e)){let r,i=null;for(const s of t.children){const o=s.component.scales[n];if(o){r===void 0?r=o.getWithExplicit("domains"):r=ac(r,o.getWithExplicit("domains"),"domains","scale",M$);const u=o.get("selectionExtent");i&&u&&i.param!==u.param&&Oe(wJe),i=u}}e[n].setWithExplicit("domains",r),i&&e[n].set("selectionExtent",i,!0)}}function Iit(t,e,n,r){if(t==="unaggregated"){const{valid:i,reason:s}=ole(e,n);if(!i){Oe(s);return}}else if(t===void 0&&r.useUnaggregatedDomain){const{valid:i}=ole(e,n);if(i)return"unaggregated"}return t}function $it(t,e){const n=t.getScaleComponent(e).get("type"),{encoding:r}=t,i=Iit(t.scaleDomain(e),t.typedFieldDef(e),n,t.config.scale);return i!==t.scaleDomain(e)&&(t.specifiedScales[e]=Object.assign(Object.assign({},t.specifiedScales[e]),{domain:i})),e==="x"&&Gn(r.x2)?Gn(r.x)?ac(hc(n,i,t,"x"),hc(n,i,t,"x2"),"domain","scale",M$):hc(n,i,t,"x2"):e==="y"&&Gn(r.y2)?Gn(r.y)?ac(hc(n,i,t,"y"),hc(n,i,t,"y2"),"domain","scale",M$):hc(n,i,t,"y2"):hc(n,i,t,e)}function Bit(t,e,n){return t.map(r=>({signal:`{data: ${NC(r,{timeUnit:n,type:e})}}`}))}function k$(t,e,n){var r;const i=(r=Ei(n))===null||r===void 0?void 0:r.unit;return e==="temporal"||i?Bit(t,e,i):[t]}function hc(t,e,n,r){const{encoding:i}=n,s=Gn(i[r]),{type:o}=s,u=s.timeUnit;if(tet(e)){const f=hc(t,void 0,n,r),x=k$(e.unionWith,o,u);return ca([...f.value,...x])}else{if(Ye(e))return ca([e]);if(e&&e!=="unaggregated"&&!Aoe(e))return ca(k$(e,o,u))}const a=n.stack;if(a&&r===a.fieldChannel){if(a.offset==="normalize")return vs([[0,1]]);const f=n.requestDataName(tn.Main);return vs([{data:f,field:n.vgField(r,{suffix:"start"})},{data:f,field:n.vgField(r,{suffix:"end"})}])}const l=tc(r)&&Le(s)?Pit(n,r,t):void 0;if(oa(s)){const f=k$([s.datum],o,u);return vs(f)}const c=s;if(e==="unaggregated"){const f=n.requestDataName(tn.Main),{field:x}=s;return vs([{data:f,field:Ie({field:x,aggregate:"min"})},{data:f,field:Ie({field:x,aggregate:"max"})}])}else if(en(c.bin)){if(ar(t))return vs(t==="bin-ordinal"?[]:[{data:tC(l)?n.requestDataName(tn.Main):n.requestDataName(tn.Raw),field:n.vgField(r,xy(c,r)?{binSuffix:"range"}:{}),sort:l===!0||!Qe(l)?{field:n.vgField(r,{}),op:"min"}:l}]);{const{bin:f}=c;if(en(f)){const x=w$(n,c.field,f);return vs([new Wi(()=>{const d=n.getSignalName(x);return`[${d}.start, ${d}.stop]`})])}else return vs([{data:n.requestDataName(tn.Main),field:n.vgField(r,{})}])}}else if(c.timeUnit&&Ot(["time","utc"],t)&&qoe(c,$n(n)?n.encoding[El(r)]:void 0,n.markDef,n.config)){const f=n.requestDataName(tn.Main);return vs([{data:f,field:n.vgField(r)},{data:f,field:n.vgField(r,{suffix:"end"})}])}else return vs(l?[{data:tC(l)?n.requestDataName(tn.Main):n.requestDataName(tn.Raw),field:n.vgField(r),sort:l}]:[{data:n.requestDataName(tn.Main),field:n.vgField(r)}])}function P$(t,e){const{op:n,field:r,order:i}=t;return Object.assign(Object.assign({op:n??(e?"sum":SC)},r?{field:ko(r)}:{}),i?{order:i}:{})}function kit(t,e){var n;const r=t.component.scales[e],i=t.specifiedScales[e].domain,s=(n=t.fieldDef(e))===null||n===void 0?void 0:n.bin,o=Aoe(i)&&i,u=_x(s)&&xC(s.extent)&&s.extent;(o||u)&&r.set("selectionExtent",o??u,!0)}function Pit(t,e,n){if(!ar(n))return;const r=t.fieldDef(e),i=r.sort;if(Poe(i))return{op:"min",field:U2(r,e),order:"ascending"};const{stack:s}=t,o=s?new Set([...s.groupbyFields,...s.stackBy.map(u=>u.fieldDef.field)]):void 0;if(sa(i)){const u=s&&!o.has(i.field);return P$(i,u)}else if(koe(i)){const{encoding:u,order:a}=i,l=t.fieldDef(u),{aggregate:c,field:f}=l,x=s&&!o.has(f);if(Al(c)||nc(c))return P$({field:Ie(l),order:a},x);if(nI(c)||!c)return P$({op:c,field:f,order:a},x)}else{if(i==="descending")return{op:"min",field:t.vgField(e),order:"descending"};if(Ot(["ascending",void 0],i))return!0}}function ole(t,e){const{aggregate:n,type:r}=t;return n?ze(n)&&!hJe.has(n)?{valid:!1,reason:iZe(n)}:r==="quantitative"&&e==="log"?{valid:!1,reason:sZe(t)}:{valid:!0}:{valid:!1,reason:rZe(t)}}function M$(t,e,n,r){return t.explicit&&e.explicit&&Oe(cZe(n,r,t.value,e.value)),{explicit:t.explicit,value:[...t.value,...e.value]}}function Mit(t){const e=xl(t.map(o=>vl(o)?Nit(o,["sort"]):o),Rt),n=xl(t.map(o=>{if(vl(o)){const u=o.sort;return u!==void 0&&!tC(u)&&("op"in u&&u.op==="count"&&delete u.field,u.order==="ascending"&&delete u.order),u}}).filter(o=>o!==void 0),Rt);if(e.length===0)return;if(e.length===1){const o=t[0];if(vl(o)&&n.length>0){let u=n[0];if(n.length>1)Oe(roe),u=!0;else if(Qe(u)&&"field"in u){const a=u.field;o.field===a&&(u=u.order?{order:u.order}:!0)}return Object.assign(Object.assign({},o),{sort:u})}return o}const r=xl(n.map(o=>tC(o)||!("op"in o)||ze(o.op)&&o.op in cJe?o:(Oe(xZe(o)),!0)),Rt);let i;r.length===1?i=r[0]:r.length>1&&(Oe(roe),i=!0);const s=xl(t.map(o=>vl(o)?o.data:null),o=>o);return s.length===1&&s[0]!==null?Object.assign({data:s[0],fields:e.map(u=>u.field)},i?{sort:i}:{}):Object.assign({fields:e},i?{sort:i}:{})}function j$(t){if(vl(t)&&ze(t.field))return t.field;if(gJe(t)){let e;for(const n of t.fields)if(vl(n)&&ze(n.field)){if(!e)e=n.field;else if(e!==n.field)return Oe(dZe),e}return Oe(hZe),e}else if(mJe(t)){Oe(pZe);const e=t.fields[0];return ze(e)?e:void 0}}function ZC(t,e){const r=t.component.scales[e].get("domains").map(i=>(vl(i)&&(i.data=t.lookupDataSource(i.data)),i));return Mit(r)}var jit=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function ule(t){return Q2(t)||z$(t)?t.children.reduce((e,n)=>e.concat(ule(n)),ale(t)):ale(t)}function ale(t){return Re(t.component.scales).reduce((e,n)=>{const r=t.component.scales[n];if(r.merged)return e;const i=r.combine(),{name:s,type:o,selectionExtent:u,domains:a,range:l,reverse:c}=i,f=jit(i,["name","type","selectionExtent","domains","range","reverse"]),x=Uit(i.range,s,n,t),d=ZC(t,n),p=u?Nnt(t,u,r,d):null;return e.push(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:s,type:o},d?{domain:d}:{}),p?{domainRaw:p}:{}),{range:x}),c!==void 0?{reverse:c}:{}),f)),e},[])}function Uit(t,e,n,r){if(Sr(n)){if(ic(t))return{step:{signal:`${e}_step`}}}else if(Qe(t)&&vl(t))return Object.assign(Object.assign({},t),{data:r.lookupDataSource(t.data)});return t}class lle extends Cl{constructor(e,n){super({},{name:e}),this.merged=!1,this.setWithExplicit("type",n)}domainDefinitelyIncludesZero(){return this.get("zero")!==!1?!0:A2(this.get("domains"),e=>be(e)&&e.length===2&&e[0]<=0&&e[1]>=0)}}const qit=["range","scheme"];function zit(t){const e=t.component.scales;for(const n of fC){const r=e[n];if(!r)continue;const i=Hit(n,t);r.setWithExplicit("range",i)}}function cle(t,e){const n=t.fieldDef(e);if(n!=null&&n.bin){const{bin:r,field:i}=n,s=Hi(e),o=t.getName(s);if(Qe(r)&&r.binned&&r.step!==void 0)return new Wi(()=>{const u=t.scaleName(e),a=`(domain("${u}")[1] - domain("${u}")[0]) / ${r.step}`;return`${t.getSignalName(o)} / (${a})`});if(en(r)){const u=w$(t,i,r);return new Wi(()=>{const a=t.getSignalName(u),l=`(${a}.stop - ${a}.start) / ${a}.step`;return`${t.getSignalName(o)} / (${l})`})}}}function Hit(t,e){const n=e.specifiedScales[t],{size:r}=e,s=e.getScaleComponent(t).get("type");for(const f of qit)if(n[f]!==void 0){const x=bI(s,f),d=voe(t,f);if(!x)Oe(toe(s,f,t));else if(d)Oe(d);else switch(f){case"range":{const p=n.range;if(be(p)){if(Sr(t))return ca(p.map(g=>{if(g==="width"||g==="height"){const m=e.getName(g),y=e.getSignalName.bind(e);return Wi.fromName(y,m)}return g}))}else if(Qe(p))return ca({data:e.requestDataName(tn.Main),field:p.field,sort:{op:"min",field:e.vgField(t)}});return ca(p)}case"scheme":return ca(Qit(n[f]))}}const o=t===En||t==="xOffset"?"width":"height",u=r[o];if(la(u)){if(Sr(t))if(ar(s)){const f=fle(u,e,t);if(f)return ca({step:f})}else Oe(noe(o));else if(b2(t)){const f=t===Y0?"x":"y";if(e.getScaleComponent(f).get("type")==="band"){const p=xle(u,s);if(p)return ca(p)}}}const{rangeMin:a,rangeMax:l}=n,c=Git(t,e);return(a!==void 0||l!==void 0)&&bI(s,"rangeMin")&&be(c)&&c.length===2?ca([a??c[0],l??c[1]]):vs(c)}function Qit(t){return eet(t)?Object.assign({scheme:t.name},Ys(t,["name"])):{scheme:t}}function Git(t,e){const{size:n,config:r,mark:i,encoding:s}=e,o=e.getSignalName.bind(e),{type:u}=Gn(s[t]),l=e.getScaleComponent(t).get("type"),{domain:c,domainMid:f}=e.specifiedScales[t];switch(t){case En:case ur:{if(Ot(["point","band"],l)){const p=dle(t,n,r.view);if(la(p))return{step:fle(p,e,t)}}const x=Hi(t),d=e.getName(x);return t===ur&&As(l)?[Wi.fromName(o,d),0]:[0,Wi.fromName(o,d)]}case Y0:case _2:return Wit(t,e,l);case ml:{const x=e.component.scales[t].get("zero"),d=hle(i,x,r),p=Kit(i,n,e,r);return O2(l)?Yit(d,p,Vit(l,r,c,t)):[d,p]}case Mo:return[0,Math.PI*2];case Ex:return[0,360];case Xu:return[0,new Wi(()=>{const x=e.getSignalName("width"),d=e.getSignalName("height");return`min(${x},${d})/2`})];case J0:return[r.scale.minStrokeWidth,r.scale.maxStrokeWidth];case Z0:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case zi:return"symbol";case qi:case ea:case ta:return l==="ordinal"?u==="nominal"?"category":"ordinal":f!==void 0?"diverging":i==="rect"||i==="geoshape"?"heatmap":"ramp";case yl:case K0:case X0:return[r.scale.minOpacity,r.scale.maxOpacity]}}function fle(t,e,n){var r,i,s,o,u;const{encoding:a}=e,l=e.getScaleComponent(n),c=Tse(n),f=a[c];if(_ue({step:t,offsetIsDiscrete:ut(f)&&hoe(f.type)})==="offset"&&tue(a,c)){const d=e.getScaleComponent(c);let g=`domain('${e.scaleName(c)}').length`;if(d.get("type")==="band"){const y=(i=(r=d.get("paddingInner"))!==null&&r!==void 0?r:d.get("padding"))!==null&&i!==void 0?i:0,E=(o=(s=d.get("paddingOuter"))!==null&&s!==void 0?s:d.get("padding"))!==null&&o!==void 0?o:0;g=`bandspace(${g}, ${y}, ${E})`}const m=(u=l.get("paddingInner"))!==null&&u!==void 0?u:l.get("padding");return{signal:`${t.step} * ${g} / (1-${AJe(m)})`}}else return t.step}function xle(t,e){if(_ue({step:t,offsetIsDiscrete:ar(e)})==="offset")return{step:t.step}}function Wit(t,e,n){const r=t===Y0?"x":"y",s=e.getScaleComponent(r).get("type"),o=e.scaleName(r);if(s==="band"){const u=dle(r,e.size,e.config.view);if(la(u)){const a=xle(u,n);if(a)return a}return[0,{signal:`bandwidth('${o}')`}]}else return IXe(`Cannot use ${t} scale if ${r} scale is not discrete.`)}function dle(t,e,n){const r=t===En?"width":"height",i=e[r];return i||MC(n,r)}function Vit(t,e,n,r){switch(t){case"quantile":return e.scale.quantileCount;case"quantize":return e.scale.quantizeCount;case"threshold":return n!==void 0&&be(n)?n.length+1:(Oe(bZe(r)),3)}}function Yit(t,e,n){const r=()=>{const i=_l(e),s=_l(t),o=`(${i} - ${s}) / (${n} - 1)`;return`sequence(${s}, ${i} + ${o}, ${o})`};return Ye(e)?new Wi(r):{signal:r()}}function hle(t,e,n){if(e)return Ye(e)?{signal:`${e.signal} ? 0 : ${hle(t,!1,n)}`}:0;switch(t){case"bar":case"tick":return n.scale.minBandSize;case"line":case"trail":case"rule":return n.scale.minStrokeWidth;case"text":return n.scale.minFontSize;case"point":case"square":case"circle":return n.scale.minSize}throw new Error(hC("size",t))}const ple=.95;function Kit(t,e,n,r){const i={x:cle(n,"x"),y:cle(n,"y")};switch(t){case"bar":case"tick":{if(r.scale.maxBandSize!==void 0)return r.scale.maxBandSize;const s=gle(e,i,r.view);return rn(s)?s-1:new Wi(()=>`${s.signal} - 1`)}case"line":case"trail":case"rule":return r.scale.maxStrokeWidth;case"text":return r.scale.maxFontSize;case"point":case"square":case"circle":{if(r.scale.maxSize)return r.scale.maxSize;const s=gle(e,i,r.view);return rn(s)?Math.pow(ple*s,2):new Wi(()=>`pow(${ple} * ${s.signal}, 2)`)}}throw new Error(hC("size",t))}function gle(t,e,n){const r=la(t.width)?t.width.step:PC(n,"width"),i=la(t.height)?t.height.step:PC(n,"height");return e.x||e.y?new Wi(()=>`min(${[e.x?e.x.signal:r,e.y?e.y.signal:i].join(", ")})`):Math.min(r,i)}function mle(t,e){$n(t)?Xit(t,e):Ale(t,e)}function Xit(t,e){const n=t.component.scales,{config:r,encoding:i,markDef:s,specifiedScales:o}=t;for(const u of Re(n)){const a=o[u],l=n[u],c=t.getScaleComponent(u),f=Gn(i[u]),x=a[e],d=c.get("type"),p=c.get("padding"),g=c.get("paddingInner"),m=bI(d,e),y=voe(u,e);if(x!==void 0&&(m?y&&Oe(y):Oe(toe(d,e,u))),m&&y===void 0)if(x!==void 0){const E=f.timeUnit,A=f.type;switch(e){case"domainMax":case"domainMin":bx(a[e])||A==="temporal"||E?l.set(e,{signal:NC(a[e],{type:A,timeUnit:E})},!0):l.set(e,a[e],!0);break;default:l.copyKeyFromObject(e,a)}}else{const E=e in yle?yle[e]({model:t,channel:u,fieldOrDatumDef:f,scaleType:d,scalePadding:p,scalePaddingInner:g,domain:a.domain,domainMin:a.domainMin,domainMax:a.domainMax,markDef:s,config:r,hasNestedOffsetScale:qI(i,u)}):r.scale[e];E!==void 0&&l.set(e,E,!1)}}}const yle={bins:({model:t,fieldOrDatumDef:e})=>Le(e)?Jit(t,e):void 0,interpolate:({channel:t,fieldOrDatumDef:e})=>Zit(t,e.type),nice:({scaleType:t,channel:e,domain:n,domainMin:r,domainMax:i,fieldOrDatumDef:s})=>est(t,e,n,r,i,s),padding:({channel:t,scaleType:e,fieldOrDatumDef:n,markDef:r,config:i})=>tst(t,e,i.scale,n,r,i.bar),paddingInner:({scalePadding:t,channel:e,markDef:n,scaleType:r,config:i,hasNestedOffsetScale:s})=>nst(t,e,n.type,r,i.scale,s),paddingOuter:({scalePadding:t,channel:e,scaleType:n,scalePaddingInner:r,config:i,hasNestedOffsetScale:s})=>rst(t,e,n,r,i.scale,s),reverse:({fieldOrDatumDef:t,scaleType:e,channel:n,config:r})=>{const i=Le(t)?t.sort:void 0;return ist(e,i,n,r.scale)},zero:({channel:t,fieldOrDatumDef:e,domain:n,markDef:r,scaleType:i})=>sst(t,e,n,r,i)};function Ele(t){$n(t)?zit(t):Ale(t,"range")}function Ale(t,e){const n=t.component.scales;for(const r of t.children)e==="range"?Ele(r):mle(r,e);for(const r of Re(n)){let i;for(const s of t.children){const o=s.component.scales[r];if(o){const u=o.getWithExplicit(e);i=ac(i,u,e,"scale",Vue((a,l)=>{switch(e){case"range":return a.step&&l.step?a.step-l.step:0}return 0}))}}n[r].setWithExplicit(e,i)}}function Jit(t,e){const n=e.bin;if(en(n)){const r=w$(t,e.field,n);return new Wi(()=>t.getSignalName(r))}else if(yi(n)&&_x(n)&&n.step!==void 0)return{step:n.step}}function Zit(t,e){if(Ot([qi,ea,ta],t)&&e!=="nominal")return"hcl"}function est(t,e,n,r,i,s){var o;if(!(!((o=aa(s))===null||o===void 0)&&o.bin||be(n)||i!=null||r!=null||Ot([Gi.TIME,Gi.UTC],t)))return Sr(e)?!0:void 0}function tst(t,e,n,r,i,s){if(Sr(t)){if(Uo(e)){if(n.continuousPadding!==void 0)return n.continuousPadding;const{type:o,orient:u}=i;if(o==="bar"&&!(Le(r)&&(r.bin||r.timeUnit))&&(u==="vertical"&&t==="x"||u==="horizontal"&&t==="y"))return s.continuousBandSize}if(e===Gi.POINT)return n.pointPadding}}function nst(t,e,n,r,i,s=!1){if(t===void 0){if(Sr(e)){const{bandPaddingInner:o,barBandPaddingInner:u,rectBandPaddingInner:a,bandWithNestedOffsetPaddingInner:l}=i;return s?l:Qn(o,n==="bar"?u:a)}else if(b2(e)&&r===Gi.BAND)return i.offsetBandPaddingInner}}function rst(t,e,n,r,i,s=!1){if(t===void 0){if(Sr(e)){const{bandPaddingOuter:o,bandWithNestedOffsetPaddingOuter:u}=i;if(s)return u;if(n===Gi.BAND)return Qn(o,Ye(r)?{signal:`${r.signal}/2`}:r/2)}else if(b2(e)){if(n===Gi.POINT)return .5;if(n===Gi.BAND)return i.offsetBandPaddingOuter}}}function ist(t,e,n,r){if(n==="x"&&r.xReverse!==void 0)return As(t)&&e==="descending"?Ye(r.xReverse)?{signal:`!${r.xReverse.signal}`}:!r.xReverse:r.xReverse;if(As(t)&&e==="descending")return!0}function sst(t,e,n,r,i){if(!!n&&n!=="unaggregated"&&As(i)){if(be(n)){const o=n[0],u=n[n.length-1];if(o<=0&&u>=0)return!0}return!1}if(t==="size"&&e.type==="quantitative"&&!O2(i))return!0;if(!(Le(e)&&e.bin)&&Ot([...na,...nJe],t)){const{orient:o,type:u}=r;return!(Ot(["bar","area","line","trail"],u)&&(o==="horizontal"&&t==="y"||o==="vertical"&&t==="x"))}return!1}function ost(t,e,n,r,i=!1){const s=ust(e,n,r,i),{type:o}=t;return tc(e)?o!==void 0?oet(e,o)?Le(n)&&!set(o,n.type)?(Oe(aZe(o,s)),s):o:(Oe(uZe(e,o,s)),s):s:null}function ust(t,e,n,r){var i;switch(e.type){case"nominal":case"ordinal":{if(S2(t)||tI(t)==="discrete")return t==="shape"&&e.type==="ordinal"&&Oe(aI(t,"ordinal")),"ordinal";if(Sr(t)||b2(t)){if(Ot(["rect","bar","image","rule"],n.type)||r)return"band"}else if(n.type==="arc"&&t in eI)return"band";const s=n[Hi(t)];return D2(s)||PI(e)&&(!((i=e.axis)===null||i===void 0)&&i.tickBand)?"band":"point"}case"temporal":return S2(t)?"time":tI(t)==="discrete"?(Oe(aI(t,"temporal")),"ordinal"):Le(e)&&e.timeUnit&&Ei(e.timeUnit).utc?"utc":"time";case"quantitative":return S2(t)?Le(e)&&en(e.bin)?"bin-ordinal":"linear":tI(t)==="discrete"?(Oe(aI(t,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error(Zse(e.type))}function ast(t,{ignoreRange:e}={}){vle(t),sle(t);for(const n of iet)mle(t,n);e||Ele(t)}function vle(t){$n(t)?t.component.scales=lst(t):t.component.scales=fst(t)}function lst(t){const{encoding:e,mark:n,markDef:r}=t,i={};for(const s of fC){const o=Gn(e[s]);if(o&&n===boe&&s===zi&&o.type===R2)continue;let u=o&&o.scale;if(b2(s)){const a=Rse(s);if(!qI(e,a)){u&&Oe(WJe(s));continue}}if(o&&u!==null&&u!==!1){u??(u={});const a=qI(e,s),l=ost(u,s,o,r,a);i[s]=new lle(t.scaleName(`${s}`,!0),{value:l,explicit:u.type===l})}}return i}const cst=Vue((t,e)=>poe(t)-poe(e));function fst(t){var e,n;const r=t.component.scales={},i={},s=t.component.resolve;for(const o of t.children){vle(o);for(const u of Re(o.component.scales))if((e=(n=s.scale)[u])!==null&&e!==void 0||(n[u]=Mae(u,t)),s.scale[u]==="shared"){const a=i[u],l=o.component.scales[u].getWithExplicit("type");a?YZe(a.value,l.value)?i[u]=ac(a,l,"type","scale",cst):(s.scale[u]="independent",delete i[u]):i[u]=l}}for(const o of Re(i)){const u=t.scaleName(o,!0),a=i[o];r[o]=new lle(u,a);for(const l of t.children){const c=l.component.scales[o];c&&(l.renameScale(c.get("name"),u),c.merged=!0)}}return r}var U$=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};class q${constructor(){this.nameMap={}}rename(e,n){this.nameMap[e]=n}has(e){return this.nameMap[e]!==void 0}get(e){for(;this.nameMap[e]&&e!==this.nameMap[e];)e=this.nameMap[e];return e}}function $n(t){return(t==null?void 0:t.type)==="unit"}function Qo(t){return(t==null?void 0:t.type)==="facet"}function z$(t){return(t==null?void 0:t.type)==="concat"}function Q2(t){return(t==null?void 0:t.type)==="layer"}class H${constructor(e,n,r,i,s,o,u){var a,l;this.type=n,this.parent=r,this.config=s,this.correctDataNames=c=>{var f,x,d;return!((f=c.from)===null||f===void 0)&&f.data&&(c.from.data=this.lookupDataSource(c.from.data)),!((d=(x=c.from)===null||x===void 0?void 0:x.facet)===null||d===void 0)&&d.data&&(c.from.facet.data=this.lookupDataSource(c.from.facet.data)),c},this.parent=r,this.config=s,this.view=Qi(u),this.name=(a=e.name)!==null&&a!==void 0?a:i,this.title=rc(e.title)?{text:e.title}:e.title?Qi(e.title):void 0,this.scaleNameMap=r?r.scaleNameMap:new q$,this.projectionNameMap=r?r.projectionNameMap:new q$,this.signalNameMap=r?r.signalNameMap:new q$,this.data=e.data,this.description=e.description,this.transforms=dnt((l=e.transform)!==null&&l!==void 0?l:[]),this.layout=n==="layer"||n==="unit"?{}:Att(e,n,s),this.component={data:{sources:r?r.component.data.sources:[],outputNodes:r?r.component.data.outputNodes:{},outputNodeRefCounts:r?r.component.data.outputNodeRefCounts:{},isFaceted:bC(e)||(r==null?void 0:r.component.data.isFaceted)&&e.data===void 0},layoutSize:new Cl,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:Object.assign({scale:{},axis:{},legend:{}},o?ct(o):{}),selection:null,scales:null,projection:null,axes:{},legends:{}}}get width(){return this.getSizeSignalRef("width")}get height(){return this.getSizeSignalRef("height")}parse(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}parseScale(){ast(this)}parseProjection(){Jae(this)}renameTopLevelLayoutSizeSignal(){this.getName("width")!=="width"&&this.renameSignal(this.getName("width"),"width"),this.getName("height")!=="height"&&this.renameSignal(this.getName("height"),"height")}parseLegends(){Wae(this)}assembleEncodeFromView(e){const n=U$(e,["style"]),r={};for(const i of Re(n)){const s=n[i];s!==void 0&&(r[i]=un(s))}return r}assembleGroupEncodeEntry(e){let n={};return this.view&&(n=this.assembleEncodeFromView(this.view)),!e&&(this.description&&(n.description=un(this.description)),this.type==="unit"||this.type==="layer")?Object.assign({width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height")},n??{}):Kt(n)?void 0:n}assembleLayout(){if(!this.layout)return;const e=this.layout,{spacing:n}=e,r=U$(e,["spacing"]),{component:i,config:s}=this,o=Ort(i.layoutHeaders,s);return Object.assign(Object.assign(Object.assign({padding:n},this.assembleDefaultLayout()),r),o?{titleBand:o}:{})}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:e}=this.component;let n=[];for(const r of Xs)e[r].title&&n.push(_rt(this,r));for(const r of b$)n=n.concat(Srt(this,r));return n}assembleAxes(){return crt(this.component.axes,this.config)}assembleLegends(){return Yae(this)}assembleProjections(){return Jrt(this)}assembleTitle(){var e,n,r;const i=(e=this.title)!==null&&e!==void 0?e:{},{encoding:s}=i,o=U$(i,["encoding"]),u=Object.assign(Object.assign(Object.assign({},$se(this.config.title).nonMarkTitleProperties),o),s?{encode:{update:s}}:{});if(u.text)return Ot(["unit","layer"],this.type)?Ot(["middle",void 0],u.anchor)&&((n=u.frame)!==null&&n!==void 0||(u.frame="group")):(r=u.anchor)!==null&&r!==void 0||(u.anchor="start"),Kt(u)?void 0:u}assembleGroup(e=[]){const n={};e=e.concat(this.assembleSignals()),e.length>0&&(n.signals=e);const r=this.assembleLayout();r&&(n.layout=r),n.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const i=!this.parent||Qo(this.parent)?ule(this):[];i.length>0&&(n.scales=i);const s=this.assembleAxes();s.length>0&&(n.axes=s);const o=this.assembleLegends();return o.length>0&&(n.legends=o),n}getName(e){return yn((this.name?`${this.name}_`:"")+e)}getDataName(e){return this.getName(tn[e].toLowerCase())}requestDataName(e){const n=this.getDataName(e),r=this.component.data.outputNodeRefCounts;return r[n]=(r[n]||0)+1,n}getSizeSignalRef(e){if(Qo(this.parent)){const n=kae(e),r=cC(n),i=this.component.scales[r];if(i&&!i.merged){const s=i.get("type"),o=i.get("range");if(ar(s)&&ic(o)){const u=i.get("name"),a=ZC(this,r),l=j$(a);if(l){const c=Ie({aggregate:"distinct",field:l},{expr:"datum"});return{signal:Bae(u,i,c)}}else return Oe(oI(r)),null}}}return{signal:this.signalNameMap.get(this.getName(e))}}lookupDataSource(e){const n=this.component.data.outputNodes[e];return n?n.getSource():e}getSignalName(e){return this.signalNameMap.get(e)}renameSignal(e,n){this.signalNameMap.rename(e,n)}renameScale(e,n){this.scaleNameMap.rename(e,n)}renameProjection(e,n){this.projectionNameMap.rename(e,n)}scaleName(e,n){if(n)return this.getName(e);if(bse(e)&&tc(e)&&this.component.scales[e]||this.scaleNameMap.has(this.getName(e)))return this.scaleNameMap.get(this.getName(e))}projectionName(e){if(e)return this.getName("projection");if(this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection")))return this.projectionNameMap.get(this.getName("projection"))}getScaleComponent(e){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");const n=this.component.scales[e];return n&&!n.merged?n:this.parent?this.parent.getScaleComponent(e):void 0}getSelectionComponent(e,n){let r=this.component.selection[e];if(!r&&this.parent&&(r=this.parent.getSelectionComponent(e,n)),!r)throw new Error(CJe(n));return r}hasAxisOrientSignalRef(){var e,n;return((e=this.component.axes.x)===null||e===void 0?void 0:e.some(r=>r.hasOrientSignalRef()))||((n=this.component.axes.y)===null||n===void 0?void 0:n.some(r=>r.hasOrientSignalRef()))}}class _le extends H${vgField(e,n={}){const r=this.fieldDef(e);if(r)return Ie(r,n)}reduceFieldDef(e,n){return Ket(this.getMapping(),(r,i,s)=>{const o=aa(i);return o?e(r,o,s):r},n)}forEachFieldDef(e,n){HI(this.getMapping(),(r,i)=>{const s=aa(r);s&&e(s,i)},n)}}var xst=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};class eT extends Ht{constructor(e,n){var r,i,s;super(e),this.transform=n,this.transform=ct(n);const o=(r=this.transform.as)!==null&&r!==void 0?r:[void 0,void 0];this.transform.as=[(i=o[0])!==null&&i!==void 0?i:"value",(s=o[1])!==null&&s!==void 0?s:"density"]}clone(){return new eT(null,ct(this.transform))}dependentFields(){var e;return new Set([this.transform.density,...(e=this.transform.groupby)!==null&&e!==void 0?e:[]])}producedFields(){return new Set(this.transform.as)}hash(){return`DensityTransform ${Rt(this.transform)}`}assemble(){const e=this.transform,{density:n}=e,r=xst(e,["density"]);return Object.assign({type:"kde",field:n},r)}}class Sy extends Ht{constructor(e,n){super(e),this.filter=n}clone(){return new Sy(null,Object.assign({},this.filter))}static make(e,n){const{config:r,mark:i,markDef:s}=n;if(jt("invalid",s,r)!=="filter")return null;const u=n.reduceFieldDef((a,l,c)=>{const f=tc(c)&&n.getScaleComponent(c);if(f){const x=f.get("type");As(x)&&l.aggregate!=="count"&&!sc(i)&&(a[l.field]=l)}return a},{});return Re(u).length?new Sy(e,u):null}dependentFields(){return new Set(Re(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${Rt(this.filter)}`}assemble(){const e=Re(this.filter).reduce((n,r)=>{const i=this.filter[r],s=Ie(i,{expr:"datum"});return i!==null&&(i.type==="temporal"?n.push(`(isDate(${s}) || (isValid(${s}) && isFinite(+${s})))`):i.type==="quantitative"&&(n.push(`isValid(${s})`),n.push(`isFinite(+${s})`))),n},[]);return e.length>0?{type:"filter",expr:e.join(" && ")}:null}}class tT extends Ht{constructor(e,n){super(e),this.transform=n,this.transform=ct(n);const{flatten:r,as:i=[]}=this.transform;this.transform.as=r.map((s,o)=>{var u;return(u=i[o])!==null&&u!==void 0?u:s})}clone(){return new tT(this.parent,ct(this.transform))}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${Rt(this.transform)}`}assemble(){const{flatten:e,as:n}=this.transform;return{type:"flatten",fields:e,as:n}}}class nT extends Ht{constructor(e,n){var r,i,s;super(e),this.transform=n,this.transform=ct(n);const o=(r=this.transform.as)!==null&&r!==void 0?r:[void 0,void 0];this.transform.as=[(i=o[0])!==null&&i!==void 0?i:"key",(s=o[1])!==null&&s!==void 0?s:"value"]}clone(){return new nT(null,ct(this.transform))}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${Rt(this.transform)}`}assemble(){const{fold:e,as:n}=this.transform;return{type:"fold",fields:e,as:n}}}class G2 extends Ht{constructor(e,n,r,i){super(e),this.fields=n,this.geojson=r,this.signal=i}clone(){return new G2(null,ct(this.fields),this.geojson,this.signal)}static parseAll(e,n){if(n.component.projection&&!n.component.projection.isFit)return e;let r=0;for(const i of[[Zu,Ju],[Ks,jo]]){const s=i.map(o=>{const u=Gn(n.encoding[o]);return Le(u)?u.field:oa(u)?{expr:`${u.datum}`}:qo(u)?{expr:`${u.value}`}:void 0});(s[0]||s[1])&&(e=new G2(e,s,null,n.getName(`geojson_${r++}`)))}if(n.channelHasField(zi)){const i=n.typedFieldDef(zi);i.type===R2&&(e=new G2(e,null,i.field,n.getName(`geojson_${r++}`)))}return e}dependentFields(){var e;const n=((e=this.fields)!==null&&e!==void 0?e:[]).filter(ze);return new Set([...this.geojson?[this.geojson]:[],...n])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${Rt(this.fields)}`}assemble(){return[...this.geojson?[{type:"filter",expr:`isValid(datum["${this.geojson}"])`}]:[],Object.assign(Object.assign(Object.assign({type:"geojson"},this.fields?{fields:this.fields}:{}),this.geojson?{geojson:this.geojson}:{}),{signal:this.signal})]}}class by extends Ht{constructor(e,n,r,i){super(e),this.projection=n,this.fields=r,this.as=i}clone(){return new by(null,this.projection,ct(this.fields),ct(this.as))}static parseAll(e,n){if(!n.projectionName())return e;for(const r of[[Zu,Ju],[Ks,jo]]){const i=r.map(o=>{const u=Gn(n.encoding[o]);return Le(u)?u.field:oa(u)?{expr:`${u.datum}`}:qo(u)?{expr:`${u.value}`}:void 0}),s=r[0]===Ks?"2":"";(i[0]||i[1])&&(e=new by(e,n.projectionName(),i,[n.getName(`x${s}`),n.getName(`y${s}`)]))}return e}dependentFields(){return new Set(this.fields.filter(ze))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${Rt(this.fields)} ${Rt(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}class Ix extends Ht{constructor(e,n){super(e),this.transform=n}clone(){return new Ix(null,ct(this.transform))}dependentFields(){var e;return new Set([this.transform.impute,this.transform.key,...(e=this.transform.groupby)!==null&&e!==void 0?e:[]])}producedFields(){return new Set([this.transform.impute])}processSequence(e){const{start:n=0,stop:r,step:i}=e;return{signal:`sequence(${[n,r,...i?[i]:[]].join(",")})`}}static makeFromTransform(e,n){return new Ix(e,n)}static makeFromEncoding(e,n){const r=n.encoding,i=r.x,s=r.y;if(Le(i)&&Le(s)){const o=i.impute?i:s.impute?s:void 0;if(o===void 0)return;const u=i.impute?s:s.impute?i:void 0,{method:a,value:l,frame:c,keyvals:f}=o.impute,x=rue(n.mark,r);return new Ix(e,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({impute:o.field,key:u.field},a?{method:a}:{}),l!==void 0?{value:l}:{}),c?{frame:c}:{}),f!==void 0?{keyvals:f}:{}),x.length?{groupby:x}:{}))}return null}hash(){return`Impute ${Rt(this.transform)}`}assemble(){const{impute:e,key:n,keyvals:r,method:i,groupby:s,value:o,frame:u=[null,null]}=this.transform,a=Object.assign(Object.assign(Object.assign(Object.assign({type:"impute",field:e,key:n},r?{keyvals:Ytt(r)?this.processSequence(r):r}:{}),{method:"value"}),s?{groupby:s}:{}),{value:!i||i==="value"?o:null});if(i&&i!=="value"){const l=Object.assign({type:"window",as:[`imputed_${e}_value`],ops:[i],fields:[e],frame:u,ignorePeers:!1},s?{groupby:s}:{}),c={type:"formula",expr:`datum.${e} === null ? datum.imputed_${e}_value : datum.${e}`,as:e};return[a,l,c]}else return[a]}}var dst=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};class rT extends Ht{constructor(e,n){var r,i,s;super(e),this.transform=n,this.transform=ct(n);const o=(r=this.transform.as)!==null&&r!==void 0?r:[void 0,void 0];this.transform.as=[(i=o[0])!==null&&i!==void 0?i:n.on,(s=o[1])!==null&&s!==void 0?s:n.loess]}clone(){return new rT(null,ct(this.transform))}dependentFields(){var e;return new Set([this.transform.loess,this.transform.on,...(e=this.transform.groupby)!==null&&e!==void 0?e:[]])}producedFields(){return new Set(this.transform.as)}hash(){return`LoessTransform ${Rt(this.transform)}`}assemble(){const e=this.transform,{loess:n,on:r}=e,i=dst(e,["loess","on"]);return Object.assign({type:"loess",x:r,y:n},i)}}class Cy extends Ht{constructor(e,n,r){super(e),this.transform=n,this.secondary=r}clone(){return new Cy(null,ct(this.transform),this.secondary)}static make(e,n,r,i){const s=n.component.data.sources,{from:o}=r;let u=null;if(Ktt(o)){let a=Tle(o.data,s);a||(a=new Nx(o.data),s.push(a));const l=n.getName(`lookup_${i}`);u=new vi(a,l,tn.Lookup,n.component.data.outputNodeRefCounts),n.component.data.outputNodes[l]=u}else if(Xtt(o)){const a=o.param;r=Object.assign({as:a},r);let l;try{l=n.getSelectionComponent(yn(a),a)}catch{throw new Error(OJe(a))}if(u=l.materialized,!u)throw new Error(DJe(a))}return new Cy(e,r,u.getSource())}dependentFields(){return new Set([this.transform.lookup])}producedFields(){return new Set(this.transform.as?qe(this.transform.as):this.transform.from.fields)}hash(){return`Lookup ${Rt({transform:this.transform,secondary:this.secondary})}`}assemble(){let e;if(this.transform.from.fields)e=Object.assign({values:this.transform.from.fields},this.transform.as?{as:qe(this.transform.as)}:{});else{let n=this.transform.as;ze(n)||(Oe(kJe),n="_lookup"),e={as:[n]}}return Object.assign(Object.assign({type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup]},e),this.transform.default?{default:this.transform.default}:{})}}var hst=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};class iT extends Ht{constructor(e,n){var r,i,s;super(e),this.transform=n,this.transform=ct(n);const o=(r=this.transform.as)!==null&&r!==void 0?r:[void 0,void 0];this.transform.as=[(i=o[0])!==null&&i!==void 0?i:"prob",(s=o[1])!==null&&s!==void 0?s:"value"]}clone(){return new iT(null,ct(this.transform))}dependentFields(){var e;return new Set([this.transform.quantile,...(e=this.transform.groupby)!==null&&e!==void 0?e:[]])}producedFields(){return new Set(this.transform.as)}hash(){return`QuantileTransform ${Rt(this.transform)}`}assemble(){const e=this.transform,{quantile:n}=e,r=hst(e,["quantile"]);return Object.assign({type:"quantile",field:n},r)}}var pst=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};class sT extends Ht{constructor(e,n){var r,i,s;super(e),this.transform=n,this.transform=ct(n);const o=(r=this.transform.as)!==null&&r!==void 0?r:[void 0,void 0];this.transform.as=[(i=o[0])!==null&&i!==void 0?i:n.on,(s=o[1])!==null&&s!==void 0?s:n.regression]}clone(){return new sT(null,ct(this.transform))}dependentFields(){var e;return new Set([this.transform.regression,this.transform.on,...(e=this.transform.groupby)!==null&&e!==void 0?e:[]])}producedFields(){return new Set(this.transform.as)}hash(){return`RegressionTransform ${Rt(this.transform)}`}assemble(){const e=this.transform,{regression:n,on:r}=e,i=pst(e,["regression","on"]);return Object.assign({type:"regression",x:r,y:n},i)}}class oT extends Ht{constructor(e,n){super(e),this.transform=n}clone(){return new oT(null,ct(this.transform))}addDimensions(e){var n;this.transform.groupby=xl(((n=this.transform.groupby)!==null&&n!==void 0?n:[]).concat(e),r=>r)}producedFields(){}dependentFields(){var e;return new Set([this.transform.pivot,this.transform.value,...(e=this.transform.groupby)!==null&&e!==void 0?e:[]])}hash(){return`PivotTransform ${Rt(this.transform)}`}assemble(){const{pivot:e,value:n,groupby:r,limit:i,op:s}=this.transform;return Object.assign(Object.assign(Object.assign({type:"pivot",field:e,value:n},i!==void 0?{limit:i}:{}),s!==void 0?{op:s}:{}),r!==void 0?{groupby:r}:{})}}class uT extends Ht{constructor(e,n){super(e),this.transform=n}clone(){return new uT(null,ct(this.transform))}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${Rt(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}function Sle(t){let e=0;function n(r,i){var s;if(r instanceof Nx&&!r.isGenerator&&!I2(r.data)&&(t.push(i),i={name:null,source:i.name,transform:[]}),r instanceof Gr&&(r.parent instanceof Nx&&!i.source?(i.format=Object.assign(Object.assign({},(s=i.format)!==null&&s!==void 0?s:{}),{parse:r.assembleFormatParse()}),i.transform.push(...r.assembleTransforms(!0))):i.transform.push(...r.assembleTransforms())),r instanceof z2){i.name||(i.name=`data_${e++}`),!i.source||i.transform.length>0?(t.push(i),r.data=i.name):r.data=i.source,t.push(...r.assemble());return}switch((r instanceof Ay||r instanceof vy||r instanceof Sy||r instanceof M2||r instanceof j2||r instanceof by||r instanceof zo||r instanceof Cy||r instanceof H2||r instanceof Lx||r instanceof nT||r instanceof tT||r instanceof eT||r instanceof rT||r instanceof iT||r instanceof sT||r instanceof dc||r instanceof uT||r instanceof oT)&&i.transform.push(r.assemble()),(r instanceof xa||r instanceof fa||r instanceof Ix||r instanceof Tl||r instanceof G2)&&i.transform.push(...r.assemble()),r instanceof vi&&(i.source&&i.transform.length===0?r.setSource(i.source):r.parent instanceof vi?r.setSource(i.name):(i.name||(i.name=`data_${e++}`),r.setSource(i.name),r.numChildren()===1&&(t.push(i),i={name:null,source:i.name,transform:[]}))),r.numChildren()){case 0:r instanceof vi&&(!i.source||i.transform.length>0)&&t.push(i);break;case 1:n(r.children[0],i);break;default:{i.name||(i.name=`data_${e++}`);let o=i.name;!i.source||i.transform.length>0?t.push(i):o=i.source;for(const u of r.children)n(u,{name:null,source:o,transform:[]});break}}}return n}function gst(t){const e=[],n=Sle(e);for(const r of t.children)n(r,{source:t.name,name:null,transform:[]});return e}function mst(t,e){var n,r;const i=[],s=Sle(i);let o=0;for(const a of t.sources){a.hasName()||(a.dataName=`source_${o++}`);const l=a.assemble();s(a,l)}for(const a of i)a.transform.length===0&&delete a.transform;let u=0;for(const[a,l]of i.entries())((n=l.transform)!==null&&n!==void 0?n:[]).length===0&&!l.source&&i.splice(u++,0,i.splice(a,1)[0]);for(const a of i)for(const l of(r=a.transform)!==null&&r!==void 0?r:[])l.type==="lookup"&&(l.from=t.outputNodes[l.from].getSource());for(const a of i)a.name in e&&(a.values=e[a.name]);return i}function yst(t){return t==="top"||t==="left"||Ye(t)?"header":"footer"}function Est(t){for(const e of Xs)Ast(t,e);Cle(t,"x"),Cle(t,"y")}function Ast(t,e){var n;const{facet:r,config:i,child:s,component:o}=t;if(t.channelHasField(e)){const u=r[e],a=q2("title",null,i,e);let l=w2(u,i,{allowDisabling:!0,includeDefault:a===void 0||!!a});s.component.layoutHeaders[e].title&&(l=be(l)?l.join(", "):l,l+=` / ${s.component.layoutHeaders[e].title}`,s.component.layoutHeaders[e].title=null);const c=q2("labelOrient",u.header,i,e),f=u.header!==null?Qn((n=u.header)===null||n===void 0?void 0:n.labels,i.header.labels,!0):!1,x=Ot(["bottom","right"],c)?"footer":"header";o.layoutHeaders[e]={title:u.header!==null?l:null,facetFieldDef:u,[x]:e==="facet"?[]:[ble(t,e,f)]}}}function ble(t,e,n){const r=e==="row"?"height":"width";return{labels:n,sizeSignal:t.child.component.layoutSize.get(r)?t.child.getSizeSignalRef(r):void 0,axes:[]}}function Cle(t,e){var n;const{child:r}=t;if(r.component.axes[e]){const{layoutHeaders:i,resolve:s}=t.component;if(s.axis[e]=O$(s,e),s.axis[e]==="shared"){const o=e==="x"?"column":"row",u=i[o];for(const a of r.component.axes[e]){const l=yst(a.get("orient"));(n=u[l])!==null&&n!==void 0||(u[l]=[ble(t,o,!1)]);const c=Ey(a,"main",t.config,{header:!0});c&&u[l][0].axes.push(c),a.mainExtracted=!0}}}}function vst(t){Q$(t),aT(t,"width"),aT(t,"height")}function _st(t){Q$(t);const e=t.layout.columns===1?"width":"childWidth",n=t.layout.columns===void 0?"height":"childHeight";aT(t,e),aT(t,n)}function Q$(t){for(const e of t.children)e.parseLayoutSize()}function aT(t,e){var n;const r=kae(e),i=cC(r),s=t.component.resolve,o=t.component.layoutSize;let u;for(const a of t.children){const l=a.component.layoutSize.getWithExplicit(r),c=(n=s.scale[i])!==null&&n!==void 0?n:Mae(i,t);if(c==="independent"&&l.value==="step"){u=void 0;break}if(u){if(c==="independent"&&u.value!==l.value){u=void 0;break}u=ac(u,l,r,"")}else u=l}if(u){for(const a of t.children)t.renameSignal(a.getName(r),t.getName(e)),a.component.layoutSize.set(r,"merged",!1);o.setWithExplicit(e,u)}else o.setWithExplicit(e,{explicit:!1,value:void 0})}function Sst(t){const{size:e,component:n}=t;for(const r of na){const i=Hi(r);if(e[i]){const s=e[i];n.layoutSize.set(i,la(s)?"step":s,!0)}else{const s=bst(t,i);n.layoutSize.set(i,s,!1)}}}function bst(t,e){const n=e==="width"?"x":"y",r=t.config,i=t.getScaleComponent(n);if(i){const s=i.get("type"),o=i.get("range");if(ar(s)){const u=MC(r.view,e);return ic(o)||la(u)?"step":u}else return n$(r.view,e)}else{if(t.hasProjection||t.mark==="arc")return n$(r.view,e);{const s=MC(r.view,e);return la(s)?s.step:s}}}function G$(t,e,n){return Ie(e,Object.assign({suffix:`by_${Ie(t)}`},n??{}))}class Ty extends _le{constructor(e,n,r,i){super(e,"facet",n,r,i,e.resolve),this.child=X$(e.spec,this,this.getName("child"),void 0,i),this.children=[this.child],this.facet=this.initFacet(e.facet)}initFacet(e){if(!cy(e))return{facet:this.initFacetFieldDef(e,"facet")};const n=Re(e),r={};for(const i of n){if(![dl,hl].includes(i)){Oe(hC(i,"facet"));break}const s=e[i];if(s.field===void 0){Oe(uI(s,i));break}r[i]=this.initFacetFieldDef(s,i)}return r}initFacetFieldDef(e,n){const r=UI(e,n);return r.header?r.header=Qi(r.header):r.header===null&&(r.header=null),r}channelHasField(e){return!!this.facet[e]}fieldDef(e){return this.facet[e]}parseData(){this.component.data=lT(this),this.child.parseData()}parseLayoutSize(){Q$(this)}parseSelections(){this.child.parseSelections(),this.component.selection=this.child.component.selection}parseMarkGroup(){this.child.parseMarkGroup()}parseAxesAndHeaders(){this.child.parseAxesAndHeaders(),Est(this)}assembleSelectionTopLevelSignals(e){return this.child.assembleSelectionTopLevelSignals(e)}assembleSignals(){return this.child.assembleSignals(),[]}assembleSelectionData(e){return this.child.assembleSelectionData(e)}getHeaderLayoutMixins(){var e,n,r;const i={};for(const s of Xs)for(const o of C$){const u=this.component.layoutHeaders[s],a=u[o],{facetFieldDef:l}=u;if(l){const c=q2("titleOrient",l.header,this.config,s);if(["right","bottom"].includes(c)){const f=YC(s,c);(e=i.titleAnchor)!==null&&e!==void 0||(i.titleAnchor={}),i.titleAnchor[f]="end"}}if(a!=null&&a[0]){const c=s==="row"?"height":"width",f=o==="header"?"headerBand":"footerBand";s!=="facet"&&!this.child.component.layoutSize.get(c)&&((n=i[f])!==null&&n!==void 0||(i[f]={}),i[f][s]=.5),u.title&&((r=i.offset)!==null&&r!==void 0||(i.offset={}),i.offset[s==="row"?"rowTitle":"columnTitle"]=10)}}return i}assembleDefaultLayout(){const{column:e,row:n}=this.facet,r=e?this.columnDistinctSignal():n?1:void 0;let i="all";return(!n&&this.component.resolve.scale.x==="independent"||!e&&this.component.resolve.scale.y==="independent")&&(i="none"),Object.assign(Object.assign(Object.assign({},this.getHeaderLayoutMixins()),r?{columns:r}:{}),{bounds:"full",align:i})}assembleLayoutSignals(){return this.child.assembleLayoutSignals()}columnDistinctSignal(){if(!(this.parent&&this.parent instanceof Ty))return{signal:`length(data('${this.getName("column_domain")}'))`}}assembleGroupStyle(){}assembleGroup(e){return this.parent&&this.parent instanceof Ty?Object.assign(Object.assign({},this.channelHasField("column")?{encode:{update:{columns:{field:Ie(this.facet.column,{prefix:"distinct"})}}}}:{}),super.assembleGroup(e)):super.assembleGroup(e)}getCardinalityAggregateForChild(){const e=[],n=[],r=[];if(this.child instanceof Ty){if(this.child.channelHasField("column")){const i=Ie(this.child.facet.column);e.push(i),n.push("distinct"),r.push(`distinct_${i}`)}}else for(const i of na){const s=this.child.component.scales[i];if(s&&!s.merged){const o=s.get("type"),u=s.get("range");if(ar(o)&&ic(u)){const a=ZC(this.child,i),l=j$(a);l?(e.push(l),n.push("distinct"),r.push(`distinct_${l}`)):Oe(oI(i))}}}return{fields:e,ops:n,as:r}}assembleFacet(){const{name:e,data:n}=this.component.data.facetRoot,{row:r,column:i}=this.facet,{fields:s,ops:o,as:u}=this.getCardinalityAggregateForChild(),a=[];for(const c of Xs){const f=this.facet[c];if(f){a.push(Ie(f));const{bin:x,sort:d}=f;if(en(x)&&a.push(Ie(f,{binSuffix:"end"})),sa(d)){const{field:p,op:g=SC}=d,m=G$(f,d);r&&i?(s.push(m),o.push("max"),u.push(m)):(s.push(p),o.push(g),u.push(m))}else if(be(d)){const p=U2(f,c);s.push(p),o.push("max"),u.push(p)}}}const l=!!r&&!!i;return Object.assign({name:e,data:n,groupby:a},l||s.length>0?{aggregate:Object.assign(Object.assign({},l?{cross:l}:{}),s.length?{fields:s,ops:o,as:u}:{})}:{})}facetSortFields(e){const{facet:n}=this,r=n[e];return r?sa(r.sort)?[G$(r,r.sort,{expr:"datum"})]:be(r.sort)?[U2(r,e,{expr:"datum"})]:[Ie(r,{expr:"datum"})]:[]}facetSortOrder(e){const{facet:n}=this,r=n[e];if(r){const{sort:i}=r;return[(sa(i)?i.order:!be(i)&&i)||"ascending"]}return[]}assembleLabelTitle(){var e;const{facet:n,config:r}=this;if(n.facet)return T$(n.facet,"facet",r);const i={row:["top","bottom"],column:["left","right"]};for(const s of b$)if(n[s]){const o=q2("labelOrient",(e=n[s])===null||e===void 0?void 0:e.header,r,s);if(i[s].includes(o))return T$(n[s],s,r)}}assembleMarks(){const{child:e}=this,n=this.component.data.facetRoot,r=gst(n),i=e.assembleGroupEncodeEntry(!1),s=this.assembleLabelTitle()||e.assembleTitle(),o=e.assembleGroupStyle();return[Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:this.getName("cell"),type:"group"},s?{title:s}:{}),o?{style:o}:{}),{from:{facet:this.assembleFacet()},sort:{field:Xs.map(a=>this.facetSortFields(a)).flat(),order:Xs.map(a=>this.facetSortOrder(a)).flat()}}),r.length>0?{data:r}:{}),i?{encode:{update:i}}:{}),e.assembleGroup(Rnt(this,[])))]}getMapping(){return this.facet}}function Cst(t,e){const{row:n,column:r}=e;if(n&&r){let i=null;for(const s of[n,r])if(sa(s.sort)){const{field:o,op:u=SC}=s.sort;t=i=new Lx(t,{joinaggregate:[{op:u,field:o,as:G$(s,s.sort,{forAs:!0})}],groupby:[Ie(s)]})}return i}return null}function Tle(t,e){var n,r,i,s;for(const o of e){const u=o.data;if(t.name&&o.hasName()&&t.name!==o.dataName)continue;const a=(n=t.format)===null||n===void 0?void 0:n.mesh,l=(r=u.format)===null||r===void 0?void 0:r.feature;if(a&&l)continue;const c=(i=t.format)===null||i===void 0?void 0:i.feature;if((c||l)&&c!==l)continue;const f=(s=u.format)===null||s===void 0?void 0:s.mesh;if(!((a||f)&&a!==f)){if(py(t)&&py(u)){if(fl(t.values,u.values))return o}else if(I2(t)&&I2(u)){if(t.url===u.url)return o}else if(Yue(t)&&t.name===o.dataName)return o}}return null}function Tst(t,e){if(t.data||!t.parent){if(t.data===null){const r=new Nx({values:[]});return e.push(r),r}const n=Tle(t.data,e);if(n)return lc(t.data)||(n.data.format=$Xe({},t.data.format,n.data.format)),!n.hasName()&&t.data.name&&(n.dataName=t.data.name),n;{const r=new Nx(t.data);return e.push(r),r}}else return t.parent.component.data.facetRoot?t.parent.component.data.facetRoot:t.parent.component.data.main}function Rst(t,e,n){var r,i;let s=0;for(const o of e.transforms){let u,a;if(unt(o))a=t=new j2(t,o),u="derived";else if(u$(o)){const l=xit(o);a=t=(r=Gr.makeWithAncestors(t,{},l,n))!==null&&r!==void 0?r:t,t=new M2(t,e,o.filter)}else if(Uue(o))a=t=xa.makeFromTransform(t,o,e),u="number";else if(lnt(o))u="date",n.getWithExplicit(o.field).value===void 0&&(t=new Gr(t,{[o.field]:u}),n.set(o.field,u,!1)),a=t=fa.makeFromTransform(t,o);else if(cnt(o))a=t=zo.makeFromTransform(t,o),u="number",E$(e)&&(t=new dc(t));else if(jue(o))a=t=Cy.make(t,e,o,s++),u="derived";else if(int(o))a=t=new H2(t,o),u="number";else if(snt(o))a=t=new Lx(t,o),u="number";else if(fnt(o))a=t=Tl.makeFromTransform(t,o),u="derived";else if(xnt(o))a=t=new nT(t,o),u="derived";else if(ont(o))a=t=new tT(t,o),u="derived";else if(Jtt(o))a=t=new oT(t,o),u="derived";else if(rnt(o))t=new uT(t,o);else if(ant(o))a=t=Ix.makeFromTransform(t,o),u="derived";else if(Ztt(o))a=t=new eT(t,o),u="derived";else if(ent(o))a=t=new iT(t,o),u="derived";else if(tnt(o))a=t=new sT(t,o),u="derived";else if(nnt(o))a=t=new rT(t,o),u="derived";else{Oe(BJe(o));continue}if(a&&u!==void 0)for(const l of(i=a.producedFields())!==null&&i!==void 0?i:[])n.set(l,u,!1)}return t}function lT(t){var e,n,r,i,s,o,u,a,l,c;let f=Tst(t,t.component.data.sources);const{outputNodes:x,outputNodeRefCounts:d}=t.component.data,p=t.data,m=!(p&&(lc(p)||I2(p)||py(p)))&&t.parent?t.parent.component.data.ancestorParse.clone():new bnt;lc(p)?(Kue(p)?f=new vy(f,p.sequence):c$(p)&&(f=new Ay(f,p.graticule)),m.parseNothing=!0):((e=p==null?void 0:p.format)===null||e===void 0?void 0:e.parse)===null&&(m.parseNothing=!0),f=(n=Gr.makeExplicit(f,t,m))!==null&&n!==void 0?n:f,f=new dc(f);const y=t.parent&&Q2(t.parent);($n(t)||Qo(t))&&y&&(f=(r=xa.makeFromEncoding(f,t))!==null&&r!==void 0?r:f),t.transforms.length>0&&(f=Rst(f,t,m));const E=hit(t),A=dit(t);f=(i=Gr.makeWithAncestors(f,{},Object.assign(Object.assign({},E),A),m))!==null&&i!==void 0?i:f,$n(t)&&(f=G2.parseAll(f,t),f=by.parseAll(f,t)),($n(t)||Qo(t))&&(y||(f=(s=xa.makeFromEncoding(f,t))!==null&&s!==void 0?s:f),f=(o=fa.makeFromEncoding(f,t))!==null&&o!==void 0?o:f,f=j2.parseAllForSortIndex(f,t));const v=t.getDataName(tn.Raw),_=new vi(f,v,tn.Raw,d);if(x[v]=_,f=_,$n(t)){const R=zo.makeFromEncoding(f,t);R&&(f=R,E$(t)&&(f=new dc(f))),f=(u=Ix.makeFromEncoding(f,t))!==null&&u!==void 0?u:f,f=(a=Tl.makeFromEncoding(f,t))!==null&&a!==void 0?a:f}$n(t)&&(f=(l=Sy.make(f,t))!==null&&l!==void 0?l:f);const S=t.getDataName(tn.Main),b=new vi(f,S,tn.Main,d);x[S]=b,f=b,$n(t)&&art(t,b);let C=null;if(Qo(t)){const R=t.getName("facet");f=(c=Cst(f,t.facet))!==null&&c!==void 0?c:f,C=new z2(f,t,R,b.getSource()),x[R]=C}return Object.assign(Object.assign({},t.component.data),{outputNodes:x,outputNodeRefCounts:d,raw:_,main:b,facetRoot:C,ancestorParse:m})}class Ost extends H${constructor(e,n,r,i){var s,o,u,a;super(e,"concat",n,r,i,e.resolve),(((o=(s=e.resolve)===null||s===void 0?void 0:s.axis)===null||o===void 0?void 0:o.x)==="shared"||((a=(u=e.resolve)===null||u===void 0?void 0:u.axis)===null||a===void 0?void 0:a.y)==="shared")&&Oe(LJe),this.children=this.getChildren(e).map((l,c)=>X$(l,this,this.getName(`concat_${c}`),void 0,i))}parseData(){this.component.data=lT(this);for(const e of this.children)e.parseData()}parseSelections(){this.component.selection={};for(const e of this.children){e.parseSelections();for(const n of Re(e.component.selection))this.component.selection[n]=e.component.selection[n]}}parseMarkGroup(){for(const e of this.children)e.parseMarkGroup()}parseAxesAndHeaders(){for(const e of this.children)e.parseAxesAndHeaders()}getChildren(e){return kC(e)?e.vconcat:t$(e)?e.hconcat:e.concat}parseLayoutSize(){_st(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(e){return this.children.reduce((n,r)=>r.assembleSelectionTopLevelSignals(n),e)}assembleSignals(){return this.children.forEach(e=>e.assembleSignals()),[]}assembleLayoutSignals(){const e=R$(this);for(const n of this.children)e.push(...n.assembleLayoutSignals());return e}assembleSelectionData(e){return this.children.reduce((n,r)=>r.assembleSelectionData(n),e)}assembleMarks(){return this.children.map(e=>{const n=e.assembleTitle(),r=e.assembleGroupStyle(),i=e.assembleGroupEncodeEntry(!1);return Object.assign(Object.assign(Object.assign(Object.assign({type:"group",name:e.getName("group")},n?{title:n}:{}),r?{style:r}:{}),i?{encode:{update:i}}:{}),e.assembleGroup())})}assembleGroupStyle(){}assembleDefaultLayout(){const e=this.layout.columns;return Object.assign(Object.assign({},e!=null?{columns:e}:{}),{bounds:"full",align:"each"})}}function Dst(t){return t===!1||t===null}const wst=Object.assign(Object.assign({disable:1,gridScale:1,scale:1},Joe),{labelExpr:1,encode:1}),Rle=Re(wst);class W$ extends Cl{constructor(e={},n={},r=!1){super(),this.explicit=e,this.implicit=n,this.mainExtracted=r}clone(){return new W$(ct(this.explicit),ct(this.implicit),this.mainExtracted)}hasAxisPart(e){return e==="axis"?!0:e==="grid"||e==="title"?!!this.get(e):!Dst(this.get(e))}hasOrientSignalRef(){return Ye(this.explicit.orient)}}function Nst(t,e,n){var r;const{encoding:i,config:s}=t,o=(r=Gn(i[e]))!==null&&r!==void 0?r:Gn(i[El(e)]),u=t.axis(e)||{},{format:a,formatType:l}=u;return Rx(l)?Object.assign({text:FI({fieldOrDatumDef:o,field:"datum.value",format:a,formatType:l,config:s})},n):n}function Fst(t){return na.reduce((e,n)=>(t.component.scales[n]&&(e[n]=[Mst(n,t)]),e),{})}const Lst={bottom:"top",top:"bottom",left:"right",right:"left"};function Ist(t){var e;const{axes:n,resolve:r}=t.component,i={top:0,bottom:0,right:0,left:0};for(const s of t.children){s.parseAxesAndHeaders();for(const o of Re(s.component.axes))r.axis[o]=O$(t.component.resolve,o),r.axis[o]==="shared"&&(n[o]=$st(n[o],s.component.axes[o]),n[o]||(r.axis[o]="independent",delete n[o]))}for(const s of na){for(const o of t.children)if(o.component.axes[s]){if(r.axis[s]==="independent"){n[s]=((e=n[s])!==null&&e!==void 0?e:[]).concat(o.component.axes[s]);for(const u of o.component.axes[s]){const{value:a,explicit:l}=u.getWithExplicit("orient");if(!Ye(a)){if(i[a]>0&&!l){const c=Lst[a];i[a]>i[c]&&u.set("orient",c,!1)}i[a]++}}}delete o.component.axes[s]}if(r.axis[s]==="independent"&&n[s]&&n[s].length>1)for(const o of n[s])o.get("grid")&&!o.explicit.grid&&(o.implicit.grid=!1)}}function $st(t,e){if(t){if(t.length!==e.length)return;const n=t.length;for(let r=0;r<n;r++){const i=t[r],s=e[r];if(!!i!=!!s)return;if(i&&s){const o=i.getWithExplicit("orient"),u=s.getWithExplicit("orient");if(o.explicit&&u.explicit&&o.value!==u.value)return;t[r]=Bst(i,s)}}}else return e.map(n=>n.clone());return t}function Bst(t,e){for(const n of Rle){const r=ac(t.getWithExplicit(n),e.getWithExplicit(n),n,"axis",(i,s)=>{switch(n){case"title":return Hse(i,s);case"gridScale":return{explicit:i.explicit,value:Qn(i.value,s.value)}}return UC(i,s,n,"axis")});t.setWithExplicit(n,r)}return t}function kst(t,e,n,r,i){if(e==="disable")return n!==void 0;switch(n=n||{},e){case"titleAngle":case"labelAngle":return t===(Ye(n.labelAngle)?n.labelAngle:iC(n.labelAngle));case"values":return!!n.values;case"encode":return!!n.encoding||!!n.labelAngle;case"title":if(t===Nae(r,i))return!0}return t===n[e]}const Pst=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function Mst(t,e){var n,r,i;let s=e.axis(t);const o=new W$,u=Gn(e.encoding[t]),{mark:a,config:l}=e,c=(s==null?void 0:s.orient)||((n=l[t==="x"?"axisX":"axisY"])===null||n===void 0?void 0:n.orient)||((r=l.axis)===null||r===void 0?void 0:r.orient)||yrt(t),f=e.getScaleComponent(t).get("type"),x=frt(t,f,c,e.config),d=s!==void 0?!s:_$("disable",l.style,s==null?void 0:s.style,x).configValue;if(o.set("disable",d,s!==void 0),d)return o;s=s||{};const p=prt(u,s,t,l.style,x),g={fieldOrDatumDef:u,axis:s,channel:t,model:e,scaleType:f,orient:c,labelAngle:p,mark:a,config:l};for(const E of Rle){const A=E in Oae?Oae[E](g):Zoe(E)?s[E]:void 0,v=A!==void 0,_=kst(A,E,s,e,t);if(v&&_)o.set(E,A,_);else{const{configValue:S=void 0,configFrom:b=void 0}=Zoe(E)&&E!=="values"?_$(E,l.style,s.style,x):{},C=S!==void 0;v&&!C?o.set(E,A,_):(b!=="vgAxisConfig"||Pst.has(E)&&C||dy(S)||Ye(S))&&o.set(E,S,!1)}}const m=(i=s.encoding)!==null&&i!==void 0?i:{},y=Xoe.reduce((E,A)=>{var v;if(!o.hasAxisPart(A))return E;const _=Pae((v=m[A])!==null&&v!==void 0?v:{},e),S=A==="labels"?Nst(e,t,_):_;return S!==void 0&&!Kt(S)&&(E[A]={update:S}),E},{});return Kt(y)||o.set("encode",y,!!s.encoding||s.labelAngle!==void 0),o}function jst({encoding:t,size:e}){for(const n of na){const r=Hi(n);la(e[r])&&ua(t[n])&&(delete e[r],Oe(noe(r)))}return e}function Ust(t,e,n){const r=Qi(t),i=jt("orient",r,n);if(r.orient=Qst(r.type,e,i),i!==void 0&&i!==r.orient&&Oe(eZe(r.orient,i)),r.type==="bar"&&r.orient){const u=jt("cornerRadiusEnd",r,n);if(u!==void 0){const a=r.orient==="horizontal"&&e.x2||r.orient==="vertical"&&e.y2?["cornerRadius"]:met[r.orient];for(const l of a)r[l]=u;r.cornerRadiusEnd!==void 0&&delete r.cornerRadiusEnd}}return jt("opacity",r,n)===void 0&&(r.opacity=zst(r.type,e)),jt("cursor",r,n)===void 0&&(r.cursor=qst(r,e,n)),r}function qst(t,e,n){return e.href||t.href||jt("href",t,n)?"pointer":t.cursor}function zst(t,e){if(Ot([EC,CI,TI,RI],t)&&!zI(e))return .7}function Hst(t,e,{graticule:n}){if(n)return!1;const r=Sx("filled",t,e),i=t.type;return Qn(r,i!==EC&&i!==yC&&i!==AC)}function Qst(t,e,n){switch(t){case EC:case TI:case RI:case Soe:case aet:case uet:return}const{x:r,y:i,x2:s,y2:o}=e;switch(t){case mC:if(Le(r)&&(yi(r.bin)||Le(i)&&i.aggregate&&!r.aggregate))return"vertical";if(Le(i)&&(yi(i.bin)||Le(r)&&r.aggregate&&!i.aggregate))return"horizontal";if(o||s){if(n)return n;if(!s&&(Le(r)&&r.type===Cx&&!en(r.bin)||kI(r)))return"horizontal";if(!o&&(Le(i)&&i.type===Cx&&!en(i.bin)||kI(i)))return"vertical"}case AC:if(s&&!(Le(r)&&yi(r.bin))&&o&&!(Le(i)&&yi(i.bin)))return;case gC:if(o)return Le(i)&&yi(i.bin)?"horizontal":"vertical";if(s)return Le(r)&&yi(r.bin)?"vertical":"horizontal";if(t===AC){if(r&&!i)return"vertical";if(i&&!r)return"horizontal"}case yC:case CI:{const u=ua(r),a=ua(i);if(n)return n;if(u&&!a)return t!=="tick"?"horizontal":"vertical";if(!u&&a)return t!=="tick"?"vertical":"horizontal";if(u&&a){const l=r,c=i,f=l.type===T2,x=c.type===T2;return f&&!x?t!=="tick"?"vertical":"horizontal":!f&&x?t!=="tick"?"horizontal":"vertical":!l.aggregate&&c.aggregate?t!=="tick"?"vertical":"horizontal":l.aggregate&&!c.aggregate&&t!=="tick"?"horizontal":"vertical"}else return}}return"vertical"}const Gst={vgMark:"arc",encodeEntry:t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),Qr("x",t,{defaultPos:"mid"})),Qr("y",t,{defaultPos:"mid"})),fc(t,"radius")),fc(t,"theta"))},Wst={vgMark:"area",encodeEntry:t=>Object.assign(Object.assign(Object.assign(Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"})),zC("x",t,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:t.markDef.orient==="horizontal"})),zC("y",t,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:t.markDef.orient==="vertical"})),m$(t))},Vst={vgMark:"rect",encodeEntry:t=>Object.assign(Object.assign(Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),fc(t,"x")),fc(t,"y"))},Yst={vgMark:"shape",encodeEntry:t=>Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),postEncodingTransform:t=>{const{encoding:e}=t,n=e.shape;return[Object.assign({type:"geoshape",projection:t.projectionName()},n&&Le(n)&&n.type===R2?{field:Ie(n,{expr:"datum"})}:{})]}},Kst={vgMark:"image",encodeEntry:t=>Object.assign(Object.assign(Object.assign(Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"})),fc(t,"x")),fc(t,"y")),p$(t,"url"))},Xst={vgMark:"line",encodeEntry:t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),Qr("x",t,{defaultPos:"mid"})),Qr("y",t,{defaultPos:"mid"})),lr("size",t,{vgChannel:"strokeWidth"})),m$(t))},Jst={vgMark:"trail",encodeEntry:t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"})),Qr("x",t,{defaultPos:"mid"})),Qr("y",t,{defaultPos:"mid"})),lr("size",t)),m$(t))};function V$(t,e){const{config:n}=t;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"})),Qr("x",t,{defaultPos:"mid"})),Qr("y",t,{defaultPos:"mid"})),lr("size",t)),lr("angle",t)),Zst(t,n,e))}function Zst(t,e,n){return n?{shape:{value:n}}:lr("shape",t)}const eot={vgMark:"symbol",encodeEntry:t=>V$(t)},tot={vgMark:"symbol",encodeEntry:t=>V$(t,"circle")},not={vgMark:"symbol",encodeEntry:t=>V$(t,"square")},rot={vgMark:"rect",encodeEntry:t=>Object.assign(Object.assign(Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),fc(t,"x")),fc(t,"y"))},iot={vgMark:"rule",encodeEntry:t=>{const{markDef:e}=t,n=e.orient;return!t.encoding.x&&!t.encoding.y&&!t.encoding.latitude&&!t.encoding.longitude?{}:Object.assign(Object.assign(Object.assign(Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),zC("x",t,{defaultPos:n==="horizontal"?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:n!=="vertical"})),zC("y",t,{defaultPos:n==="vertical"?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:n!=="horizontal"})),lr("size",t,{vgChannel:"strokeWidth"}))}},sot={vgMark:"text",encodeEntry:t=>{const{config:e,encoding:n}=t;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Zs(t,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"})),Qr("x",t,{defaultPos:"mid"})),Qr("y",t,{defaultPos:"mid"})),p$(t)),lr("size",t,{vgChannel:"fontSize"})),lr("angle",t)),lae("align",oot(t.markDef,n,e))),lae("baseline",uot(t.markDef,n,e))),Qr("radius",t,{defaultPos:null})),Qr("theta",t,{defaultPos:null}))}};function oot(t,e,n){if(jt("align",t,n)===void 0)return"center"}function uot(t,e,n){if(jt("baseline",t,n)===void 0)return"middle"}const aot={vgMark:"rect",encodeEntry:t=>{const{config:e,markDef:n}=t,r=n.orient,i=r==="horizontal"?"width":"height",s=r==="horizontal"?"height":"width";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Zs(t,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),Qr("x",t,{defaultPos:"mid",vgChannel:"xc"})),Qr("y",t,{defaultPos:"mid",vgChannel:"yc"})),lr("size",t,{defaultValue:lot(t),vgChannel:i})),{[s]:un(jt("thickness",n,e))})}};function lot(t){var e;const{config:n,markDef:r}=t,{orient:i}=r,s=i==="horizontal"?"width":"height",o=t.getScaleComponent(i==="horizontal"?"x":"y"),u=(e=jt("size",r,n,{vgChannel:s}))!==null&&e!==void 0?e:n.tick.bandSize;if(u!==void 0)return u;{const a=o?o.get("range"):void 0;return a&&ic(a)&&rn(a.step)?a.step*3/4:PC(n.view,s)*3/4}}const cT={arc:Gst,area:Wst,bar:Vst,circle:tot,geoshape:Yst,image:Kst,line:Xst,point:eot,rect:rot,rule:iot,square:not,text:sot,tick:aot,trail:Jst};function cot(t){if(Ot([yC,gC,cet],t.mark)){const e=rue(t.mark,t.encoding);if(e.length>0)return fot(t,e)}else if(t.mark===mC){const e=rI.some(n=>jt(n,t.markDef,t.config));if(t.stack&&!t.fieldDef("size")&&e)return xot(t)}return Y$(t)}const Ole="faceted_path_";function fot(t,e){return[{name:t.getName("pathgroup"),type:"group",from:{facet:{name:Ole+t.requestDataName(tn.Main),data:t.requestDataName(tn.Main),groupby:e}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:Y$(t,{fromPrefix:Ole})}]}const Dle="stack_group_";function xot(t){var e;const[n]=Y$(t,{fromPrefix:Dle}),r=t.scaleName(t.stack.fieldChannel),i=(c={})=>t.vgField(t.stack.fieldChannel,c),s=(c,f)=>{const x=[i({prefix:"min",suffix:"start",expr:f}),i({prefix:"max",suffix:"start",expr:f}),i({prefix:"min",suffix:"end",expr:f}),i({prefix:"max",suffix:"end",expr:f})];return`${c}(${x.map(d=>`scale('${r}',${d})`).join(",")})`};let o,u;t.stack.fieldChannel==="x"?(o=Object.assign(Object.assign({},ey(n.encode.update,["y","yc","y2","height",...rI])),{x:{signal:s("min","datum")},x2:{signal:s("max","datum")},clip:{value:!0}}),u={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},n.encode.update=Object.assign(Object.assign({},Ys(n.encode.update,["y","yc","y2"])),{height:{field:{group:"height"}}})):(o=Object.assign(Object.assign({},ey(n.encode.update,["x","xc","x2","width"])),{y:{signal:s("min","datum")},y2:{signal:s("max","datum")},clip:{value:!0}}),u={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},n.encode.update=Object.assign(Object.assign({},Ys(n.encode.update,["x","xc","x2"])),{width:{field:{group:"width"}}}));for(const c of rI){const f=Sx(c,t.markDef,t.config);n.encode.update[c]?(o[c]=n.encode.update[c],delete n.encode.update[c]):f&&(o[c]=un(f)),f&&(n.encode.update[c]={value:0})}const a=[];if(((e=t.stack.groupbyChannels)===null||e===void 0?void 0:e.length)>0)for(const c of t.stack.groupbyChannels){const f=t.fieldDef(c),x=Ie(f);x&&a.push(x),(f!=null&&f.bin||f!=null&&f.timeUnit)&&a.push(Ie(f,{binSuffix:"end"}))}return o=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce((c,f)=>{if(n.encode.update[f])return Object.assign(Object.assign({},c),{[f]:n.encode.update[f]});{const x=Sx(f,t.markDef,t.config);return x!==void 0?Object.assign(Object.assign({},c),{[f]:un(x)}):c}},o),o.stroke&&(o.strokeForeground={value:!0},o.strokeOffset={value:0}),[{type:"group",from:{facet:{data:t.requestDataName(tn.Main),name:Dle+t.requestDataName(tn.Main),groupby:a,aggregate:{fields:[i({suffix:"start"}),i({suffix:"start"}),i({suffix:"end"}),i({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:o},marks:[{type:"group",encode:{update:u},marks:[n]}]}]}function dot(t){var e;const{encoding:n,stack:r,mark:i,markDef:s,config:o}=t,u=n.order;if(!(!be(u)&&qo(u)&&hse(u.value)||!u&&hse(jt("order",s,o)))){if((be(u)||Le(u))&&!r)return Use(u,{expr:"datum"});if(sc(i)){const a=s.orient==="horizontal"?"y":"x",l=n[a];if(Le(l)){const c=l.sort;if(be(c))return{field:Ie(l,{prefix:a,suffix:"sort_index",expr:"datum"})};if(sa(c))return{field:Ie({aggregate:zI(t.encoding)?c.op:void 0,field:c.field},{expr:"datum"})};if(koe(c)){const f=t.fieldDef(c.encoding);return{field:Ie(f,{expr:"datum"}),order:c.order}}else return c===null?void 0:{field:Ie(l,{binSuffix:!((e=t.stack)===null||e===void 0)&&e.impute?"mid":void 0,expr:"datum"})}}return}}}function Y$(t,e={fromPrefix:""}){const{mark:n,markDef:r,encoding:i,config:s}=t,o=Qn(r.clip,hot(t),pot(t)),u=Mse(r),a=i.key,l=dot(t),c=got(t),f=jt("aria",r,s),x=cT[n].postEncodingTransform?cT[n].postEncodingTransform(t):null;return[Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:t.getName("marks"),type:cT[n].vgMark},o?{clip:!0}:{}),u?{style:u}:{}),a?{key:a.field}:{}),l?{sort:l}:{}),c||{}),f===!1?{aria:f}:{}),{from:{data:e.fromPrefix+t.requestDataName(tn.Main)},encode:{update:cT[n].encodeEntry(t)}}),x?{transform:x}:{})]}function hot(t){const e=t.getScaleComponent("x"),n=t.getScaleComponent("y");return e!=null&&e.get("selectionExtent")||n!=null&&n.get("selectionExtent")?!0:void 0}function pot(t){const e=t.component.projection;return e&&!e.isFit?!0:void 0}function got(t){if(!t.component.selection)return null;const e=Re(t.component.selection).length;let n=e,r=t.parent;for(;r&&n===0;)n=Re(r.component.selection).length,r=r.parent;return n?{interactive:e>0||!!t.encoding.tooltip}:null}class wle extends _le{constructor(e,n,r,i={},s){var o;super(e,"unit",n,r,s,void 0,Sue(e)?e.view:void 0),this.specifiedScales={},this.specifiedAxes={},this.specifiedLegends={},this.specifiedProjection={},this.selection=[],this.children=[];const u=ia(e.mark)?Object.assign({},e.mark):{type:e.mark},a=u.type;u.filled===void 0&&(u.filled=Hst(u,s,{graticule:e.data&&c$(e.data)}));const l=this.encoding=Vet(e.encoding||{},a,u.filled,s);this.markDef=Ust(u,l,s),this.size=jst({encoding:l,size:Sue(e)?Object.assign(Object.assign(Object.assign({},i),e.width?{width:e.width}:{}),e.height?{height:e.height}:{}):i}),this.stack=Nue(a,l),this.specifiedScales=this.initScales(a,l),this.specifiedAxes=this.initAxes(l),this.specifiedLegends=this.initLegends(l),this.specifiedProjection=e.projection,this.selection=((o=e.params)!==null&&o!==void 0?o:[]).filter(c=>ZI(c))}get hasProjection(){const{encoding:e}=this,n=this.mark===boe,r=e&&WXe.some(i=>ut(e[i]));return n||r}scaleDomain(e){const n=this.specifiedScales[e];return n?n.domain:void 0}axis(e){return this.specifiedAxes[e]}legend(e){return this.specifiedLegends[e]}initScales(e,n){return fC.reduce((r,i)=>{var s;const o=Gn(n[i]);return o&&(r[i]=this.initScale((s=o.scale)!==null&&s!==void 0?s:{})),r},{})}initScale(e){const{domain:n,range:r}=e,i=Qi(e);return be(n)&&(i.domain=n.map(Es)),be(r)&&(i.range=r.map(Es)),i}initAxes(e){return na.reduce((n,r)=>{const i=e[r];if(ut(i)||r===En&&ut(e.x2)||r===ur&&ut(e.y2)){const s=ut(i)?i.axis:void 0;n[r]=s&&this.initAxis(Object.assign({},s))}return n},{})}initAxis(e){const n=Re(e),r={};for(const i of n){const s=e[i];r[i]=dy(s)?Bse(s):Es(s)}return r}initLegends(e){return rJe.reduce((n,r)=>{const i=Gn(e[r]);if(i&&sJe(r)){const s=i.legend;n[r]=s&&Qi(s)}return n},{})}parseData(){this.component.data=lT(this)}parseLayoutSize(){Sst(this)}parseSelections(){this.component.selection=urt(this,this.selection)}parseMarkGroup(){this.component.mark=cot(this)}parseAxesAndHeaders(){this.component.axes=Fst(this)}assembleSelectionTopLevelSignals(e){return Ont(this,e)}assembleSignals(){return[...Tae(this),...Tnt(this,[])]}assembleSelectionData(e){return Dnt(this,e)}assembleLayout(){return null}assembleLayoutSignals(){return R$(this)}assembleMarks(){var e;let n=(e=this.component.mark)!==null&&e!==void 0?e:[];return(!this.parent||!Q2(this.parent))&&(n=Jue(this,n)),n.map(this.correctDataNames)}assembleGroupStyle(){const{style:e}=this.view||{};if(e!==void 0)return e;if(this.encoding.x||this.encoding.y)return"cell"}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(e){return Dx(this.encoding,e)}fieldDef(e){const n=this.encoding[e];return aa(n)}typedFieldDef(e){const n=this.fieldDef(e);return Js(n)?n:null}}class K$ extends H${constructor(e,n,r,i,s){super(e,"layer",n,r,s,e.resolve,e.view);const o=Object.assign(Object.assign(Object.assign({},i),e.width?{width:e.width}:{}),e.height?{height:e.height}:{});this.children=e.layer.map((u,a)=>{if(jC(u))return new K$(u,this,this.getName(`layer_${a}`),o,s);if(Sl(u))return new wle(u,this,this.getName(`layer_${a}`),o,s);throw new Error(sI(u))})}parseData(){this.component.data=lT(this);for(const e of this.children)e.parseData()}parseLayoutSize(){vst(this)}parseSelections(){this.component.selection={};for(const e of this.children){e.parseSelections();for(const n of Re(e.component.selection))this.component.selection[n]=e.component.selection[n]}}parseMarkGroup(){for(const e of this.children)e.parseMarkGroup()}parseAxesAndHeaders(){Ist(this)}assembleSelectionTopLevelSignals(e){return this.children.reduce((n,r)=>r.assembleSelectionTopLevelSignals(n),e)}assembleSignals(){return this.children.reduce((e,n)=>e.concat(n.assembleSignals()),Tae(this))}assembleLayoutSignals(){return this.children.reduce((e,n)=>e.concat(n.assembleLayoutSignals()),R$(this))}assembleSelectionData(e){return this.children.reduce((n,r)=>r.assembleSelectionData(n),e)}assembleGroupStyle(){const e=new Set;for(const r of this.children)for(const i of qe(r.assembleGroupStyle()))e.add(i);const n=Array.from(e);return n.length>1?n:n.length===1?n[0]:void 0}assembleTitle(){let e=super.assembleTitle();if(e)return e;for(const n of this.children)if(e=n.assembleTitle(),e)return e}assembleLayout(){return null}assembleMarks(){return wnt(this,this.children.flatMap(e=>e.assembleMarks()))}assembleLegends(){return this.children.reduce((e,n)=>e.concat(n.assembleLegends()),Yae(this))}}function X$(t,e,n,r,i){if(bC(t))return new Ty(t,e,n,i);if(jC(t))return new K$(t,e,n,r,i);if(Sl(t))return new wle(t,e,n,r,i);if(ytt(t))return new Ost(t,e,n,i);throw new Error(sI(t))}var mot=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function yot(t,e={}){e.logger&&CZe(e.logger),e.fieldTitle&&Woe(e.fieldTitle);try{const n=Due(I7(e.config,t.config)),r=pnt(t,n),i=X$(r,null,"",void 0,n);return i.parse(),wit(i.component.data,i),{spec:Aot(i,Eot(t,r.autosize,n,i),t.datasets,t.usermeta),normalized:r}}finally{e.logger&&TZe(),e.fieldTitle&&Met()}}function Eot(t,e,n,r){const i=r.component.layoutSize.get("width"),s=r.component.layoutSize.get("height");if(e===void 0?(e={type:"pad"},r.hasAxisOrientSignalRef()&&(e.resize=!0)):ze(e)&&(e={type:e}),i&&s&&vnt(e.type)){if(i==="step"&&s==="step")Oe(Wse()),e.type="pad";else if(i==="step"||s==="step"){const o=i==="step"?"width":"height";Oe(Wse(cC(o)));const u=o==="width"?"height":"width";e.type=_nt(u)}}return Object.assign(Object.assign(Object.assign({},Re(e).length===1&&e.type?e.type==="pad"?{}:{autosize:e.type}:{autosize:e}),Wue(n,!1)),Wue(t,!0))}function Aot(t,e,n={},r){const i=t.config?Ntt(t.config):void 0,s=[].concat(t.assembleSelectionData([]),mst(t.component.data,n)),o=t.assembleProjections(),u=t.assembleTitle(),a=t.assembleGroupStyle(),l=t.assembleGroupEncodeEntry(!0);let c=t.assembleLayoutSignals();c=c.filter(d=>(d.name==="width"||d.name==="height")&&d.value!==void 0?(e[d.name]=+d.value,!1):!0);const{params:f}=e,x=mot(e,["params"]);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({$schema:"https://vega.github.io/schema/vega/v5.json"},t.description?{description:t.description}:{}),x),u?{title:u}:{}),a?{style:a}:{}),l?{encode:{update:l}}:{}),{data:s}),o.length>0?{projections:o}:{}),t.assembleGroup([...c,...t.assembleSelectionTopLevelSignals([]),...vue(f)])),i?{config:i}:{}),r?{usermeta:r}:{})}const fT=t=>t&&typeof t=="object";function J$(t,e){return!fT(t)||!fT(e)?e:(Object.keys(e).forEach(n=>{const r=t[n],i=e[n];Array.isArray(r)&&Array.isArray(i)?t[n]=[...i]:fT(r)&&fT(i)?t[n]=J$(Object.assign({},r),i):t[n]=i}),t)}class xT{constructor(e,n,r,i={},s){this.document=e,this.styleDefaults=n,this.options=r,this.timezone=s,this.size=i.size||this.styleDefaults.size||"medium",this.chartOptions=i}mapData(e){const n=[];for(const r of e){const i={};for(const s of e.field.allFields){let o=this.getDataValue(r.cell(s));o instanceof Date&&(o=o7e(o,this.timezone)),i[s.name]=o}n.push(i)}return n}getSize(){return this.size==="large"?{height:350,width:500}:{height:175,width:250}}async render(e){if(!e.isArray())throw new Error("Invalid type for chart renderer");const n=this.getVegaLiteSpec(e);n.config=J$(n.config??{},this.chartOptions.vegaConfigOverride??{});const r=yot(n,{logger:{level(o){return o!==void 0?this:0},info(){return this},error(){return this},warn(){return this},debug(){return this}}}).spec,i=new xL(Qie(r),{renderer:"none"});i.logger().level(-1);const s=this.document.createElement("div");return s.innerHTML=await i.toSVG(),s}}const $x="#727883",W2="#E5E7EB",vot=()=>({range:{category:["#1877F2","#30C8B4","#5A24C7","#E42C97","#F0701A","#00487C","#A87CFF","#9C4300","#DA8600","#68013D","#56585C"],diverging:["#3F1691","#5A24C7","#1877F2","#5FAAFF","#32AB4F","#FF9831","#EB660D","#D31E3C","#A50326"],heatmap:["#07316D","#1455B0","#1877F2","#5FAAFF","#8A8D91","#FF9831","#EB660D","#AB3A02","#692600"],ordinal:["#05214D","#083E89","#1877F2","#76B6FF","#A8D1FF"],ramp:["#05214D","#083E89","#1877F2","#76B6FF","#A8D1FF"]},axisY:{gridColor:W2,grid:!0,tickColor:W2,domain:!1,labelFont:"Inter, sans-serif",labelFontSize:10,labelFontWeight:"normal",labelColor:$x,labelPadding:5,titleColor:$x,titleFont:"Inter, sans-serif",titleFontSize:10,titleFontWeight:500,titlePadding:10,labelOverlap:!1},axisX:{gridColor:W2,tickColor:W2,tickSize:0,domain:!1,labelFont:"Inter, sans-serif",labelFontSize:10,labelFontWeight:"normal",labelPadding:5,labelColor:$x,titleColor:$x,titleFont:"Inter, sans-serif",titleFontSize:10,titleFontWeight:500,titlePadding:10},view:{strokeWidth:0}}),dT={$schema:"https://vega.github.io/schema/vega-lite/v5.json",config:{params:[{name:"defaultFont",value:"var(--malloy-font-family, 'Inter')"},{name:"titleColor",value:`var(--malloy-title-color, ${$x})`},{name:"labelColor",value:`var(--malloy-label-color, ${$x})`}],background:void 0,color:{expr:"titleColor"},header:{labelFont:{expr:"defaultFont"},titleFont:{expr:"defaultFont"},titleFontWeight:500},text:{font:{expr:"defaultFont"},color:{expr:"labelColor"}},mark:{font:{expr:"defaultFont"},color:{expr:"labelColor"}},title:{font:{expr:"defaultFont"},subtitleFont:{expr:"defaultFont"},fontWeight:500},axis:{labelColor:{expr:"labelColor"},labelFont:{expr:"defaultFont"},titleFont:{expr:"defaultFont"},titleFontWeight:500,titleColor:{expr:"titleColor"},titleFontSize:12,gridColor:W2,tickColor:W2,labelPadding:5,titlePadding:10},legend:{titleFontWeight:500,titleColor:{expr:"titleColor"},titleFontSize:12,labelColor:{expr:"labelColor"},labelFont:{expr:"defaultFont"},titleFont:{expr:"defaultFont"}}}},pc={config:dT.config,encoding:{y:{field:"#{1}",type:"nominal",axis:null,sort:null}},layer:[{mark:{type:"bar",color:"#aec7e8"},encoding:{x:{field:"#{2}",type:"quantitative",sort:null},color:{value:"#4285F4"}}},{mark:{type:"text",align:"left",x:5},encoding:{text:{field:"#{1}"}}}]},hT={...dT,mark:"bar",data:[],encoding:{x:{field:"#{1}",type:"nominal",sort:null},y:{field:"#{2}",type:"quantitative",sort:null},color:{value:"#4285F4"}}};({...hT,encoding:{...hT.encoding,color:Ba("quantitative",!0,!0)}},{...hT,encoding:{...hT.encoding,color:Ba("nominal",!0,!0)}}),{...pc,layer:({...pc.layer[0],encoding:{...pc.layer[0].encoding,color:Ba("nominal",!0,!0)}},pc.layer[1])},{...pc,layer:({...pc.layer[0],encoding:{...pc.layer[0].encoding,color:Ba("quantitative",!0,!0)}},pc.layer[1])};const pT={...dT,mark:"bar",data:[],encoding:{x:{field:"#{1}",type:"nominal",sort:null},y:{field:"#{2}",type:"quantitative",sort:null},color:{value:"#4285F4"}}};({...pT,encoding:{...pT.encoding,color:Ba("nominal",!0)}},{...pT,encoding:{...pT.encoding,color:Ba("quantitative",!0)}});function Nle(t){return Array.isArray(t)||t!==null&&typeof t=="object"}class _ot extends xT{constructor(e,n,r,i,s){super(e,n,r);const o=s.spec;if(o)this.spec=o;else if(s.spec_name){const u=r.dataStyles[s.spec_name];if(u!==void 0&&u.renderer==="vega")if(u.spec)this.spec=u.spec;else throw new Error(`No spec defined on ${s.spec_name}`);else throw new Error(`No Vega renderer named ${s.spec_name}`)}else throw new Error(`No top level vega spec defined for ${i.name}`)}getDataValue(e){if(e.isNull())return null;if(e.isTimestamp()||e.isDate()||e.isNumber()||e.isString())return e.value;throw new Error("Invalid field type for vega chart.")}getDataType(e){if(e.isAtomicField()){if(e.isDate()||e.isTimestamp()||e.isString())return"nominal";if(e.isNumber())return"quantitative"}throw new Error("Invalid field type for vega chart.")}translateField(e,n){const r=n.match(/#\{(\d+)\}/);return r&&r.groups?e.allFields[parseInt(r.groups[1])-1].name:n}translateFields(e,n){if(Array.isArray(e))for(const r of e)Nle(r)&&this.translateFields(r,n);else if(e&&typeof e=="object")for(const[r,i]of Object.entries(e))if(r==="field"&&typeof i=="string")e[r]=this.translateField(n,i);else if(r==="repeat"&&Array.isArray(i))for(const s of i.keys()){const o=i[s];typeof o=="string"&&(i[s]=this.translateField(n,o))}else Nle(i)&&this.translateFields(i,n)}getVegaLiteSpec(e){if(e.isNull()||!e.isArray())throw new Error("Expected struct value not to be null.");const n=structuredClone(this.spec);this.translateFields(n,e.field);const r={values:this.mapData(e)};return n.data=r,n}}const AT=class AT extends vf{create(e,n,r,i,s){return new _ot(e,n,r,i,s)}get rendererName(){return"vega"}};AT.instance=new AT;let Fle=AT;class Lle extends xT{getVegaLiteSpec(e){const n=e.field.allFields,r=n[0],i=n[1],s=n[2],o=n[3],u=n[4],a=this.getDataType(r),l=this.getDataType(i),c=s?this.getDataType(s):void 0,f=o?this.getDataType(o):void 0,x=u?this.getDataType(u):void 0,d=this.getMark(),p=s!==void 0?{field:s.name,type:c,axis:{title:Af(this.options,s,void 0,this.timezone)},scale:Ba(c,d==="bar")}:{value:"#4285F4"},g=o?{field:o.name,type:f,axis:{title:Af(this.options,o,void 0,this.timezone)}}:void 0,m=u?{field:u.name,type:x,axis:{title:Af(this.options,u,void 0,this.timezone)}}:void 0,y=a==="nominal"?null:void 0,E=l==="nominal"?null:void 0,A={field:r.name,type:a,sort:y,axis:{title:Af(this.options,r,void 0,this.timezone)},scale:{zero:!1}},v={field:i.name,type:l,sort:E,axis:{title:Af(this.options,i,void 0,this.timezone)},scale:{zero:!1}};return{...dT,...this.getSize(),data:{values:this.mapData(e)},mark:d,encoding:{x:A,y:v,size:g,color:p,shape:m},background:"transparent"}}}class Sot extends Lle{getMark(){return"line"}getDataType(e){if(e.isAtomicField()){if(e.isDate()||e.isTimestamp())return"temporal";if(e.isString())return"nominal";if(e.isNumber())return"quantitative"}throw new Error("Invalid field type for line chart.")}getDataValue(e){if(e.isNull())return null;if(e.isTimestamp()||e.isDate()||e.isNumber()||e.isString())return e.value;throw new Error("Invalid field type for line chart.")}}const vT=class vT extends vf{create(e,n,r,i,s,o){return new Sot(e,n,r,s,o)}get rendererName(){return"line_chart"}};vT.instance=new vT;let Z$=vT;class bot extends Lle{getMark(){return"point"}getDataType(e){if(e.isAtomicField()){if(e.isDate()||e.isTimestamp())return"temporal";if(e.isString())return"nominal";if(e.isNumber())return"quantitative"}throw new Error("Invalid field type for scatter chart.")}getDataValue(e){if(e.isNull())return null;if(e.isTimestamp()||e.isDate()||e.isNumber()||e.isString())return e.value;throw new Error("Invalid field type for scatter chart.")}}const _T=class _T extends vf{create(e,n,r,i,s,o){return new bot(e,n,r,s,o)}get rendererName(){return"scatter_chart"}};_T.instance=new _T;let eB=_T;const tB={type:"Topology",bbox:[-179.14733999999999,-14.552548999999999,179.77847,71.352561],transform:{scale:[.003589293992939929,.0008590596905969058],translate:[-179.14733999999999,-14.552548999999999]},objects:{states:{type:"GeometryCollection",geometries:[{type:"MultiPolygon",arcs:[[[0]],[[1,2,3,4,5]]],id:"01",properties:{name:"Alabama"}},{type:"MultiPolygon",arcs:[[[6]],[[7]],[[8]],[[9]],[[10]],[[11]],[[12]],[[13]],[[14]],[[15]],[[16]],[[17]],[[18]],[[19]],[[20]],[[21]],[[22]],[[23]],[[24]],[[25]],[[26]],[[27]],[[28]],[[29]],[[30]],[[31]],[[32]],[[33]],[[34]],[[35]],[[36]],[[37]],[[38]],[[39]],[[40]],[[41]],[[42]],[[43]],[[44]],[[45]],[[46]],[[47]],[[48]],[[49]],[[50]],[[51]],[[52]],[[53]],[[54]],[[55]],[[56]],[[57]],[[58]],[[59]],[[60]],[[61]],[[62]],[[63]],[[64]],[[65]],[[66]],[[67]],[[68]],[[69]],[[70]],[[71]],[[72]],[[73]],[[74]],[[75]],[[76]],[[77]],[[78]],[[79]],[[80]],[[81]],[[82]],[[83]],[[84]],[[85]],[[86]],[[87]],[[88]],[[89]],[[90]],[[91]],[[92]],[[93]],[[94]],[[95]],[[96]],[[97]],[[98]],[[99]],[[100]],[[101]],[[102]],[[103]],[[104]],[[105]],[[106]],[[107]],[[108]],[[109]],[[110]],[[111]],[[112]],[[113]],[[114]],[[115]],[[116]],[[117]],[[118]],[[119]],[[120]],[[121]],[[122]],[[123]],[[124]],[[125]],[[126]],[[127]],[[128]],[[129]],[[130]],[[131]],[[132]],[[133]],[[134]],[[135]],[[136]],[[137]],[[138]],[[139]],[[140]],[[141]],[[142]]],id:"02",properties:{name:"Alaska"}},{type:"Polygon",arcs:[[143,144,145,146,147]],id:"04",properties:{name:"Arizona"}},{type:"Polygon",arcs:[[148,149,150,151,152,153]],id:"08",properties:{name:"Colorado"}},{type:"MultiPolygon",arcs:[[[154]],[[155]],[[156]],[[157]],[[158]],[[159]],[[160]],[[161]],[[162]],[[163,164,-4]]],id:"12",properties:{name:"Florida"}},{type:"Polygon",arcs:[[165,166,167,168,-164,-3]],id:"13",properties:{name:"Georgia"}},{type:"Polygon",arcs:[[169,170,171,172,173]],id:"18",properties:{name:"Indiana"}},{type:"Polygon",arcs:[[174,175,176,-151]],id:"20",properties:{name:"Kansas"}},{type:"MultiPolygon",arcs:[[[177]],[[178]],[[179]],[[180]],[[181]],[[182]],[[183]],[[184,185]]],id:"23",properties:{name:"Maine"}},{type:"MultiPolygon",arcs:[[[186]],[[187]],[[188,189,190,191,192,193,194,195]]],id:"25",properties:{name:"Massachusetts"}},{type:"Polygon",arcs:[[196,197,198,199,200]],id:"27",properties:{name:"Minnesota"}},{type:"Polygon",arcs:[[201,202,203,204,205,206,207,208]],id:"34",properties:{name:"New Jersey"}},{type:"MultiPolygon",arcs:[[[209]],[[210]],[[211,212,213,-167,214]]],id:"37",properties:{name:"North Carolina"}},{type:"Polygon",arcs:[[215,-201,216,217]],id:"38",properties:{name:"North Dakota"}},{type:"Polygon",arcs:[[-152,-177,218,219,220,221]],id:"40",properties:{name:"Oklahoma"}},{type:"Polygon",arcs:[[222,223,-204,224,225,226,227]],id:"42",properties:{name:"Pennsylvania"}},{type:"Polygon",arcs:[[228,-217,-200,229,230,231]],id:"46",properties:{name:"South Dakota"}},{type:"Polygon",arcs:[[-221,232,233,234,235,236,237]],id:"48",properties:{name:"Texas"}},{type:"Polygon",arcs:[[-232,238,-149,239,240,241]],id:"56",properties:{name:"Wyoming"}},{type:"Polygon",arcs:[[-195,242,243,244]],id:"09",properties:{name:"Connecticut"}},{type:"Polygon",arcs:[[245,246,247,248,249,250,251,-219,-176,252]],id:"29",properties:{name:"Missouri"}},{type:"Polygon",arcs:[[253,-227,254,255,256]],id:"54",properties:{name:"West Virginia"}},{type:"Polygon",arcs:[[257,258,259,-174,260,-247]],id:"17",properties:{name:"Illinois"}},{type:"Polygon",arcs:[[-153,-222,-238,261,-147]],id:"35",properties:{name:"New Mexico"}},{type:"Polygon",arcs:[[-252,262,263,264,-235,233,-233,-220]],id:"05",properties:{name:"Arkansas"}},{type:"MultiPolygon",arcs:[[[265]],[[266]],[[267]],[[268]],[[269]],[[270]],[[271]],[[272]],[[273,274,275,-144,276]]],id:"06",properties:{name:"California"}},{type:"MultiPolygon",arcs:[[[-209,277]],[[-225,-203,278,279]]],id:"10",properties:{name:"Delaware"}},{type:"Polygon",arcs:[[280,281]],id:"11",properties:{name:"District of Columbia"}},{type:"MultiPolygon",arcs:[[[282]],[[283]],[[284]],[[285]],[[286]],[[287]],[[288]],[[289]]],id:"15",properties:{name:"Hawaii"}},{type:"Polygon",arcs:[[-199,290,-258,-246,291,-230]],id:"19",properties:{name:"Iowa"}},{type:"MultiPolygon",arcs:[[[-261,-173,292,-257,293,294,-248]],[[295,-250]]],id:"21",properties:{name:"Kentucky"}},{type:"MultiPolygon",arcs:[[[296,297]],[[298]],[[299]],[[-226,-280,300,301,302,303,-281,304,-255]]],id:"24",properties:{name:"Maryland"}},{type:"MultiPolygon",arcs:[[[305]],[[306]],[[307]],[[308]],[[309]],[[310]],[[311]],[[312]],[[313]],[[314,315,-171]],[[316]],[[317,318,319,320,321,322]]],id:"26",properties:{name:"Michigan"}},{type:"MultiPolygon",arcs:[[[323]],[[324]],[[325]],[[326]],[[-264,327,-6,328,329]]],id:"28",properties:{name:"Mississippi"}},{type:"Polygon",arcs:[[330,-218,-229,-242,331]],id:"30",properties:{name:"Montana"}},{type:"Polygon",arcs:[[332,-185,333,-190,334]],id:"33",properties:{name:"New Hampshire"}},{type:"MultiPolygon",arcs:[[[335]],[[336]],[[337]],[[338,-207]],[[339]],[[340]],[[341,342,-196,-245,343,-205,-224]]],id:"36",properties:{name:"New York"}},{type:"MultiPolygon",arcs:[[[344]],[[345]],[[-316,346,-228,-254,-293,-172]]],id:"39",properties:{name:"Ohio"}},{type:"Polygon",arcs:[[347,348,349,274,-275,-274,350]],id:"41",properties:{name:"Oregon"}},{type:"Polygon",arcs:[[-251,-296,-249,-295,351,-215,-166,-2,-328,-263]],id:"47",properties:{name:"Tennessee"}},{type:"Polygon",arcs:[[352,-240,-154,-146,353]],id:"49",properties:{name:"Utah"}},{type:"MultiPolygon",arcs:[[[354]],[[-302,355]],[[356,-297]],[[-256,-305,-282,-304,357,-212,-352,-294]]],id:"51",properties:{name:"Virginia"}},{type:"MultiPolygon",arcs:[[[358]],[[359]],[[360]],[[361]],[[362]],[[363]],[[364]],[[365]],[[366]],[[367]],[[368,-348,369]]],id:"53",properties:{name:"Washington"}},{type:"MultiPolygon",arcs:[[[370]],[[371]],[[372]],[[373]],[[374]],[[375]],[[376]],[[377]],[[378]],[[379]],[[380,-323,321,-321,319,-319,381,-259,-291,-198]]],id:"55",properties:{name:"Wisconsin"}},{type:"MultiPolygon",arcs:[[[382]],[[383]],[[384]]],id:"60",properties:{name:"American Samoa"}},{type:"MultiPolygon",arcs:[[[385]]],id:"66",properties:{name:"Guam"}},{type:"MultiPolygon",arcs:[[[386]],[[387]],[[388]],[[389]],[[390]],[[391]],[[392]],[[393]]],id:"69",properties:{name:"Commonwealth of the Northern Mariana Islands"}},{type:"Polygon",arcs:[[-231,-292,-253,-175,-150,-239]],id:"31",properties:{name:"Nebraska"}},{type:"Polygon",arcs:[[-214,394,-168]],id:"45",properties:{name:"South Carolina"}},{type:"MultiPolygon",arcs:[[[395]],[[396]],[[397]],[[398]],[[399]]],id:"72",properties:{name:"Puerto Rico"}},{type:"MultiPolygon",arcs:[[[400]],[[401]],[[402]]],id:"78",properties:{name:"United States Virgin Islands"}},{type:"Polygon",arcs:[[-369,403,-332,-241,-353,404,-349]],id:"16",properties:{name:"Idaho"}},{type:"Polygon",arcs:[[-275,-350,-405,-354,-145,-276]],id:"32",properties:{name:"Nevada"}},{type:"Polygon",arcs:[[405,-335,-189,-343]],id:"50",properties:{name:"Vermont"}},{type:"MultiPolygon",arcs:[[[406]],[[407]],[[408]],[[409]],[[410]],[[411]],[[412]],[[-265,-330,413,-236]]],id:"22",properties:{name:"Louisiana"}},{type:"MultiPolygon",arcs:[[[-192,414]],[[415]],[[416]],[[417]],[[-243,-194,418]]],id:"44",properties:{name:"Rhode Island"}}]},nation:{type:"GeometryCollection",geometries:[{type:"MultiPolygon",arcs:[[[0]],[[164,4,328,413,236,261,147,276,350,369,403,330,215,196,380,317,381,259,169,314,346,222,341,405,332,185,333,190,414,192,418,243,343,205,338,207,277,201,278,300,355,302,357,212,394,168]],[[6]],[[7]],[[8]],[[9]],[[10]],[[11]],[[12]],[[13]],[[14]],[[15]],[[16]],[[17]],[[18]],[[19]],[[20]],[[21]],[[22]],[[23]],[[24]],[[25]],[[26]],[[27]],[[28]],[[29]],[[30]],[[31]],[[32]],[[33]],[[34]],[[35]],[[36]],[[37]],[[38]],[[39]],[[40]],[[41]],[[42]],[[43]],[[44]],[[45]],[[46]],[[47]],[[48]],[[49]],[[50]],[[51]],[[52]],[[53]],[[54]],[[55]],[[56]],[[57]],[[58]],[[59]],[[60]],[[61]],[[62]],[[63]],[[64]],[[65]],[[66]],[[67]],[[68]],[[69]],[[70]],[[71]],[[72]],[[73]],[[74]],[[75]],[[76]],[[77]],[[78]],[[79]],[[80]],[[81]],[[82]],[[83]],[[84]],[[85]],[[86]],[[87]],[[88]],[[89]],[[90]],[[91]],[[92]],[[93]],[[94]],[[95]],[[96]],[[97]],[[98]],[[99]],[[100]],[[101]],[[102]],[[103]],[[104]],[[105]],[[106]],[[107]],[[108]],[[109]],[[110]],[[111]],[[112]],[[113]],[[114]],[[115]],[[116]],[[117]],[[118]],[[119]],[[120]],[[121]],[[122]],[[123]],[[124]],[[125]],[[126]],[[127]],[[128]],[[129]],[[130]],[[131]],[[132]],[[133]],[[134]],[[135]],[[136]],[[137]],[[138]],[[139]],[[140]],[[141]],[[142]],[[154]],[[155]],[[156]],[[157]],[[158]],[[159]],[[160]],[[161]],[[162]],[[177]],[[178]],[[179]],[[180]],[[181]],[[182]],[[183]],[[186]],[[187]],[[209]],[[210]],[[265]],[[266]],[[267]],[[268]],[[269]],[[270]],[[271]],[[272]],[[282]],[[283]],[[284]],[[285]],[[286]],[[287]],[[288]],[[289]],[[297,356]],[[298]],[[299]],[[305]],[[306]],[[307]],[[308]],[[309]],[[310]],[[311]],[[312]],[[313]],[[316]],[[323]],[[324]],[[325]],[[326]],[[335]],[[336]],[[337]],[[339]],[[340]],[[344]],[[345]],[[354]],[[358]],[[359]],[[360]],[[361]],[[362]],[[363]],[[364]],[[365]],[[366]],[[367]],[[370]],[[371]],[[372]],[[373]],[[374]],[[375]],[[376]],[[377]],[[378]],[[379]],[[382]],[[383]],[[384]],[[385]],[[386]],[[387]],[[388]],[[389]],[[390]],[[391]],[[392]],[[393]],[[395]],[[396]],[[397]],[[398]],[[399]],[[400]],[[401]],[[402]],[[406]],[[407]],[[408]],[[409]],[[410]],[[411]],[[412]],[[415]],[[416]],[[417]]]}]}},arcs:[[[25302,52136],[56,31],[1,25],[14,-40],[-9,-28],[-10,16],[-18,-2],[-20,-17],[-14,15]],[[25338,57677],[0,15],[150,-6],[63,0],[160,-13],[93,-2],[37,2],[159,-4],[61,-5]],[[26061,57664],[15,-321],[23,-443],[18,-379],[13,-294],[15,-311],[33,-713],[9,-32],[-4,-36],[13,-45],[5,-149],[10,-72],[17,-69],[3,-82],[9,-36],[-10,-117],[18,-28],[12,-40],[-10,-52],[-11,0],[2,-24],[-14,-21],[-13,-52],[3,-56],[-2,-86],[-7,-86],[-14,-72],[-3,-45],[6,-124],[-2,-44],[19,-87],[3,-120],[-7,-57],[2,-43],[-8,-80],[1,-79],[-7,-21],[5,-51],[-3,-54],[20,-91],[7,-64],[2,-61]],[[26229,53027],[-67,0],[-71,-5],[-110,-4],[-174,0],[-135,7],[-166,-2],[3,-38],[-13,-115],[2,-23],[23,-79],[3,-41],[36,-80],[3,-69],[-15,-102],[3,-55],[20,-51],[-18,-35],[-8,-82],[-9,-15],[7,-24],[-15,-26]],[[25528,52188],[-38,-35],[-40,-24],[-56,-4],[18,41],[12,-26],[35,27],[3,34],[-15,48],[-7,43],[-20,47],[-7,90],[9,74],[-3,76],[-7,48],[-20,32],[-15,-46],[2,-38],[-9,-57],[1,-41],[-6,-32],[-1,-144],[-8,-66],[-15,-4],[1,36],[-20,40],[-15,-16],[-5,23],[-18,-22]],[[25284,52292],[-3,222],[-3,357],[-6,423],[-10,773],[9,283],[21,710],[5,212],[33,1120],[6,160],[19,643],[12,362],[-16,35],[-13,85]],[[8053,88108],[6,38],[18,-11],[-20,-43],[-4,16]],[[7905,86007],[29,90],[15,-17],[-1,-46],[-28,-74],[-15,19],[0,28]],[[7695,85792],[26,-14],[-3,-36],[-23,50]],[[7642,85774],[22,-17],[-7,-33],[-14,14],[-1,36]],[[7602,85813],[20,-2],[-5,-34],[-15,36]],[[7594,84711],[8,45],[20,-13],[-8,-73],[-15,-17],[-5,58]],[[7543,85532],[12,28],[21,-40],[-33,-2],[0,14]],[[7540,87187],[29,79],[8,112],[31,-29],[-28,-64],[-9,-49],[5,-24],[-36,-25]],[[7464,85521],[14,55],[18,-28],[23,-4],[-33,-33],[-22,10]],[[7385,86976],[17,6],[5,-88],[-22,82]],[[7168,84530],[29,89],[15,6],[26,-66],[5,20],[-21,65],[6,54],[9,10],[27,-25],[21,19],[-29,54],[16,56],[29,-31],[15,4],[-14,56],[12,17],[20,-20],[14,45],[-18,6],[-13,33],[20,3],[22,67],[34,18],[-12,35],[-3,68],[27,66],[7,-31],[53,51],[7,-7],[-12,-118],[-13,-18],[-26,-103],[5,-84],[36,11],[2,69],[22,-9],[21,-71],[20,48],[12,-33],[-17,-117],[9,-22],[9,72],[27,47],[7,-25],[-3,-115],[-30,-89],[-32,23],[-11,81],[-21,-26],[13,-99],[-22,-20],[-39,13],[-16,-54],[-8,36],[2,74],[-10,2],[-9,-114],[-8,-24],[-31,-17],[2,-37],[-16,-22],[-45,-13],[-86,76],[-21,-13],[-15,29]],[[7129,86075],[41,28],[18,-43],[-5,-48],[-13,-16],[-29,-3],[-16,59],[4,23]],[[6962,82933],[31,45],[8,-48],[-37,-9],[-2,12]],[[6905,82759],[20,62],[19,20],[11,-11],[25,17],[5,-40],[19,-37],[36,16],[-2,-37],[-19,-31],[-46,-6],[-32,-13],[-32,25],[-4,35]],[[6789,83718],[20,17],[4,76],[18,75],[25,34],[5,44],[15,-8],[34,70],[33,36],[39,-15],[29,1],[0,-112],[26,-57],[4,45],[17,53],[-18,48],[6,25],[53,-14],[-3,35],[-52,44],[-19,-4],[-1,127],[31,61],[29,29],[20,-12],[22,-56],[6,-133],[15,13],[9,77],[-5,55],[35,-38],[7,47],[-37,36],[-21,58],[7,44],[17,-6],[51,-87],[9,4],[30,-41],[11,10],[-31,75],[-20,34],[-7,44],[17,0],[30,-58],[29,12],[41,-29],[7,49],[36,15],[-8,-63],[-39,-106],[-7,-83],[19,-36],[0,95],[16,43],[16,-49],[5,46],[17,32],[5,41],[14,10],[10,-31],[22,72],[17,8],[-4,-45],[28,-16],[-11,-38],[-11,20],[-18,-15],[19,-36],[-5,-49],[19,22],[11,-51],[27,1],[-24,-53],[-16,33],[-24,2],[-15,-48],[16,-9],[-8,-53],[26,-8],[-26,-89],[23,17],[13,47],[5,-35],[47,-4],[-3,-41],[-36,-78],[-13,-110],[-38,13],[-2,39],[-10,-41],[-23,42],[-17,-6],[-23,49],[-15,-13],[-24,19],[-8,-46],[27,1],[15,-17],[45,-87],[-8,-70],[-23,-52],[-11,36],[-19,-50],[-19,30],[-6,38],[-21,18],[-20,-12],[-17,-37],[29,2],[20,-49],[-38,-53],[-34,12],[-4,-20],[25,-34],[14,13],[35,1],[22,-43],[-11,-28],[-24,-8],[-34,-33],[-8,11],[-19,-29],[3,-49],[-27,-50],[-13,20],[7,34],[-23,50],[7,47],[27,62],[-8,24],[-15,-21],[-34,-105],[-3,-24],[-22,32],[-22,-10],[-5,-35],[26,-6],[10,-63],[-16,-61],[-25,-20],[1,-70],[-25,-41],[-12,13],[-23,-82],[-19,-30],[-18,21],[-31,-20],[22,116],[11,11],[26,71],[24,31],[-2,37],[-33,-23],[3,52],[22,102],[29,52],[-7,30],[-15,-45],[-34,-61],[-26,-112],[-24,-59],[-14,-11],[-5,-44],[-19,-30],[-4,84],[-26,58],[-33,27],[3,100],[-4,106],[-13,83],[-11,32],[-23,20],[-27,5],[14,30],[-15,37],[5,23]],[[6782,82633],[27,101],[51,97],[21,-4],[16,-54],[-12,-23],[-55,-73],[-29,-79],[-19,35]],[[6519,81925],[26,41],[5,38],[13,22],[8,-32],[-6,-43],[5,-68],[-7,-33],[-36,13],[-8,62]],[[6240,82171],[5,47],[14,25],[13,-59],[-13,-63],[-19,50]],[[6225,82357],[9,35],[3,-82],[-10,-1],[-2,48]],[[6080,82757],[21,48],[48,-3],[25,-54],[-35,23],[-16,-26],[-43,-6],[0,18]],[[5919,82533],[19,25],[11,-57],[-9,-11],[-21,43]],[[5642,81925],[8,64],[19,12],[27,-58],[-8,-18],[-21,37],[-25,-37]],[[5573,81984],[16,-49],[-27,12],[11,37]],[[5524,80844],[-1,36],[13,24],[20,-25],[-9,-59],[-19,-15],[-4,39]],[[5506,81836],[8,67],[10,10],[11,-62],[-29,-15]],[[5485,80904],[12,85],[-11,46],[31,-2],[4,-99],[-27,-38],[-9,8]],[[5445,80747],[10,13],[16,-42],[-1,-34],[-23,-4],[-2,67]],[[5429,81185],[17,-21],[5,49],[17,46],[5,-22],[-8,-58],[9,-13],[1,-44],[-10,-61],[13,-30],[-7,-19],[-17,22],[-2,-21],[-20,8],[-3,164]],[[5385,80755],[21,25],[11,-30],[-20,-26],[-12,31]],[[5377,81028],[9,39],[23,41],[5,-36],[-23,-38],[-9,-58],[-5,52]],[[5303,81352],[14,11],[5,-42],[-19,31]],[[5265,80882],[33,98],[15,27],[-5,18],[-22,0],[-4,76],[22,50],[27,-44],[-1,38],[-13,52],[30,-13],[18,114],[12,-23],[-2,-43],[-9,-2],[-5,-75],[12,-18],[0,33],[13,1],[-4,-60],[-11,-37],[-22,12],[-1,-45],[-28,-71],[-18,-24],[-31,-141],[-6,77]],[[5246,85264],[5,41],[14,-83],[-7,-25],[-12,67]],[[5238,81460],[22,42],[36,-14],[-1,-78],[-50,12],[-7,38]],[[5213,85252],[8,77],[5,-57],[-13,-20]],[[5096,81334],[16,74],[25,25],[18,-23],[-2,-46],[10,5],[12,47],[15,-32],[26,-26],[26,25],[7,-66],[-9,-60],[-14,40],[-22,3],[-14,23],[-3,40],[-10,-12],[0,-69],[11,-20],[11,-87],[-11,-60],[-36,35],[-10,59],[-18,-18],[-18,-90],[4,58],[-10,43],[0,104],[-4,28]],[[5033,85142],[7,131],[39,52],[21,6],[39,76],[5,-2],[-55,-273],[-22,-32],[-32,-4],[-2,46]],[[4937,81216],[27,3],[-4,-71],[-26,47],[3,21]],[[4863,81217],[10,31],[36,8],[-9,-51],[-37,-10],[0,22]],[[4804,81100],[4,51],[17,20],[25,-19],[12,-29],[35,-42],[6,-41],[-30,44],[-23,-57],[-28,74],[-11,-38],[-7,37]],[[4656,80881],[30,66],[26,-27],[0,-83],[-11,-53],[-13,-21],[-27,58],[-5,60]],[[4587,90956],[19,44],[21,16],[24,-17],[22,6],[9,-37],[-1,-50],[-75,-13],[-18,19],[-1,32]],[[4545,80324],[1,51],[68,-54],[19,-39],[26,0],[18,-28],[-20,-23],[-10,-33],[-22,40],[-17,-9],[-31,37],[-18,-29],[-22,57],[8,30]],[[4451,81463],[14,-1],[-5,-38],[-9,39]],[[3979,80040],[12,22],[16,-18],[-21,-37],[-7,33]],[[3880,79918],[22,34],[33,-11],[24,18],[5,-24],[-9,-45],[-26,-13],[-47,27],[-2,14]],[[3807,79887],[60,24],[9,-35],[-15,-32],[-13,37],[-34,-4],[-7,10]],[[3781,79848],[17,29],[7,-36],[-18,-14],[-6,21]],[[3751,80090],[13,56],[14,-15],[18,18],[12,-21],[-22,-33],[13,-48],[30,0],[1,-41],[-23,3],[-18,-79],[-23,24],[-2,78],[16,35],[-9,20],[-16,-21],[-4,24]],[[3635,79967],[5,36],[28,54],[30,-6],[3,-58],[20,6],[14,-15],[8,-44],[13,13],[-2,-41],[-26,-36],[-12,11],[-18,-45],[-6,28],[-25,1],[-17,-20],[-18,91],[3,25]],[[3608,79782],[7,15],[27,-33],[-32,-11],[-2,29]],[[3261,87028],[35,25],[57,0],[22,-20],[23,10],[9,-24],[21,10],[10,30],[-8,38],[34,68],[37,-11],[0,37],[25,46],[33,-40],[24,32],[23,9],[15,54],[19,-132],[27,-10],[29,34],[29,-20],[27,-40],[-12,-65],[11,-44],[-11,-40],[13,-11],[4,-65],[-13,-38],[21,-54],[2,-58],[21,10],[-11,-34],[2,-48],[-71,-21],[-6,-34],[-20,19],[-26,-18],[-28,-58],[8,-64],[-26,-8],[-23,71],[-38,47],[-57,-4],[-14,35],[-28,18],[-27,58],[-35,42],[-40,19],[-32,72],[-25,10],[-2,70],[-28,97]],[[3147,79003],[17,23],[22,53],[25,5],[37,40],[9,27],[28,-21],[14,19],[8,44],[22,-19],[3,72],[24,-11],[-17,106],[20,32],[8,-16],[15,18],[-18,35],[4,39],[17,23],[29,-1],[9,-68],[15,7],[-7,50],[13,31],[-53,47],[-14,-21],[-32,81],[0,46],[31,92],[42,50],[36,32],[6,-15],[23,13],[16,-63],[-16,-42],[7,-35],[17,-18],[14,53],[6,-33],[15,29],[-1,41],[18,63],[15,-58],[11,26],[20,-62],[-8,-56],[-23,-13],[-24,-70],[-40,-70],[2,-39],[34,54],[58,64],[4,22],[22,22],[7,-19],[-5,-72],[-16,-51],[-26,-34],[-6,-23],[-45,-51],[-30,-20],[12,-46],[-16,-1],[-4,-61],[-16,17],[-7,-70],[-20,25],[-4,-76],[-36,-13],[-22,30],[-10,-31],[-12,23],[-21,-37],[-6,11],[-44,-73],[-3,-31],[-23,4],[-16,-23],[-13,-60],[-28,23],[-9,-45],[-49,40],[-15,36]],[[3070,93368],[7,34],[34,50],[123,108],[63,74],[48,74],[45,56],[42,64],[84,105],[55,56],[146,167],[172,154],[133,90],[87,45],[135,15],[52,-11],[34,-31],[-41,-11],[7,-38],[-10,-71],[-31,-77],[1,-70],[12,-56],[-21,-59],[-49,-33],[-4,-20],[49,7],[42,-151],[40,-3],[36,32],[42,-1],[49,-30],[47,21],[69,15],[32,-58],[50,21],[18,-34],[52,32],[18,26],[84,-65],[18,59],[26,44],[37,150],[18,26],[40,-9],[8,-39],[32,-12],[31,27],[26,0],[-32,110],[-71,55],[-45,24],[-48,-1],[-60,-60],[13,112],[-3,83],[-62,114],[-22,91],[-26,35],[-59,14],[-8,56],[-32,90],[7,50],[27,18],[10,43],[16,-37],[24,28],[27,-89],[36,-91],[24,-10],[-19,-101],[3,-55],[28,-50],[57,-123],[53,-68],[39,18],[30,28],[9,49],[-45,2],[-10,45],[-56,70],[-53,112],[10,52],[0,60],[14,23],[1,57],[33,93],[30,-32],[22,3],[1,28],[-38,55],[-25,-8],[-28,57],[-87,-29],[-32,-37],[-34,0],[-39,-19],[-34,17],[-20,43],[-17,-16],[-21,23],[-4,-51],[-36,39],[-91,42],[-54,31],[-48,15],[-22,30],[1,98],[-22,163],[-52,216],[-20,58],[-36,62],[-91,101],[-145,228],[-21,24],[-51,87],[-50,49],[-54,37],[-51,23],[-29,35],[-19,70],[-54,84],[-45,40],[-81,41],[-42,-6],[37,40],[92,59],[20,46],[3,57],[19,76],[11,236],[-8,117],[179,-31],[68,6],[144,42],[79,28],[77,15],[77,63],[41,65],[29,30],[53,87],[81,192],[21,92],[7,79],[-2,186],[39,233],[84,183],[65,179],[37,77],[129,162],[96,-35],[69,-3],[68,40],[64,53],[93,104],[74,108],[44,86],[114,188],[33,31],[99,63],[7,-47],[55,-44],[82,-12],[68,15],[13,24],[32,-3],[61,17],[73,51],[74,85],[71,121],[36,88],[86,185],[68,76],[12,-68],[47,-38],[39,-2],[39,-20],[16,-82],[27,41],[99,-49],[15,-98],[-54,-71],[-35,-63],[-41,-4],[12,-146],[81,-15],[44,59],[-7,76],[16,8],[31,67],[23,12],[19,-48],[4,63],[-27,43],[35,55],[21,-47],[-3,65],[15,22],[71,-74],[45,-66],[13,-42],[-11,-33],[1,-109],[9,-49],[61,10],[35,-37],[16,-40],[48,62],[30,75],[112,0],[69,42],[53,-11],[40,-34],[84,-2],[61,-32],[45,-35],[9,-34],[-26,-11],[-26,-83],[-26,-30],[14,-93],[25,5],[19,-24],[45,-6],[10,-28],[69,-20],[33,9],[-17,-43],[9,-25],[-53,-26],[-8,-24],[20,-25],[89,6],[72,-41],[14,-33],[28,5],[44,86],[57,15],[24,-18],[10,34],[40,7],[29,-27],[15,-59],[42,27],[38,8],[58,83],[13,-22],[45,20],[21,-15],[34,26],[12,-30],[66,-8],[62,-72],[28,-1],[19,-24],[26,31],[24,-8],[37,-73],[0,-45],[35,-19],[41,51],[1,-63],[26,57],[81,-77],[14,-67],[24,-23],[49,1],[43,-15],[29,36],[23,-73],[48,-10],[29,45],[43,-12],[62,12],[66,-10],[49,-38],[50,-3],[17,28],[65,-95],[28,-8],[32,-54],[45,-16],[20,-30],[45,-12],[17,-26],[27,32],[66,-20],[45,77],[48,6],[9,20],[84,49],[18,24],[86,30],[42,-25],[48,32],[9,-18],[79,-73],[53,-37],[70,-80],[26,-67],[37,-11],[87,-97],[68,-40],[52,-62],[27,-47],[61,-13],[58,-45],[0,-9012],[2,-971],[-1,-889],[130,-95],[17,100],[135,-145],[81,180],[170,20],[1,-39],[-33,-272],[47,-112],[66,-76],[26,-22],[11,-116],[29,-80],[266,-580],[30,-299],[-8,-93],[22,4],[51,108],[111,158],[11,23],[68,8],[32,139],[-2,209],[30,-19],[18,19],[19,71],[-1,39],[-32,47],[45,48],[68,28],[131,158],[62,-115],[28,-88],[11,-2],[24,-70],[0,-104],[-12,-24],[1,-37],[16,-47],[-5,-42],[18,-76],[73,-38],[5,-66],[32,-73],[24,0],[29,-108],[-6,-69],[26,-20],[-6,-46],[22,-71],[114,-152],[32,-119],[46,-120],[50,-110],[-23,-49],[33,-134],[47,-140],[28,-176],[57,-182],[32,-161],[30,-111],[25,-123],[53,-180],[32,-155],[-33,-140],[89,-52],[-21,-205],[71,-81],[-8,-61],[11,-57],[7,-119],[71,14],[33,-77],[82,-115],[23,-48],[85,-47],[44,-115],[44,-33],[11,-116],[23,-15],[27,-36],[40,23],[28,-143],[-3,-90],[-20,-107],[-18,-67],[1,-60],[10,-38],[-5,-118],[12,-104],[11,-46],[6,-133],[12,-63],[-32,-100],[-24,-122],[-1,-33],[-20,-90],[-23,-77],[-37,-97],[-27,-55],[-19,-14],[3,-46],[-19,-23],[-12,40],[-1,56],[-13,24],[-1,-44],[-12,-22],[-18,18],[-13,52],[-4,108],[3,57],[-17,33],[8,103],[-9,6],[-16,56],[-6,64],[30,63],[17,63],[15,-8],[-3,75],[-11,82],[14,122],[-9,190],[-10,67],[-43,164],[-22,55],[-12,48],[-7,-34],[23,-62],[25,-85],[7,-72],[22,-90],[10,-131],[-16,-43],[-2,-79],[7,-92],[11,-62],[-9,-28],[-11,96],[-8,12],[3,-70],[-4,-74],[-36,-102],[-14,-5],[-24,49],[19,73],[11,73],[-3,38],[-25,-10],[10,-72],[-8,-42],[-33,-56],[-7,1],[-23,108],[-11,-45],[-25,54],[-17,18],[-12,50],[-28,68],[0,76],[31,31],[22,51],[-20,47],[7,75],[-9,39],[23,44],[3,24],[-18,1],[-3,74],[7,43],[-41,-17],[6,-45],[11,-16],[-1,-37],[-13,-85],[-1,-60],[-19,-73],[-18,13],[7,-93],[-10,-43],[-24,52],[-25,22],[-9,30],[-12,132],[-16,70],[21,-29],[7,75],[27,37],[12,147],[-8,102],[10,57],[6,-21],[12,42],[7,92],[-21,-11],[-4,-58],[-19,-30],[-21,-61],[13,-113],[-8,-42],[-33,3],[-12,-43],[3,-30],[-17,-14],[-7,34],[4,67],[-19,23],[-12,128],[-32,-17],[0,-48],[-28,118],[-3,123],[8,25],[25,1],[7,66],[13,49],[30,12],[16,-72],[7,63],[-15,168],[9,3],[30,-45],[4,-59],[11,-32],[6,23],[-9,77],[-22,35],[-19,48],[-3,53],[-11,13],[-12,-25],[-10,49],[-23,32],[-5,57],[12,23],[-4,64],[-22,28],[-37,66],[-13,69],[-15,33],[-13,79],[29,43],[-11,58],[-18,-47],[-19,18],[-2,-27],[-23,58],[-31,8],[-11,56],[-27,-28],[-54,76],[-8,75],[15,73],[18,-22],[33,4],[9,48],[-22,3],[-32,36],[2,35],[-18,125],[13,81],[-24,-10],[-15,19],[-16,53],[7,103],[20,2],[16,-36],[33,-24],[63,-89],[5,15],[-25,58],[-20,19],[-66,130],[-3,95],[-17,-15],[-2,-65],[-20,3],[-39,166],[-55,147],[-11,140],[9,65],[-2,52],[27,41],[-13,100],[-8,-2],[-9,-85],[-20,-30],[0,-42],[12,-22],[-13,-57],[-10,10],[-22,-20],[-25,11],[-36,34],[-7,-15],[-35,36],[-40,174],[-4,110],[-42,140],[-13,79],[19,1],[-11,174],[-19,-56],[1,-58],[-35,132],[-8,177],[-8,92],[-21,135],[-32,116],[-36,37],[-5,-16],[28,-38],[4,-41],[17,-39],[20,-131],[-15,11],[-34,140],[-22,36],[-22,10],[41,-92],[13,-85],[17,-29],[-7,-97],[9,-88],[13,-23],[-5,-24],[27,-124],[3,-55],[25,-139],[2,-32],[-14,11],[27,-204],[9,-85],[1,-69],[-12,8],[-1,-61],[12,-64],[-29,23],[-19,32],[-14,-4],[-18,43],[-15,66],[-10,84],[-22,-16],[-33,50],[-27,-37],[-50,-19],[3,81],[-25,16],[-4,19],[30,39],[-10,69],[5,53],[-28,109],[0,36],[-22,84],[13,24],[-2,90],[-19,64],[-12,10],[15,-131],[-12,-125],[-27,-5],[-42,70],[-26,30],[-15,150],[-11,-68],[-13,-22],[-44,54],[-14,-20],[-10,50],[-12,-18],[-3,-54],[45,-35],[7,7],[45,-44],[33,-66],[30,-104],[-11,-44],[-24,-44],[6,-11],[33,44],[7,30],[27,1],[7,-105],[26,-78],[16,-157],[-19,-44],[-43,-32],[-11,10],[9,47],[-18,16],[-12,-17],[7,-39],[-10,-37],[-43,22],[-11,-23],[5,-60],[-8,-35],[-29,5],[-8,78],[-36,35],[3,15],[-28,74],[-17,19],[-29,-19],[-35,70],[-16,15],[-56,107],[-51,75],[-2,50],[-30,70],[-37,64],[-5,28],[4,75],[-15,48],[-55,121],[-30,47],[-96,89],[-36,71],[-43,66],[-98,104],[-42,49],[-91,144],[-30,39],[5,29],[31,89],[24,-14],[-9,-27],[24,3],[0,43],[21,70],[-22,7],[2,77],[-14,116],[7,35],[22,41],[-5,34],[16,30],[-13,56],[-19,-51],[-2,-59],[-25,-21],[-21,-72],[-1,-49],[-107,-100],[-12,-28],[-28,-28],[-95,22],[-67,36],[-26,32],[-123,125],[-17,56],[18,-10],[34,24],[11,71],[-33,131],[3,42],[-20,-17],[-31,44],[6,-50],[45,-120],[-10,-21],[-54,-51],[-39,0],[-49,55],[-61,24],[-32,23],[-81,40],[-45,11],[-59,-4],[-63,-33],[-77,-12],[-80,-28],[-54,-48],[-39,39],[-45,-26],[-64,-120],[-46,-115],[6,65],[36,103],[62,117],[46,2],[-16,66],[-49,48],[-8,25],[-10,-82],[-26,84],[-26,30],[-17,-9],[-16,27],[-71,19],[9,28],[38,23],[-42,33],[-19,-6],[-2,25],[37,156],[-15,15],[-13,-36],[-29,-22],[-1,-57],[-20,-66],[-39,12],[-70,97],[1,31],[-26,36],[-39,26],[-41,-35],[-22,27],[13,29],[31,32],[25,74],[-14,10],[-18,-49],[-79,-93],[-29,-23],[-38,5],[1,-54],[60,27],[11,-24],[2,-53],[-17,2],[-28,-37],[-18,6],[-41,-38],[-41,-77],[-12,2],[-12,48],[47,77],[-37,-12],[-17,11],[-1,54],[23,83],[13,27],[18,2],[20,-31],[24,17],[22,41],[38,13],[57,58],[42,20],[-9,25],[-19,-2],[1,71],[-11,-49],[-19,-20],[1,30],[25,65],[1,21],[-33,-58],[-45,-47],[-19,-3],[-4,30],[63,112],[-6,38],[-29,-60],[-38,-14],[-12,26],[-15,-49],[-20,-14],[-54,13],[-10,58],[27,19],[11,-9],[18,25],[40,16],[29,28],[23,65],[-25,2],[-14,-46],[-23,-19],[-45,-2],[-18,68],[-12,3],[-17,-69],[-21,-8],[-4,59],[16,26],[17,-6],[-11,44],[-3,55],[13,34],[26,114],[96,6],[-7,38],[-91,-5],[-21,-63],[-27,-26],[-21,-77],[-31,-48],[-23,12],[20,36],[-10,113],[-12,53],[18,30],[-22,10],[-14,-23],[-1,-51],[12,-63],[-14,-63],[1,-41],[-13,-15],[-26,48],[-2,-67],[-27,-45],[-21,22],[0,52],[-11,19],[-7,-73],[-9,15],[4,129],[9,62],[-15,11],[-17,-130],[9,-111],[-4,-29],[-19,-9],[1,49],[-27,34],[-7,-46],[16,-65],[-13,-8],[-38,16],[-34,-48],[-28,9],[-5,31],[14,95],[42,151],[1,53],[49,123],[16,81],[-6,18],[-73,-211],[-1,-35],[-18,-58],[-8,8],[-8,69],[-12,-1],[-3,-81],[-11,-54],[-18,-42],[-3,-64],[-16,-68],[-21,27],[-7,-44],[24,-28],[-5,-91],[10,-8],[19,85],[37,6],[11,-22],[4,-91],[-14,-45],[-31,-32],[-22,-76],[1,-63],[21,20],[17,75],[30,44],[30,-89],[0,-44],[10,-43],[-23,-192],[-26,0],[-9,52],[-19,9],[1,-36],[-27,-44],[0,-17],[28,14],[23,-27],[61,-124],[26,-85],[-15,-77],[-13,-26],[-34,-35],[-17,16],[-14,-18],[-29,-6],[9,51],[-26,67],[9,60],[-17,63],[-16,-126],[0,-62],[-12,-41],[-19,69],[-9,-8],[-7,-59],[-18,-33],[-34,50],[-29,-40],[-15,52],[-27,-21],[-22,5],[-9,28],[24,74],[-9,14],[-27,-38],[-29,-175],[-30,-42],[-9,18],[14,55],[13,84],[-15,172],[-16,5],[-5,-28],[1,-81],[13,-53],[-10,-4],[-10,-72],[-17,11],[-8,-20],[-5,-68],[-11,-17],[4,-47],[25,-31],[-6,-74],[-27,32],[-12,127],[8,37],[-11,78],[-17,6],[6,-52],[-8,-49],[5,-196],[-5,-64],[-27,74],[-1,43],[-16,28],[-34,31],[3,-40],[24,-36],[-1,-63],[-69,-158],[-32,-91],[0,-36],[-16,-10],[-9,-86],[-12,2],[-3,70],[34,211],[0,29],[-26,-65],[-19,-111],[-12,11],[-9,142],[-13,-52],[-11,2],[16,-62],[-5,-80],[-39,0],[-8,-61],[-18,-24],[-22,-55],[7,-43],[-15,-41],[-16,-10],[0,54],[-16,36],[-13,-45],[-1,-53],[-22,-17],[-24,31],[-9,-23],[-21,38],[-7,43],[-12,-36],[-21,-27],[6,-35],[-20,0],[-5,-39],[-41,-7],[-6,76],[-22,-14],[-21,22],[3,22],[-21,8],[-3,70],[8,36],[16,18],[5,71],[32,31],[9,-11],[29,51],[33,3],[0,45],[33,21],[34,62],[31,-9],[-11,69],[22,26],[3,32],[37,102],[-13,15],[-24,-22],[-60,-109],[-30,-20],[-18,-39],[-39,16],[-43,67],[-15,40],[-5,46],[18,117],[13,45],[15,133],[27,79],[17,33],[35,99],[11,98],[0,71],[23,32],[5,156],[4,27],[-18,44],[-22,163],[39,35],[5,27],[63,27],[89,164],[92,118],[51,-161],[41,-16],[13,-27],[34,112],[30,8],[36,-45],[19,10],[63,-48],[65,-20],[30,-55],[-1,27],[-22,63],[-29,36],[-38,-14],[-51,63],[-24,-1],[-40,42],[-25,68],[-39,66],[-29,28],[18,55],[24,9],[31,124],[23,18],[8,60],[46,27],[30,45],[-32,50],[-20,4],[-43,-64],[-11,-49],[-19,-14],[-12,-70],[0,-70],[-18,-31],[-25,19],[-36,7],[-74,-17],[-26,43],[-28,16],[-14,-52],[-87,-84],[-39,-154],[-36,-12],[-19,-31],[-33,2],[-39,-63],[-48,-109],[-1,-29],[26,-124],[-2,-23],[-38,25],[-19,-18],[-30,-52],[-21,-92],[-27,-29],[-32,-74],[-6,-73],[8,-34],[19,-24],[-40,-56],[-9,-67],[-13,-4],[-28,-70],[-19,-7],[-9,28],[-25,-11],[4,-68],[16,-13],[-3,-30],[25,-42],[8,-35],[-12,-73],[-19,-47],[-7,-62],[-25,-21],[-4,-22],[-39,-2],[-15,12],[-40,-31],[-18,3],[-19,-60],[23,16],[15,-20],[15,30],[19,1],[7,-50],[-16,-116],[-19,-16],[-26,-51],[-28,37],[5,-34],[-13,-18],[-18,18],[7,35],[2,75],[-22,71],[3,-119],[-9,-55],[-18,-15],[-13,25],[-6,-35],[16,-28],[-9,-53],[-49,-10],[17,-93],[-8,-32],[-27,-21],[-10,8],[-24,-45],[-12,13],[-36,-37],[5,-26],[20,-18],[-23,-32],[-7,-43],[2,-61],[-12,-44],[-24,-35],[24,-26],[-6,-59],[10,-60],[27,63],[59,-23],[16,22],[12,-22],[15,25],[22,-78],[19,-27],[19,13],[23,-34],[18,-53],[8,-53],[15,-22],[-28,-14],[-14,-118],[-12,-39],[-30,-25],[-11,-55],[-24,-33],[-48,0],[-15,-17],[-4,-94],[-12,-33],[-27,1],[-5,-20],[10,-79],[11,-32],[-27,-36],[-20,15],[-2,-45],[20,-46],[-11,-81],[-21,-30],[-6,-33],[9,-24],[-23,0],[-14,-52],[-26,66],[-9,-7],[5,-57],[-4,-40],[-21,-3],[-12,-43],[-17,16],[0,27],[-20,-1],[-4,-39],[-22,-24],[-23,31],[-28,-17],[-35,-69],[15,-52],[-9,-51],[-40,-44],[-28,-2],[1,-53],[14,-25],[-6,-40],[-20,-16],[-36,59],[-10,30],[-20,-20],[-5,-63],[1,-69],[-26,-27],[-3,-97],[-65,-7],[-21,24],[-2,-74],[8,-71],[-20,0],[-12,37],[-21,3],[-4,-39],[-32,-27],[-39,-92],[-15,-12],[-5,-44],[13,-11],[47,64],[4,-50],[-6,-53],[-15,-7],[0,-31],[18,-38],[-10,-38],[-18,-26],[-2,-49],[-26,-44],[-8,-32],[2,-42],[-32,14],[-31,-28],[-4,-70],[-12,-12],[-19,75],[-8,-53],[-27,-42],[-11,-53],[-24,-6],[5,-50],[-17,-27],[-25,43],[-24,67],[-22,-16],[0,-51],[11,-5],[1,-36],[-29,-10],[-13,-67],[6,-32],[18,-6],[5,-52],[-36,-4],[-24,-15],[-17,77],[-51,-38],[-18,-51],[-16,-3],[-9,-49],[19,-1],[27,25],[20,-17],[6,-54],[-16,-47],[-43,44],[-23,11],[-5,-70],[-33,6],[-23,21],[-20,-33],[-27,-88],[2,-44],[47,-20],[32,-36],[-3,-29],[-32,-42],[1,-23],[18,-4],[25,31],[16,-7],[-55,-78],[-23,-63],[1,-52],[-13,50],[-10,-17],[16,-66],[-6,-50],[-7,39],[-10,-2],[-2,-53],[-25,80],[0,95],[-19,-60],[8,-73],[-4,-67],[-24,-6],[3,58],[-35,1],[-16,-80],[-25,-9],[-75,-43],[-29,-22],[-7,-22],[-3,-74],[-17,46],[5,80],[-23,-19],[10,-30],[1,-104],[-16,-71],[6,-46],[-24,-81],[-32,-30],[2,52],[24,4],[-1,40],[-10,4],[2,111],[18,72],[-29,39],[-28,12],[-13,-18],[3,-45],[-12,-21],[-13,22],[-25,-13],[-9,-82],[-35,-74],[-26,-20],[-37,28],[-6,-29],[11,-44],[-20,-81],[1,-31],[-21,-37],[-12,105],[-10,13],[-14,-37],[-11,14],[-18,-31],[31,-13],[-2,-68],[-32,-10],[-16,25],[5,39],[-13,24],[-22,-22],[-19,-90],[-61,-85],[-26,2],[-11,29],[-26,-29],[-13,4],[10,156],[29,96],[1,46],[-15,16],[-31,-2],[-24,-29],[-24,-101],[4,-129],[-40,-140],[-7,-12],[-14,-85],[-21,36],[-19,-12],[13,-65],[10,-17],[1,-56],[-25,-38],[-19,33],[0,45],[-16,15],[-13,-60],[10,-49],[-17,-47],[-14,27],[-32,-8],[-16,18],[-14,74],[32,6],[-21,47],[-8,104],[-21,56],[-11,7],[-16,-33],[-10,-65],[7,-27],[14,0],[18,-70],[-11,-46],[14,-95],[0,-52],[-22,30],[-20,-19],[3,-26],[-17,-30],[-18,-7],[-22,28],[-16,59],[4,36],[-13,56],[-21,37],[-31,-25],[-10,-56],[49,-85],[4,-31],[-50,-111],[-24,-21],[-20,-33],[16,-56],[27,2],[9,24],[22,-50],[13,-83],[-26,6],[8,34],[-17,6],[-10,-28],[-16,22],[-17,62],[-25,-39],[2,-69],[-18,-1],[-28,-50],[-23,18],[-37,10],[-45,-5],[-34,-14],[-41,-40],[-29,-71],[-4,-69],[-29,-53],[-51,-33],[-29,3],[-28,28],[-9,30],[-9,74],[-10,30],[-1,55],[8,29],[44,41],[14,25],[23,110],[19,110],[-1,29],[22,54],[14,13],[25,-46],[38,39],[25,49],[25,0],[37,81],[34,20],[36,-14],[31,5],[1,-37],[28,-72],[9,-61],[-5,-50],[27,24],[-8,52],[2,37],[30,-30],[-15,42],[2,77],[-10,109],[32,46],[26,21],[42,-15],[21,14],[10,69],[-16,4],[4,28],[18,10],[7,38],[18,-4],[26,99],[3,-32],[15,-20],[21,48],[-5,83],[-20,-9],[27,68],[64,206],[33,52],[23,62],[19,13],[27,42],[25,68],[27,14],[35,39],[37,20],[89,70],[30,-9],[10,18],[45,5],[10,-10],[-20,-27],[-1,-47],[14,-2],[-3,-49],[-29,-18],[-3,-85],[38,-98],[11,22],[27,-39],[4,19],[-29,53],[-3,85],[-6,32],[26,-28],[57,3],[7,-86],[23,7],[26,-36],[7,22],[-14,40],[27,15],[-56,89],[-32,36],[1,58],[-16,-7],[39,166],[15,123],[11,56],[23,44],[36,96],[18,13],[40,74],[30,81],[82,96],[41,74],[35,39],[68,106],[17,42],[29,-68],[19,-14],[31,19],[8,59],[-13,47],[-2,46],[15,122],[29,108],[41,130],[24,62],[22,37],[40,41],[21,52],[22,87],[14,15],[26,62],[30,25],[8,-74],[18,-15],[4,41],[-10,105],[-23,-2],[-6,34],[2,95],[9,59],[25,409],[14,42],[38,16],[12,53],[-20,-9],[-34,77],[-3,62],[9,97],[20,106],[27,33],[29,101],[49,102],[4,57],[19,93],[-5,45],[13,33],[-3,43],[13,38],[-20,0],[-11,-32],[0,-38],[-21,-53],[-28,-31],[-38,-27],[-21,-31],[-29,-22],[-5,-21],[-41,-28],[-44,-61],[-79,-73],[-26,5],[-28,53],[-5,73],[-20,49],[-40,38],[2,46],[11,17],[9,167],[-12,-3],[-25,-101],[-41,-54],[-6,-58],[5,-58],[-8,-37],[-14,-12],[-3,-32],[9,-80],[16,-91],[19,-76],[-26,-87],[-28,-21],[-42,32],[-39,161],[-47,208],[-26,73],[-23,42],[-31,13],[16,65],[-16,44],[-25,-9],[-6,-87],[-15,7],[1,-65],[-29,-30],[-24,79],[3,26],[-19,19],[-11,-30],[-16,6],[-1,59],[-22,-18],[-25,61],[18,47],[-17,89],[-44,-52],[-46,-72],[-31,-62],[-20,-95],[-13,57],[-36,-33],[-94,-124],[-10,-41],[0,-49],[-41,-38],[-8,-26],[-22,-10],[-15,-44],[-20,-15],[-4,55],[-29,45],[-54,-20],[-29,33],[49,47],[15,-39],[18,12],[5,50],[25,77],[3,60],[-8,85],[1,81],[-16,74],[5,21],[-16,20],[-29,97],[-20,139],[29,128],[21,23],[24,79],[24,26],[-15,77],[-18,44],[-15,64],[-10,107],[-50,162],[-3,74],[-25,67],[-10,63],[-30,85],[-10,44],[-22,9],[-11,-37],[-2,-74],[6,-37],[-8,-56],[-12,-21],[-27,-10],[-18,21],[-19,-54],[-36,-29],[-50,-68],[-73,-48],[-88,-28],[-75,10],[-51,38],[-13,32],[-13,99],[23,18],[-18,69],[-54,62],[-32,108],[-5,34],[-33,51],[-18,62],[-42,8],[-31,42],[-47,110],[23,32],[24,55],[-2,36],[-24,6],[-38,-54],[-48,10],[-16,51],[11,32],[32,1],[57,128],[10,-4],[17,45],[-16,34],[-4,41],[32,24],[-27,7],[5,70],[27,78],[-17,3],[-18,-48],[-40,42],[-6,40],[22,49],[27,-6],[19,23],[0,45],[-17,-21],[-30,32],[-16,54],[2,23],[-20,7],[-13,35],[-10,-14],[-12,-99],[-14,-6],[-38,16],[-10,21],[-10,66],[1,129],[-11,19],[-43,10],[-18,37],[-10,98],[42,44],[6,38],[-17,46],[-30,31],[-45,-27],[0,-46],[-21,23],[-9,88],[8,147],[6,11],[-2,-107],[92,47],[0,19],[-35,20],[-20,28],[-24,82],[2,18],[36,19],[55,-8],[33,25],[-29,134],[-4,46],[3,84],[21,77],[101,278],[4,29],[27,77],[29,61],[5,70],[18,67],[21,34],[19,-4],[9,23],[-11,115],[26,188],[18,70],[38,61],[-18,24],[4,22],[58,133],[60,46],[48,11],[42,-45],[43,-11],[32,-84],[24,-6],[6,-26],[54,-88],[73,24],[61,124],[4,47],[44,29],[63,172],[23,89],[23,39],[-9,58],[14,5],[28,-28],[22,-5],[13,-77],[52,0],[45,20],[26,-20],[77,28],[48,38],[9,51],[56,128],[38,135],[0,71],[-12,81],[-23,95],[-17,121],[-1,118],[-5,52],[-71,157],[-9,32],[-41,28],[-27,1],[10,97],[27,33],[14,-25],[35,-20],[51,7],[-10,45],[31,10],[41,81],[2,114],[-42,122],[-47,68],[-25,48],[-1,-32],[-27,-48],[-20,-86],[-42,-30],[-42,42],[-59,-93],[-81,-34],[-18,-71],[-85,-103],[-21,-70],[-5,-99],[-44,-70],[-4,93],[-15,110],[-23,50],[-28,-3],[4,34],[-32,46],[-9,36],[-38,-60],[16,-45],[21,-7],[16,-39],[24,11],[2,-48],[-22,-81],[-19,-11],[-22,82],[-55,76],[-41,33],[-64,13],[-41,-27],[-27,12],[-52,3],[-45,-22],[-108,-112],[-58,-17],[-111,74],[-94,45],[-47,14],[-88,40],[-49,79],[-20,96],[1,74],[20,36],[-6,64],[-28,63],[-45,56],[-1,59],[-46,64],[-10,56],[39,-33],[33,3],[9,27],[24,15],[16,32],[-3,55],[35,61],[-38,63],[-19,9],[-29,-16],[-39,15],[-64,52],[-104,21],[-49,52],[-38,63],[-55,60],[-46,30],[-15,93]],[[2812,78476],[27,27],[-1,59],[18,0],[10,36],[0,57],[21,33],[5,57],[-10,16],[11,87],[46,106],[16,-26],[27,16],[28,-3],[-9,65],[-12,5],[9,77],[-6,26],[18,76],[40,67],[54,37],[29,-53],[31,1],[2,-23],[-21,-74],[5,-60],[-55,-95],[-65,-72],[-19,-66],[-1,-36],[-28,-81],[-15,-58],[-25,-10],[-28,-71],[-15,-17],[-4,-51],[-15,21],[-27,-49],[-54,-69],[13,45]],[[2752,78371],[29,49],[-1,-45],[-26,-25],[-2,21]],[[2615,78610],[4,50],[19,16],[4,-44],[-9,-45],[-12,-8],[-6,31]],[[2607,82847],[50,-13],[29,5],[10,-14],[-27,-68],[-23,4],[-9,46],[-20,10],[-10,30]],[[2611,78728],[8,-39],[-15,13],[7,26]],[[2547,78457],[17,17],[23,-3],[-2,19],[27,23],[19,-10],[10,-25],[-17,-105],[-30,50],[-25,-29],[-19,14],[-3,49]],[[2517,78521],[8,26],[23,-16],[1,-31],[-14,-31],[-13,16],[-5,36]],[[2497,78313],[4,72],[33,-18],[-7,-57],[-30,3]],[[2431,83489],[9,43],[22,15],[12,-10],[29,22],[-2,-56],[-32,-62],[-5,31],[-33,17]],[[2316,78170],[5,42],[40,72],[31,-27],[1,-27],[-13,-58],[-19,2],[-17,-26],[-15,-48],[-15,21],[2,49]],[[2228,78152],[9,-32],[-16,2],[7,30]],[[2183,78046],[17,42],[16,-37],[-12,-55],[-19,-1],[-2,51]],[[2036,90914],[2,37],[25,87],[-3,75],[8,18],[-5,57],[21,3],[8,-42],[-4,-48],[12,-34],[64,-57],[77,-48],[55,-20],[58,87],[58,58],[58,-14],[29,-69],[23,-15],[15,-104],[-2,-38],[53,-56],[56,-14],[22,-32],[9,-35],[36,-20],[88,-20],[14,6],[102,-55],[-27,-131],[-22,-43],[-51,35],[-43,-1],[-50,-29],[-44,-89],[-10,-61],[1,-53],[-20,-46],[-30,22],[3,24],[-26,119],[-32,62],[-50,60],[-39,-5],[-11,69],[-17,55],[-54,80],[-86,69],[-65,11],[-47,-44],[-18,-58],[-36,-34],[-28,33],[-49,36],[-24,83],[-7,56],[3,73]],[[1818,77819],[15,59],[33,49],[12,-2],[27,-39],[-1,-41],[-28,-51],[-32,-27],[-22,-1],[-4,53]],[[1695,87369],[6,69],[25,52],[11,-3],[-4,-58],[12,-54],[33,-70],[48,-63],[22,-14],[25,13],[57,-94],[-21,-19],[-9,37],[-51,8],[-26,-17],[-33,46],[-58,136],[-37,31]],[[1687,87598],[8,-5],[5,-84],[-20,42],[7,47]],[[1421,77626],[35,0],[33,-31],[9,30],[14,-2],[33,27],[25,-1],[-6,-28],[10,-29],[8,15],[31,-24],[23,16],[10,-11],[32,11],[5,-12],[41,-7],[-25,-23],[-16,6],[-14,-22],[-44,-1],[-22,-35],[-8,16],[-16,-19],[-19,4],[-18,25],[-52,3],[-9,-15],[-29,19],[-10,49],[-11,-1],[-10,40]],[[1064,77503],[55,37],[11,-28],[25,50],[3,-22],[19,38],[5,29],[18,-29],[27,8],[8,34],[6,-24],[35,37],[1,42],[44,10],[-13,41],[43,-5],[13,34],[-1,36],[-32,7],[-23,29],[5,26],[21,-16],[12,36],[-2,39],[38,46],[33,-32],[22,-76],[1,-31],[-21,-85],[-34,8],[-4,-43],[33,-79],[-3,-24],[-15,21],[-17,-10],[-4,-27],[-16,-4],[-20,23],[-19,-95],[-25,31],[-64,-55],[-13,29],[-29,12],[-23,-6],[-13,-35],[-22,-8],[-33,6],[-32,25]],[[1013,77451],[17,17],[7,-29],[-22,-4],[-2,16]],[[1005,77685],[16,-19],[-11,-12],[-5,31]],[[949,77433],[5,9],[40,-3],[1,-26],[-19,3],[-22,-24],[-5,41]],[[890,77452],[11,14],[28,-1],[15,-90],[-16,5],[-17,49],[-21,23]],[[821,77563],[14,45],[26,-9],[23,-80],[-20,-38],[15,-56],[-13,-34],[-18,-2],[-18,22],[3,57],[-7,2],[-8,77],[3,16]],[[811,77269],[5,56],[12,10],[10,-27],[19,10],[-12,22],[34,30],[10,-23],[-2,-55],[-23,0],[13,-52],[-29,29],[2,-40],[-12,12],[-5,-39],[-7,45],[-15,22]],[[601,77040],[11,67],[15,16],[7,36],[-13,66],[4,27],[32,7],[7,59],[-13,69],[10,45],[15,4],[18,-20],[19,59],[9,-14],[3,-74],[-20,-29],[-2,-50],[13,-20],[19,4],[31,26],[30,5],[7,-64],[-7,-88],[-15,-12],[-36,18],[-13,-52],[-18,-12],[-13,-41],[-23,31],[-6,-25],[6,-48],[-11,17],[-13,-26],[-4,55],[-14,29],[-19,-108],[-14,11],[-2,32]],[[469,77371],[13,9],[2,-26],[-14,-17],[-1,34]],[[402,77131],[18,33],[24,-17],[26,34],[50,39],[21,43],[2,128],[12,16],[16,-10],[15,-44],[-26,-98],[5,-86],[-7,-38],[-33,-31],[-36,61],[-27,-33],[-40,-10],[-1,-43],[-10,5],[-9,51]],[[257,77332],[8,29],[29,17],[39,-5],[11,-42],[-2,-30],[19,-32],[15,17],[18,-17],[33,34],[-10,-40],[-41,-32],[-12,-71],[4,-31],[-12,-31],[-8,16],[-9,-44],[8,-57],[-8,-5],[-9,56],[-14,-24],[-16,48],[-13,8],[4,28],[41,25],[-3,64],[-20,1],[-13,34],[-39,66],[0,18]],[[130,77016],[32,-12],[-3,-18],[-27,7],[-2,23]],[[81,76979],[27,-17],[7,-23],[-25,5],[-9,35]],[[77,77233],[14,52],[20,-35],[0,-61],[-19,-10],[-15,54]],[[43,76751],[8,25],[10,-22],[5,-50],[-12,-2],[-10,-32],[-1,81]],[[3,76640],[12,18],[6,-59],[-18,-25],[0,66]],[[99917,77451],[12,-2],[12,35],[26,14],[31,-61],[-9,-68],[-24,-42],[-12,-5],[-25,29],[-11,29],[0,71]],[[99678,77049],[5,24],[26,-29],[19,3],[27,-24],[4,-31],[24,-42],[27,-78],[25,-26],[11,-57],[44,-11],[21,-33],[-18,-19],[-9,14],[-29,-16],[-15,41],[-41,72],[-30,101],[-30,43],[-17,-8],[-22,25],[-22,51]],[[99628,77446],[9,11],[20,-16],[11,-33],[-14,-49],[-10,-4],[-16,91]],[[99570,77271],[19,-7],[21,-67],[-22,15],[-18,59]],[[99530,77510],[7,22],[17,-22],[3,-34],[-17,-20],[-10,54]],[[99282,77351],[24,27],[15,50],[39,26],[6,63],[16,96],[11,18],[20,-52],[-12,-32],[-8,-57],[-20,-53],[21,-18],[0,-35],[-13,-10],[-42,17],[-17,-31],[-4,-70],[-11,2],[-25,40],[0,19]],[[98911,77903],[26,-13],[-18,-27],[-8,40]],[[98408,78327],[22,-8],[3,-26],[-24,15],[-1,19]],[[98376,78346],[14,-8],[0,-29],[-14,37]],[[98352,78374],[20,-27],[-12,-2],[-8,29]],[[98210,77943],[6,31],[19,27],[23,-6],[26,67],[41,5],[-17,-40],[-5,-37],[10,-104],[-21,0],[-17,52],[-35,-19],[-30,24]],[[97960,78551],[47,86],[33,11],[100,-20],[29,-63],[24,-15],[35,-94],[2,-18],[-35,-8],[-21,38],[-17,-71],[-9,-13],[-38,15],[-26,-41],[-27,32],[-12,40],[-3,63],[-32,56],[-35,-24],[-15,26]],[[13347,81071],[9,23],[10,-28],[-5,-52],[-16,34],[2,23]],[[13279,80906],[61,56],[7,-80],[13,-14],[-20,-68],[-24,-1],[-33,63],[-4,44]],[[13241,80901],[26,65],[8,-25],[-26,-58],[-8,18]],[[13234,81005],[16,62],[-2,43],[13,20],[-14,43],[-2,70],[5,39],[11,9],[19,-32],[5,-35],[13,-7],[17,-40],[0,-165],[-9,-34],[-27,-2],[-13,32],[-23,-36],[-9,33]],[[13172,81388],[4,66],[6,1],[52,-135],[-12,-28],[-1,-68],[-15,-111],[-23,74],[-9,113],[-2,88]],[[12999,82714],[4,48],[9,-30],[-13,-18]],[[12979,82569],[2,29],[21,40],[21,-38],[-1,-22],[-24,-37],[-19,28]],[[12954,82690],[20,33],[17,52],[-5,-50],[-18,-75],[-14,40]],[[12888,80934],[18,6],[-4,-53],[-14,47]],[[12850,82395],[7,53],[10,-24],[22,-97],[10,-68],[-13,-15],[-21,61],[-9,4],[-6,86]],[[12838,82543],[18,86],[21,30],[30,-20],[24,22],[28,-42],[4,-36],[-18,-53],[6,-82],[-16,-19],[-44,-22],[-23,65],[-24,29],[-6,42]],[[12768,81460],[21,27],[-2,-46],[-16,-11],[-3,30]],[[12700,80811],[9,0],[10,-128],[-15,29],[-4,99]],[[12674,81692],[9,23],[1,61],[20,-30],[1,-32],[-22,-72],[-9,50]],[[12659,81749],[12,9],[-1,-36],[-11,27]],[[12637,81497],[8,92],[8,25],[32,-9],[10,-16],[-2,-35],[-16,-42],[8,-16],[20,40],[5,43],[13,-19],[19,68],[19,-2],[16,-39],[-5,-60],[-15,-35],[-19,15],[-13,-35],[17,-22],[-2,-37],[-22,-21],[-22,-50],[-9,-97],[-23,78],[17,61],[-1,78],[-29,51],[-14,-16]],[[12629,82086],[11,22],[24,102],[28,10],[11,20],[-22,13],[-1,47],[15,-22],[9,34],[-36,62],[14,29],[-10,86],[23,49],[45,-24],[71,-17],[24,-82],[11,-73],[-5,-69],[14,-6],[13,-68],[17,-48],[17,5],[57,-119],[12,-52],[33,-111],[3,-126],[29,-29],[8,-82],[8,-32],[31,-50],[13,-58],[-10,-6],[-19,46],[-75,98],[-3,-31],[-23,-74],[11,-8],[14,47],[8,-19],[23,10],[5,-37],[20,-13],[10,-29],[-38,-14],[8,-36],[32,21],[14,-52],[16,-14],[11,-87],[8,-9],[-12,-49],[-20,9],[2,-32],[22,-22],[11,8],[3,46],[14,36],[9,-21],[5,-91],[-15,-34],[4,-36],[-22,-94],[-29,-40],[18,-23],[27,59],[15,-10],[0,-203],[7,-72],[-20,-105],[-37,-9],[-26,48],[-14,-19],[-17,38],[-1,37],[-38,-2],[17,53],[27,-10],[1,39],[-19,42],[-19,13],[-35,78],[9,38],[10,115],[-15,9],[-11,-58],[7,101],[8,28],[-11,39],[-5,-55],[-27,-21],[14,-103],[-18,-58],[-47,56],[-4,35],[17,58],[-18,100],[-20,-5],[-10,50],[-21,3],[12,-78],[18,-65],[6,-72],[-7,-36],[15,-17],[20,-145],[24,-26],[-4,58],[24,18],[28,-65],[4,-124],[-14,-16],[-18,74],[-7,-7],[23,-170],[-29,0],[-26,32],[-2,60],[-20,40],[-49,177],[-10,22],[-2,84],[-12,10],[-8,61],[29,8],[-27,33],[3,119],[-33,-28],[-10,26],[-18,-19],[-9,42],[6,84],[33,30],[11,-63],[17,20],[-13,29],[6,39],[14,20],[14,-14],[22,44],[-29,96],[14,12],[-16,32],[4,66],[-24,-21],[-49,87],[-4,28],[16,-1],[-9,50],[3,35],[-27,18],[6,-57],[-10,-13],[-32,39],[-16,58],[12,52],[28,14],[37,-54],[28,35],[-17,67],[-18,16],[-12,-20],[-9,17],[8,30],[-2,42],[7,63],[-5,16],[-13,-47],[-27,-65],[-22,-33],[-23,38],[-5,45]],[[12611,83642],[15,25],[14,-33],[-27,-31],[-2,39]],[[12594,82026],[14,28],[11,-6],[4,-52],[-8,-48],[-10,3],[-11,75]],[[12476,82024],[28,22],[1,-43],[31,33],[8,75],[7,-2],[-9,-101],[-22,-24],[-20,-56],[-18,17],[8,30],[-14,49]],[[12463,83115],[17,52],[16,17],[7,33],[33,-1],[1,26],[28,-40],[11,-83],[18,-54],[31,-2],[9,-21],[10,26],[-29,44],[-13,80],[-2,55],[-35,79],[11,53],[34,26],[51,-37],[25,-9],[47,-44],[31,-20],[7,14],[57,-11],[30,-74],[14,-82],[3,-56],[9,-23],[23,-11],[16,-48],[5,-46],[33,-52],[9,-64],[15,-34],[-31,-38],[-20,-42],[-26,-24],[-16,16],[-31,4],[-43,24],[5,-48],[-23,-51],[-40,25],[-19,29],[-12,-47],[-15,-20],[-25,-2],[-17,15],[-3,87],[-11,32],[-30,-64],[13,-29],[-2,-90],[-23,-3],[-2,-31],[10,-51],[-11,-51],[-2,-62],[-17,-50],[4,-39],[-9,-64],[-10,-11],[-25,15],[-14,-103],[-15,19],[-12,52],[-7,63],[-1,109],[-10,87],[2,75],[14,48],[-3,57],[15,101],[-12,28],[-22,-1],[5,77],[-20,56],[-8,75],[2,43],[-5,91]],[[12311,84926],[43,-96],[7,-47],[14,-9],[8,-130],[19,1],[21,38],[11,-23],[20,-2],[21,-29],[54,13],[-3,-89],[25,-75],[2,-52],[21,-52],[14,-87],[17,-55],[2,-142],[21,-60],[4,-65],[-9,-2],[-5,47],[-38,120],[-10,115],[-19,37],[-9,53],[-21,0],[26,-101],[4,-34],[-13,-23],[35,-121],[23,-49],[-2,-62],[24,-113],[-19,6],[15,-102],[0,-27],[-25,-62],[-20,26],[-17,-1],[4,-34],[-21,-104],[-38,-83],[-24,-25],[-2,-33],[-31,-65],[-29,3],[-9,89],[-4,135],[21,80],[15,23],[-16,31],[-1,69],[14,6],[12,-39],[6,23],[-40,141],[-1,58],[-18,60],[-5,82],[-11,43],[8,125],[-12,81],[-3,95],[-11,91],[4,44],[-20,93],[-17,45],[-9,77],[-6,101],[3,42]],[[12292,85061],[35,-45],[27,-125],[-10,-5],[-22,115],[-23,19],[-7,41]],[[12202,85643],[15,-71],[0,-46],[-10,29],[-5,88]],[[12106,83714],[16,11],[1,26],[28,65],[-4,68],[36,64],[18,-12],[25,-85],[15,10],[18,-58],[23,-24],[38,4],[22,-14],[12,-79],[-2,-49],[-20,35],[-19,-2],[-1,-22],[21,-25],[11,-46],[29,-278],[-1,-71],[12,-56],[0,-58],[18,-142],[5,-107],[-5,-112],[-11,1],[8,-81],[3,-240],[-9,-111],[-11,6],[-28,70],[-10,86],[-21,59],[-40,212],[4,48],[22,23],[-18,30],[-26,-31],[-14,88],[-11,-15],[-17,42],[-12,55],[2,34],[-14,-22],[-10,24],[-30,2],[-19,96],[19,3],[10,-29],[10,13],[-3,105],[19,53],[6,38],[-39,86],[24,63],[-4,22],[14,35],[4,53],[-33,16],[-21,-28],[-14,79],[-26,72]],[[12097,84881],[16,18],[19,-7],[16,-52],[-29,-6],[-22,47]],[[12062,83572],[4,48],[-3,66],[25,9],[34,-62],[15,-74],[12,-19],[17,30],[23,-10],[-16,-82],[-24,-14],[-27,-161],[-12,6],[-40,-30],[-9,8],[3,102],[25,47],[1,50],[-22,4],[2,29],[-13,31],[5,22]],[[11978,85151],[9,14],[7,-59],[-16,45]],[[11978,84786],[30,41],[3,-53],[-16,-19],[-17,31]],[[11861,84371],[5,174],[16,33],[8,-9],[29,60],[3,51],[-12,92],[32,-2],[0,-54],[12,-60],[28,61],[29,-6],[17,-20],[17,49],[36,50],[14,-55],[41,-30],[25,-53],[-12,-78],[-31,-76],[4,-49],[12,-5],[8,60],[32,108],[15,12],[34,-55],[46,-10],[11,-32],[29,-16],[15,-79],[-4,-67],[-22,-44],[-37,49],[-10,-8],[12,-40],[18,-18],[33,-75],[-21,-29],[-25,-2],[4,-28],[21,-13],[23,24],[7,-95],[14,-69],[12,-143],[-14,-42],[-42,-11],[-17,12],[-44,95],[-65,99],[-27,50],[-22,-26],[-9,29],[-4,-32],[30,-55],[22,-8],[-21,-31],[6,-25],[0,-72],[-9,-50],[-31,-87],[-51,47],[-1,38],[-42,85],[-20,90],[-12,-38],[-19,43],[-10,79],[4,25],[-18,86],[2,24],[-16,57],[-26,30],[-7,49],[-25,36]],[[9331,87212],[28,-14],[12,-44],[-27,-9],[-13,67]],[[9232,87245],[16,14],[58,-26],[-3,-31],[-21,-10],[-50,53]],[[8867,87809],[26,35],[27,3],[15,-16],[-18,-53],[-50,31]],[[8817,87545],[4,86],[28,16],[21,-89],[-11,-44],[-37,-10],[-5,41]],[[8816,87079],[2,14],[43,47],[1,-36],[-40,-59],[-6,34]],[[8698,86532],[8,21],[3,71],[23,12],[-3,42],[21,54],[16,7],[-3,41],[30,34],[9,30],[43,75],[22,118],[27,44],[-3,40],[10,71],[27,34],[4,-43],[24,2],[-17,-51],[9,-17],[24,28],[8,-22],[-11,-37],[-62,-118],[-49,-129],[-8,-80],[-33,-60],[30,-57],[-19,-42],[-23,-8],[-22,15],[-17,-57],[-9,6],[-45,-47],[-14,23]],[[8692,87068],[44,270],[11,-41],[12,13],[-4,66],[44,84],[0,-54],[-12,-32],[-3,-82],[-20,-37],[20,-42],[-24,-97],[2,-46],[-17,-104],[-24,45],[-3,25],[-25,7],[-1,25]],[[8672,87628],[15,31],[17,-19],[17,-48],[-24,-45],[-25,81]],[[17950,55027],[5,31],[24,-13],[25,26],[-2,40],[18,63],[1,79],[-15,136],[-16,8],[-7,-13],[-13,25],[-3,-17],[-14,68],[7,67],[2,142],[-15,41],[9,65],[-8,51],[19,9],[28,138],[9,24],[-4,46],[4,110],[8,12],[-2,74],[-7,64],[1,51],[6,6],[-2,55],[-7,20],[28,116],[0,69],[8,28],[23,29],[10,40],[17,21],[1,19],[25,65],[-1,49],[-11,54],[-14,19],[-31,100],[-13,7],[2,58],[-26,239],[-23,63],[-7,69],[-16,57],[1,147]],[[17974,57684],[6,95],[-10,22],[21,43],[0,72],[-9,178],[-6,65],[-11,47],[-4,58],[6,36],[0,103],[-9,38],[3,39],[-7,31],[3,51],[-5,59],[4,56],[9,24],[-10,31],[-12,97],[4,43],[-7,80],[25,31],[9,29],[5,-14],[12,25],[17,-1],[2,-25],[24,19],[13,-3],[18,-71],[-2,-28],[21,-51],[24,11],[24,183],[5,15],[1,230],[-2,272],[0,437]],[[18136,60011],[200,0],[222,0],[313,1],[97,1],[160,2],[6,-7],[235,0],[162,1]],[[19531,60009],[0,-1691],[-1,-237],[1,-30],[0,-925],[-1,-608],[1,-145],[-1,-113],[0,-2847]],[[19530,53413],[-64,2],[-201,-1],[-128,-1],[-172,0],[-359,476],[-212,269],[-102,136],[-368,471],[5,66],[-5,17],[1,60],[8,16],[17,103]],[[19530,64667],[242,0],[154,2],[327,0],[66,-5],[137,-1],[242,1],[7,2],[217,2]],[[20922,64668],[282,1],[135,0],[140,0],[0,-1163]],[[21479,63506],[1,-381],[0,-434],[1,-193],[0,-1270],[1,-137],[0,-1089]],[[21482,60002],[-183,3],[-22,5],[-62,1]],[[21215,60011],[-204,-3],[-169,-5],[-184,0],[-34,2],[-301,-1],[-186,-2],[-2,9],[-152,-1],[-230,-1],[-222,0]],[[19531,60009],[0,583],[1,36],[0,738],[-5,129],[0,517],[2,216],[0,1857],[1,46],[0,536]],[[27414,45876],[14,60],[5,-33],[-14,-44],[-5,17]],[[27386,45813],[9,39],[11,4],[-5,-33],[-15,-10]],[[27310,45701],[52,90],[6,-30],[-45,-80],[-13,20]],[[27118,45540],[19,106],[20,46],[25,43],[3,23],[36,66],[38,-67],[4,-52],[14,-43],[-4,-11],[-40,-48],[-3,27],[-27,-5],[-3,-24],[-46,-73],[-36,-15],[0,27]],[[27062,45510],[39,24],[-10,-43],[-17,-14],[-13,8],[1,25]],[[27020,45533],[6,35],[12,-10],[-5,-41],[-13,16]],[[26992,48019],[5,-18],[19,-211],[8,-28],[17,-26],[7,17],[14,-21],[-14,-31],[-9,-1],[-21,50],[-7,28],[-13,115],[-6,76],[0,50]],[[26806,45614],[15,13],[4,-23],[-20,-10],[1,20]],[[26322,51623],[29,47],[0,-29],[-16,-37],[-11,-6],[-2,25]],[[26229,53027],[6,-79],[11,-52],[2,-83],[6,-75],[14,-48],[136,-25],[261,-56],[206,-51],[135,-34],[-5,-14],[2,-57],[7,-26],[-3,-71],[11,-76],[37,13],[0,75],[6,47],[3,119],[-12,91],[4,60],[-1,49],[8,16],[-4,24],[12,-8],[9,59],[15,-7],[7,-33],[17,-3],[18,-28],[7,-25],[33,-19],[17,-18],[14,15],[13,-19]],[[27221,52688],[4,-13],[-4,-113],[3,-92],[-4,-22],[10,-25],[4,-95],[1,-113],[23,-389],[13,-129],[0,-51],[28,-302],[32,-288],[29,-229],[65,-412],[38,-200],[4,-63],[10,-83],[-18,-57],[-4,-54],[-1,-87],[5,-130],[6,-96],[16,-145],[35,-269],[15,-166],[5,-84],[5,-29],[11,-140],[17,-152],[9,-66],[6,-94],[13,-109],[17,-258],[-1,-235],[-7,-175],[-5,-210],[-3,-37],[-8,-286],[0,-169],[-3,-80],[-7,-81],[0,-44],[-6,23],[3,51],[-5,20],[-16,-25],[-10,-102],[-6,-17],[-1,-64],[-8,-40],[-2,-78],[5,-33],[-2,-46],[6,-16],[-8,-53],[-8,-13],[-1,-49],[21,39],[25,194],[7,41],[0,-41],[-8,-83],[-34,-222],[-9,-82],[-25,-93],[-34,-139],[-24,-66],[-3,12],[34,122],[14,40],[7,53],[3,81],[5,32],[-6,23],[-9,-11],[-7,26],[-6,-18],[-34,-22],[-14,-41],[-9,-6],[-18,45],[-18,-13],[-7,-41],[-27,-18],[-23,-6],[-17,52],[-8,68],[2,79],[6,60],[6,-3],[-2,49],[-12,97],[-11,47],[2,34],[-8,62],[-11,32],[-5,85],[-6,18],[-11,-15],[-9,101],[-24,31],[-1,16],[-21,38],[-21,55],[-11,-13],[-8,-39],[-16,126],[-15,148],[-5,173],[-7,109],[-7,57],[-28,113],[-11,9],[-1,52],[-12,23],[0,-64],[-14,-11],[-1,66],[-8,113],[-12,51],[3,24],[13,-3],[9,-39],[11,159],[-2,86],[-8,14],[0,40],[8,10],[-4,31],[-12,-4],[-5,-33],[-11,-11],[8,-148],[-9,-20],[-20,-11],[-5,-50],[0,75],[-6,50],[-17,94],[-26,177],[-9,94],[-19,140],[-27,149],[-14,56],[-4,58],[-10,61],[10,-19],[1,-30],[15,30],[10,72],[12,28],[13,98],[13,34],[-2,23],[14,26],[11,84],[-5,75],[-22,21],[5,-113],[-22,30],[6,34],[-1,65],[-5,39],[-38,71],[1,-65],[-11,-28],[11,-37],[16,-6],[11,-110],[-10,-42],[0,-62],[-4,-27],[-21,-6],[-3,-32],[7,-38],[-9,-30],[-4,40],[2,83],[-14,85],[-9,26],[-8,58],[6,182],[-5,66],[-4,164],[9,1],[0,-93],[4,-89],[9,-7],[-4,153],[9,37],[1,41],[8,44],[0,38],[7,50],[0,39],[9,47],[1,91],[5,83],[-6,66],[2,56],[-13,29],[4,42],[-9,109],[12,64],[-21,110],[3,31],[-8,55],[-10,3],[5,33],[-1,49],[-7,13],[-47,23],[-9,-51],[-7,-4],[-9,100],[3,45],[-14,32],[-12,9],[-2,63],[-7,58],[-11,45],[-15,6],[-5,44],[-24,48],[0,111],[-4,67],[-12,7],[-10,38],[-13,17],[-13,61],[0,42],[-9,35],[-5,51],[-14,44],[-28,62],[-40,72],[-26,75],[-11,-2],[-26,-33],[-31,29],[-1,-35],[-26,-69],[9,-99],[-3,-28],[-10,-7],[-15,15],[-5,26],[-24,-22],[-31,-73],[-65,-132],[-6,2],[7,44],[-10,12],[-7,-39],[-15,-41],[-36,1],[13,-49],[2,-38],[16,-22],[30,53],[29,40],[27,84],[3,-13],[-24,-82],[-28,-43],[-35,-66],[-12,-14],[-10,33],[-16,22],[-23,51],[-19,7],[-17,-28],[-13,94],[-5,119],[8,42],[0,-105],[6,-91],[7,-22],[10,39],[1,97],[-17,105],[-18,60],[-17,13],[-15,40],[-16,71],[-27,47],[-22,69],[-41,95],[-47,76],[-58,70],[-31,20],[-62,18],[-33,-5],[-47,-25],[-65,-49],[-32,-15],[-7,10],[-63,-51]],[[26061,57664],[39,-2],[136,6],[183,1]],[[26419,57669],[196,-2],[-1,6],[143,10]],[[26757,57683],[-3,-72],[-31,-68],[-26,-105],[1,-36],[-8,-26],[3,-64],[30,-82],[17,-7],[23,-104],[23,-51],[28,16],[8,-12],[8,-64],[3,-64],[12,-30],[3,-50],[11,-52],[0,-51],[7,-68],[12,-24],[8,-67],[14,-48],[11,-101],[9,-1],[19,-72],[29,-52],[29,-98],[4,-61],[9,-41],[1,-40],[13,-38],[12,-2],[17,-37],[18,-93],[15,-26],[4,-24],[-7,-43],[4,-39],[-4,-32],[28,-82],[-4,-30],[13,-42],[11,5],[-2,-41],[8,-45],[27,-55],[9,1],[16,-58],[19,-43],[-5,-67],[12,-64],[2,-49],[9,-15],[0,-85],[4,-32],[-5,-45],[6,-8],[4,-48],[-5,-41],[12,-48],[25,-26],[0,-23],[23,-81],[-4,-34],[15,-105],[4,4],[6,-76],[-10,-44],[11,-67],[-4,-26],[5,-62],[21,-34],[11,17],[22,-71],[9,-4]],[[27376,54230],[12,-12],[-5,-64],[-14,-29],[-10,15],[-6,-48],[10,-8],[-16,-60],[-21,23],[-3,-56],[11,-11],[-9,-59],[-17,-54],[-17,13],[-3,-16],[12,-33],[8,5],[-1,-84],[-7,-62],[-28,-26],[0,-22],[17,10],[6,-24],[-23,-131],[-6,-91],[7,-13],[-5,-30],[-5,-97],[-13,-22],[-8,-59],[-9,-3],[0,-71],[-7,-69],[-7,2],[-12,-44],[13,-24],[11,24],[1,-81],[-16,-161],[5,-70]],[[25527,65491],[15,-41],[12,20],[7,-15],[-6,-40],[27,-23],[29,1],[28,25],[52,75],[31,59]],[[25722,65552],[90,-1],[198,-1],[187,1],[87,1],[0,-75]],[[26284,65477],[1,-242],[0,-1380],[-3,-437],[0,-441],[-2,-278],[0,-238]],[[26280,62461],[-19,-45],[-2,-20],[16,-71],[2,-31],[-11,-38],[3,-37],[17,-7],[4,-25],[-13,-46],[6,-44],[-22,3],[-16,-23],[-9,5],[-35,-63],[-14,-39],[-19,10],[-10,43],[-26,-7],[-16,7],[-12,-33],[4,-125],[6,-71],[-16,-40],[-7,-44],[-30,-34],[-19,-161],[-19,-39],[-14,24],[-10,-13],[-6,-63],[-16,-72],[1,-87],[-5,-70],[-8,-24],[-23,-18],[-4,-36],[-13,58],[-22,1],[-26,55],[-1,94],[-21,67],[-8,-2],[1,-34],[13,-12],[-1,-25],[-13,-2],[-8,-29],[-8,23],[-9,-29],[9,-17],[-6,-42],[-18,-9],[-2,-94],[5,-38],[-23,-9],[-2,-63],[-11,-29],[-7,24],[5,51],[-10,10],[-10,-25],[-10,22],[-12,89],[-17,-2],[-14,-52],[-29,-27],[-10,-30],[-5,-97],[-7,-27],[-11,-3],[-8,62],[-18,13],[-22,57],[-22,44],[-20,6],[-14,-37],[-14,19],[-6,49],[-8,6],[-7,-66],[11,-64],[-13,-40],[-11,3],[3,56],[-5,30],[-42,-31],[-11,52],[-9,4],[-10,-40],[10,-91],[-12,-47],[-23,32]],[[25386,60941],[-11,2],[-4,34],[12,-9],[-16,92],[24,-8],[-15,29],[15,67],[1,60],[-8,26],[19,19],[2,38],[-12,-19],[22,73],[-14,60],[-4,59],[9,-10],[9,68],[5,-35],[7,41],[8,-33],[13,102],[8,9],[13,84],[-2,38],[24,42],[0,66],[9,83],[7,32],[14,12],[14,76],[-1,42],[-15,94],[11,111],[-18,40],[1,79],[-16,55],[-3,73],[19,60],[-9,50],[2,60],[6,32],[13,9],[0,347],[-1,0],[0,397],[1,12],[0,294],[1,247],[0,1196],[1,254]],[[21479,63506],[257,-1],[104,0],[263,-1],[273,1],[163,0],[279,-1],[263,-1],[144,0],[133,0]],[[23358,63503],[16,-60],[13,-11],[1,-43],[13,6],[5,-36],[26,-14],[8,41],[24,-13],[-4,-28],[7,-33],[11,-11],[-4,-42],[-9,-1],[3,-36],[12,16],[-1,-49],[-10,-6],[-13,24],[-5,-75],[-15,-19],[-7,-41],[2,-41],[-17,-24],[1,-48],[15,-41],[1,-29],[16,-31],[12,-61],[14,0],[5,-21],[-9,-25],[6,-79],[18,-52],[-3,-28],[15,-13],[5,-31],[14,-11],[9,16],[5,-31],[20,-3],[-5,-41],[0,-444],[-1,-120],[0,-696],[-1,-52],[0,-779],[-1,-97],[0,-281]],[[23550,60009],[-249,1],[-196,-1],[-169,0],[-218,0],[-208,-1],[-258,2],[-103,0],[-154,3],[-149,-4],[-209,-4],[-155,-3]],[[30863,68384],[14,7],[-7,-35],[-7,28]],[[30827,68345],[7,83],[6,-34],[19,-55],[-15,-45],[-5,34],[-12,17]],[[30819,68560],[3,42],[11,-71],[-14,29]],[[30732,68434],[14,2],[3,-41],[-17,39]],[[30712,67988],[8,37],[1,-75],[-9,38]],[[30703,68290],[8,41],[25,45],[11,-50],[-9,-8],[14,-78],[-11,-39],[-18,-13],[-12,24],[5,25],[-3,50],[-10,3]],[[30697,68452],[13,68],[2,64],[9,25],[6,-26],[-9,-35],[1,-36],[-8,-70],[-10,-29],[-4,39]],[[30213,67064],[-35,81],[0,69],[6,42],[-41,128],[-9,53],[8,101],[-4,10],[6,88],[-6,23],[-5,313],[0,89],[-11,861],[-15,757]],[[30107,69679],[21,15],[0,33],[25,-41],[-1,-38],[7,-43],[11,-15],[13,85],[2,86],[-6,28],[12,36],[8,-3],[12,-44],[21,-9],[1,39],[-24,83],[-1,32],[22,107],[14,27],[11,43],[8,-1],[15,41],[24,38],[-9,71],[21,66],[23,45],[5,56],[-7,28],[-14,0],[0,66],[10,38],[-8,14],[15,51],[5,46],[-15,44],[16,115],[8,18],[-1,37],[17,32],[14,59],[11,8],[17,324],[215,890],[13,-3],[27,-38],[11,4],[-3,-58],[1,-141],[4,-18],[37,-73],[25,43],[26,30],[28,2],[11,52],[30,11],[25,-12],[0,62],[16,23],[25,-6],[23,-36],[4,-32],[33,-68],[36,-132],[0,-15],[28,-51],[0,-545],[3,-693],[-1,-71],[9,-30],[-15,-39],[14,-70],[-15,-34],[1,-136],[23,-18],[3,20],[10,-57],[19,-28],[30,-23],[14,19],[8,-62],[1,-56],[-13,8],[-11,-22],[7,-68],[16,-63],[-9,-73],[-10,-41],[23,-116],[0,-23],[18,-40],[13,28],[1,46],[18,-30],[19,-3],[13,-56],[6,-51],[-8,-14],[10,-32],[12,-98],[15,-38],[1,-118],[-12,-50],[-10,2],[-4,-32],[-32,-113],[-24,-25],[4,-22],[-15,-8],[6,42],[-4,85],[-27,-30],[12,-58],[-12,-43],[-11,13],[-13,-58],[-13,18],[-10,-12],[2,-35],[16,-40],[-22,-57],[-13,46],[-6,57],[-13,-10],[-3,-38],[-8,3],[-7,59],[-7,-62],[-9,-14],[-8,-74],[-7,19],[-6,-48],[-4,42],[-20,-51],[-5,27],[-12,-92],[-16,39],[0,36],[-10,-21],[-11,9],[2,-66],[-16,-71],[11,-33],[-35,-16],[-23,32],[-16,107],[6,29],[22,27],[-9,45],[-13,-35],[2,44],[-10,-3],[1,-68],[-5,0],[0,64],[-24,-56],[5,-35],[-6,-43],[14,-67],[-3,-45],[-23,-77],[9,-11],[-12,-31],[11,-56],[-5,-69],[-16,-10],[-3,85],[6,4],[-3,55],[-17,45],[-4,64],[15,51],[-19,40],[6,26],[-10,10],[-18,-21],[1,113],[11,44],[1,50],[-7,14],[-7,-46],[-14,-40],[-11,33],[-7,-32],[-15,-4],[14,-81],[-3,-48],[-12,-23],[-10,-71],[-4,-72],[-13,-78],[19,-30],[-13,-28],[10,-57],[-10,-38],[-27,4],[-13,-72],[-15,-1],[-2,-58],[-11,-9],[0,52],[7,37],[-9,15],[-3,-30],[-12,-13],[5,65],[-18,-9],[1,-52],[-16,-37],[-5,-50],[-12,51],[-2,-47],[-15,-32],[-12,26],[-3,-66],[-13,51],[-13,-92],[-23,-27],[-5,-19],[-5,83],[-16,5],[-15,-42],[-5,-39],[-20,4],[-7,-49],[-20,4],[-10,-49],[-3,-50],[5,-29],[-8,-32],[-13,29],[-22,-31],[-9,-46],[6,-67],[-8,-43],[-10,-15],[3,-33],[-14,-24],[-14,4],[-10,-25],[-11,-98],[5,-19],[-14,-80],[1,-22],[-14,-74],[-9,-13]],[[30332,65028],[13,-24],[29,5],[18,17],[12,70],[16,-105],[-1,-30],[-10,-16],[-33,4],[-41,60],[-3,19]],[[30177,65078],[18,0],[19,90],[27,60],[11,-15],[7,-70],[15,-27],[10,40],[-1,-84],[-41,1],[-31,-9],[-18,-47],[-16,61]],[[29500,66699],[224,-22]],[[29724,66677],[199,-23],[126,-12],[10,46],[21,1],[-1,62],[15,36],[19,-18],[9,62],[36,32],[15,-30],[8,13]],[[30181,66846],[2,-72],[9,-136],[25,-47],[12,42],[14,-34],[-16,-90],[-23,-7],[-38,-35],[12,-50],[-18,-50],[-7,9],[-5,-59],[-4,41],[-11,-53],[11,-74],[-13,10],[-5,-28],[8,-26],[-5,-27],[14,-14],[6,36],[14,8],[9,-47],[24,-28],[12,-42],[2,-46],[21,-93],[-1,-50],[-7,-39],[-12,-5],[3,-24],[21,-51],[12,8],[8,-24],[8,-83],[-5,-50],[13,-48],[23,-35],[34,-12],[9,-23],[19,44],[19,8],[27,33],[6,25],[-1,79],[-6,61],[-13,-31],[0,97],[-5,55],[-15,34],[-9,-7],[-5,-39],[-11,59],[13,11],[21,-18],[23,-58],[18,-123],[9,-119],[2,-137],[-15,-129],[-2,-44],[-7,9],[12,112],[-7,23],[-26,-5],[-43,-40],[-30,8],[-7,-28],[-17,-7],[-15,-62],[-33,-10],[-34,-66],[-16,-47],[-21,-28],[-23,-15],[6,26],[35,34],[16,47],[24,49],[5,40],[-2,117],[6,41],[-26,26],[0,-59],[-7,14],[-4,-50],[-14,3],[2,-32],[-31,-11],[-7,-49],[2,-44],[-6,-29],[-25,-23],[-12,17],[-10,-14]],[[30097,65246],[-3,189],[-18,18]],[[30076,65453],[-8,41]],[[30068,65494],[-10,48],[-19,33],[-5,56],[2,81],[-12,-6],[0,147],[-116,-13]],[[29908,65840],[-1,18],[-202,13],[-22,-4],[-42,6],[-3,-39],[-14,-6],[1,45],[-54,3],[-118,14],[-15,-1]],[[29438,65889],[-6,42],[34,395],[34,373]],[[22823,73980],[83,-1],[266,0],[229,-1],[0,449],[27,-37],[28,20],[29,-53],[8,-35],[14,-202],[7,-25],[18,-251],[-6,-69],[4,-54],[14,-43],[29,-45],[24,-12],[8,19],[44,-11],[11,-58],[61,-7],[48,-21],[8,-66],[-3,-49],[6,-12],[42,2],[5,15],[22,-2],[23,20],[-1,48],[33,46],[39,18],[9,-22],[53,0],[72,-98],[26,4],[1,-49],[-19,-7],[-4,-37],[16,-31],[41,13],[15,-54],[-6,-34],[6,-49],[24,-127],[25,27],[-8,84],[13,45],[15,-11],[42,16],[16,-44],[-2,-65],[17,-41],[14,9],[9,-36],[41,-9],[5,-67],[-4,-31],[20,-21],[23,13],[-3,-75],[22,28],[14,-22],[19,24],[34,17],[46,113],[17,13],[13,32],[25,30],[14,-13],[0,-67],[17,-17],[-6,-26],[10,-48],[16,-3],[35,29],[6,-29],[25,15],[26,-18],[19,13],[48,8],[29,-28],[9,-66],[34,-53],[15,35],[20,9],[13,-20],[23,6],[11,-18],[25,22],[-27,-56],[-10,20],[-4,-34],[-17,-15],[-26,-58],[-37,-34],[-14,-37],[-52,-44],[-48,-54],[-15,-6],[-42,-45],[-4,-14],[-51,-77],[-37,-79],[-72,-183],[-17,-69],[-55,-178],[-26,-72],[-26,-41],[-26,-88],[-11,-11],[-28,-83],[-10,-10],[-61,-134],[-9,-25],[8,-50],[14,-46]],[[24276,71309],[-21,50],[-14,-11],[-3,-29],[-16,-14],[9,-19],[-11,-43],[-22,16],[0,-685],[-10,-10],[-6,-59],[-24,7],[-10,-56],[-14,13],[-8,-38],[-25,-23],[-20,-47],[-20,-148],[-22,-49],[-7,-114],[1,-53],[21,-21],[10,9],[14,-32],[-1,-31],[23,-85],[-1,-50],[-15,-47],[1,-29],[-17,-49],[2,-91],[-4,-32],[6,-91],[-16,-58],[11,-34],[-2,-65],[6,-41],[-7,-42],[3,-75],[-12,-80],[5,-36],[16,-27],[31,-87],[-1,-24],[14,-16],[9,-44],[50,-9],[12,-17],[10,-78],[14,-38],[50,-51],[22,-39],[14,-40],[0,-53],[8,-15],[5,-84],[17,-45],[27,-41],[3,-29],[36,-90],[39,-29],[15,-55],[30,-136],[9,-75],[-8,-113],[2,-71],[10,-37],[-4,-44],[8,-53]],[[24498,67577],[-204,0],[-224,0],[-116,-1],[-223,0],[-180,1],[-313,0],[-199,0]],[[23039,67577],[0,1215],[1,101],[-1,302],[0,479],[-10,65],[-36,59],[-18,4],[-14,55],[-9,73],[-26,98],[5,46],[25,62],[22,39],[12,63],[14,46],[4,128]],[[23008,70412],[-4,106],[6,37],[-11,188],[-1,129],[-13,27],[-20,98],[-5,49],[-4,119],[-11,57],[-2,39],[5,68],[-6,112],[5,17],[6,117],[-6,-11],[-11,51],[1,171],[-5,92],[-2,114],[3,50],[-7,103],[1,217],[-5,3],[-7,89],[-11,92],[-8,17],[-11,101],[-3,58],[-11,34],[-5,121],[-16,101],[-3,110],[7,53],[-8,93],[3,52],[-1,107],[-7,59],[7,76],[9,24],[3,62],[-15,80],[-8,124],[-6,24],[-11,98],[3,40]],[[28860,63072],[14,65]],[[28874,63137],[9,32],[5,61],[12,42]],[[28900,63272],[17,44],[38,25],[25,45],[0,69],[16,25],[7,33],[34,72],[18,15],[12,51],[10,-8],[17,39],[-14,71],[-20,41],[-7,52],[-21,54],[-7,68],[-25,19],[-4,45],[2,95],[-10,37],[-17,-5],[-9,14],[-2,83],[7,30],[-8,22],[9,100],[11,-5],[23,113],[-24,120],[13,48],[18,29],[16,56],[-4,24],[17,35],[11,49],[14,124],[22,69],[16,13]],[[29101,65083],[88,-173],[132,-246],[3,-19],[-20,-187],[-12,-65],[-4,-65],[-6,-22]],[[29282,64306],[-7,-34]],[[29275,64272],[-37,-35],[-4,-84],[-9,-16],[-3,-50]],[[29222,64087],[0,-43],[19,-28],[16,18],[24,-44],[14,-9],[4,44],[4,-90],[-3,-107],[-14,-182],[-13,-247],[-5,-173],[-40,-241],[-11,-48],[-9,-9],[3,-32],[-10,-55],[-20,-63],[-1,-19],[-31,-55],[-32,-108],[-21,-118],[-22,-149],[-20,-60],[-19,-14],[-11,14],[6,88],[15,97],[3,69],[-21,37],[-18,4],[-6,25],[-18,-3],[-7,-36],[-9,24],[-2,47],[-18,37],[-3,30],[-10,-12],[-15,68],[-7,-8],[-18,58],[-10,56],[-19,25],[6,140],[-12,29]],[[28861,63044],[-1,28]],[[28814,58772],[18,-19],[12,-74],[1,-47],[-15,9],[2,45],[-18,86]],[[28734,57762],[8,60],[8,0],[47,86],[15,12],[14,33],[12,2],[16,35],[13,10],[5,74],[11,252],[0,54],[-8,95],[-6,105],[3,-2],[11,-106],[5,-95],[-3,-136],[-15,-286],[-24,-8],[-50,-64],[-43,-78],[-19,-43]],[[27156,59531],[84,-16],[55,-3],[95,-15],[37,4],[114,-21],[48,-2],[170,-2],[279,0],[74,4],[264,0],[106,-1],[0,10],[31,-2],[120,0],[142,0]],[[28775,59487],[2,-58],[17,-245],[16,-158],[23,-156],[35,-271],[-9,14],[-18,146],[-14,80],[-13,11],[-9,174],[-16,155],[-8,23],[3,39],[-5,89],[-10,30],[-4,48],[-25,13],[-1,40],[-13,-20],[6,-61],[16,-48],[11,10],[0,-67],[15,-135],[9,-61],[-1,-26],[11,-75],[0,-47],[-19,64],[1,37],[-13,61],[-3,38],[-12,12],[6,-38],[-3,-28],[14,-39],[-31,25],[-32,118],[-15,12],[19,-97],[10,-17],[6,-52],[-9,-23],[-24,-14],[-21,71],[7,-63],[10,-27],[-7,-14],[-31,45],[-13,5],[-5,29],[-18,24],[23,-73],[21,-23],[-7,-19],[-24,-8],[-13,-62],[-16,-22],[-17,1],[-8,31],[-20,12],[-12,121],[0,61],[12,78],[-5,13],[-14,-76],[-2,-76],[8,-94],[11,-77],[-5,-42],[8,-34],[40,10],[37,47],[9,-49],[13,6],[13,30],[26,24],[32,-1],[14,-41],[0,-43],[-14,-78],[3,-55],[2,-164],[9,5],[7,115],[3,150],[14,40],[-6,33],[14,20],[25,-21],[16,-94],[7,-65],[-4,-52],[7,-98],[-8,-25],[4,-54],[-13,-54],[-17,-10],[-6,18],[-10,-16],[-6,-40],[-10,-9],[-3,-43],[-7,-11],[-7,-71],[-13,-15],[-3,-46],[-17,-25],[-3,-24],[-26,25],[-29,-4],[-26,18],[-5,25],[-10,-14],[-15,45],[-13,115],[31,3],[5,45],[-28,-25],[-12,11],[-9,-33],[9,-57],[6,-86],[-7,0],[-29,47],[-14,-10],[-20,34],[-31,30],[-23,48],[-1,-29],[17,-61],[21,-5],[63,-102],[46,-28],[8,-31],[1,-40],[-7,-56],[-13,-54],[1,-28],[-9,-53],[-15,-42],[-50,-112],[-50,112],[1,-65],[24,-55],[36,-43],[36,80],[13,2],[27,30],[4,62],[11,-14],[3,-66],[8,-31],[18,-5],[-9,75],[20,-29],[2,-85],[-17,-75],[-18,-13],[0,-34],[-11,-20],[-14,-84],[-7,-71],[-17,20],[1,80],[-10,19],[1,-82],[-16,-7],[42,-64],[23,123],[33,120],[24,75],[47,176],[8,-21],[-28,-83],[-26,-96],[-22,-62],[-21,-78],[-18,-82],[-21,-115],[-3,-32],[-4,67],[-35,55],[-39,1],[-60,-38],[-29,-33],[-20,-32],[-32,-81],[-39,-75],[-26,-63],[-37,-113],[-14,-55],[-25,-128],[-14,-111],[-10,-112],[-9,-69],[-4,-69],[-13,7],[-3,34],[-21,21],[-23,9],[-28,-2],[-30,-12],[-35,-42],[-8,-17]],[[28030,56345],[-93,330],[-104,362],[-31,116],[-88,302],[-61,1],[-74,7],[-178,10],[4,135],[-42,199],[-30,-73],[-5,21],[7,48],[-2,53],[-55,13],[-105,16],[-188,29],[-23,-20],[-5,39],[-12,-52],[-7,9],[-20,-27],[-6,5],[-29,-47],[-28,-60],[-7,21],[-91,-99]],[[26419,57669],[9,275],[22,48],[3,-26],[28,4],[22,63],[-5,57],[9,25],[-4,44],[17,62],[13,15],[8,48],[16,8],[15,45],[80,7],[11,50],[22,32],[5,26],[10,-7],[16,48],[4,35],[16,4],[8,40],[21,29],[24,-18],[26,115],[-3,63],[10,30],[15,-36],[20,98],[33,70],[10,-40],[-5,-70],[15,-20],[28,62],[15,93],[15,35],[17,21],[12,-5],[9,33],[19,-12],[4,-50],[15,0],[14,28],[33,200],[21,53],[11,12],[8,-23],[17,0],[-10,74],[7,65],[6,12],[-4,80],[9,60]],[[20923,73979],[188,-1],[322,0],[212,0],[92,0],[193,1],[160,-1],[135,0],[141,1],[256,1],[201,0]],[[23008,70412],[-210,-1],[-186,1],[-119,1],[-252,4],[-192,2],[-179,2],[-253,1],[-123,0],[-292,1],[-173,0],[-105,0]],[[20924,70423],[0,2828],[-1,17],[0,711]],[[23550,60009],[0,-581]],[[23550,59428],[6,-130],[7,-206],[6,-127],[14,-355],[4,-82],[15,-387],[-2,-319],[-3,-261],[-1,-235],[-2,-170],[-2,-417],[-5,-642]],[[23587,56097],[-9,-25],[-19,73],[-16,-13],[-1,23],[-17,-1],[-18,79],[-15,-16],[-12,5],[-21,78],[-7,58],[-22,2],[-23,85],[-27,28],[-7,-68],[-11,-32],[-13,-7],[-34,4],[0,15],[-21,-7],[-7,61],[-10,3],[-24,-52],[-20,3],[1,-45],[-13,9],[-9,-31],[-29,61],[-1,-30],[-30,-29],[-15,13],[1,-20],[-14,8],[-8,-90],[-14,-14],[-19,19],[-7,-81],[-12,-3],[-1,22],[-17,79],[-21,-6],[-8,57],[-11,-4],[-16,30],[12,58],[-25,16],[-8,-86],[-18,-9],[-4,42],[-13,14],[-6,-33],[-9,25],[-6,95],[-5,11],[-14,-27],[-6,15],[3,-73],[-16,-57],[-13,19],[11,-42],[-13,-22],[3,-64],[-11,-31],[-11,14],[-12,94],[10,30],[-2,66],[-9,28],[-10,-19],[-2,-42],[-13,19],[-9,-7],[-11,-64],[-20,5],[-5,30],[1,63],[-12,19],[-16,-27],[-11,25],[3,41],[-19,42],[-9,-3],[-12,-58],[-29,-92],[-12,-9],[-16,34],[-9,3],[4,65],[-5,-1],[7,60],[-7,20],[-13,-14],[-19,11],[-10,91],[8,35],[-4,50],[-17,-47],[-20,22],[-15,0],[-19,28],[-11,-40],[-3,-44],[-20,-26],[-24,96],[-21,23],[-12,-37],[-21,4],[-13,26],[-13,3],[-17,24],[-19,46],[-16,-27],[-9,15],[-12,-11],[-2,20],[-18,-3],[-5,140],[-18,56],[4,22],[-16,5],[-18,57],[-4,-92],[-12,-4],[-22,47],[-17,2],[-6,-49],[-30,15],[-24,78],[-37,143],[-20,-19],[0,2257],[-123,0],[-179,0],[-150,0],[-175,1],[-210,0]],[[21214,59429],[1,119],[0,463]],[[27478,65805],[48,61],[45,74],[9,24],[10,60],[13,3],[3,-28],[36,72],[47,74]],[[27689,66145],[0,-314],[1,-2],[247,-1],[77,3],[167,-2],[243,1],[105,3],[111,-4],[169,-1],[107,2],[14,-59],[5,4],[8,-100],[15,4],[27,-34],[10,-49],[-8,-32],[14,-21],[2,-159],[-8,-12],[25,-113],[1,-34],[11,5],[15,-33],[-2,-18],[25,3],[3,-22],[16,8],[-1,-30],[13,-55]],[[28900,63272],[-23,37],[-22,6],[-24,-20],[-15,-34],[-20,-82]],[[28796,63179],[-217,-1],[-118,-1],[-151,0],[-236,3],[-305,-2]],[[27769,63178],[-167,0],[-124,0],[0,1068]],[[27478,64246],[0,1559]],[[20920,69320],[5,4],[0,872],[-1,227]],[[23039,67577],[-40,0],[5,-22],[-7,-37],[22,-64],[-1,-110],[-14,-5],[8,-52],[-3,-31],[24,-3],[2,-83],[9,-35],[-7,-66],[-14,-16],[5,-56],[-8,-28],[6,-21],[-12,-46],[0,-80],[-11,-16],[-3,-52],[-11,-26],[1,-76],[15,-27],[17,-60],[10,-87],[-4,-45],[13,-31]],[[23041,66402],[-17,-7],[-5,30],[-24,-5],[-7,53],[-21,66],[7,52],[-11,16],[-21,3],[-1,40],[-28,35],[-12,-17],[-8,48],[-43,13],[-5,28],[-18,20],[-1,38],[-25,25],[-15,-14],[-15,13],[-7,-23],[-18,14],[-16,-13],[-16,11],[-18,-17],[-25,9],[-20,21],[-8,-11],[-9,-74],[-12,-29],[-19,-9],[-31,69],[-36,62],[-58,85],[-9,59],[-112,0],[-186,-1],[-153,1],[-214,-1],[-206,-2],[-62,4],[-178,0],[-143,1],[-293,1]],[[20922,66996],[0,345],[-1,8],[0,1828],[-1,143]],[[23587,56097],[8,8],[0,-54],[11,-25],[9,6],[-2,-36],[10,-9],[5,27],[8,-18],[3,29],[21,-27],[11,46],[12,-17],[5,-30],[6,21],[16,-22]],[[23710,55996],[0,0]],[[23710,55996],[1,-11],[0,-608]],[[23711,55377],[0,-1196],[8,-12],[11,-72],[18,-31],[9,-83],[15,-55],[-2,-34],[8,-56],[-7,-42],[3,-45],[-7,-28],[6,-51],[9,-32],[13,-6],[3,-35],[-6,-27],[14,-36],[-1,-32],[8,-15],[3,-49],[-6,-53],[12,-47],[6,2],[6,-113],[19,12],[-6,-102],[8,-31],[2,-54],[-13,-21],[-1,-33],[12,-55],[-9,-22],[-3,-38],[4,-63],[-9,-33],[-9,-63],[-3,-73],[-12,-25],[-2,-68],[-14,-30],[-3,-40],[7,-24],[5,-91],[-13,-51],[-6,-74],[16,-52],[1,-53],[-5,-39],[9,-79],[-12,-70],[9,-19],[-11,-51],[-14,-39],[-7,-78],[-13,-74],[-17,-45],[-2,-25],[9,-30],[17,-94]],[[23768,51502],[0,-14],[-46,3],[-37,-40],[-128,-208],[-28,-61],[-10,-54],[-15,7],[22,71],[9,47],[13,-1],[9,19],[8,46],[9,-16],[11,8],[-15,55],[-54,-54],[-8,26],[17,90],[4,80],[0,74],[-12,5],[-5,23],[-17,-29],[-10,-41],[-4,-50],[-15,-24],[-6,46],[-18,-45],[-2,-35],[9,-32],[-10,-50],[10,-55],[20,-17],[-6,-54],[11,-20],[2,-78],[-2,-67],[-8,-31],[-9,10],[-19,-71],[-22,-65],[-3,26],[-13,-8],[-2,-88],[6,-26],[13,44],[26,65],[3,19],[32,99],[15,23],[0,45],[26,-15],[-20,-61],[-62,-153],[-24,-69],[-4,-25],[-32,-91],[-40,-143],[-15,-8],[-69,-146],[-35,-80],[-53,-89],[-61,-112],[-34,-87],[-13,-42],[-15,-74],[-53,-111],[-24,-68],[-47,-155],[-32,-143],[-11,-83],[-14,-59],[-33,-221],[-24,-197],[-11,-127],[-10,-192],[-2,-108],[1,-103],[8,-205],[14,-207],[12,-134],[16,-229],[11,-260],[-7,47],[-5,147],[-12,189],[-11,152],[-24,16],[18,27],[-9,83],[-6,87],[-9,88],[-3,106],[1,138],[-1,122],[11,276],[16,180],[19,148],[14,70],[10,87],[8,35],[-2,47],[13,86],[18,38],[9,45],[18,127],[28,58],[8,53],[16,2],[35,105],[23,49],[24,23],[-4,43],[9,29],[-9,16],[-16,-41],[-20,-35],[-11,-40],[-17,-5],[-6,40],[0,60],[-18,12],[-6,-31],[0,-84],[-5,-25],[6,-41],[-4,-36],[-20,-56],[-17,-61],[-8,-1],[-18,30],[-3,43],[-32,-61],[-17,-67],[21,-22],[24,57],[8,-74],[-7,-23],[-38,-223],[-12,-2],[-6,55],[-21,-10],[-4,18],[-32,-11],[-11,12],[-6,-38],[12,-32],[15,-1],[11,17],[-4,-64],[7,-48],[15,-34],[17,-18],[-19,-146],[-13,-185],[-12,-106],[-20,-27],[-7,-27],[-11,18],[14,21],[3,59],[-8,3],[-6,-31],[-29,-75],[4,-32],[24,-16],[25,38],[8,2],[-5,-116],[3,-4],[-4,-202],[-6,-207],[-4,-3],[10,-230],[8,-65],[1,-84],[9,-1],[23,-215],[5,-29],[-9,-47],[4,-34],[-1,-62],[8,-72],[20,-11],[1,-35],[12,18],[2,-127],[-23,7],[-13,-8],[0,-19],[-21,-12],[-6,-99],[-20,11],[-7,40],[-15,3],[-6,55],[-11,4],[-18,98],[-31,12],[-11,33],[-17,-9],[-7,16],[-23,-17],[-4,18],[-13,-1],[-3,-29],[-10,31],[-20,-14],[-8,22],[-6,-22],[-14,20],[-8,30],[3,25],[-16,1],[-3,44],[-15,-1],[-21,75],[-9,-11],[-25,48],[-19,-22],[-13,35],[-15,69],[-10,8],[-2,33],[-8,12],[-18,-15],[-21,47],[-12,-3],[-8,20],[-12,-19],[-9,44],[6,50],[-10,56],[-11,13],[-3,98],[-6,42],[-3,79],[-8,25],[-1,49],[-7,64],[-17,43],[2,31],[-13,26],[-7,37],[5,20],[-11,46],[-9,7],[-1,52],[6,31],[-3,66],[4,29],[-4,86],[-16,25],[1,37],[-12,11],[9,30],[5,86],[-3,31],[4,60],[-13,10],[5,76],[-12,58],[-7,-14],[-7,46],[-9,-18],[-9,39],[-10,-6],[-18,90],[-9,11],[-3,38],[-8,-9],[-10,38],[0,50],[-7,26],[3,41],[-13,48],[2,47],[-17,16],[-7,81],[-10,23],[-8,70],[-35,53],[-4,53],[-7,-2],[-13,59],[2,38],[-17,100],[3,47],[-9,39],[9,29],[-12,11],[-9,47],[4,39],[-14,28],[1,33],[-15,28],[-4,51],[2,41],[-8,26],[-4,73],[-6,1],[-9,88],[-8,1],[-6,47],[1,76],[-7,106],[-18,46],[-10,40],[3,14],[-9,71],[-23,41],[-2,30],[-17,46],[-18,25],[-13,84],[0,21],[-26,21],[-6,44],[-23,7],[3,57],[-2,65],[-5,5],[-6,-67],[-6,27],[2,53],[-17,27],[-13,108],[-8,-4],[-9,32],[-13,-25],[-7,44],[-8,-27],[-37,-13],[-19,31],[-6,-8],[-15,22],[-22,-14],[-12,24],[-17,-7],[-4,-22],[-26,21],[-11,50],[-13,-3],[-20,40],[-14,-18],[-10,-111],[-34,19],[-9,-37],[-7,11],[-22,-32],[-7,10],[-8,-54],[2,-23],[-13,-40],[0,-50],[-7,0],[-2,-59],[-11,-30],[1,-33],[-7,-58],[2,-52],[-5,-48],[-10,-5],[-3,-72],[-5,-37],[10,-22],[-5,-38],[-18,-38],[-10,8],[-7,-67],[-17,-43],[-7,-36],[-4,-84],[-14,-8],[-17,15],[-15,-11],[-14,46],[-27,24],[-27,111],[-24,33],[-10,-8],[-22,38],[-18,77],[-13,24],[-39,21],[-17,28],[-19,61],[-11,12],[-19,81],[0,24],[-14,47],[-21,7],[-12,27],[-5,34],[-30,78],[-9,43],[-7,110],[-12,56],[-7,60],[-13,63],[0,59],[-7,57],[6,72],[-3,54],[2,55],[-7,68],[-11,30],[-3,44],[-13,39],[-1,30],[-13,34],[2,33],[-13,177],[-7,40],[-12,4],[-11,91],[-15,0],[-14,66],[-12,10],[-3,24],[-15,34],[-12,-4],[-7,28],[-31,39],[0,39],[-44,118],[-13,107],[-12,37],[-18,26],[-9,33],[-9,2],[-2,36],[-24,106],[-20,35],[-4,54],[-14,32],[-21,7],[-35,78],[-11,88],[-10,24],[-6,68],[-13,89],[-9,41],[-19,38],[-11,-19],[-11,41]],[[20232,53938],[-5,28],[-16,20],[1,23],[-10,25],[-3,38],[7,18],[1,101],[331,0],[250,-1],[226,0],[183,1],[0,1212],[2,254],[0,149],[2,417],[2,232],[0,1518],[1,434],[0,809],[-1,213],[11,0]],[[20922,66996],[0,-2328]],[[19530,64667],[-136,-2],[-143,-1],[-52,-3],[-133,1],[-93,2],[0,442],[1,219],[-1,508]],[[18973,65833],[0,676],[1,163],[0,1090],[-1,26],[0,516],[-1,267],[1,140]],[[18973,68711],[-2,175],[-1,282],[1,156],[75,2],[22,-12],[85,2],[11,8],[45,-5],[25,8],[87,-2],[194,5],[11,-7],[221,0],[316,0],[14,-4],[144,-2],[178,-1],[23,7],[132,0],[251,-2],[115,-1]],[[29908,65840],[0,-107],[3,-222],[0,-150],[-3,-209],[-12,-8],[3,-76],[-8,-29]],[[29891,65039],[-7,19],[-17,2],[-21,-24],[-18,3],[-13,-24],[-16,28],[-6,-37],[-49,-35],[-3,20],[-15,0],[-27,-33],[-6,21],[-26,1],[-7,-26],[-18,23],[-40,-27],[-3,60],[-9,-17],[-19,-82],[-12,0],[-22,-73],[-13,23],[-24,-58],[-7,13],[-23,-28],[5,-22],[-10,-32],[-29,-11],[-22,-54],[-9,15],[-15,-35]],[[29390,64649],[1,33],[-20,102],[68,130],[-19,97],[4,161],[5,295],[9,422]],[[23231,64184],[167,-9],[159,-8],[156,3],[130,8],[62,0],[197,12],[152,13],[101,14],[12,-38],[1,-33],[18,-14],[-1,-36],[16,-57],[10,-2],[1,-56],[11,-31],[19,-7]],[[24442,63943],[-8,-18],[-17,-144],[-2,-71],[6,-165],[14,-99],[7,-28],[-8,-66],[5,-38],[15,-34],[4,-28],[-3,-61],[26,-77],[15,-57],[11,-14],[10,-69],[13,-8],[11,-76],[16,-54],[59,-137],[20,-90],[3,-90],[8,-78],[-9,-36],[11,-85],[3,-65],[22,-69],[11,7],[11,32],[9,66],[19,4],[27,-45],[16,-5],[38,-82],[-2,-60],[-12,-29],[-13,-59],[10,-92],[-2,-37],[-22,-96],[-6,-99],[-17,-68],[-7,-52],[-1,-78],[5,-70],[18,-50],[20,-89],[25,-37],[11,-54],[8,0],[17,-60],[16,7],[3,-27],[-12,-24],[6,-50],[20,-5],[10,31],[13,-28],[1,-29],[15,-12],[23,-70],[-2,-40],[14,-3],[9,-42],[19,-24],[0,-57],[11,-68],[-13,-8],[2,-50],[26,-161],[-4,-62],[-15,-12],[-8,-56],[17,-53],[-1,-47],[13,-87],[11,-46],[-1,-53],[24,-56],[10,27],[-15,45],[14,12],[17,-56],[8,-53],[11,14]],[[25079,59990],[9,-21],[-5,-90],[-6,-46],[-10,-9],[-1,-38],[17,-37],[-3,-28],[-16,3],[-4,-44],[11,-58],[-8,-29],[-7,-71],[-13,-18],[-18,78],[-13,-13],[-13,-142]],[[24999,59427],[-8,-40],[-13,7],[2,31]],[[24980,59425],[6,38],[-5,49],[-21,2],[-4,-30],[9,-58]],[[24965,59426],[6,-22],[-7,-64],[10,-59],[-5,-37],[-24,-1],[0,-37],[21,-39],[1,-27],[-15,-15],[-30,16],[-3,-21],[28,-74],[1,-61],[-22,-40],[-3,-75],[-12,-23]],[[24911,58847],[-179,-6],[16,110],[23,58],[0,23],[15,53],[16,28],[3,43],[9,7],[5,133],[-22,44],[3,15],[-5,71],[-349,-1],[-323,1],[-141,0],[-222,1],[-210,1]],[[23358,63503],[-31,56],[8,79],[-24,76],[-2,77],[-20,19],[1,32],[-18,26],[-12,110],[1,39],[-11,34],[-1,40],[13,42],[-11,18],[-1,-33],[-20,3],[1,63]],[[26900,61666],[18,-20],[35,40],[23,11],[5,49],[3,98],[12,28],[16,-7],[6,30],[-3,101],[-10,105],[21,52],[0,67],[14,88],[12,27],[6,37],[13,-40],[11,-1],[12,-79],[-8,-40],[11,-20],[9,22],[3,42],[9,20],[9,-25],[4,111],[-10,29],[-3,43],[19,19],[-3,96],[8,41],[10,12],[3,55],[31,-7],[3,83],[25,76],[17,-19],[6,-52],[11,3],[21,47],[17,8],[11,54],[11,8],[8,48],[16,57],[30,89],[16,9],[4,83],[10,26],[-11,50],[12,48],[0,57],[10,23],[-4,60],[13,-11],[-2,52],[7,20],[0,122],[9,30],[0,58],[10,48],[5,61],[10,23],[5,65],[-3,95],[4,71],[-9,84],[-11,44],[9,50],[14,-1],[18,27]],[[27769,63178],[-3,-600],[10,7],[33,103],[12,-1],[10,67],[31,60],[13,75],[11,-2],[28,-36],[11,54],[38,158],[13,-10],[-13,-14],[13,-18],[2,-26],[20,-34],[17,1],[7,-18],[28,-4],[14,38],[-7,49],[13,-1],[-11,32],[14,-11],[9,37],[19,-23],[28,87],[24,-20],[17,-49],[8,-40],[18,20],[17,-23],[14,4],[0,-37],[-16,-15],[12,-69],[19,-41],[-2,-33],[9,-12],[5,-43],[-6,-63],[10,-14]],[[28258,62713],[-9,-45],[-21,-175],[-78,209],[-66,179],[-4,-62],[5,-28],[-6,-36],[7,-11],[-23,-106],[6,-15],[-11,-54],[10,-36],[-16,-62],[-7,-7],[-24,-88],[6,-16],[-14,-63],[-7,21],[-15,-66],[-10,-24],[0,36],[-23,-71],[-20,-130],[-35,101],[-9,-69],[-17,-82],[-1,-71],[-8,1],[-10,-57],[-15,-138],[-28,-94],[-46,53],[-17,109],[-31,47],[-14,-121],[3,-65],[-12,-60],[-22,-87],[6,-44],[-12,-21],[-25,-81],[-7,-56],[6,-29],[-8,-30],[-6,-60],[-10,-51],[-18,-51],[-30,-104],[-21,-112],[2,-36],[-12,-39],[4,-41],[17,-34],[-12,-40],[-18,-34],[-1,-32],[13,-4],[-4,-29],[-49,-99],[-10,68],[-12,-9],[-19,-47],[-41,-71],[-4,26],[-21,38],[-7,-51],[9,-43],[-19,-47],[-17,-5],[-37,-27],[-31,-51],[-27,75],[-11,45],[-8,-21],[-8,-55],[-23,-17],[-2,-30],[-13,-29],[-34,-7],[-19,48],[0,24],[-12,25],[-18,3],[-7,52],[-14,31],[-2,90],[-15,22],[-1,33],[18,34],[-11,29]],[[27075,60636],[-14,-4],[-28,30],[-3,37],[-8,1],[-7,40],[-9,-2],[-7,42],[-15,11],[-13,134],[-10,19],[-13,61],[1,34],[-15,19],[-8,39],[11,55],[-15,22],[-9,80],[-10,45],[-15,37],[0,38],[8,0],[3,55],[-4,20],[11,33],[1,58],[-8,36],[1,90]],[[24442,63943],[12,16],[-2,50],[4,90],[-11,35],[13,69],[31,43],[18,-1],[18,41],[1,61],[6,49],[1,67],[10,27],[14,66],[11,19],[6,106],[-1,98],[-13,75],[-13,6],[-20,85],[11,77],[2,74],[6,55],[19,21],[13,-15],[23,40],[31,-6],[24,17],[16,56],[10,13],[26,-1],[18,57],[16,21],[-1,66],[9,59],[0,52],[9,29],[28,49],[-1,41],[8,72],[-3,58],[7,61],[-7,37],[1,89],[-13,41],[-47,73],[-15,74],[3,60],[-16,63],[-22,37],[-2,26],[-22,35],[0,47]],[[24658,66423],[45,-2],[227,-2],[51,-5],[194,-11],[41,4],[152,1],[82,-5]],[[25450,66403],[-2,-124],[-8,-97],[10,-109],[21,-117],[12,-37],[3,-54],[13,-139],[4,-75],[14,-93],[8,-20],[2,-47]],[[25386,60941],[-8,-66],[-17,-35],[-11,-56],[7,-105],[20,-68],[-6,-50],[-48,-19],[-12,-11],[-18,-52],[-14,26],[-18,-44],[-2,-55],[-9,-65],[2,-25],[17,-65],[7,-66],[-10,-89],[-15,-10],[-13,13],[-19,52],[-35,40],[-14,39],[-31,42],[-19,5],[-13,-21],[-13,-42],[-9,-65],[-16,-52],[-4,-55],[14,-52]],[[20232,53938],[-214,0],[-254,0],[0,-524],[-234,-1]],[[24911,58847],[4,-38],[18,-49],[0,-45],[-24,23],[-9,-49],[20,-36],[-11,-33],[-11,-1],[-9,-52],[-17,-22],[-9,21],[-15,-41],[6,-68],[9,-17],[12,23],[3,-38],[-26,-42],[1,-53],[9,-10],[-3,-40],[-22,56],[-9,-9],[-5,-58],[9,-42],[-11,-75],[-8,88],[-23,-67],[-3,-46],[12,-6],[2,43],[15,-35],[-9,-47],[0,-45],[-16,-10],[4,-47],[15,-7],[6,-29],[-12,-43],[15,-58],[-10,-25],[-12,21],[-9,-26],[-9,-100],[-25,13],[-3,-49]],[[24751,57677],[17,-55],[0,-45],[-18,-44],[-31,-44],[-4,59],[-11,2],[-2,-29],[8,-44],[-5,-25],[6,-72],[-14,-19],[-5,34],[2,57],[-10,-27],[2,-35],[-7,-14],[6,-40],[20,-2],[2,-31],[-14,-50],[-11,18],[1,49],[-10,-21],[0,-64],[12,-61],[1,-27],[-13,-51],[6,-83],[-25,-57],[0,-63],[-10,1],[3,54],[-19,-1],[-5,-27],[8,-45],[-7,-30],[-19,-15],[-4,-71],[-16,43],[-9,-29],[14,-43],[20,1],[2,-25],[-13,-28],[-16,33],[-12,-32],[9,-51],[11,3],[3,-24],[-8,-61],[-24,-6],[7,-45],[-11,-16],[-5,43],[-16,-23],[-3,-29],[22,-34],[-18,-78],[7,-55],[16,-26],[-10,-34],[-8,18],[-24,-2],[-1,-59],[10,-26],[13,14],[8,-50],[-12,-18],[-16,22],[-7,35],[-17,-16],[-2,-28],[25,-51],[2,-33],[-28,-41],[13,-63],[-14,-80],[18,16],[-1,51],[14,-27],[-4,-54],[-17,-10],[-3,-19],[10,-24],[17,14],[10,73],[5,-32],[-23,-90],[0,-64],[12,-68],[3,42],[10,13],[2,-23],[-13,-52],[2,-75],[-3,-23],[-14,-8],[-11,14],[-5,-39],[23,-62],[-13,-59]],[[24512,55359],[-219,4],[-154,5],[-157,7],[-86,0],[-185,2]],[[16868,55911],[16,-5],[28,-53],[21,-22],[1,-25],[16,-61],[-5,-43],[-13,25],[-26,7],[-6,35],[0,74],[-20,16],[-12,52]],[[16867,55390],[9,4],[22,-117],[40,-130],[-10,4],[-11,-22],[-17,44],[-13,72],[-14,119],[-6,26]],[[16741,55926],[8,7],[1,-41],[-11,7],[2,27]],[[16637,56552],[8,-17],[11,14],[0,-30],[-17,-4],[-9,21],[7,16]],[[16596,55679],[14,7],[20,-35],[8,-31],[-13,-15],[-20,21],[-9,53]],[[16501,56608],[18,-7],[13,-22],[15,5],[19,-43],[19,-4],[7,39],[20,-20],[-11,-43],[-28,-11],[-17,-31],[-42,24],[-1,61],[-12,52]],[[16410,56520],[22,8],[9,21],[13,-8],[13,19],[0,-48],[18,-13],[1,-48],[-41,-54],[-16,37],[-19,86]],[[16354,56562],[16,17],[6,28],[6,-35],[13,-26],[-21,-6],[-20,22]],[[15305,65829],[155,-4],[9,6],[77,-1],[56,12],[28,-8],[115,2],[37,5],[95,-1],[45,-5],[154,-8],[114,-4],[197,0],[92,2]],[[16479,65825],[0,-1]],[[16479,65824],[0,-1448],[1,-34],[0,-756],[-1,-393],[-1,-13],[0,-457],[-1,-122],[2,-263],[26,-77],[115,-330],[114,-336],[63,-182],[99,-298],[125,-377],[62,-186],[127,-394],[313,-989],[234,-759],[70,-234],[147,-492]],[[17950,55027],[-416,-126],[-254,-89],[-3,98],[-9,62],[-8,20],[-14,-23],[-3,66],[1,71],[-8,41],[9,61],[-9,161],[-13,127],[-9,54],[-40,193],[-25,61],[-10,51],[-15,37],[-9,-2],[-19,95],[-26,59],[-14,15],[-20,57],[-25,88],[-24,39],[-2,-47],[-21,-23],[-18,14],[-10,25],[-15,6],[-4,38],[9,34],[1,43],[-14,116],[-11,64],[-17,50],[-35,1],[-22,-8],[-16,-36],[-14,38],[-28,16],[-37,59],[-12,2],[-24,53],[-17,141],[-10,10],[-17,53],[-4,-3],[-20,65],[-21,25],[-6,20],[-32,4],[-16,-24],[-18,25],[-22,-10],[-37,60],[-23,0],[-15,15],[-44,-7],[-48,-22],[-1,31],[-13,66],[-16,30],[-12,-4],[-6,32],[13,143],[-11,60],[8,119],[-17,54],[9,115],[1,140],[-18,56],[-14,7],[-3,-21],[-27,55],[-11,48],[10,131],[-2,50],[-11,53],[-27,14],[-27,102],[-18,101],[-24,25],[-17,66],[-5,81],[-16,47],[-7,37],[-14,35],[-6,99],[-5,35],[-20,29],[-15,104],[-25,94],[-33,64],[-11,45],[-8,80],[1,42],[-11,101],[2,92],[-11,16],[10,74],[18,-38],[9,30],[7,61],[8,141],[-21,149],[-12,43],[-10,11],[-9,-28],[-37,2],[-28,68],[-22,102],[-14,18],[-2,31],[-17,60],[-4,62],[5,129],[-12,89],[-2,52],[-12,14],[-6,33],[-1,64],[5,27],[2,77],[-6,134],[14,28],[16,8],[6,-24],[7,-88],[-9,-9],[11,-107],[-2,-27],[27,-23],[27,-80],[8,5],[14,-63],[12,3],[-6,40],[-12,19],[-10,87],[-7,109],[-21,54],[-2,46],[-22,26],[9,74],[-7,68],[-15,-1],[-14,68],[8,-9],[9,26],[0,40],[19,-2],[10,39],[-10,71],[-26,44],[-13,-30],[-14,-6],[2,-47],[-5,-46],[15,-51],[-12,-25],[-4,-44],[19,-56],[-7,-14],[-11,29],[7,-71],[-15,-16],[-9,38],[-26,61],[-13,-12],[-23,67],[-10,53],[-17,33],[-16,8],[-20,-33],[14,127],[3,48],[-12,92],[7,20],[-16,70],[-11,-10],[-1,67],[-17,106],[-20,51],[-14,19],[-22,64],[-37,176],[-14,29],[-8,41],[-31,90],[-24,116],[14,78],[-1,42],[-14,126],[-16,123],[-7,105],[3,99],[13,132],[-5,52],[0,65],[-14,92],[-4,108],[-16,36],[-6,55],[-35,133],[-7,6],[0,43],[-8,43],[-22,32],[-49,151],[4,63],[-4,70],[-13,74],[9,98],[14,109],[42,265],[11,95],[7,119],[-12,37],[-1,97],[4,2],[11,99],[12,244],[-5,126],[-15,128],[-8,96],[-9,-4],[-17,54],[10,74],[5,110],[-3,67]],[[28861,63044],[-1,28]],[[28874,63137],[-6,7],[-22,-81],[2,-39],[11,-31],[1,-49],[-8,-28],[0,-41],[14,-52],[7,-58],[21,-62],[10,-68],[3,-58],[-5,-35],[2,-126],[16,-48],[7,-43],[2,-74],[34,-137],[16,-29],[10,24],[4,-36],[5,-129],[4,-244]],[[29002,61700],[-105,1],[-74,9],[-2,72],[-25,1311],[0,86]],[[28426,62262],[21,70],[37,-118],[-36,-118]],[[28448,62096],[0,93],[-22,73]],[[6433,39922],[2,44],[19,76],[12,7],[13,93],[16,52],[3,58],[-17,94],[-4,45],[-1,105],[8,37],[18,-9],[18,-32],[3,-32],[22,-44],[15,-47],[12,6],[25,-32],[39,-77],[13,-19],[22,-61],[16,-57],[17,-76],[-3,-47],[1,-90],[8,-10],[16,12],[7,-57],[-1,-57],[22,-82],[22,-39],[5,-21],[-4,-44],[-13,-51],[-17,-47],[-14,-56],[-23,-38],[-20,-47],[-20,-18],[-16,15],[-9,-9],[-18,-66],[-16,-25],[-13,-48],[-14,-16],[-12,-59],[1,-33],[-8,-37],[-5,-59],[-20,-63],[-15,61],[-22,52],[-22,29],[-10,95],[5,113],[4,151],[-10,106],[1,46],[-9,12],[-5,114],[-7,66],[-9,8],[-8,108]],[[6254,41293],[5,69],[11,56],[14,6],[13,-33],[10,-78],[10,-50],[24,29],[18,35],[26,-21],[0,-16],[17,-51],[10,-15],[5,-40],[31,-37],[5,-32],[0,-52],[-8,-43],[-13,-40],[-6,3],[-17,-36],[-14,10],[-30,-53],[-21,-9],[-17,26],[-7,210],[-7,20],[-14,-24],[-26,50],[-13,58],[-6,58]],[[6253,40841],[7,29],[28,57],[10,-30],[-4,-44],[5,-17],[-13,-19],[-5,15],[-18,-23],[-10,32]],[[6153,41274],[7,27],[13,5],[26,-19],[17,-60],[8,-51],[-9,-65],[-19,-29],[-17,-5],[-7,60],[-3,73],[-14,32],[-2,32]],[[6084,41504],[6,52],[9,29],[-2,58],[17,-2],[3,-14],[54,-29],[10,34],[4,-42],[22,-13],[27,18],[17,-25],[-8,-55],[-18,-51],[-20,-21],[-35,32],[-26,31],[-15,-14],[-29,-5],[-16,17]],[[5814,42059],[43,9],[13,49],[4,35],[13,48],[14,15],[6,-27],[6,-70],[20,-84],[4,-52],[-4,-15],[3,-47],[18,-55],[3,57],[12,-2],[-4,-64],[8,-24],[-1,-29],[17,-70],[-12,-37],[-11,18],[-21,-29],[-6,26],[-17,31],[-25,11],[-30,-20],[-7,4],[-7,84],[-11,34],[-1,31],[-14,67],[0,61],[-13,45]],[[5394,42585],[1,40],[11,38],[4,49],[33,72],[8,26],[23,-18],[3,25],[16,-11],[8,14],[15,-20],[10,-37],[5,-45],[0,-46],[-11,-63],[1,-106],[-4,-28],[-28,-78],[-8,15],[-36,12],[-18,71],[-24,29],[-9,61]],[[5266,42374],[4,43],[12,44],[19,45],[2,38],[11,9],[2,-31],[-5,-57],[2,-36],[-20,-28],[-16,-97],[-12,30],[1,40]],[[24498,67577],[-5,-52],[10,-50],[-1,-74],[27,-41],[13,-76],[-18,-60],[-6,-52],[-9,-24],[1,-108],[8,-88],[0,-68],[12,-25],[13,-169],[33,-64],[47,-37],[17,-20],[18,-109],[0,-37]],[[23231,64184],[4,28],[-10,56],[-13,16],[-15,58],[2,37],[13,35],[-4,83],[10,51],[-7,27],[2,66],[-9,20],[1,42],[-7,30],[5,27],[-5,93],[12,17],[-24,24],[4,37],[-5,63],[13,41],[-20,27],[7,29],[-1,116],[-20,10],[2,77],[-9,1],[-2,-37],[-15,28],[3,56],[-11,39],[7,39],[-8,41],[11,18],[-6,54],[8,20],[3,46],[-12,23],[-1,38],[-14,61],[6,11],[3,66],[-16,6],[1,30],[-15,11],[5,16],[-15,25],[1,83],[-22,56],[-3,48],[10,25],[-14,103],[-11,29],[0,76],[9,44],[-4,44],[-14,8]],[[26280,62461],[18,48],[7,-2],[15,-54],[21,-28],[14,29],[14,-3],[8,29],[8,-8],[4,-69],[29,-32],[10,-84],[16,-83],[0,-66],[5,-26],[40,-41],[33,19],[29,-46],[3,-34],[15,-26],[5,-50],[28,-29],[14,66],[26,22],[15,-32],[28,-20],[11,-24],[5,-43],[13,24],[30,-1],[10,53],[18,34],[9,39],[15,0],[21,32],[7,-33],[-3,-44],[9,-111],[13,-37],[21,-6],[21,-79],[13,-35],[2,-44]],[[27075,60636],[-108,-317],[-37,-39],[-22,-41],[-19,-49],[-25,-45],[0,-86],[-16,-39],[-12,-2],[-12,-33],[3,-59],[-6,-45],[-25,-36],[-29,-4],[-16,-80],[-2,-50],[-16,-4],[-33,-35],[-39,-52],[-21,2],[-33,-49],[-8,-27]],[[26599,59546],[-4,-21],[-83,8],[-79,2],[-76,5],[-83,11],[-51,16],[-74,9],[-55,-14],[-96,8],[-56,10],[-83,22],[-49,4],[-16,-22],[-7,22],[-146,-12],[-92,-2],[-114,-8],[1,35],[-61,17],[10,-147],[-6,-64],[-137,6],[-126,0],[-84,6],[-33,-10]],[[24980,59425],[-15,1]],[[28739,61120],[-14,0]],[[28725,61120],[-1,72],[8,28],[11,-40],[-4,-60]],[[28711,61320],[2,79],[11,13],[7,-30],[5,-118],[-15,21],[4,27],[-14,8]],[[28627,62072],[5,20],[5,-46],[-10,26]],[[29002,61700],[-1,-43],[-9,-105],[-5,-15],[-20,-211],[-18,-120]],[[28949,61206],[-107,-38],[-6,-55],[-6,4]],[[28830,61117],[-13,30],[-19,-4],[-22,-64],[-9,-1],[-1,67],[7,70],[17,28],[-17,2],[2,45],[11,40],[-21,9],[-12,-33],[-4,28],[5,58],[26,27],[-6,39],[-9,-13],[-4,36],[15,112],[-15,-24],[-7,-47],[0,-60],[-8,-1],[-11,77],[11,9],[-1,53],[-8,10],[-4,-49],[-9,-33],[6,-27],[-9,-62],[-4,29],[-17,-23],[-9,12],[-16,83],[-9,13],[2,43],[-24,151],[20,14],[5,39],[-8,-7],[-9,51],[8,40],[12,22],[6,-25],[12,26],[1,-36],[22,-9],[13,-39],[4,10],[-16,69],[-17,14],[-8,42],[-7,-3],[-16,77],[-5,-28],[-12,20],[-1,-59],[-7,8],[3,101],[18,92],[14,-45],[8,10],[-3,124],[-8,17],[-17,-47],[-12,4],[1,-48],[-12,-17],[4,104],[16,101],[7,-51],[21,-11],[11,31],[-6,54],[11,55],[-16,-9],[-3,-52],[4,-31],[-12,17],[3,63],[-6,59],[-7,14],[16,136],[12,42],[-2,24],[14,25],[7,37],[30,-6],[-11,24],[18,70],[-10,6],[12,122],[-35,-24],[-6,-48],[12,-24],[4,-32],[-12,-14],[-34,-97],[-7,31],[7,54],[-8,28],[0,-44],[-9,-51],[8,-34],[-7,-46],[-6,96],[-15,14],[6,-103],[-8,8],[-6,-42],[12,-22],[-21,-44],[-7,-28],[-13,8],[-2,26],[-22,46],[3,-46],[9,-13],[2,-41],[27,-54],[2,-67],[-5,-25],[13,-48],[-23,-45],[7,-37],[-3,-40],[-9,4],[-7,-55],[6,-53],[-17,-58],[9,-50],[-2,-54],[6,-73],[-2,-89],[7,-65],[22,-80],[8,-62],[-9,-45],[-14,7],[9,-42],[9,22],[8,-14],[-7,-47],[4,-48],[18,-92],[-5,-22],[5,-97],[-9,19],[-11,58],[-8,4],[-5,64],[-8,-9],[-2,-57],[-7,38],[-8,-3],[-5,48],[-12,45],[-23,23],[-35,3],[-8,129],[-8,13],[-4,-31],[10,-68],[-2,-22],[-22,43],[-2,34],[-13,31],[-12,114],[-20,-44],[-33,-56],[-12,27],[-7,115],[11,82],[15,57],[20,30],[-5,10]],[[28423,61914],[-1,45],[7,27],[18,25],[1,85]],[[28426,62262],[-9,37],[-20,6],[-8,17],[1,48],[-26,42],[-34,15],[-6,39],[-10,13],[1,58],[9,18],[7,49],[-23,43],[-6,45],[-15,-1],[-16,25],[-13,-3]],[[26327,70327],[8,17],[9,-60],[65,-63],[-17,-58],[-23,18],[-14,61],[-28,85]],[[26120,70229],[5,40],[7,-20],[-12,-20]],[[26084,70289],[21,-39],[-4,-36],[-19,38],[2,37]],[[26055,70019],[7,48],[3,69],[6,15],[1,57],[18,-7],[-1,-85],[4,-83],[-19,-44],[-19,30]],[[26035,70180],[13,8],[-5,-54],[-7,1],[-1,45]],[[25984,69839],[13,-17],[1,-59],[-14,76]],[[25933,69486],[6,23],[19,-25],[-6,-96],[-17,52],[-2,46]],[[25908,69335],[11,44],[6,-47],[-17,3]],[[25759,70041],[20,-64],[-8,-22],[-4,36],[-14,43],[6,7]],[[25722,65552],[30,68],[27,87],[37,261],[34,146],[19,134],[10,99],[10,176],[-1,58],[6,87],[-1,163],[-6,182],[-11,120],[-35,230],[-11,94],[-12,138],[-17,119],[0,48],[22,102],[7,50],[1,77],[-9,134],[-14,90],[4,32],[20,51],[24,151],[21,112],[4,124],[9,134],[-11,112],[1,33],[27,43],[20,15],[6,93],[-2,74],[10,36],[13,-18],[16,80],[18,-35],[17,13],[8,32],[9,86],[10,16],[15,94],[11,47],[9,-7],[12,35],[3,-39],[-19,-32],[-3,-42],[12,-81],[-23,-81],[13,19],[0,-74],[-6,-7],[-8,-84],[7,-95],[8,-2],[19,145],[3,98],[13,20],[-8,-158],[-15,-44],[-6,-67],[14,-14],[8,65],[7,13],[22,135],[5,78],[-1,56],[4,82],[-6,85],[5,94],[17,49],[10,3],[18,48],[18,16],[25,-7],[26,14],[12,20],[-1,33],[-33,17],[-14,47],[-8,114],[16,75],[13,14],[20,69],[-2,31],[-18,27],[60,-15],[7,49],[61,-102],[26,-58],[13,20],[11,-16],[13,10],[32,-34],[24,-85],[3,-57],[17,-27],[33,4],[8,-9],[29,-77],[23,-7],[34,-71],[29,6],[21,-78],[11,-25],[-9,-27],[15,-96],[11,-30],[14,-133],[-20,21],[-16,34],[-15,-41],[4,-110],[12,-44],[21,-26],[5,-59],[1,-98],[7,-37],[-4,-71],[-8,-67],[2,-65],[-5,-111],[-1,-121],[-12,-15],[-14,-64],[-24,2],[-8,-30],[-8,-108],[-4,-115],[-19,-5],[-8,-19],[0,-49],[-42,-6],[-13,-35],[-9,-76],[-5,-124],[-8,-42],[13,-91],[16,-32],[9,33],[5,-38],[20,-21],[13,-38],[10,16],[28,120],[14,0],[7,25],[-7,51],[9,44],[9,87],[4,-50],[19,31],[5,29],[-21,31],[24,-3],[11,24],[5,41],[23,10],[34,28],[9,45],[31,30],[11,-30],[23,-25],[15,-39],[17,-123],[10,-37],[7,-97],[5,-208],[17,-178],[4,-247],[10,-143],[18,-110],[2,-48],[-11,-46],[-7,-145],[4,-47],[-12,-113],[-4,-67],[-18,-66],[-15,4],[-12,-42],[1,66],[-9,27],[10,16],[15,62],[-14,26],[-15,-5],[-19,-34],[-7,-32],[9,-27],[2,-45],[-15,4],[-11,-52],[1,-84],[-7,-77],[-17,-53],[-30,-25],[-18,-97],[2,-127],[-3,-44],[-15,-25],[-1,-70],[-16,-39],[-6,-39],[-13,-4],[-7,-65],[-11,-11],[-17,-72],[5,-79],[-8,-9]],[[26661,65520],[-86,-11],[-167,-20],[-124,-12]],[[25045,72671],[21,69],[95,141],[7,-2],[43,98],[31,42],[6,-11],[28,29],[-1,-28],[-12,-16],[-30,-80],[0,-30],[-25,-55],[-51,-53],[-42,-66],[2,-20],[23,0],[-59,-73],[-18,3],[-18,52]],[[24721,71146],[19,40],[12,3],[39,49],[38,34],[31,77],[19,64],[16,27],[33,17],[15,-17],[29,27],[22,-3],[52,75],[30,94],[22,5],[29,23],[10,39],[5,51],[25,65],[14,16],[30,82],[23,23],[21,56],[11,54],[20,52],[58,85],[56,25],[50,-7],[23,-39],[1,-45],[-11,5],[-17,-24],[-19,13],[-21,-10],[5,-47],[-32,-57],[-30,-95],[-19,-20],[-5,-74],[-7,9],[-7,-52],[-14,-26],[-5,-67],[-12,-48],[-9,-6],[-12,-164],[6,-52],[-9,-35],[11,3],[20,87],[3,44],[7,-13],[29,80],[28,43],[-12,-55],[-12,-24],[-15,-77],[30,84],[26,18],[14,-13],[37,1],[15,-30],[8,8],[17,-35],[8,-39],[15,11],[22,-63],[3,-61],[17,-49],[6,-47],[14,-49],[19,-15],[-2,-79],[11,-28],[26,-15],[42,10],[25,43],[11,-8],[14,-72],[12,-27],[19,-4],[8,46],[16,-7],[9,-38],[4,69],[-7,53],[16,20],[7,-32],[-6,-56],[17,-26],[26,72],[40,62],[59,110],[11,-21],[61,42],[46,-16],[35,-3],[30,7],[62,85],[24,12],[30,-7],[32,14],[-22,-84],[-2,-135],[2,-45],[-8,-19],[9,-51],[16,-8],[9,16],[6,-26],[15,3],[17,-28],[34,49],[13,-4],[11,-46],[-1,-35],[25,28],[7,-7],[10,65],[19,24],[23,-19],[11,9],[8,39],[27,-5],[5,-30],[-10,-100],[7,-120],[1,-95],[-29,-2],[-8,-65],[15,-12],[5,21],[15,-4],[8,-38],[19,-19],[-13,-40],[24,-75],[12,-1],[20,-45],[8,38],[14,-35],[8,26],[-16,100],[14,-15],[41,13],[12,-15],[14,-91],[16,-31],[-10,-64],[-14,-20],[-27,39],[-31,-16],[-31,42],[-11,-12],[-27,1],[-27,23],[-60,-26],[-13,-28],[-37,69],[-15,48],[-13,-7],[-13,30],[-10,-41],[2,-51],[-15,-32],[1,-45],[9,-63],[-12,-20],[-24,42],[-3,31],[-21,37],[-5,30],[-22,64],[-38,46],[-13,-7],[-33,49],[-18,-5],[-13,23],[-5,-20],[-19,11],[-25,-75],[-17,-73],[-9,-8],[-32,23],[-23,-15],[-8,-22],[2,-34],[-23,37],[-21,17],[-24,-14],[-10,11],[-23,-24],[-13,-42],[-2,-63],[-9,-72],[-14,4],[-7,-39],[-22,-15],[-6,-46],[-13,-3],[0,-45],[-12,-9],[4,-61],[-20,32],[-9,40],[12,27],[1,34],[11,31],[1,40],[13,-4],[15,87],[-3,43],[-12,10],[-18,-75],[-38,24],[3,-51],[-13,-47],[-5,-56],[-30,-31],[-5,-27],[-6,39],[3,55],[-4,67],[-8,32],[-10,-19],[-5,-120],[3,-12],[-31,-55],[-26,-129],[-17,-146],[-19,-65],[-20,-112],[-41,-174],[6,-33]],[[25508,69434],[-19,14],[-8,47],[-13,28],[-2,29],[15,118],[11,48],[-2,34],[-11,25],[-16,-47],[-27,-10]],[[25436,69720],[0,0]],[[25436,69720],[-7,47],[7,24],[-3,38],[13,34],[6,40],[-3,47],[8,69],[-14,75],[12,13],[-8,44],[-13,18],[-6,33],[-24,4],[-9,43],[-21,-18],[-18,45],[17,52],[-7,21],[0,47],[-40,48],[-14,-14],[-24,47],[-12,-15],[-21,21],[-2,25],[-27,-2],[-3,-32],[-14,0],[-4,29],[-17,16],[-12,-13],[-86,142],[-287,231],[1,27],[-28,167],[-27,16],[-10,24]],[[24739,71113],[0,0]],[[24739,71113],[-12,-6],[-6,39]],[[25252,52115],[30,-13],[-14,-20],[-12,9],[-4,24]],[[25179,52148],[16,13],[30,-29],[6,-15],[-24,5],[-28,26]],[[25119,52114],[15,7],[15,31],[-4,-29],[-21,-27],[-5,18]],[[25071,52140],[21,-1],[8,13],[-5,-43],[-10,-7],[-17,26],[3,12]],[[24751,57677],[229,-2],[156,1],[202,1]],[[25284,52292],[-4,-32],[-7,15],[-10,-40],[-18,27],[-13,-15],[-5,30],[-18,7],[-18,-23],[-23,49],[-2,-28],[-21,38],[-22,-3],[-31,-27],[-28,-42],[-30,-33],[4,54],[-10,30],[-14,-27],[9,-17],[1,-40],[-25,-57],[-8,-80],[-9,10],[-13,-16]],[[24969,52072],[-12,0],[-13,50],[-4,66],[0,69],[-15,77],[0,54],[-10,43],[-11,19],[-4,39],[-10,34],[-4,95],[-8,14],[10,88],[-4,36],[7,25],[9,125],[7,19],[-1,45],[7,22],[-7,36],[-165,-2],[-134,-1],[-226,0],[13,21],[7,58],[-16,50],[-1,28],[10,46],[-3,41],[-12,30],[1,38],[18,-7],[17,20],[2,43],[-12,37],[-1,45],[-7,16],[9,39],[4,-50],[8,-29],[9,7],[0,29],[-13,75],[-1,74],[20,18],[12,35],[-4,32],[-18,-13],[-9,30],[5,38],[10,-28],[18,0],[1,106],[11,35],[23,5],[4,18],[-29,11],[7,94],[12,11],[2,-43],[7,-17],[5,28],[-6,21],[24,78],[-2,50],[7,25],[19,14],[0,50],[-19,26],[5,25],[13,-39],[5,36],[12,22],[9,69],[-15,24],[2,-62],[-32,11],[2,79],[27,20],[7,27],[14,-31],[5,42],[-2,53],[12,-8],[16,79],[-4,18],[-6,-40],[-23,17],[0,58],[8,20],[-8,35],[-10,-20],[-23,49],[3,58],[5,1],[17,-48],[10,7],[-5,26],[-21,50],[14,31],[8,37],[-7,37],[-6,-46],[-20,-26],[-6,14],[-3,52],[9,38],[16,33],[2,27],[-31,30],[1,71],[5,37],[21,52],[2,39],[-9,72],[-11,-4],[1,-67],[-14,-26],[-9,22],[3,48],[10,50]],[[17580,73980],[234,-2],[232,3],[190,-5],[190,2],[348,-2],[211,0],[232,2],[328,0],[141,0],[292,0],[227,1],[143,-1],[294,0],[114,0],[167,1]],[[18973,68711],[-21,23],[-6,49],[-24,59],[2,43],[-28,117],[-17,36],[-8,-52],[-20,-3],[5,-33],[-16,-98],[15,-64],[-32,26],[-9,-16],[-24,13],[-3,-19],[-30,-40],[-13,63],[-22,-8],[-13,-25],[-10,13],[-21,-30],[-8,22],[-14,-8],[-12,35],[-16,7],[-9,-35],[-9,0],[-2,-61],[-8,-45],[-24,38],[-8,-20],[-11,24],[-33,2],[-17,22],[-17,-23],[-15,-72],[6,-53],[-9,-22],[-11,44],[-18,24],[-15,40],[-6,53],[5,34],[-21,81],[9,48],[-5,50],[-18,109],[-32,58],[-26,-44],[-4,40],[-28,53],[-11,97],[14,13],[2,55],[-4,61],[-19,39],[2,26],[-17,15],[-7,73],[-24,73],[-1,35],[-14,54],[2,70],[-8,19],[-6,57],[6,30],[-1,46],[-19,0],[7,95],[-15,25],[-12,-2],[2,26],[-10,44],[-15,26],[-9,-13],[2,-41],[-15,-35],[-19,-82],[-19,-26],[-13,12],[-3,-58],[-24,-42],[-5,36],[-14,22],[-13,60],[-25,0],[4,53],[-8,36],[18,37],[1,48],[-19,74],[18,89],[25,1],[7,44],[-13,54],[6,49],[-19,27],[-4,54],[9,58],[-17,33],[2,49],[19,7],[-1,79],[-6,30],[13,24],[1,116],[13,65],[-7,69],[12,3],[10,123],[-3,58],[-8,10],[-26,-23],[-4,-21],[-22,15],[-19,-5],[-8,39],[6,39],[-7,30],[-14,9],[-4,-30],[-15,-21],[-6,17],[6,55],[-34,58],[-16,59],[4,71],[-20,60],[-13,-1],[-6,60],[-19,82],[-17,54],[-12,13],[-5,37],[-11,7],[2,38],[-9,41],[-24,10],[-32,45],[-7,54],[-47,87],[-11,-2],[12,36],[22,8],[3,22],[-16,7],[-5,57],[-11,5],[2,34],[13,32],[-12,55],[2,63],[-13,24],[-7,47],[-8,-6],[-8,88],[-15,21],[-39,152],[-1,279],[1,109],[0,804]],[[29991,69339],[3,68],[18,64],[-3,15],[11,74],[-13,36],[18,11],[4,26],[22,42],[15,-61],[28,-5],[13,70]],[[30213,67064],[-30,-174],[-2,-44]],[[29724,66677],[-9,53],[-6,-10],[-12,102],[9,73],[1,57],[13,10],[8,45],[-6,52],[9,33],[-5,65],[4,138],[12,64],[-6,60],[10,135],[-5,35],[5,74],[15,33],[6,109],[9,44],[19,43],[6,44],[-1,64],[19,67],[0,85],[12,44],[12,69],[0,47],[-10,68],[6,57],[-6,34],[10,61],[35,32],[10,-13],[16,21],[5,52],[24,14],[14,39],[7,45],[16,22],[-6,59],[11,13],[2,73],[-10,38],[-11,102],[15,52],[4,64],[18,75],[-13,89],[11,30]],[[29842,64964],[3,18],[27,22],[-21,-43],[-9,3]],[[29812,64781],[5,20],[11,-16],[0,-50],[-6,35],[-10,11]],[[29792,64880],[16,16],[-12,-43],[-4,27]],[[29275,64272],[5,-67],[-9,-39],[-38,-78],[-11,-1]],[[28633,68013],[16,50],[-5,-45],[-11,-5]],[[28611,68032],[12,40],[9,-5],[-21,-35]],[[27689,66145],[33,53],[53,111],[29,91],[30,50],[26,25],[11,70],[13,36],[4,52],[36,56],[19,54],[-4,80],[-13,40],[2,43],[-7,37],[-23,35],[1,92],[-18,15],[9,77],[-5,125],[-3,13],[28,22],[38,42],[56,47],[40,20],[33,2],[38,-9],[36,8],[86,-42],[23,-19],[15,-47],[23,-46],[12,-10],[40,49],[35,1],[43,12],[21,-19],[23,-1],[14,25],[30,20],[18,40],[9,1],[19,80],[30,64],[10,8],[19,54],[14,5],[20,-15],[17,19],[9,53],[2,87],[-9,180],[-20,40],[11,50],[14,11],[2,-33],[21,41],[-3,43],[-19,47],[-22,-15],[5,29],[-15,51],[-15,1],[1,80],[16,115],[19,5],[23,42],[0,48],[18,22],[27,55],[9,-5],[16,29],[25,75],[4,46],[12,51],[41,121],[31,100],[56,141],[-1,12],[68,109],[26,62],[18,0],[22,37],[27,-29],[19,10],[91,-8],[53,-1],[107,14],[24,-1],[93,10]],[[29478,69336],[1,-109],[-7,-30],[-4,-63],[13,-57],[-10,-55],[-2,-92],[-4,-31],[4,-70],[19,-88],[4,-69],[-12,-80],[7,-114],[-4,-36],[-19,-63],[-5,-89],[-8,-79],[9,-27],[-1,-103],[10,-67],[-5,-64],[12,-57],[-16,-97],[-7,-114],[10,-26],[7,66],[19,0],[2,-53],[13,-29],[-2,-343],[-6,-422],[0,-74],[-4,-37],[8,-65]],[[29390,64649],[-7,-42],[-21,-42],[-2,-79],[-13,2],[9,-60],[18,87],[11,-15],[10,42],[21,27],[18,2],[4,33],[22,-30],[2,41],[9,-28],[20,-8],[18,-23],[23,28],[2,43],[17,8],[10,-12],[75,3],[39,20],[14,18],[30,63],[9,40],[12,13],[13,50],[21,21],[12,-2],[-18,-52],[-9,-6],[15,-31],[5,-44],[17,-12],[11,25],[16,-72],[15,17],[23,48],[2,28],[17,11],[12,-12],[-5,-21],[-67,-94],[-78,-123],[-50,-62],[-81,-93],[-53,-78],[-43,-41],[-27,-12],[-6,15],[-64,-60],[-61,10],[-46,-55],[3,38],[-23,-2],[3,25],[-11,39],[7,35],[-8,36]],[[26861,65369],[16,17],[-2,-36],[-14,19]],[[26831,65420],[6,90],[11,-35],[-3,-35],[-14,-42],[0,22]],[[26661,65520],[1,-26],[21,-28],[13,17],[37,-82],[25,-20],[11,-21],[18,-66],[19,-29],[18,23],[2,50],[7,13],[14,-55],[19,2],[-1,-37],[29,-96],[16,-33],[22,-21],[41,57],[22,4],[17,35],[51,60],[37,-38],[19,15],[20,-9],[29,61],[29,86],[8,10],[16,58],[44,102],[10,1],[67,108],[30,17],[24,34],[65,69],[17,24]],[[15490,70789],[21,10],[13,-45],[-1,-55],[17,-42],[25,-1],[32,51],[14,-4],[59,-119],[7,-61],[18,-81],[1,-57],[7,-52],[-3,-67],[10,-88],[-4,-41],[3,-50],[33,-54],[46,-35],[11,-19],[17,14],[13,-32],[18,-5],[23,39],[23,7],[54,83],[12,45],[15,16],[21,-15],[29,12],[28,26],[19,-30],[17,-9],[18,14],[34,-40],[9,-75],[14,4],[19,50],[34,4],[13,-16],[11,34],[47,51],[15,35],[21,-9],[21,-51],[22,6],[34,26],[20,5],[11,42],[28,27],[29,46],[46,27],[37,10],[13,57],[14,23],[24,-22],[64,39],[17,-14],[19,6],[28,42],[11,36],[163,1],[250,-3],[164,-3]],[[17338,70482],[16,-107],[11,-27],[16,-75],[18,5],[10,-47],[19,-2],[16,-48],[0,-53],[13,-49],[7,-54],[-24,-108],[-1,-55],[-10,-23],[-24,-150],[1,-36],[-9,-51],[-7,-116],[-13,-40],[-6,-53],[-14,-44],[-3,-51],[7,-58],[-9,-68],[-18,-76],[0,-21],[-32,-49],[-14,-93],[-8,-97],[-10,-66],[-18,-48],[3,-66],[-8,-36],[15,-69],[-8,-56],[13,-35],[19,25],[16,-59],[20,12],[2,-53],[18,-17],[1,-31],[-10,-62],[-12,-17],[1,-42],[11,-32],[-1,-43],[-12,-81],[0,-54],[-11,-11],[-2,-59],[0,-2105]],[[17307,65831],[-166,-2],[-273,-5],[-26,-3],[-143,2],[-220,2]],[[15305,65829],[-21,55],[-15,55],[-7,69],[2,33],[-14,81],[2,32],[-7,63],[-2,126],[13,147],[-7,107],[-17,87],[-11,2],[-11,123],[15,90],[12,96],[6,83],[0,52],[9,80],[6,99],[-6,42],[17,53],[8,43],[16,132],[15,193],[15,283],[7,225],[4,188],[-2,8],[10,197],[-1,69],[7,184],[0,92],[-5,39],[8,91],[12,227],[8,117],[4,157],[-3,66],[3,109],[-4,69],[5,24],[5,176],[-1,76],[-11,41],[6,87],[-2,83],[-7,45],[16,36],[1,109],[-19,193],[27,-79],[14,-14],[-3,38],[23,10],[7,17],[11,-28],[12,31],[15,0],[20,51]],[[26599,59546],[33,-4],[78,1],[5,-5],[157,-1],[61,3],[151,-2],[3,26],[77,-5],[-8,-28]],[[18139,65823],[61,-6],[262,13],[192,2],[5,-5],[196,3],[118,3]],[[18136,60011],[0,880],[1,11],[-1,272],[1,173],[-1,298],[1,318],[0,1661],[1,149],[0,628],[1,266],[0,1156]],[[28738,60998],[7,-15],[-7,-27],[0,42]],[[28949,61206],[-16,-79],[-15,-98],[-8,-27],[-5,21],[-15,-7],[-19,-78],[-12,-70],[-11,-126],[1,-64],[-23,-128],[7,-14],[-18,-91],[-12,-79],[-9,-11],[1,-57],[-11,-86],[-18,-64],[-16,2],[4,-35],[-9,-5],[-1,84],[-10,55],[-4,61],[2,70],[9,59],[3,89],[10,105],[4,76],[16,79],[18,110],[-4,34],[21,17],[15,65],[1,28],[-20,21],[25,54]],[[28739,61120],[-11,-44],[-3,44]],[[28423,61914],[-20,-21],[-13,21],[0,-52],[-18,-113],[-4,-52],[2,-76],[15,-59],[29,15],[6,26],[15,0],[12,38],[9,-30],[-6,-74],[19,-64],[0,-49],[35,-59],[25,-2],[7,-28],[6,21],[24,-9],[4,-44],[16,-39],[8,-59],[13,-15],[15,-54],[20,-23],[30,-68],[-5,-65],[-15,-24],[-2,-107],[4,-29],[-11,-46],[13,-23],[-19,-30],[-31,64],[-11,-27],[-7,25],[0,41],[-13,81],[-19,32],[-8,35],[-12,12],[-21,103],[-11,11],[-4,45],[-13,30],[-2,-30],[28,-89],[20,-114],[15,-24],[1,-25],[16,-14],[10,-96],[11,-53],[30,-4],[7,-36],[31,-24],[-14,-29],[-1,-37],[13,-8],[4,22],[8,-41],[5,-110],[-8,-90],[-18,63],[-21,45],[-9,-42],[11,-39],[7,-55],[9,-14],[-22,-24],[-18,-4],[6,-39],[22,11],[-2,-76],[14,12],[4,-31],[12,-20],[6,-49],[-9,-97],[-4,15],[-16,-18],[-15,-34],[-10,68],[-29,61],[-14,45],[4,48],[-13,71],[-22,-9],[-8,-25],[-10,46],[-18,11],[-4,23],[-21,-35],[11,-33],[12,8],[18,-13],[15,-55],[9,-2],[8,58],[8,-119],[1,-67],[22,-19],[25,-82],[1,-65],[27,4],[9,27],[1,-33],[9,-11],[-3,86],[17,6],[13,-29],[35,-36],[17,27],[11,-11],[8,-128],[12,-140],[9,-71],[7,-94]],[[15775,72069],[4,105],[10,72],[12,-52],[-2,-58],[19,-32],[-18,-27],[-5,-26],[-18,-12],[-2,30]],[[15740,73454],[0,40],[20,-41],[-17,-26],[-3,27]],[[15720,73667],[6,14],[26,-115],[-18,42],[-14,59]],[[15715,73495],[8,29],[12,-47],[-15,-33],[-5,51]],[[15707,73080],[13,89],[14,59],[2,55],[16,11],[7,-19],[0,-49],[19,-38],[3,-26],[-15,-19],[-17,15],[-1,-29],[-13,-34],[-14,-7],[3,-24],[23,10],[11,-42],[8,-84],[-4,-14],[10,-100],[8,27],[-5,67],[10,-3],[16,-57],[16,-13],[7,-94],[-8,-58],[-14,13],[-12,86],[-21,-25],[2,30],[-19,44],[3,93],[-5,56],[-18,-4],[-3,30],[-22,54]],[[15649,73739],[11,-4],[34,-53],[-8,-8],[-22,20],[-15,45]],[[15623,73630],[17,26],[2,-33],[-19,7]],[[15618,73982],[15,0],[4,-29],[-17,-2],[-2,31]],[[15586,73509],[7,30],[20,1],[2,-29],[15,-33],[17,-9],[-18,69],[37,108],[12,-2],[37,-58],[-19,-50],[11,-66],[-2,-62],[-11,-25],[4,-69],[-20,-12],[-15,50],[-9,-12],[-22,11],[-31,62],[-6,76],[-9,20]],[[15577,73617],[18,-10],[18,-54],[-30,41],[-6,23]],[[17306,73978],[-1,-290],[0,-441],[-2,-286],[0,-702],[1,-52],[0,-1247],[-7,-48],[20,-76],[8,-54],[0,-63],[12,-40],[-17,-93],[7,-11],[11,-93]],[[15490,70789],[-34,9],[-3,34],[-12,6],[-10,-31],[-13,10],[-19,-51],[-9,7],[-21,74],[-10,8],[-7,-47],[-10,-10],[6,139],[1,124],[-4,165],[13,-61],[-2,-100],[4,-137],[17,0],[1,37],[-10,40],[0,61],[12,-37],[14,83],[-19,116],[11,42],[25,53],[-17,37],[-6,-27],[-18,-2],[4,-23],[-16,4],[-20,44],[-1,55],[-11,130],[8,8],[6,-52],[11,31],[52,63],[-10,27],[-34,23],[-2,45],[-27,14],[-8,-24],[8,-90],[-16,-21],[3,38],[-4,206],[-14,176],[-24,80],[-9,207],[-5,77],[-15,162],[-14,36],[-4,55],[-14,23],[-5,31],[-19,29],[-12,110],[-8,101],[1,53],[-11,56],[12,58],[9,138],[-19,46],[3,22],[17,1],[40,-55],[32,-64],[10,-1],[25,-39],[6,12],[41,-55],[-1,-20],[35,-41],[56,-11],[21,13],[31,-37],[9,19],[10,-18],[24,7],[12,-32],[41,2],[32,71],[-3,-24],[22,-42],[7,-45],[17,17],[17,-5],[-3,-32],[14,-20],[1,-59],[10,6],[3,53],[-14,34],[0,40],[12,28],[21,10],[3,-31],[-15,-34],[10,-50],[7,6],[2,48],[10,14],[8,-100],[-15,-10],[11,-42],[8,-78],[13,-21],[-8,-25],[-16,2],[2,-42],[-17,-36],[-9,-113],[-14,-9],[11,113],[-6,17],[-19,-101],[-4,-53],[-21,-70],[-38,-183],[-13,-119],[12,8],[23,-13],[12,27],[21,17],[3,38],[-44,-62],[-17,27],[42,226],[31,74],[29,28],[3,73],[16,73],[31,68],[-9,97],[22,-40],[14,-187],[-22,0],[3,-40],[11,-14],[-4,-56],[7,-19],[0,-53],[-14,-38],[-1,-38],[15,-16],[-10,-48],[-6,-87],[4,-21],[-10,-57],[7,-49],[-15,-79],[-27,78],[8,96],[-16,-42],[-6,-63],[30,-83],[-10,-16],[1,-48],[-11,-26],[-16,46],[-20,105],[12,37],[1,61],[-7,25],[0,-51],[-12,-57],[7,-72],[-6,-48],[13,14],[11,-66],[27,-22],[11,37],[0,33],[13,16],[8,79],[10,53],[-2,30],[25,-58],[10,25],[-4,36],[27,34],[0,50],[-8,58],[-8,11],[6,35],[-10,40],[-7,71],[22,38],[-24,58],[16,82],[-6,91],[15,46],[9,119],[22,25],[-1,69],[-14,23],[-23,86],[1,74],[-10,49],[-15,4],[3,-24],[-11,-28],[10,-67],[18,-50],[1,-35],[-26,85],[-12,4],[-7,58],[2,77],[18,24],[16,-22],[10,42],[-10,45],[-28,45],[-13,48],[1,39],[-29,-33],[-7,33],[4,45],[-13,-17],[3,39],[24,28],[13,-15],[9,-49],[19,7],[-10,108],[17,6],[5,34],[-21,66],[-5,66],[8,44],[-13,30],[-17,-6],[-11,-41],[9,-44],[-19,40],[8,57],[-10,25],[-9,-14],[-1,65],[-21,54],[11,21],[-5,36],[-13,16],[16,54],[184,0],[97,-6],[145,5],[143,-2],[190,0],[169,0],[165,1],[178,0],[325,-2]],[[25685,69733],[6,80],[31,-17],[-23,-128],[-14,65]],[[25568,69555],[12,14],[2,-63],[-14,23],[0,26]],[[24707,71654],[8,83],[12,4],[-5,-75],[-15,-12]],[[24691,71507],[21,33],[-14,-47],[-7,14]],[[24655,71564],[5,21],[30,29],[5,-13],[-11,-48],[-24,-11],[-5,22]],[[24625,71464],[3,27],[20,41],[1,-19],[-24,-49]],[[24631,71609],[14,-54],[-13,-3],[-8,37],[7,20]],[[24621,71679],[35,36],[11,-55],[14,34],[2,-44],[-16,-9],[-17,-49],[-11,42],[-16,20],[-2,25]],[[24616,71401],[17,18],[32,86],[14,-32],[-30,-33],[5,-35],[-17,-4],[-20,-37],[-1,37]],[[24563,71635],[15,17],[-1,-44],[-14,27]],[[24276,71309],[20,-30],[34,11],[49,52],[19,27],[18,0],[48,70],[25,27],[6,26],[17,-22],[7,33],[25,10],[22,70],[14,-12],[14,35],[10,-4],[24,-81],[-14,-76],[-24,-78],[9,-73],[-16,-35],[-11,-77],[13,-16],[42,73],[5,54],[42,-108],[13,-22],[9,10],[25,-27]],[[25508,69434],[-10,-58],[-1,-80],[-37,-13],[-21,-40],[3,-47],[-11,-59],[-9,-15],[-11,-83],[-12,-42],[-7,-104],[3,-25],[-13,-50],[20,-42],[12,7],[7,53],[26,64],[10,3],[15,63],[0,36],[31,133],[26,36],[11,-7],[11,34],[15,-32],[-6,46],[12,97],[27,109],[7,100],[12,-5],[21,32],[1,59],[17,60],[22,-3],[-2,-87],[-16,-5],[-2,-142],[-12,-40],[-8,4],[-5,-53],[-14,-52],[5,-43],[-13,-39],[4,-26],[-18,-33],[-13,-62],[-8,-87],[-17,-107],[-9,-26],[-9,-62],[-21,-268],[9,-94],[-2,-71],[-12,-41],[-23,-46],[-3,-62],[-8,-37],[-14,-162],[2,-82],[8,-50],[-2,-102],[-21,-118],[-7,-136],[-20,-107],[-9,-156],[8,-76],[-5,-38],[8,-85],[-7,-57],[14,-62],[0,-85],[6,-63],[16,-59],[-4,-89],[-11,-107],[6,-145]],[[2682,386],[26,11],[1,-51],[-9,8],[-8,-28],[-10,60]],[[2636,452],[21,8],[-4,-21],[-13,-12],[-4,25]],[[2313,271],[13,35],[16,2],[19,68],[4,-20],[27,2],[4,-44],[-7,13],[-29,-30],[-23,-89],[-11,47],[-13,16]],[[90204,32599],[5,15],[34,16],[21,137],[6,65],[7,-11],[7,-43],[14,-11],[-10,-88],[-32,-109],[-9,-44],[-2,-111],[-12,-56],[-18,30],[-7,101],[8,50],[-12,59]],[[90597,35570],[10,43],[4,-16],[-8,-45],[-6,18]],[[90537,37432],[5,20],[1,-49],[-6,29]],[[90507,37973],[14,53],[0,59],[11,0],[0,-66],[-9,-13],[-10,-55],[-6,22]],[[90501,34555],[4,28],[2,101],[9,-12],[20,67],[5,-22],[-14,-80],[4,-63],[-13,7],[0,-73],[-12,18],[-5,29]],[[90487,38800],[6,39],[11,-28],[-1,-51],[-8,-23],[-7,25],[-1,38]],[[90486,35993],[20,2],[3,-36],[-19,-8],[-4,42]],[[90472,34420],[4,45],[13,54],[5,-54],[-4,-24],[7,-40],[-2,-61],[-9,-29],[-14,109]],[[90343,33382],[11,51],[21,35],[15,-9],[-2,-35],[-12,-13],[-8,-39],[-11,-6],[-5,23],[-9,-7]],[[28030,56345],[-13,-8],[-36,-51],[-27,-66],[-35,-121],[-18,-79],[-7,-45],[-16,-58],[-14,-93],[-13,-174],[3,-55],[-7,-48],[-14,-47],[-23,-41],[-9,-97],[-17,10],[-17,-16],[-11,39],[-16,-33],[-10,-63],[3,-31],[8,10],[0,-33],[-15,-20],[-18,-45],[-9,-52],[-34,-59],[-10,38],[-11,-7],[-1,-32],[17,-22],[-5,-59],[-25,-52],[-7,-40],[-10,5],[-24,-22],[-17,-59],[-6,18],[-36,-90],[-8,21],[-15,-28],[-2,30],[-13,-1],[-4,-42],[15,-83],[-7,-74],[-32,-62],[-19,-20],[-2,41],[-19,40],[-11,-22],[-2,-31],[12,-15],[14,-59],[-15,-65],[-25,-59],[-9,0],[-17,-67],[5,-21]],[[31708,38299],[11,-21],[12,13],[9,-36],[-17,-36],[-12,19],[-3,61]],[[31642,38028],[49,54],[35,-32],[-18,-26],[-21,-7],[-11,-24],[-8,12],[-17,-17],[-9,40]],[[31637,38350],[7,-14],[0,-44],[-7,58]],[[31170,38320],[15,18],[17,49],[-4,63],[7,32],[14,12],[20,-6],[17,-25],[50,2],[20,-22],[24,26],[18,-5],[25,-25],[8,20],[28,0],[27,-20],[16,1],[7,-19],[6,24],[37,-35],[4,19],[18,-18],[6,7],[31,-33],[14,-49],[7,13],[5,-27],[10,-6],[14,22],[-5,-40],[3,-84],[13,-30],[-7,-43],[-11,19],[3,-28],[-10,2],[-7,-32],[-13,1],[-11,-59],[-7,-83],[-8,-6],[-1,-44],[-25,-46],[-15,-9],[-12,12],[-7,-27],[-10,13],[-21,-43],[-10,9],[-9,-29],[-8,9],[-18,66],[-12,-10],[-7,-34],[-21,60],[-8,0],[-25,-33],[-14,24],[-12,-19],[-25,47],[-7,-39],[-14,-27],[-21,-3],[-12,-18],[-8,41],[-21,8],[-11,-32],[-19,19],[-12,-12],[1,53],[10,31],[-11,12],[3,65],[5,15],[1,75],[7,31],[-10,101],[-13,21],[-9,78]],[[30985,38023],[20,12],[5,-43],[-15,-38],[-12,32],[2,37]],[[31858,38286],[13,39],[11,-4],[15,-28],[-13,-4],[1,-49],[-9,20],[-13,-5],[-5,31]],[[31828,37522],[7,36],[-4,40],[7,30],[10,-13],[8,22],[17,3],[6,-29],[39,5],[2,-18],[-32,-48],[-41,-30],[-19,2]],[[31779,38288],[6,50],[10,-23],[12,26],[19,-21],[33,6],[-2,-23],[-14,-4],[9,-42],[-16,-11],[-15,23],[-7,-20],[-12,49],[-23,-10]],[[17306,73978],[171,1],[103,1]],[[18139,65823],[-119,3],[-36,-2],[-58,9],[-63,-7],[-79,0],[-293,0],[-184,5]],[[29478,69336],[71,5],[115,0],[40,-9],[62,-5],[57,2],[168,10]],[[25149,51924],[13,-63],[5,-76],[-3,-101],[-10,-105],[-4,3],[8,90],[4,100],[-1,46],[-12,106]],[[25020,51931],[11,38],[32,81],[2,-14],[-13,-63],[2,-28],[13,-33],[-15,-50],[-3,47],[-10,-10],[-17,10],[-2,22]],[[24941,51321],[17,10],[-9,-42],[-8,32]],[[24732,50824],[7,27],[13,-65],[-8,-14],[-12,52]],[[24681,50807],[39,-33],[-19,-8],[-20,41]],[[24628,50763],[25,19],[2,-17],[-26,-20],[-1,18]],[[24275,51386],[10,27],[12,-5],[3,26],[22,-6],[23,-61],[9,7],[6,-29],[-15,-36],[-1,-40],[-14,-19],[-59,115],[4,21]],[[24969,52072],[-17,-35],[-8,7],[-17,-56],[-2,-38],[-12,-15],[3,-40],[-28,17],[-11,-45],[5,-68],[18,-10],[13,25],[-4,-59],[8,-34],[15,-19],[13,11],[6,29],[5,101],[-2,13],[24,54],[3,44],[18,-34],[13,6],[0,-21],[-17,-34],[0,-34],[15,-17],[3,-61],[15,14],[11,82],[16,-25],[-4,-55],[-13,0],[-12,-44],[22,2],[-3,-29],[-31,-22],[13,-66],[11,22],[-7,-59],[-9,26],[-14,11],[-12,-55],[-1,-99],[-9,-5],[-6,86],[-11,1],[-2,-66],[13,-58],[-13,33],[-14,5],[-8,-17],[-15,6],[18,-39],[0,-32],[-23,49],[0,-25],[12,-32],[-12,-14],[1,-34],[11,-36],[20,-11],[-1,-22],[12,-24],[-1,-34],[7,-46],[9,30],[5,-21],[22,-2],[16,-34],[3,30],[20,-91],[11,44],[24,-111],[0,-59],[6,-13],[18,28],[7,-41],[-24,-15],[-2,-33],[16,-3],[-8,-52],[-11,24],[-12,-96],[2,-44],[-21,36],[-2,55],[-8,16],[-31,-138],[-15,-41],[7,67],[9,29],[5,48],[9,21],[0,54],[9,23],[-1,51],[-10,24],[-4,-62],[-16,-29],[-12,29],[-14,77],[-34,43],[-10,45],[-56,33],[-12,-14],[-48,-143],[-46,-115],[-7,10],[4,41],[-12,16],[-2,41],[6,3],[-12,100],[-11,27],[-9,-1],[1,-28],[-8,-36],[2,76],[-10,56],[-13,-64],[-14,14],[-7,-22],[-7,31],[-6,-27],[10,-63],[-12,4],[-7,-27],[-4,-54],[-8,7],[-5,-57],[-8,12],[-19,-33],[-6,-76],[-16,16],[5,21],[-13,67],[-18,57],[-11,-13],[-26,21],[-10,33],[-25,12],[-16,25],[-16,60],[12,14],[7,58],[8,-12],[12,-52],[7,22],[-1,-68],[15,-17],[-4,104],[-23,64],[0,42],[-11,7],[-9,-41],[-13,-13],[2,41],[-10,-7],[3,39],[9,28],[-10,40],[-29,-50],[-10,80],[-10,-8],[-6,118],[-26,1],[6,33],[1,85],[-32,16],[-13,-10],[-20,-38],[-7,57],[8,41],[8,-3],[-2,46],[-16,8],[-14,-22],[-9,20],[-2,-40],[-24,-36],[-14,-34],[-6,32],[-18,-16],[0,-32],[9,-30],[18,-8],[-9,-30],[8,-63],[20,21],[5,-18],[-13,-14],[6,-20],[-32,-6],[-26,-49],[-20,-9],[-82,63],[-35,42],[-57,101],[-23,32],[-41,40],[-33,5],[-14,-14],[-36,7],[-58,-25],[-17,-13],[-26,-53]],[[30097,65246],[-20,-46],[-6,102],[2,64],[-10,22],[2,-159],[-17,2],[-2,-35],[-10,-7],[-1,55],[16,95],[8,68],[17,46]],[[30029,65436],[5,7],[11,-52],[-5,-7],[-11,52]],[[30019,65203],[6,51],[-4,23],[5,57],[4,-20],[0,-85],[-11,-26]],[[29960,64853],[11,80],[5,-14],[1,-76],[-17,10]],[[30068,65494],[-3,-45],[-14,-41],[-6,42],[4,35],[-19,54],[-8,40],[5,-129],[-22,17],[12,-39],[1,-75],[-12,-11],[8,-53],[0,-72],[-10,-45],[-8,-73],[-12,6],[-27,-18],[-27,-34],[-38,-30],[-1,16]]]},Cot={AL:"01",Alabama:"01",AK:"02",Alaska:"02",AZ:"04",Arizona:"04",AR:"05",Arkansas:"05",CA:"06",California:"06",CO:"08",Colorado:"08",CT:"09",Connecticut:"09",DE:"10",Delaware:"10",DC:"11","District of Columbia":"11",FL:"12",Florida:"12",GA:"13",Georgia:"13",HI:"15",Hawaii:"12",ID:"16",Idaho:"16",IL:"17",Illinois:"17",IN:"18",Indiana:"18",IA:"19",Iowa:"19",KS:"20",Kansas:"20",KY:"21",Kentucky:"21",LA:"22",Louisiana:"22",ME:"23",Maine:"23",MD:"24",Maryland:"24",MA:"25",Massachusetts:"25",MI:"26",Michigan:"26",MN:"27",Minnesota:"27",MS:"28",Mississippi:"28",MO:"29",Missouri:"29",MT:"30",Montana:"30",NE:"31",Nebraska:"31",NV:"32",Nevada:"32",NH:"33","New Hampshire":"33",NJ:"34","New Jersey":"34",NM:"35","New Mexico":"35",NY:"36","New York":"36",NC:"37","North Carolina":"37",ND:"38","North Dakota":"38",OH:"39",Ohio:"39",OK:"40",Oklahoma:"40",OR:"41",Oregon:"41",PA:"42",Pennsylvania:"42",RI:"44","Rhode Island":"44",SC:"45","South Carolina":"45",SD:"46","South Dakota":"46",TN:"47",Tennessee:"47",TX:"48",Texas:"48",UT:"49",Utah:"49",VT:"50",Vermont:"50",VA:"51",Virginia:"51",WA:"53",Washington:"53",WV:"54","West Virginia":"54",WI:"55",Wisconsin:"55",WY:"56",Wyoming:"56",PR:"72","Puerto Rico":"72",VI:"78",AS:"60",MP:"69",GU:"66"};class Tot extends xT{getRegionField(e){return e.allFields[0]}getColorField(e){return e.allFields[1]}getDataValue(e){if(e.isNumber())return e.value;if(e.isString())if(e.field===this.getRegionField(e.field.parentExplore)){const n=Cot[e.value];return n===void 0?void 0:n}else return e.value;else{if(e.isNull())return;throw new Error("Invalid field type for shape map.")}}getDataType(e){if(e.isAtomicField()){if(e.isDate()||e.isTimestamp())return"nominal";if(e.isString())return e===this.getRegionField(e.parentExplore)?"quantitative":"nominal";if(e.isNumber())return"quantitative"}throw new Error("Invalid field type for shape map.")}getVegaLiteSpec(e){if(e.isNull())throw new Error("Expected struct value not to be null.");if(!e.isArray())throw new Error("Invalid data for shape map");const n=this.getRegionField(e.field),r=this.getColorField(e.field),i=r?this.getDataType(r):void 0,s=r!==void 0?{field:r.name,type:i,axis:{title:Af(this.options,r,void 0,this.timezone)},scale:Ba(i,!1)}:void 0,o=this.mapData(e).filter(u=>u[n.name]!==void 0);return{...this.getSize(),data:{values:o},projection:{type:"albersUsa"},layer:[{data:{values:tB,format:{type:"topojson",feature:"states"}},mark:{type:"geoshape",fill:"#efefef",stroke:"white"}},{transform:[{lookup:n.name,from:{data:{values:tB,format:{type:"topojson",feature:"states"}},key:"id"},as:"geo"}],mark:"geoshape",encoding:{shape:{field:"geo",type:"geojson"},color:s}}],background:"transparent",config:{axis:{labelFont:"var(--malloy-font-family, Roboto)",titleFont:"var(--malloy-font-family, Roboto)",titleFontWeight:500,titleColor:"var(--malloy-title-color, #505050)",labelColor:"var(--malloy-label-color, #000000)",titleFontSize:12},legend:{labelFont:"var(--malloy-font-family, Roboto)",titleFont:"var(--malloy-font-family, Roboto)",titleFontWeight:500,titleColor:"var(--malloy-title-color, #505050)",labelColor:"var(--malloy-label-color, #000000)",titleFontSize:12},header:{labelFont:"var(--malloy-font-family, Roboto)",titleFont:"var(--malloy-font-family, Roboto)",titleFontWeight:500},mark:{font:"var(--malloy-font-family, Roboto)"},title:{font:"var(--malloy-font-family, Roboto)",subtitleFont:"var(--malloy-font-family, Roboto)",fontWeight:500}}}}}const ST=class ST extends vf{create(e,n,r,i,s,o){return new Tot(e,n,r,s,o)}get rendererName(){return"shape_map"}};ST.instance=new ST;let nB=ST;class Rot extends xT{getDataValue(e){if(e.isNull()||e.isNumber()||e.isString())return e.value;throw new Error("Invalid field type for segment map.")}getDataType(e){if(e.isAtomicField()){if(e.isString())return"nominal";if(e.isNumber())return"quantitative"}throw new Error("Invalid field type for segment map.")}getVegaLiteSpec(e){if(e.isNull())throw new Error("Expected struct value not to be null.");const n=e.field.allFields,r=n[0],i=n[1],s=n[2],o=n[3],u=n[4],a=u?this.getDataType(u):void 0,l=u!==void 0?{field:u.name,type:a,axis:{title:Af(this.options,u,void 0,this.timezone)},scale:Ba(a,!1)}:void 0;return{...this.getSize(),data:{values:this.mapData(e)},projection:{type:"albersUsa"},layer:[{data:{values:tB,format:{type:"topojson",feature:"states"}},mark:{type:"geoshape",fill:"lightgray",stroke:"white"}},{mark:"line",encoding:{latitude:{field:r.name,type:"quantitative"},longitude:{field:i.name,type:"quantitative"},latitude2:{field:s.name,type:"quantitative"},longitude2:{field:o.name,type:"quantitative"},color:l}}],background:"transparent",config:{axis:{labelFont:"var(--malloy-font-family, Roboto)",titleFont:"var(--malloy-font-family, Roboto)",titleFontWeight:500,titleColor:"var(--malloy-title-color, #505050)",labelColor:"var(--malloy-label-color, #000000)",titleFontSize:12},legend:{labelFont:"var(--malloy-font-family, Roboto)",titleFont:"var(--malloy-font-family, Roboto)",titleFontWeight:500,titleColor:"var(--malloy-title-color, #505050)",labelColor:"var(--malloy-label-color, #000000)",titleFontSize:12},header:{labelFont:"var(--malloy-font-family, Roboto)",titleFont:"var(--malloy-font-family, Roboto)",titleFontWeight:500},mark:{font:"var(--malloy-font-family, Roboto)"},title:{font:"var(--malloy-font-family, Roboto)",subtitleFont:"var(--malloy-font-family, Roboto)",fontWeight:500}}}}}const bT=class bT extends vf{create(e,n,r,i,s,o){return new Rot(e,n,r,s,o)}get rendererName(){return"segment_map"}};bT.instance=new bT;let rB=bT;var Oot=kt("<div>");const Dot=[Z$.instance,eB.instance,nB.instance,rB.instance];function wot(t){var o;const e=mx(),n=iB(),r=((o=n.vegaConfigOverride)==null?void 0:o.call(n,t.type))??{},i=()=>{var u;return(u=Dot.find(a=>a.rendererName===t.type))==null?void 0:u.create(document,{size:Bs(e.rootField)===Bs(t.data.field)?"large":"medium"},{dataStyles:{}},t.data.field,{vegaConfigOverride:r})};let s;return no(async()=>{if(s&&i()){const u=await i().render(t.data);s.replaceChildren(u)}}),(()=>{var u=Oot(),a=s;return typeof a=="function"?Yo(a,u):s=u,u})()}function gT(t,e){const n=e??t.tagParse().tag;return!t.isExplore()&&t.isAtomicField()?n.has("link")?"link":n.has("image")?"image":"cell":FS(n,"list","list_detail")?"list":FS(n,"bar_chart","line_chart")?"chart":n.has("dashboard")?"dashboard":FS(n,"scatter_chart","shape_map","segment_map")?"legacy_chart":"table"}const Not="∅";function Bx(t){const{field:e,dataColumn:n,resultMetadata:r,tag:i,customProps:s={}}=t,o=gT(e,i);let u="";const a=s[o]||{};if(n.isNull())u=Not;else switch(o){case"cell":{const l=n.value;MG(e,l)?u=mh(e,l):jG(e,l)?u=l:e.isAtomicField()&&(e.isDate()||e.isTimestamp())?u=bKe(t):u=String(l);break}case"link":{u=p7e(e,n);break}case"list":{u=EXe(t);break}case"image":{u=vXe(t);break}case"chart":{u=st(zKe,Ac({field:e,get data(){return r.getData(n)},metadata:r},a));break}case"dashboard":{if(n.isArray())u=st(OXe,Ac({data:n},a));else throw new Error(`Malloy render: wrong data type passed to the dashboard renderer for field ${n.field.name}`);break}case"legacy_chart":{if(n.isArray())u=st(wot,{type:o,data:n});else throw new Error(`Malloy render: wrong data type passed to the ${o} renderer for field ${n.field.name}`);break}case"table":{if(n.isArrayOrRecord())u=st(gXe,Ac({data:n},a));else throw new Error(`Malloy render: wrong data type passed to the table renderer for field ${n.field.name}`);break}default:try{u=String(n.value)}catch{console.warn("Couldnt get value for ",e,n)}}return{renderAs:o,renderValue:u}}function Fot(t,e){const n=e??t.tagParse().tag,r=n.tag("bar_chart")??n.tag("bar"),i=!n.has("tooltip"),s=(r==null?void 0:r.text("size"))==="spark"||n.text("size")==="spark";if(!r)throw new Error("Tried to render a bar_chart, but no bar_chart tag was found");const o={fields:[],type:null},u={fields:[],type:null},a={fields:[],type:null},l=r.has("stack");r.text("x")&&o.fields.push(r.text("x")),r.text("y")?u.fields.push(r.text("y")):r.textArray("y")&&u.fields.push(...r.textArray("y")),r.text("series")&&a.fields.push(r.text("series"));const c=[],f=[],x=[];ML(t,p=>{const{tag:g}=p.tagParse();g.has("x")&&c.push(ji(t,p)),g.has("y")&&f.push(ji(t,p)),g.has("series")&&x.push(ji(t,p))}),c.forEach(p=>{o.fields.push(p)}),f.forEach(p=>{u.fields.push(p)}),x.forEach(p=>{a.fields.push(p)});const d=t.allFields.filter(p=>p.isAtomicField()&&p.sourceWasDimension());if(o.fields.length===0&&d.length>0&&o.fields.push(ji(t,d[0])),u.fields.length===0){const p=t.allFields.find(g=>g.isAtomicField()&&g.sourceWasMeasureLike()&&g.isNumber());p&&u.fields.push(ji(t,p))}if(a.fields.length===0&&d.length>1){const p=d.find(g=>{const m=ji(t,g);return!o.fields.includes(m)});p&&a.fields.push(ji(t,p))}return o.type="nominal",u.type="quantitative",a.type="nominal",{xChannel:o,yChannel:u,seriesChannel:a,isStack:l,interactive:i,hideReferences:s}}const Lot={spark:[180,1],xs:[170,2],sm:[216,3],md:[256,4],lg:[472,7],xl:[508,10],"2xl":[730,14]},mT=28;function Ile(t,e,n,r){var ae;const i=(r==null?void 0:r.xField)??t.allFields.at(0),s=(r==null?void 0:r.yField)??t.allFields.at(1),{tag:o}=t.tagParse(),u=n.numeric("size","width")??o.numeric("size","width"),a=n.numeric("size","height")??o.numeric("size","height"),l=(n.text("size")??o.text("size"))||"md";let c=0,f=0,x=0;[c,x]=Lot[l],f=x*mT,u&&(c=u),a&&(f=a);let d=0,p=0,g=-90,m="right",y="middle",E=0,A=0,v=0;const _=l!=="spark",S=l!=="spark",b=e.fields[Bs(t)];let C=l!=="spark"?mT-1:0,R;const L=Bs(s),[$,U]=((ae=r==null?void 0:r.getYMinMax)==null?void 0:ae.call(r))??[e.fields[L].min,e.fields[L].max],z=Lt("linear")().domain([$,U]).nice().range([f,0]),ee=z.domain();if(S){const V=z.domain().at(1),te=z.domain().at(0),se=ZV(),he=s.isAtomicField()?mh(s,te):se.format(",")(te),D=s.isAtomicField()?mh(s,V):se.format(",")(V);v=31,p=Math.max(O7(he,"10px Inter, sans-serif")+4,O7(D,"10px Inter, sans-serif")+4)+5+v;const N=Math.ceil(f/40),W=z.ticks(N).at(-1);if(W<V){const H=(V-W)/(V-te),w=f/(1-H);C=Math.max(0,C-(w-f)),f=w,R=N}}if(_){const V=Bs(i),te=e.fields[V].maxString,se=O7(te,"10px Inter, sans-serif")+4,he=1;A=26,d=Math.min(se,he*f),E=d;const D=e.fields[V].values.size,N=D<=20?D:b.maxUniqueFieldValueCounts.get(e.getFieldKey(i)),P=c/N;(P>d||P>se)&&(g=0,E=P,m=void 0,y="top",A=22,d=14)}const G=f+d+A,fe=Math.ceil(G/mT)*mT;A+=fe-G;const pe=o.text("size")==="spark";return{plotWidth:c,plotHeight:f,xAxis:{labelAngle:g,labelAlign:m,labelBaseline:y,labelLimit:E,height:d,titleSize:A,hidden:pe},yAxis:{width:p,tickCount:R,hidden:pe,yTitleSize:v},yScale:{domain:n.has("y","independent")?null:ee},padding:pe?{top:0,left:0,bottom:0,right:0}:{top:C+1,left:p,bottom:d+A,right:8},xField:i,yField:s,get totalWidth(){return this.plotWidth+this.padding.left+this.padding.right},get totalHeight(){return this.plotHeight+this.padding.top+this.padding.bottom}}}function $le({type:t,title:e,tickCount:n,labelLimit:r,fieldPath:i,showBrushes:s=!0,axisSettings:o}){const u={orient:"left",scale:"yscale",title:e,...o,tickCount:{signal:`${n}`},labelLimit:r,encode:{labels:{enter:{text:{signal:`renderMalloyNumber(malloyExplore, '${i}', datum.value, datum, item)`}},update:{text:{signal:`renderMalloyNumber(malloyExplore, '${i}', datum.value, datum, item)`},fillOpacity:[...s?[{test:'brushMeasureIn !== "empty" ? (datum.index !== 0 && datum.index !== 1) : false',value:0},{test:'brushMeasureRangeIn && datum.value >= (brushMeasureRangeIn[0] - (invert("yscale", 0)-invert("yscale", 20))) && datum.value <= (brushMeasureRangeIn[1] + (invert("yscale", 0)-invert("yscale", 20)))',value:0}]:[],{value:1}]}}}},a=$ot({type:t,fieldPath:i,axisSettings:o}),l=Iot({type:t,axisSettings:o});return{axis:u,interactiveMarks:[a,l],interactiveSignals:[],brushMeasureEvents:[{events:"@y_axis_overlay:mousemove",update:"yIsBrushing ? null : { fieldRefId: measureFieldRefId, sourceId: brushMeasureSourceId, value: event.shiftKey ? invert('yscale',y(item())) : snapValue([domain('yscale')[0],domain('yscale')[1]], 1000,invert('yscale',y(item()))), type: 'measure'}"},{events:"@y_axis_overlay:mouseout",update:"null"}]}}function Iot(t){const e={name:`${t.type}_axis_overlay`,type:"rect",encode:{enter:{}}};return e.encode.enter={x:{value:-t.axisSettings.width+t.axisSettings.yTitleSize},x2:{value:0},y:{value:0},y2:{signal:"height"},fill:{value:"transparent"}},e}function $ot(t){const e={signal:'brushMeasureIn === "empty" || yIsBrushing ? 0 : 1'},n=-t.axisSettings.width+t.axisSettings.yTitleSize,r=(s=0)=>`brushMeasureIn !== "empty" ? (scale("yscale",brushMeasureIn) + ${s}) : 0`;return{name:"y_reference_line_group",type:"group",marks:[{name:"y_reference_lines_backdrop",type:"rect",encode:{enter:{x:{value:n-2},x2:{value:0},fill:{value:{x1:1,y1:0,x2:1,y2:1,gradient:"linear",stops:[{offset:0,color:"rgba(255,255,255,0)"},{offset:.275,color:"white"},{offset:.7,color:"white"},{offset:1,color:"rgba(255,255,255,0)"}]}},height:{value:40}},update:{y:{signal:r(-25)},opacity:e}}},{name:"y_reference_lines",type:"rule",encode:{enter:{x:{value:n},x2:{signal:"width"},stroke:{value:"black"},strokeOpacity:{value:.5},strokeDash:{value:[4,2]}},update:{y:{signal:r()},y2:{signal:r(0)},opacity:e}}},{name:"y_reference_line_label_backdrop",type:"text",encode:{enter:{x:{value:n},dy:{value:-4},align:{value:"left"},baseline:{value:"alphabetic"},fill:{value:"white"},stroke:{value:"white"},strokeWidth:{value:3},fontSize:{value:10},fontWeight:{value:"normal"},font:{value:"Inter, sans-serif"},strokeOpacity:{value:1}},update:{y:{signal:r()},text:{signal:`brushMeasureIn ? renderMalloyNumber(malloyExplore, '${t.fieldPath}', brushMeasureIn) : ''`},opacity:e}}},{name:"y_reference_line_label",type:"text",encode:{enter:{x:{value:n},dy:{value:-4},align:{value:"left"},baseline:{value:"alphabetic"},fill:{value:$x},fontSize:{value:10},fontWeight:{value:"normal"},font:{value:"Inter, sans-serif"}},update:{y:{signal:r()},text:{signal:`brushMeasureIn ? renderMalloyNumber(malloyExplore, '${t.fieldPath}', brushMeasureIn) : ''`},opacity:e}}}]}}function Ble({explore:t,records:e,metadata:n}){const r=t.allFields.filter(s=>s.tagParse().tag.has("tooltip")),i=[];return r.forEach(s=>{(s.isAtomicField()||s.isExploreField())&&e.forEach(o=>{i.push({label:s.name,value:()=>Bx({field:s,dataColumn:o.__source.__malloyDataRecord.cell(s.name),resultMetadata:n,tag:s.tagParse().tag}).renderValue,highlight:!1,color:"",entryType:s.isExploreField()?"block":"list-item",ignoreHighlightState:!0})})}),i}const Bot=.4,kot=384;function Pot(t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[t[n]]=n);return e}function Mot(t,e){var le;const n=t.tagParse().tag,r=n.tag("bar_chart")??n.tag("bar");if(!r)throw new Error("Bar chart should only be rendered for bar_chart or bar tag");const i=Fot(t,n),s=i.xChannel.fields.at(0),o=i.yChannel.fields.at(0),u=i.seriesChannel.fields.at(0);if(!s)throw new Error("Malloy Bar Chart: Missing x field");if(!o)throw new Error("Malloy Bar Chart: Missing y field");const a=ys(t,s),l=ys(t,o),c=u?ys(t,u):null,f=V0(a),x=V0(l),d=c&&V0(c),p=e.field(a),g=c?e.field(c):null,m=i.yChannel.fields.reduce((Se,Pe)=>{const Me=ys(t,Pe);return{...Se,[Pe]:V0(Me)}},{}),y=Pot(m),E=!!c,A=i.yChannel.fields.length>1,v=E||A,_="brush-x_"+crypto.randomUUID(),S="brush-series_"+crypto.randomUUID(),b="brush-measure_"+crypto.randomUUID(),C="brush-measure-range_"+crypto.randomUUID(),R=v&&!i.isStack,L=v&&i.isStack;let $=1/0,U=-1/0;for(const Se of i.yChannel.fields){const Pe=ys(t,Se),Me=e.field(Pe).min;Me!==null&&($=Math.min($,Me));const J=e.field(Pe).max;J!==null&&(U=Math.max(U,J))}const z=Math.min(0,$),ee=Math.max(0,U),G=Ile(t,e,r,{xField:a,yField:l,chartType:"bar_chart",getYMinMax:()=>[z,ee]}),fe=p.values.size<=20,pe=r.text("x","independent")==="false",ae=r.has("x","independent")&&!pe,V=pe||fe&&!ae,te=g&&g.values.size<=20,se=r.text("series","independent")==="false",he=r.has("series","independent")&&!se,D=se||te&&!he,O=G.yAxis.hidden?null:$le({type:"y",title:i.yChannel.fields.join(", "),tickCount:G.yAxis.tickCount??"ceil(height/40)",labelLimit:G.yAxis.width+10,fieldPath:o,fieldRef:x,brushMeasureRangeSourceId:C,axisSettings:G.yAxis}),N=.25,P=0,W={};let H={};R?(W.signal=`scale('xOffset', datum.series)+bandwidth("xscale")*${N/2}`,H={scale:"xOffset",band:1-P}):(W.signal=`bandwidth("xscale")*${N/2}`,H={scale:"xscale",band:1-N});const w={name:"x_group",from:{facet:{data:"values",name:"x_facet",groupby:["x"],aggregate:{fields:["x","x"],ops:["values","min"],as:["v","x"]}}},data:[{name:"x_facet_values",source:"x_facet",transform:[{type:"aggregate",fields:["x","x"],ops:["values","min"],as:["v","x"]}]}],type:"group",interactive:!1,encode:{enter:{x:{scale:"xscale",field:"x"}}},marks:[]},B=.35,k={name:"bars",type:"rect",from:{data:"x_facet"},zindex:2,encode:{enter:{x:{offset:W},width:H,y:{scale:"yscale",field:i.isStack?"y0":"y"},y2:i.isStack?{scale:"yscale",field:"y1"}:{scale:"yscale",value:0}},update:{fill:{scale:"color",field:"series"},fillOpacity:[{test:"brushSeriesIn && brushSeriesIn != datum.series",value:B},{test:A?"length(brushMeasureListIn) > 0 && indexof(brushMeasureListIn, datum.series) === -1":"false",value:B},{test:"brushXIn && length(brushXIn) > 0 && indexof(brushXIn, datum.x) === -1",value:B},{test:"brushMeasureRangeIn && (datum.y < brushMeasureRangeIn[0] || datum.y > brushMeasureRangeIn[1])",value:B},{value:1}]}}},Q={name:"x_highlight",type:"rect",from:{data:"x_facet_values"},zindex:1,encode:{enter:{x:{value:0},width:{scale:"xscale",band:1},y:{value:0},y2:{signal:"height"}},update:{fill:{value:"#4c72ba"},fillOpacity:[{test:"brushXIn ? indexof(brushXIn,datum.x) > -1 : false",value:.1},{value:0}]}}};w.marks.push(Q,k);const I={name:"values",values:[],transform:[]};A&&(I.transform.push({type:"fold",fields:i.yChannel.fields.map(Se=>`__source.${Se}`),as:["series","y"]}),I.transform.push({type:"formula",as:"series",expr:"replace(datum.series, '__source.', '')"})),L&&I.transform.push({type:"stack",groupby:["x"],field:"y",sort:{field:"series"}});const q=[w],M=[{name:"malloyExplore"},{name:"xFieldRefId",value:f},{name:"seriesFieldRefId",value:d},{name:"measureFieldRefId",value:x},{name:"yRefsMap",value:m},{name:"yRefToFieldPath",value:y},{name:"yRefsList",value:Object.values(m)},{name:"brushXSourceId",value:_},{name:"brushSeriesSourceId",value:S},{name:"brushMeasureSourceId",value:b},{name:"brushIn",value:[]},{name:"brushXIn",update:"getMalloyBrush(brushIn, xFieldRefId)"},{name:"brushSeriesIn",update:"getMalloyBrush(brushIn, seriesFieldRefId)"},{name:"brushMeasureIn",update:`getMalloyBrush(brushIn, yRefsList, 'measure') || "empty"`},{name:"brushMeasureRangeIn",update:"getMalloyBrush(brushIn, measureFieldRefId, 'measure-range') || null"},{name:"brushMeasureListIn",update:A?"pluck(getMalloyMeasureBrushes(brushIn, yRefsList, yRefToFieldPath),'fieldPath')":"[]"}];if(i.interactive){O&&q.push(...O.interactiveMarks);const Se=O?O.interactiveSignals:[];M.push({name:"brushX",on:f?[{events:"@x_highlight:mouseover, @bars:mouseover",update:"{ fieldRefId: xFieldRefId, value: [datum.x], sourceId: brushXSourceId, type: 'dimension'}"},{events:"@x_highlight:mouseout, @bars:mouseout",update:"null"}]:[]},{name:"brushSeries",on:E&&d?[{events:"@bars:mouseover",update:"{ fieldRefId: seriesFieldRefId, value: datum.series, sourceId: brushSeriesSourceId, type: 'dimension' }"},{events:"@bars:mouseout",update:"null"},{events:"@legend_labels:mouseover, @legend_symbols:mouseover",update:"{ fieldRefId: seriesFieldRefId, value: datum.value, sourceId: brushSeriesSourceId, type: 'dimension' }"},{events:"@legend_labels:mouseout, @legend_symbols:mouseout",update:"null"}]:[]},{name:"brushMeasure",on:[{events:"@bars:mouseover",update:A?`{ fieldRefId: yRefsMap[datum.series], value: datum['${L?"y1":"y"}'], sourceId: brushMeasureSourceId, type: 'measure'}`:`{ fieldRefId: measureFieldRefId, value: datum['${L?"y1":"y"}'], sourceId: brushMeasureSourceId, type: 'measure'}`},{events:"@bars:mouseout",update:"null"},...(O==null?void 0:O.brushMeasureEvents)??[],...A?[{events:"@legend_labels:mouseover, @legend_symbols:mouseover",update:"{ fieldRefId: yRefsMap[datum.value], value: null, sourceId: brushMeasureSourceId, type: 'measure' }"},{events:"@legend_labels:mouseout, @legend_symbols:mouseout",update:"null"}]:[]]},{name:"brushOut",update:"[{ sourceId: brushXSourceId, data: brushX }, { sourceId: brushSeriesSourceId, data: brushSeries, debounce: { time: 100, strategy: 'on-empty' } },{ sourceId: brushMeasureSourceId, data: brushMeasure, debounce: { time: 100, strategy: 'on-empty' } } ]"},...Se,{name:"yIsBrushing",value:!1})}else M.push({name:"yIsBrushing",value:!1});const Z={$schema:"https://vega.github.io/schema/vega/v5.json",width:G.plotWidth,height:G.plotHeight,autosize:{type:"none",resize:!0,contains:"content"},padding:G.padding,data:[I],scales:[{name:"xscale",type:"band",domain:V?[...p.values]:{data:"values",field:"x"},range:"width",paddingOuter:.05,round:!0},{name:"yscale",nice:!0,range:"height",domain:i.isStack?{data:"values",field:"y1"}:G.yScale.domain??{data:"values",field:"y"}},{name:"color",type:"ordinal",range:"category",domain:D?[...g.values]:{data:"values",field:"series"}},{name:"xOffset",type:"band",domain:D?[...g.values]:{data:"values",field:"series"},range:{signal:`[0,bandwidth('xscale') * ${1-N}]`}}],axes:[{orient:"bottom",scale:"xscale",title:s,...G.xAxis,encode:{labels:{update:{fillOpacity:[{test:"brushXIn ? indexof(brushXIn,datum.value) === -1 : false",value:.35},{value:1}]}}}},...O?[O.axis]:[]],legends:[],marks:q,signals:M};let xe=0;if(v){E?(xe=((le=g.maxString)==null?void 0:le.length)??0,xe=Math.max(xe,c.name.length)):xe=i.yChannel.fields.reduce((Me,J)=>Math.max(Me,J.length),xe);const Se=Math.min(kot,G.totalWidth*Bot,xe*10+20),Pe={titleLimit:Se-20,labelLimit:Se-40,padding:8,offset:4};Z.padding.right=Se,Z.legends.push({fill:"color",title:c?c.name:"",...Pe,encode:{entries:{name:"legend_entries",interactive:!0},labels:{name:"legend_labels",interactive:!0,update:{fillOpacity:[{test:"brushSeriesIn === datum.value",value:1},{test:"brushSeriesIn && brushSeriesIn != datum.value",value:.35},...A?[{test:"length(brushMeasureListIn) > 0 && indexof(brushMeasureListIn, datum.value) > -1",value:1},{test:"length(brushMeasureListIn) > 0 && indexof(brushMeasureListIn, datum.value) === -1",value:.35}]:[],{value:1}]}},symbols:{name:"legend_symbols",interactive:!0,update:{fillOpacity:[{test:"brushSeriesIn === datum.value",value:1},{test:"brushSeriesIn && brushSeriesIn != datum.value",value:.35},{value:1}]}}}})}const oe=(Se,Pe)=>{const Me=Se.allFields.filter(ie=>ie.isAtomicField()&&(ie.isDate()||ie.isTimestamp()));Pe.forEach(ie=>{Me.forEach(Te=>{const $e=ie[Te.name];(typeof $e=="number"||typeof $e=="string")&&(ie[Te.name]=X3(new Date($e),Te.isDate(),Te.timeframe))})});const J=Pe.map(ie=>({__source:ie,x:ie[s],y:ie[o],series:u?ie[u]:o}));return Z.data[0].values=J,J},Y=new Map;return{spec:Z,plotWidth:G.plotWidth,plotHeight:G.plotHeight,totalWidth:G.totalWidth,totalHeight:G.totalHeight,chartType:"bar_chart",mapMalloyDataToChartData:oe,getTooltipData:(Se,Pe)=>{if(Y.has(Se))return Y.get(Se);let Me=null,J=[];const ie=Pe.scale("color"),Te=ne=>{const K=ne.series,ue=E?l:ys(t,K),Be=ne.y;return ue.isAtomicField()?mh(ue,Be):String(Be)};if(Y5(Se)==="x_highlight"){const ne=Se.datum.x;J=Se.datum.v,Me={title:[ne],entries:J.map(K=>({label:K.series,value:Te(K),highlight:!1,color:ie(K.series),entryType:"list-item"}))}}let $e=null;if(Se.datum&&["bars"].includes(Y5(Se))){const ne=Se.datum;$e=ne.series,J=Se.mark.group.datum.v,Me={title:[ne.x],entries:J.map(K=>({label:K.series,value:Te(K),highlight:$e===K.series,color:ie(K.series),entryType:"list-item"}))}}const ke=J.filter(ne=>ne.series===$e);let j=[];if(E&&ke.length===1?j=ke:A?j=J.slice(0,1):!E&&!A&&J.length===1&&(j=J),Me){const ne=Ble({explore:t,records:j,metadata:e}),K=d?Me.entries.findIndex(ue=>ue.highlight)+1:Me.entries.length;Me.entries.splice(K,0,...ne)}return Y.set(Se,Me),Me}}}function jot(t,e){const n=e??t.tagParse().tag,r=n.tag("line_chart");if(!r)throw new Error("Tried to render a bar_chart, but no bar_chart tag was found");const i=r.has("zero_baseline")?r.text("zero_baseline")!=="false":!0,s=!n.has("tooltip"),o={fields:[],type:null},u={fields:[],type:null},a={fields:[],type:null};r.text("x")&&o.fields.push(r.text("x")),r.text("y")?u.fields.push(r.text("y")):r.textArray("y")&&u.fields.push(...r.textArray("y")),r.text("series")&&a.fields.push(r.text("series"));const l=[],c=[],f=[];ML(t,d=>{const{tag:p}=d.tagParse();p.has("x")&&l.push(ji(t,d)),p.has("y")&&c.push(ji(t,d)),p.has("series")&&f.push(ji(t,d))}),l.forEach(d=>{o.fields.push(d)}),c.forEach(d=>{u.fields.push(d)}),f.forEach(d=>{a.fields.push(d)});const x=t.allFields.filter(d=>d.isAtomicField()&&d.sourceWasDimension());if(o.fields.length===0&&x.length>0&&o.fields.push(ji(t,x[0])),u.fields.length===0){const d=t.allFields.find(p=>p.isAtomicField()&&p.sourceWasMeasureLike()&&p.isNumber());d&&u.fields.push(ji(t,d))}if(a.fields.length===0&&x.length>1){const d=x.find(p=>{const g=ji(t,p);return!o.fields.includes(g)});d&&a.fields.push(ji(t,d))}return o.type="nominal",u.type="quantitative",a.type="nominal",{xChannel:o,yChannel:u,seriesChannel:a,zeroBaseline:i,interactive:s}}const Uot=.4,qot=384;function zot(t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[t[n]]=n);return e}function Hot(t,e){var oe;const n=t.tagParse().tag,r=n.tag("line_chart");if(!r)throw new Error("Line chart should only be rendered for line_chart tag");const i=jot(t,n),s=i.xChannel.fields.at(0),o=i.yChannel.fields.at(0),u=i.seriesChannel.fields.at(0);if(!s)throw new Error("Malloy Bar Chart: Missing x field");if(!o)throw new Error("Malloy Bar Chart: Missing y field");const a=ys(t,s),l=ys(t,o),c=u?ys(t,u):null,f=V0(a),x=V0(l),d=c&&V0(c),p=e.field(a),g=c?e.field(c):null,m=i.yChannel.fields.reduce((Y,le)=>{const Se=ys(t,le);return{...Y,[le]:V0(Se)}},{}),y=zot(m),E=!!c,A=i.yChannel.fields.length>1,v=E||A,_="brush-x_"+crypto.randomUUID(),S="brush-series_"+crypto.randomUUID(),b="brush-measure_"+crypto.randomUUID(),C="brush-measure-range_"+crypto.randomUUID();let R=1/0,L=-1/0;for(const Y of i.yChannel.fields){const le=ys(t,Y),Se=e.field(le).min;Se!==null&&(R=Math.min(R,Se));const Pe=e.field(le).max;Pe!==null&&(L=Math.max(L,Pe))}const $=i.zeroBaseline?Math.min(0,R):R,U=i.zeroBaseline?Math.max(0,L):L,z=Ile(t,e,r,{xField:a,yField:l,chartType:"line_chart",getYMinMax:()=>[$,U]}),ee=p.values.size<=20,G=r.text("x","independent")==="false",fe=r.has("x","independent")&&!G,pe=G||ee&&!fe,ae=g&&g.values.size<=20,V=r.text("series","independent")==="false",te=r.has("series","independent")&&!V,se=V||ae&&!te,he=z.yAxis.hidden?null:$le({type:"y",title:i.yChannel.fields.join(", "),tickCount:z.yAxis.tickCount??"ceil(height/40)",labelLimit:z.yAxis.width+10,fieldPath:o,fieldRef:x,brushMeasureRangeSourceId:C,axisSettings:z.yAxis}),D=[],O={name:"series_group",from:{facet:{data:"values",name:"series_facet",groupby:["series"],aggregate:{ops:["count"],as:["count"]}}},type:"group",interactive:!1,marks:[]},P={name:"lines",type:"line",from:{data:"series_facet"},encode:{enter:{x:{scale:"xscale",field:"x"},y:{scale:"yscale",field:"y"},stroke:{scale:"color",field:"series"},strokeWidth:{value:2},zindex:{value:0}},update:{strokeOpacity:[{test:"brushSeriesIn && brushSeriesIn != datum.series",value:.35},{value:1}],zindex:[{test:"brushSeriesIn && brushSeriesIn === datum.series",value:1},{value:0}]}}},W={name:"x_highlight_rule",type:"rule",from:{data:"x_data"},zindex:1,interactive:!1,encode:{enter:{x:{scale:"xscale",field:"x"},y:{value:0},y2:{signal:"height"}},update:{stroke:{value:"#4c72ba"},fill:{value:"#4c72ba"},strokeOpacity:[{test:"brushXIn ? indexof(brushXIn,datum.x) > -1 : false",value:.2},{value:0}]}}},H={name:"x_hit_target_group",type:"group",marks:[{name:"mid_points",type:"symbol",zindex:1,from:{data:"x_data"},interactive:!1,encode:{enter:{fill:{value:"transparent"},size:{value:36},x:{scale:"xscale",field:"x"},y:{signal:"height /2"}}}},{name:"x_hit_target",type:"path",from:{data:"mid_points"},encode:{enter:{fill:{value:"transparent"}}},transform:[{type:"voronoi",x:"datum.x",y:"datum.y",size:[{signal:"width"},{signal:"height"}]}]}]},w={name:"ref_line_targets",type:"symbol",from:{data:"values"},encode:{enter:{x:{scale:"xscale",field:"x"},y:{scale:"yscale",field:"y"},fill:{value:"transparent"},size:{value:256}}}},B={name:"points",type:"symbol",from:{data:"series_facet"},encode:{enter:{x:{scale:"xscale",field:"x"},y:{scale:"yscale",field:"y"},fill:{scale:"color",field:"series"}},update:{fillOpacity:[{test:"brushXIn ? indexof(brushXIn,datum.x) > -1 : false",value:1},{signal:"item.mark.group.datum.count > 1 ? 0 : 1"}]}}};O.marks.push(P),O.marks.push(B),D.push(O),i.interactive&&he&&D.push(...he.interactiveMarks),D.push(W,H,w);const k={name:"values",values:[],transform:[]};A&&(k.transform.push({type:"fold",fields:i.yChannel.fields.map(Y=>`__source.${Y}`),as:["series","y"]}),k.transform.push({type:"formula",as:"series",expr:"replace(datum.series, '__source.', '')"}));const Q=he?he.interactiveSignals:[],I=[{name:"malloyExplore"},{name:"xFieldRefId",value:f},{name:"seriesFieldRefId",value:d},{name:"measureFieldRefId",value:x},{name:"yRefsMap",value:m},{name:"yRefToFieldPath",value:y},{name:"yRefsList",value:Object.values(m)},{name:"brushXSourceId",value:_},{name:"brushSeriesSourceId",value:S},{name:"brushMeasureSourceId",value:b},{name:"brushIn",value:[]},{name:"brushXIn",update:"getMalloyBrush(brushIn, xFieldRefId)"},{name:"brushSeriesIn",update:"getMalloyBrush(brushIn, seriesFieldRefId)"},{name:"brushMeasureIn",update:`getMalloyBrush(brushIn, yRefsList, 'measure') || "empty"`},{name:"brushMeasureRangeIn",update:"getMalloyBrush(brushIn, measureFieldRefId, 'measure-range') || null"},{name:"brushMeasureListIn",update:A?"pluck(getMalloyMeasureBrushes(brushIn, yRefsList, yRefToFieldPath),'fieldPath')":"[]"}];i.interactive&&I.push({name:"brushX",on:f?[{events:"@x_hit_target:mouseover",update:"{ fieldRefId: xFieldRefId, value: [datum.datum.x], sourceId: brushXSourceId, type: 'dimension'}"},{events:"@ref_line_targets:mouseover",update:"{ fieldRefId: xFieldRefId, value: [datum.x], sourceId: brushXSourceId, type: 'dimension'}"},{events:"@x_hit_target:mouseout",update:"null"},{events:"@ref_line_targets:mouseout",update:"null"}]:[]},{name:"brushSeries",on:E&&d?[{events:"@ref_line_targets:mouseover",update:"{ fieldRefId: seriesFieldRefId, value: datum.series, sourceId: brushSeriesSourceId, type: 'dimension' }"},{events:"@ref_line_targets:mouseout",update:"null"},{events:"@legend_labels:mouseover, @legend_symbols:mouseover",update:"{ fieldRefId: seriesFieldRefId, value: datum.value, sourceId: brushSeriesSourceId, type: 'dimension' }"},{events:"@legend_labels:mouseout, @legend_symbols:mouseout",update:"null"}]:[]},{name:"brushMeasure",on:x?[{events:"@ref_line_targets:mouseover",update:"{ fieldRefId: measureFieldRefId, value: [datum.y], sourceId: brushMeasureSourceId, type: 'measure'}"},...(he==null?void 0:he.brushMeasureEvents)??[],{events:"@ref_line_targets:mouseout",update:"null"}]:[]},{name:"brushOut",update:"[{ sourceId: brushXSourceId, data: brushX }, { sourceId: brushSeriesSourceId, data: brushSeries, debounce: { time: 100, strategy: 'on-empty' } }, { sourceId: brushMeasureSourceId, data: brushMeasure } ]"},...Q,{name:"yIsBrushing",value:!1});const q={$schema:"https://vega.github.io/schema/vega/v5.json",width:z.plotWidth,height:z.plotHeight,autosize:{type:"none",resize:!0,contains:"content"},padding:z.padding,data:[k,{name:"x_data",source:"values",transform:[{type:"aggregate",groupby:["x"],fields:["x"],ops:["values"],as:["v"]}]}],scales:[{name:"xscale",type:"point",domain:pe?[...p.values]:{data:"values",field:"x"},range:"width",paddingOuter:.05},{name:"yscale",nice:!0,range:"height",zero:i.zeroBaseline,domain:z.yScale.domain??{data:"values",field:"y"}},{name:"color",type:"ordinal",range:"category",domain:se?[...g.values]:{data:"values",field:"series"}}],axes:[{orient:"bottom",scale:"xscale",title:s,labelOverlap:"greedy",...z.xAxis},...he?[he.axis]:[]],legends:[],marks:D,signals:I};let M=0;if(v){E?(M=((oe=g.maxString)==null?void 0:oe.length)??0,M=Math.max(M,c.name.length)):M=i.yChannel.fields.reduce((Se,Pe)=>Math.max(Se,Pe.length),M);const Y=Math.min(qot,z.totalWidth*Uot,M*10+20),le={titleLimit:Y-20,labelLimit:Y-40,padding:8,offset:4};q.padding.right=Y,q.legends.push({fill:"color",title:c?c.name:"",...le,encode:{entries:{name:"legend_entries",interactive:!0},labels:{name:"legend_labels",interactive:!0,update:{fillOpacity:[{test:"brushSeriesIn === datum.value",value:1},{test:"brushSeriesIn && brushSeriesIn != datum.value",value:.35},...A?[{test:"length(brushMeasureListIn) > 0 && indexof(brushMeasureListIn, datum.value) > -1",value:1},{test:"length(brushMeasureListIn) > 0 && indexof(brushMeasureListIn, datum.value) === -1",value:.35}]:[],{value:1}]}},symbols:{name:"legend_symbols",interactive:!0,update:{fillOpacity:[{test:"brushSeriesIn === datum.value",value:1},{test:"brushSeriesIn && brushSeriesIn != datum.value",value:.35},{value:1}]}}}})}const Z=(Y,le)=>{const Se=Y.allFields.filter(Me=>Me.isAtomicField()&&(Me.isDate()||Me.isTimestamp()));le.forEach(Me=>{Se.forEach(J=>{const ie=Me[J.name];(typeof ie=="number"||typeof ie=="string")&&(Me[J.name]=X3(new Date(ie),J.isDate(),J.timeframe))})});const Pe=le.map(Me=>({__source:Me,x:Me[s],y:Me[o],series:u?Me[u]:o}));return q.data[0].values=Pe,Pe},xe=new Map;return{spec:q,plotWidth:z.plotWidth,plotHeight:z.plotHeight,totalWidth:z.totalWidth,totalHeight:z.totalHeight,chartType:"line_chart",mapMalloyDataToChartData:Z,getTooltipData(Y,le){if(xe.has(Y))return xe.get(Y);const Se=Y5(Y);let Pe=null,Me=[];const J=le.scale("color"),ie=j=>{const ne=j.series,K=E?l:ys(t,ne),ue=j.y;return K.isAtomicField()?mh(K,ue):String(ue)};if(["x_hit_target","ref_line_targets"].includes(Se)){const j=Se==="x_hit_target"?Y.datum.datum.x:Y.datum.x;Me=Se==="x_hit_target"?Y.datum.datum.v:[],Pe={title:[j],entries:Me.map(ne=>({label:ne.series,value:ie(ne),highlight:!1,color:J(ne.series),entryType:"list-item"}))}}let Te=null;if(Y.datum&&["ref_line_targets"].includes(Y5(Y))){const j=Y.datum;Te=j.series,Me=[];for(const ne of Y.mark.items){const K=ne.datum;K.x===j.x&&Me.push(K)}Pe={title:[j.x],entries:Me.map(ne=>({label:ne.series,value:ie(ne),highlight:Te===ne.series,color:J(ne.series),entryType:"list-item"}))}}const $e=Me.filter(j=>j.series===Te);let ke=[];if(E&&$e.length===1?ke=$e:A?ke=Me.slice(0,1):!E&&!A&&Me.length===1&&(ke=Me),Pe){const j=Ble({explore:t,records:ke,metadata:e}),ne=d?Pe.entries.findIndex(K=>K.highlight)+1:Pe.entries.length;Pe.entries.splice(ne,0,...j)}return xe.set(Y,Pe),Pe}}}function Qot(){const t=new WeakMap;return{get:e=>{if(!t.has(e)&&e.isArray()){const n=[];for(const r of e){const i=Object.assign(r.toObject(),{__malloyDataRecord:r});n.push(i)}t.set(e,n)}return t.get(e)}}}function Got(t,e={}){const n=new WeakMap,r=a=>{if(n.has(a))return n.get(a);const l=Bs(a);return n.set(a,l),l},i=Qot(),s=t.data.field,o={fields:{},fieldKeyMap:n,getFieldKey:r,field:a=>o.fields[r(a)],getData:i.get,modelTag:t.modelTag,resultTag:t.tagParse().tag,rootField:s,store:jKe()},u=o.getFieldKey(s);return o.fields[u]={field:s,min:null,max:null,minString:null,maxString:null,values:new Set,maxRecordCt:null,maxUniqueFieldValueCounts:new Map,renderAs:gT(s,t.tagParse().tag)},kle(t.data.field,o),Ple(t.data,o),Object.values(o.fields).forEach(a=>{const l=a.field;l.isExploreField()?Mle(l,l.tagParse().tag,o,e):l.isExplore()&&Mle(l,t.tagParse().tag,o,e)}),o}function kle(t,e){for(const n of t.allFields){const r=e.getFieldKey(n);e.fields[r]={field:n,min:null,max:null,minString:null,maxString:null,values:new Set,maxRecordCt:null,maxUniqueFieldValueCounts:new Map,renderAs:gT(n)},n.isExploreField()&&kle(n,e)}}const Ple=(t,e)=>{let n=0;const r=t.field,i=e.field(r),s=new Map;t.field.allFields.forEach(o=>{s.set(Bs(o),new Set)});for(const o of t){n++;for(const u of t.field.allFields){const a=e.field(u),l=s.get(Bs(u)),c=u.isAtomicField()?o.cell(u).value:void 0;if(MG(u,c)){const f=c;a.min=Math.min(a.min??f,f),a.max=Math.max(a.max??f,f),u.isAtomicField()&&u.sourceWasDimension()&&(a.values.add(f),l.add(f))}else if(jG(u,c)){const f=c;a.values.add(f),l.add(f),(!a.minString||a.minString.length>f.length)&&(a.minString=f),(!a.maxString||a.maxString.length<f.length)&&(a.maxString=f)}else if(pRe(u,c)){const f=Number(c);a.min=Math.min(a.min??f,f),a.max=Math.max(a.max??f,f);const x=X3(c,u.isAtomicField()&&u.isDate(),u.isAtomicField()&&(u.isDate()||u.isTimestamp())?u.timeframe:void 0).toString();(!a.minString||a.minString.length>x.length)&&(a.minString=x),(!a.maxString||a.maxString.length<x.length)&&(a.maxString=x),u.isAtomicField()&&u.sourceWasDimension()&&a.values.add(x)}else if(u.isExploreField()){const f=o.cell(u);f.isArray()&&Ple(f,e)}}}for(const[o,u]of s)i.maxUniqueFieldValueCounts.set(o,Math.max(i.maxUniqueFieldValueCounts.get(o)??0,u.size));i.maxRecordCt=Math.max(i.maxRecordCt??n,n)};function Mle(t,e,n,r){var o,u,a;const i=n.field(t);let s=null;if(FS(e,"bar","bar_chart")?s=Mot(t,n):e.has("line_chart")&&(s=Hot(t,n)),s){const l=J$(vot(),((o=r.getVegaConfigOverride)==null?void 0:o.call(r,s.chartType))??{});i.vegaChartProps={...s,spec:{...s.spec,config:l}},(u=i.vegaChartProps)!=null&&u.spec&&(i.runtime=Qie((a=i.vegaChartProps)==null?void 0:a.spec))}}const jle=FT(),iB=()=>{const t=LT(jle);if(!t)throw new Error("ConfigContext missing a value; did you provide a ConfigProvider?");return t};function Wot(t,{element:e}){const n=Wn(()=>t.result?t.result:t.queryResult&&t.modelDef?new TB.Result(t.queryResult,t.modelDef):null);return st(Wo,{get when(){return n()},get children(){return st(jle.Provider,{get value(){return{onClick:t.onClick,vegaConfigOverride:t.vegaConfigOverride}},get children(){return st(Vot,{get result(){return n()},element:e,get scrollEl(){return t.scrollEl},get vegaConfigOverride(){return t.vegaConfigOverride}})}})}})}function Vot(t){const e=Wn(()=>Got(t.result,{getVegaConfigOverride:t.vegaConfigOverride})),n=()=>{const i=e().modelTag,s=e().resultTag,o=i.tag("theme"),u=s.tag("theme");return{modelTag:i,resultTag:s,modelTheme:o,localTheme:u}};no(()=>{if(t.element){const i=Yot(n().modelTheme,n().localTheme);for(const[s,o]of Object.entries(i))t.element.style.setProperty(s,o)}});const r=()=>Bx({field:t.result.resultExplore,dataColumn:t.result.data,resultMetadata:e(),tag:n().resultTag,customProps:{table:{scrollEl:t.scrollEl},dashboard:{scrollEl:t.scrollEl}}});return st(nse.Provider,{get value(){return e()},get children(){return r().renderValue}})}function eo(t,...e){let n;for(const r of e)if(n=r==null?void 0:r.text(t),typeof n<"u")break;return n??`var(--malloy-theme--${t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()})`}function Yot(t,e){const n={},r=eo("tableRowHeight",e,t),i=eo("tableBodyColor",e,t),s=eo("tableFontSize",e,t),o=eo("tableHeaderColor",e,t),u=eo("tableHeaderWeight",e,t),a=eo("tableBodyWeight",e,t),l=eo("tableBorder",e,t),c=eo("tableBackground",e,t),f=eo("tableGutterSize",e,t),x=eo("tablePinnedBackground",e,t),d=eo("tablePinnedBorder",e,t),p=eo("fontFamily",e,t);return n["--malloy-render--table-row-height"]=r,n["--malloy-render--table-body-color"]=i,n["--malloy-render--table-font-size"]=s,n["--malloy-render--font-family"]=p,n["--malloy-render--table-header-color"]=o,n["--malloy-render--table-header-weight"]=u,n["--malloy-render--table-body-weight"]=a,n["--malloy-render--table-border"]=l,n["--malloy-render--table-background"]=c,n["--malloy-render--table-gutter-size"]=f,n["--malloy-render--table-pinned-background"]=x,n["--malloy-render--table-pinned-border"]=d,n}const Kot=`:host {
1472
1472
  --malloy-theme--table-row-height: 28px;
1473
1473
  --malloy-theme--table-font-size: 12px;
1474
1474
  --malloy-theme--table-header-color: #5d626b;