import{applyPatch as ze}from"/-/fast-json-patch@v3.1.1-IjacxII42OC4A6OXhkDe/dist=es2020,mode=imports,min/optimized/fast-json-patch.js";import ce from"/-/json-stringify-pretty-compact@v3.0.0-RM0i5NMwoiFhg7YNuXef/dist=es2020,mode=imports,min/optimized/json-stringify-pretty-compact.js";import*as He from"/-/vega@v5.30.0-fYDVG3pUN16BiGmbVNdw/dist=es2020,mode=imports,min/optimized/vega.js";import{isString as Z,mergeConfig as ve,isBoolean as Me,isObject as We,writeConfig as qe}from"/-/vega@v5.30.0-fYDVG3pUN16BiGmbVNdw/dist=es2020,mode=imports,min/optimized/vega.js";import{expressionInterpreter as Ye}from"/-/vega-interpreter@v1.0.5-xGayK8haM1EVgaoW7oOi/dist=es2020,mode=imports,min/optimized/vega-interpreter.js";import*as Be from"/-/vega-lite@v5.19.0-4m5nwXbwdKW9Bc7adV02/dist=es2020,mode=imports,min/optimized/vega-lite.js";import ge from"/-/vega-schema-url-parser@v2.2.0-YmXJGRcKOXOac3VG4xfw/dist=es2020,mode=imports,min/optimized/vega-schema-url-parser.js";import*as Ke from"/-/vega-themes@v2.15.0-wV2Z38N5Dk8FL05cPDbE/dist=es2020,mode=imports,min/optimized/vega-themes.js";import{Handler as Je}from"/-/vega-tooltip@v0.34.0-YVV3uKnnOnCt2kW7Vclb/dist=es2020,mode=imports,min/optimized/vega-tooltip.js";function $e(){throw new Error("setTimeout has not been defined")}function Ie(){throw new Error("clearTimeout has not been defined")}var k=$e,X=Ie,H;typeof window!="undefined"?H=window:typeof self!="undefined"?H=self:H={},typeof H.setTimeout=="function"&&(k=setTimeout),typeof H.clearTimeout=="function"&&(X=clearTimeout);function Re(r){if(k===setTimeout)return setTimeout(r,0);if((k===$e||!k)&&setTimeout)return k=setTimeout,setTimeout(r,0);try{return k(r,0)}catch(t){try{return k.call(null,r,0)}catch(e){return k.call(this,r,0)}}}function Ze(r){if(X===clearTimeout)return clearTimeout(r);if((X===Ie||!X)&&clearTimeout)return X=clearTimeout,clearTimeout(r);try{return X(r)}catch(t){try{return X.call(null,r)}catch(e){return X.call(this,r)}}}var U=[],M=!1,V,Q=-1;function Qe(){if(!M||!V)return;M=!1,V.length?U=V.concat(U):Q=-1,U.length&&Le()}function Le(){if(M)return;var r=Re(Qe);M=!0;for(var t=U.length;t;){for(V=U,U=[];++Q1)for(var e=1;e=this.max){const h=this.map.keys().next().value;this.delete(h)}this.map.set(t,e)}return this}}var wt=Ot;const Tt=Object.freeze({loose:!0}),yt=Object.freeze({}),At=r=>r?typeof r!="object"?Tt:r:yt;var ue=At,de={exports:{}};const St="2.0.0",be=256,Ct=Number.MAX_SAFE_INTEGER||9007199254740991,xt=16,Dt=be-6,Pt=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var fe={MAX_LENGTH:be,MAX_SAFE_COMPONENT_LENGTH:xt,MAX_SAFE_BUILD_LENGTH:Dt,MAX_SAFE_INTEGER:Ct,RELEASE_TYPES:Pt,SEMVER_SPEC_VERSION:St,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const Ft=typeof ee=="object"&&ee.env&&ee.env.NODE_DEBUG&&/\bsemver\b/i.test(ee.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};var te=Ft;(function(r,t){const{MAX_SAFE_COMPONENT_LENGTH:e,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:h}=fe,o=te;t=r.exports={};const w=t.re=[],I=t.safeRe=[],i=t.src=[],n=t.t={};let d=0;const $="[a-zA-Z0-9-]",A=[["\\s",1],["\\d",h],[$,s]],D=_=>{for(const[C,S]of A)_=_.split(`${C}*`).join(`${C}{0,${S}}`).split(`${C}+`).join(`${C}{1,${S}}`);return _},c=(_,C,S)=>{const b=D(C),P=d++;o(_,P,C),n[_]=P,i[P]=C,w[P]=new RegExp(C,S?"g":void 0),I[P]=new RegExp(b,S?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","\\d+"),c("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${$}*`),c("MAINVERSION",`(${i[n.NUMERICIDENTIFIER]})\\.(${i[n.NUMERICIDENTIFIER]})\\.(${i[n.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${i[n.NUMERICIDENTIFIERLOOSE]})\\.(${i[n.NUMERICIDENTIFIERLOOSE]})\\.(${i[n.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${i[n.NUMERICIDENTIFIER]}|${i[n.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${i[n.NUMERICIDENTIFIERLOOSE]}|${i[n.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${i[n.PRERELEASEIDENTIFIER]}(?:\\.${i[n.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${i[n.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[n.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER",`${$}+`),c("BUILD",`(?:\\+(${i[n.BUILDIDENTIFIER]}(?:\\.${i[n.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${i[n.MAINVERSION]}${i[n.PRERELEASE]}?${i[n.BUILD]}?`),c("FULL",`^${i[n.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${i[n.MAINVERSIONLOOSE]}${i[n.PRERELEASELOOSE]}?${i[n.BUILD]}?`),c("LOOSE",`^${i[n.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${i[n.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${i[n.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${i[n.XRANGEIDENTIFIER]})(?:\\.(${i[n.XRANGEIDENTIFIER]})(?:\\.(${i[n.XRANGEIDENTIFIER]})(?:${i[n.PRERELEASE]})?${i[n.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${i[n.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[n.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[n.XRANGEIDENTIFIERLOOSE]})(?:${i[n.PRERELEASELOOSE]})?${i[n.BUILD]}?)?)?`),c("XRANGE",`^${i[n.GTLT]}\\s*${i[n.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${i[n.GTLT]}\\s*${i[n.XRANGEPLAINLOOSE]}$`),c("COERCEPLAIN",`(^|[^\\d])(\\d{1,${e}})(?:\\.(\\d{1,${e}}))?(?:\\.(\\d{1,${e}}))?`),c("COERCE",`${i[n.COERCEPLAIN]}(?:$|[^\\d])`),c("COERCEFULL",i[n.COERCEPLAIN]+`(?:${i[n.PRERELEASE]})?(?:${i[n.BUILD]})?(?:$|[^\\d])`),c("COERCERTL",i[n.COERCE],!0),c("COERCERTLFULL",i[n.COERCEFULL],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${i[n.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${i[n.LONETILDE]}${i[n.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${i[n.LONETILDE]}${i[n.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${i[n.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${i[n.LONECARET]}${i[n.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${i[n.LONECARET]}${i[n.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${i[n.GTLT]}\\s*(${i[n.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${i[n.GTLT]}\\s*(${i[n.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${i[n.GTLT]}\\s*(${i[n.LOOSEPLAIN]}|${i[n.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${i[n.XRANGEPLAIN]})\\s+-\\s+(${i[n.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${i[n.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[n.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(de,de.exports);var pe=de.exports;const Oe=/^[0-9]+$/,we=(r,t)=>{const e=Oe.test(r),s=Oe.test(t);return e&&s&&(r=+r,t=+t),r===t?0:e&&!s?-1:s&&!e?1:rwe(t,r);var Gt={compareIdentifiers:we,rcompareIdentifiers:_t};const re=te,{MAX_LENGTH:Te,MAX_SAFE_INTEGER:ie}=fe,{safeRe:ye,t:Ae}=pe,jt=ue,{compareIdentifiers:q}=Gt;let Ut=class j{constructor(t,e){if(e=jt(e),t instanceof j){if(t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Te)throw new TypeError(`version is longer than ${Te} characters`);re("SemVer",t,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;const s=t.trim().match(e.loose?ye[Ae.LOOSE]:ye[Ae.FULL]);if(!s)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>ie||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ie||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ie||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(h=>{if(/^[0-9]+$/.test(h)){const o=+h;if(o>=0&&o=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(e===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(h)}}if(e){let o=[e,h];s===!1&&(o=[e]),q(this.prerelease[0],e)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var he=Ut;const Se=he,kt=(r,t,e)=>new Se(r,e).compare(new Se(t,e));var Y=kt;const Xt=Y,Vt=(r,t,e)=>Xt(r,t,e)===0;var zt=Vt;const Ht=Y,Mt=(r,t,e)=>Ht(r,t,e)!==0;var Wt=Mt;const qt=Y,Yt=(r,t,e)=>qt(r,t,e)>0;var Bt=Yt;const Kt=Y,Jt=(r,t,e)=>Kt(r,t,e)>=0;var Zt=Jt;const Qt=Y,er=(r,t,e)=>Qt(r,t,e)<0;var tr=er;const rr=Y,ir=(r,t,e)=>rr(r,t,e)<=0;var sr=ir;const nr=zt,ar=Wt,or=Bt,lr=Zt,cr=tr,ur=sr,dr=(r,t,e,s)=>{switch(t){case"===":return typeof r=="object"&&(r=r.version),typeof e=="object"&&(e=e.version),r===e;case"!==":return typeof r=="object"&&(r=r.version),typeof e=="object"&&(e=e.version),r!==e;case"":case"=":case"==":return nr(r,e,s);case"!=":return ar(r,e,s);case">":return or(r,e,s);case">=":return lr(r,e,s);case"<":return cr(r,e,s);case"<=":return ur(r,e,s);default:throw new TypeError(`Invalid operator: ${t}`)}};var fr=dr,me,Ce;function pr(){if(Ce)return me;Ce=1;const r=Symbol("SemVer ANY");class t{static get ANY(){return r}constructor(d,$){if($=e($),d instanceof t){if(d.loose===!!$.loose)return d;d=d.value}d=d.trim().split(/\s+/).join(" "),w("comparator",d,$),this.options=$,this.loose=!!$.loose,this.parse(d),this.semver===r?this.value="":this.value=this.operator+this.semver.version,w("comp",this)}parse(d){const $=this.options.loose?s[h.COMPARATORLOOSE]:s[h.COMPARATOR],A=d.match($);if(!A)throw new TypeError(`Invalid comparator: ${d}`);this.operator=A[1]!==void 0?A[1]:"",this.operator==="="&&(this.operator=""),A[2]?this.semver=new I(A[2],this.options.loose):this.semver=r}toString(){return this.value}test(d){if(w("Comparator.test",d,this.options.loose),this.semver===r||d===r)return!0;if(typeof d=="string")try{d=new I(d,this.options)}catch($){return!1}return o(d,this.operator,this.semver,this.options)}intersects(d,$){if(!(d instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new i(d.value,$).test(this.value):d.operator===""?d.value===""?!0:new i(this.value,$).test(d.semver):($=e($),$.includePrerelease&&(this.value==="<0.0.0-0"||d.value==="<0.0.0-0")||!$.includePrerelease&&(this.value.startsWith("<0.0.0")||d.value.startsWith("<0.0.0"))?!1:this.operator.startsWith(">")&&d.operator.startsWith(">")||(this.operator.startsWith("<")&&d.operator.startsWith("<")||(this.semver.version===d.semver.version&&this.operator.includes("=")&&d.operator.includes("=")||o(this.semver,"<",d.semver,$)&&this.operator.startsWith(">")&&d.operator.startsWith("<")))?!0:!!(o(this.semver,">",d.semver,$)&&this.operator.startsWith("<")&&d.operator.startsWith(">")))}}me=t;const e=ue,{safeRe:s,t:h}=pe,o=fr,w=te,I=he,i=De();return me}var Ee,xe;function De(){if(xe)return Ee;xe=1;class r{constructor(a,m){if(m=s(m),a instanceof r)return a.loose===!!m.loose&&a.includePrerelease===!!m.includePrerelease?a:new r(a.raw,m);if(a instanceof h)return this.raw=a.value,this.set=[[a]],this.format(),this;if(this.options=m,this.loose=!!m.loose,this.includePrerelease=!!m.includePrerelease,this.raw=a.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(f=>this.parseRange(f.trim())).filter(f=>f.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const f=this.set[0];if(this.set=this.set.filter(p=>!c(p[0])),this.set.length===0)this.set=[f];else if(this.set.length>1){for(const p of this.set)if(p.length===1&&_(p[0])){this.set=[p];break}}}this.format()}format(){return this.range=this.set.map(a=>a.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(a){const m=(this.options.includePrerelease&&A)|(this.options.loose&&D),f=m+":"+a,p=e.get(f);if(p)return p;const u=this.options.loose,E=u?I[i.HYPHENRANGELOOSE]:I[i.HYPHENRANGE];a=a.replace(E,oe(this.options.includePrerelease)),o("hyphen replace",a),a=a.replace(I[i.COMPARATORTRIM],n),o("comparator trim",a),a=a.replace(I[i.TILDETRIM],d),o("tilde trim",a),a=a.replace(I[i.CARETTRIM],$),o("caret trim",a);let R=a.split(" ").map(y=>S(y,this.options)).join(" ").split(/\s+/).map(y=>ae(y,this.options));u&&(R=R.filter(y=>(o("loose invalid filter",y,this.options),!!y.match(I[i.COMPARATORLOOSE])))),o("range list",R);const v=new Map,O=R.map(y=>new h(y,this.options));for(const y of O){if(c(y))return[y];v.set(y.value,y)}v.size>1&&v.has("")&&v.delete("");const x=[...v.values()];return e.set(f,x),x}intersects(a,m){if(!(a instanceof r))throw new TypeError("a Range is required");return this.set.some(f=>C(f,m)&&a.set.some(p=>C(p,m)&&f.every(u=>p.every(E=>u.intersects(E,m)))))}test(a){if(!a)return!1;if(typeof a=="string")try{a=new w(a,this.options)}catch(m){return!1}for(let m=0;ml.value==="<0.0.0-0",_=l=>l.value==="",C=(l,a)=>{let m=!0;const f=l.slice();let p=f.pop();for(;m&&f.length;)m=f.every(u=>p.intersects(u,a)),p=f.pop();return m},S=(l,a)=>(o("comp",l,a),l=L(l,a),o("caret",l),l=P(l,a),o("tildes",l),l=g(l,a),o("xrange",l),l=F(l,a),o("stars",l),l),b=l=>!l||l.toLowerCase()==="x"||l==="*",P=(l,a)=>l.trim().split(/\s+/).map(m=>ne(m,a)).join(" "),ne=(l,a)=>{const m=a.loose?I[i.TILDELOOSE]:I[i.TILDE];return l.replace(m,(f,p,u,E,R)=>{o("tilde",l,f,p,u,E,R);let v;return b(p)?v="":b(u)?v=`>=${p}.0.0 <${+p+1}.0.0-0`:b(E)?v=`>=${p}.${u}.0 <${p}.${+u+1}.0-0`:R?(o("replaceTilde pr",R),v=`>=${p}.${u}.${E}-${R} <${p}.${+u+1}.0-0`):v=`>=${p}.${u}.${E} <${p}.${+u+1}.0-0`,o("tilde return",v),v})},L=(l,a)=>l.trim().split(/\s+/).map(m=>N(m,a)).join(" "),N=(l,a)=>{o("caret",l,a);const m=a.loose?I[i.CARETLOOSE]:I[i.CARET],f=a.includePrerelease?"-0":"";return l.replace(m,(p,u,E,R,v)=>{o("caret",l,p,u,E,R,v);let O;return b(u)?O="":b(E)?O=`>=${u}.0.0${f} <${+u+1}.0.0-0`:b(R)?u==="0"?O=`>=${u}.${E}.0${f} <${u}.${+E+1}.0-0`:O=`>=${u}.${E}.0${f} <${+u+1}.0.0-0`:v?(o("replaceCaret pr",v),u==="0"?E==="0"?O=`>=${u}.${E}.${R}-${v} <${u}.${E}.${+R+1}-0`:O=`>=${u}.${E}.${R}-${v} <${u}.${+E+1}.0-0`:O=`>=${u}.${E}.${R}-${v} <${+u+1}.0.0-0`):(o("no pr"),u==="0"?E==="0"?O=`>=${u}.${E}.${R}${f} <${u}.${E}.${+R+1}-0`:O=`>=${u}.${E}.${R}${f} <${u}.${+E+1}.0-0`:O=`>=${u}.${E}.${R} <${+u+1}.0.0-0`),o("caret return",O),O})},g=(l,a)=>(o("replaceXRanges",l,a),l.split(/\s+/).map(m=>T(m,a)).join(" ")),T=(l,a)=>{l=l.trim();const m=a.loose?I[i.XRANGELOOSE]:I[i.XRANGE];return l.replace(m,(f,p,u,E,R,v)=>{o("xRange",l,f,p,u,E,R,v);const O=b(u),x=O||b(E),y=x||b(R),K=y;return p==="="&&K&&(p=""),v=a.includePrerelease?"-0":"",O?p===">"||p==="<"?f="<0.0.0-0":f="*":p&&K?(x&&(E=0),R=0,p===">"?(p=">=",x?(u=+u+1,E=0,R=0):(E=+E+1,R=0)):p==="<="&&(p="<",x?u=+u+1:E=+E+1),p==="<"&&(v="-0"),f=`${p+u}.${E}.${R}${v}`):x?f=`>=${u}.0.0${v} <${+u+1}.0.0-0`:y&&(f=`>=${u}.${E}.0${v} <${u}.${+E+1}.0-0`),o("xRange return",f),f})},F=(l,a)=>(o("replaceStars",l,a),l.trim().replace(I[i.STAR],"")),ae=(l,a)=>(o("replaceGTE0",l,a),l.trim().replace(I[a.includePrerelease?i.GTE0PRE:i.GTE0],"")),oe=l=>(a,m,f,p,u,E,R,v,O,x,y,K)=>(b(f)?m="":b(p)?m=`>=${f}.0.0${l?"-0":""}`:b(u)?m=`>=${f}.${p}.0${l?"-0":""}`:E?m=`>=${m}`:m=`>=${m}${l?"-0":""}`,b(O)?v="":b(x)?v=`<${+O+1}.0.0-0`:b(y)?v=`<${O}.${+x+1}.0-0`:K?v=`<=${O}.${x}.${y}-${K}`:l?v=`<${O}.${x}.${+y+1}-0`:v=`<=${v}`,`${m} ${v}`.trim()),le=(l,a,m)=>{for(let f=0;f0){const p=l[f].semver;if(p.major===a.major&&p.minor===a.minor&&p.patch===a.patch)return!0}}return!1}return!0};return Ee}const hr=De(),mr=(r,t,e)=>{try{t=new hr(t,e)}catch(s){return!1}return t.test(r)};var Er=mr,Pe=bt(Er);function vr(r,t,e){const s=r.open(t),h=1e4,o=250,{origin:w}=new URL(t);let I=~~(h/o);function i(d){d.source===s&&(I=0,r.removeEventListener("message",i,!1))}r.addEventListener("message",i,!1);function n(){if(I<=0)return;s.postMessage(e,w),setTimeout(n,o),I-=1}setTimeout(n,o)}var gr=`.vega-embed { position: relative; display: inline-block; box-sizing: border-box; } .vega-embed.has-actions { padding-right: 38px; } .vega-embed details:not([open]) > :not(summary) { display: none !important; } .vega-embed summary { list-style: none; position: absolute; top: 0; right: 0; padding: 6px; z-index: 1000; background: white; box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1); color: #1b1e23; border: 1px solid #aaa; border-radius: 999px; opacity: 0.2; transition: opacity 0.4s ease-in; cursor: pointer; line-height: 0px; } .vega-embed summary::-webkit-details-marker { display: none; } .vega-embed summary:active { box-shadow: #aaa 0px 0px 0px 1px inset; } .vega-embed summary svg { width: 14px; height: 14px; } .vega-embed details[open] summary { opacity: 0.7; } .vega-embed:hover summary, .vega-embed:focus-within summary { opacity: 1 !important; transition: opacity 0.2s ease; } .vega-embed .vega-actions { position: absolute; z-index: 1001; top: 35px; right: -9px; display: flex; flex-direction: column; padding-bottom: 8px; padding-top: 8px; border-radius: 4px; box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2); border: 1px solid #d9d9d9; background: white; animation-duration: 0.15s; animation-name: scale-in; animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5); text-align: left; } .vega-embed .vega-actions a { padding: 8px 16px; font-family: sans-serif; font-size: 14px; font-weight: 600; white-space: nowrap; color: #434a56; text-decoration: none; } .vega-embed .vega-actions a:hover, .vega-embed .vega-actions a:focus { background-color: #f7f7f9; color: black; } .vega-embed .vega-actions::before, .vega-embed .vega-actions::after { content: ""; display: inline-block; position: absolute; } .vega-embed .vega-actions::before { left: auto; right: 14px; top: -16px; border: 8px solid rgba(0, 0, 0, 0); border-bottom-color: #d9d9d9; } .vega-embed .vega-actions::after { left: auto; right: 15px; top: -14px; border: 7px solid rgba(0, 0, 0, 0); border-bottom-color: #fff; } .vega-embed .chart-wrapper.fit-x { width: 100%; } .vega-embed .chart-wrapper.fit-y { height: 100%; } .vega-embed-wrapper { max-width: 100%; overflow: auto; padding-right: 14px; } @keyframes scale-in { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } } `;function Fe(r,...t){for(const e of t)$r(r,e);return r}function $r(r,t){for(const e of Object.keys(t))qe(r,e,t[e],!0)}var Ir="vega-embed",Rr="6.26.0",Lr="Publish Vega visualizations as embedded web components.",Nr=["vega","data","visualization","component","embed"],br={type:"git",url:"http://github.com/vega/vega-embed.git"},Or={name:"UW Interactive Data Lab",url:"http://idl.cs.washington.edu"},wr=[{name:"Dominik Moritz",url:"https://www.domoritz.de"}],Tr={url:"https://github.com/vega/vega-embed/issues"},yr="https://github.com/vega/vega-embed#readme",Ar="BSD-3-Clause",Sr="build/vega-embed.js",Cr="build/vega-embed.module.js",xr="build/vega-embed.min.js",Dr="build/vega-embed.min.js",Pr="build/vega-embed.module.d.ts",Fr=["src","build"],_r={".":{import:{types:"./build/vega-embed.module.d.ts",default:"./build/vega-embed.module.js"},require:{default:"./build/vega-embed.js"}}},Gr={"@babel/core":"^7.24.7","@babel/eslint-parser":"^7.24.7","@babel/plugin-transform-runtime":"^7.24.7","@babel/preset-env":"^7.24.7","@babel/preset-typescript":"^7.24.7","@release-it/conventional-changelog":"^8.0.1","@rollup/plugin-commonjs":"26.0.1","@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^15.2.3","@rollup/plugin-terser":"^0.4.4","@types/semver":"^7.5.8","@typescript-eslint/parser":"^7.15.0","@vitest/coverage-v8":"^1.6.0","browser-sync":"^3.0.2",concurrently:"^8.2.2","del-cli":"^5.1.0",eslint:"^9.6.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","eslint-plugin-vitest":"^0.5.4",jsdom:"^24.1.0","postinstall-postinstall":"^2.1.0",prettier:"^3.3.2","release-it":"^17.4.1",rollup:"4.18.0","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-ts":"^3.4.5",sass:"^1.77.6",typescript:"^5.5.3","typescript-eslint":"^7.15.0",vega:"^5.30.0","vega-lite":"^5.19.0",vitest:"^1.6.0","vitest-canvas-mock":"^0.3.3"},jr={vega:"^5.21.0","vega-lite":"*"},Ur={"fast-json-patch":"^3.1.1","json-stringify-pretty-compact":"^3.0.0",semver:"^7.6.2",tslib:"^2.6.3","vega-interpreter":"^1.0.5","vega-schema-url-parser":"^2.2.0","vega-themes":"^2.15.0","vega-tooltip":"^0.34.0"},kr={prebuild:"yarn clean && yarn build:style",build:"rollup -c","build:style":"./build-style.sh",clean:"del-cli build src/style.ts",prepublishOnly:"yarn clean && yarn build",preversion:"yarn lint && yarn test",serve:"browser-sync start --directory -s -f build *.html",start:"yarn build && concurrently --kill-others -n Server,Rollup 'yarn serve' 'rollup -c -w'",pretest:"yarn build:style",test:"vitest run",prettierbase:"prettier '*.{css,scss,html}'",format:"eslint . --fix && yarn prettierbase --write",lint:"eslint . && yarn prettierbase --check",release:"release-it"},Xr={name:Ir,version:Rr,description:Lr,keywords:Nr,repository:br,author:Or,contributors:wr,bugs:Tr,homepage:yr,license:Ar,main:Sr,module:Cr,unpkg:xr,jsdelivr:Dr,types:Pr,files:Fr,exports:_r,devDependencies:Gr,peerDependencies:jr,dependencies:Ur,scripts:kr};const Vr=Xr.version,G=He;let B=Be;const _e=typeof window!="undefined"?window:void 0;B===void 0&&_e?.vl?.compile&&(B=_e.vl);const Ge={export:{svg:!0,png:!0},source:!0,compiled:!0,editor:!0},zr={CLICK_TO_VIEW_ACTIONS:"Click to view actions",COMPILED_ACTION:"View Compiled Vega",EDITOR_ACTION:"Open in Vega Editor",PNG_ACTION:"Save as PNG",SOURCE_ACTION:"View Source",SVG_ACTION:"Save as SVG"},J={vega:"Vega","vega-lite":"Vega-Lite"},se={vega:G.version,"vega-lite":B?B.version:"not available"},Hr={vega:r=>r,"vega-lite":(r,t)=>B.compile(r,{config:t}).spec},Mr=` `,Wr="chart-wrapper";function qr(r){return typeof r=="function"}function je(r,t,e,s){const h=`${t}
`,o=`
${e}`,w=window.open("");w.document.write(h+r+o),w.document.title=`${J[s]} JSON Source`}function Ue(r,t){if(r.$schema){const e=ge(r.$schema);t&&t!==e.library&&console.warn(`The given visualization spec is written in ${J[e.library]}, but mode argument sets ${J[t]??t}.`);const s=e.library;return Pe(se[s],`^${e.version.slice(1)}`)||console.warn(`The input spec uses ${J[s]} ${e.version}, but the current version of ${J[s]} is v${se[s]}.`),s}return"mark"in r||"encoding"in r||"layer"in r||"hconcat"in r||"vconcat"in r||"facet"in r||"repeat"in r?"vega-lite":"marks"in r||"signals"in r||"scales"in r||"axes"in r?"vega":t??"vega"}function ke(r){return!!(r&&"load"in r)}function Xe(r){return ke(r)?r:G.loader(r)}function Yr(r){const t=r.usermeta?.embedOptions??{};return Z(t.defaultStyle)&&(t.defaultStyle=!1),t}async function Br(r,t,e={}){let s,h;Z(t)?(h=Xe(e.loader),s=JSON.parse(await h.load(t))):s=t;const o=Yr(s),w=o.loader;(!h||w)&&(h=Xe(e.loader??w));const I=await Ve(o,h),i=await Ve(e,h),n={...Fe(i,I),config:ve(i.config??{},I.config??{})};return await Jr(r,s,n,h)}async function Ve(r,t){const e=Z(r.config)?JSON.parse(await t.load(r.config)):r.config??{},s=Z(r.patch)?JSON.parse(await t.load(r.patch)):r.patch;return{...r,...s?{patch:s}:{},...e?{config:e}:{}}}function Kr(r){const t=r.getRootNode?r.getRootNode():document;return t instanceof ShadowRoot?{root:t,rootContainer:t}:{root:document,rootContainer:document.head??document.body}}async function Jr(r,t,e={},s){const h=e.theme?ve(Ke[e.theme],e.config??{}):e.config,o=Me(e.actions)?e.actions:Fe({},Ge,e.actions??{}),w={...zr,...e.i18n},I=e.renderer??"canvas",i=e.logLevel??G.Warn,n=e.downloadFileName??"visualization",d=typeof r=="string"?document.querySelector(r):r;if(!d)throw new Error(`${r} does not exist`);if(e.defaultStyle!==!1){const L="vega-embed-style",{root:N,rootContainer:g}=Kr(d);if(!N.getElementById(L)){const T=document.createElement("style");T.id=L,T.innerHTML=e.defaultStyle===void 0||e.defaultStyle===!0?gr.toString():e.defaultStyle,g.appendChild(T)}}const $=Ue(t,e.mode);let A=Hr[$](t,h);if($==="vega-lite"&&A.$schema){const L=ge(A.$schema);Pe(se.vega,`^${L.version.slice(1)}`)||console.warn(`The compiled spec uses Vega ${L.version}, but current version is v${se.vega}.`)}d.classList.add("vega-embed"),o&&d.classList.add("has-actions"),d.innerHTML="";let D=d;if(o){const L=document.createElement("div");L.classList.add(Wr),d.appendChild(L),D=L}const c=e.patch;if(c&&(A=c instanceof Function?c(A):ze(A,c,!0,!1).newDocument),e.formatLocale&&G.formatLocale(e.formatLocale),e.timeFormatLocale&&G.timeFormatLocale(e.timeFormatLocale),e.expressionFunctions)for(const L in e.expressionFunctions){const N=e.expressionFunctions[L];"fn"in N?G.expressionFunction(L,N.fn,N.visitor):N instanceof Function&&G.expressionFunction(L,N)}const{ast:_}=e,C=G.parse(A,$==="vega-lite"?{}:h,{ast:_}),S=new(e.viewClass||G.View)(C,{loader:s,logLevel:i,renderer:I,..._?{expr:G.expressionInterpreter??e.expr??Ye}:{}});if(S.addSignalListener("autosize",(L,N)=>{const{type:g}=N;g=="fit-x"?(D.classList.add("fit-x"),D.classList.remove("fit-y")):g=="fit-y"?(D.classList.remove("fit-x"),D.classList.add("fit-y")):g=="fit"?D.classList.add("fit-x","fit-y"):D.classList.remove("fit-x","fit-y")}),e.tooltip!==!1){const{loader:L,tooltip:N}=e,g=L&&!ke(L)?L?.baseURL:void 0,T=qr(N)?N:new Je({baseURL:g,...N===!0?{}:N}).call;S.tooltip(T)}let{hover:b}=e;if(b===void 0&&(b=$==="vega"),b){const{hoverSet:L,updateSet:N}=typeof b=="boolean"?{}:b;S.hover(L,N)}e&&(e.width!=null&&S.width(e.width),e.height!=null&&S.height(e.height),e.padding!=null&&S.padding(e.padding)),await S.initialize(D,e.bind).runAsync();let P;if(o!==!1){let L=d;if(e.defaultStyle!==!1||e.forceActionsMenu){const g=document.createElement("details");g.title=w.CLICK_TO_VIEW_ACTIONS,d.append(g),L=g;const T=document.createElement("summary");T.innerHTML=Mr,g.append(T),P=F=>{g.contains(F.target)||g.removeAttribute("open")},document.addEventListener("click",P)}const N=document.createElement("div");if(L.append(N),N.classList.add("vega-actions"),o===!0||o.export!==!1){for(const g of["svg","png"])if(o===!0||o.export===!0||o.export[g]){const T=w[`${g.toUpperCase()}_ACTION`],F=document.createElement("a"),ae=We(e.scaleFactor)?e.scaleFactor[g]:e.scaleFactor;F.text=T,F.href="#",F.target="_blank",F.download=`${n}.${g}`,F.addEventListener("mousedown",async function(oe){oe.preventDefault();const le=await S.toImageURL(g,ae);this.href=le}),N.append(F)}}if(o===!0||o.source!==!1){const g=document.createElement("a");g.text=w.SOURCE_ACTION,g.href="#",g.addEventListener("click",function(T){je(ce(t),e.sourceHeader??"",e.sourceFooter??"",$),T.preventDefault()}),N.append(g)}if($==="vega-lite"&&(o===!0||o.compiled!==!1)){const g=document.createElement("a");g.text=w.COMPILED_ACTION,g.href="#",g.addEventListener("click",function(T){je(ce(A),e.sourceHeader??"",e.sourceFooter??"","vega"),T.preventDefault()}),N.append(g)}if(o===!0||o.editor!==!1){const g=e.editorUrl??"https://vega.github.io/editor/",T=document.createElement("a");T.text=w.EDITOR_ACTION,T.href="#",T.addEventListener("click",function(F){vr(window,g,{config:h,mode:c?"vega":$,renderer:I,spec:ce(c?A:t)}),F.preventDefault()}),N.append(T)}}function ne(){P&&document.removeEventListener("click",P),S.finalize()}return{view:S,spec:t,vgSpec:A,finalize:ne,embedOptions:e}}export default Br;export{Ge as DEFAULT_ACTIONS,Ue as guessMode,G as vega,B as vegaLite,Vr as version};