@galaxyproject/galaxy-client
Version:
Galaxy client application build system
1 lines • 277 kB
JavaScript
"use strict";(self.webpackChunk_galaxyproject_galaxy_client=self.webpackChunk_galaxyproject_galaxy_client||[]).push([[949],{62949:(e,t,n)=>{n.d(t,{Ay:()=>Pg});var i={};n.r(i),n.d(i,{Bounds:()=>S.cz,CanvasHandler:()=>S.Vb,CanvasRenderer:()=>S.KB,DATE:()=>w.vH,DAY:()=>w.d_,DAYOFYEAR:()=>w.V6,Dataflow:()=>l.bn,Debug:()=>c.y,Error:()=>c.$D,EventStream:()=>l.vC,Gradient:()=>S.Hf,GroupItem:()=>S.NZ,HOURS:()=>w.Al,Handler:()=>S.hR,HybridHandler:()=>S.JA,HybridRenderer:()=>S.YR,Info:()=>c.R2,Item:()=>S.q7,MILLISECONDS:()=>w.R5,MINUTES:()=>w.eX,MONTH:()=>w.Lp,Marks:()=>S.Pl,MultiPulse:()=>l.Py,None:()=>c.NV,Operator:()=>l.XP,Parameters:()=>l.H$,Pulse:()=>l.S9,QUARTER:()=>w.pz,RenderType:()=>S.nJ,Renderer:()=>S.A4,ResourceLoader:()=>S.WH,SECONDS:()=>w.cs,SVGHandler:()=>S.Fb,SVGRenderer:()=>S.w4,SVGStringRenderer:()=>S.fI,Scenegraph:()=>S.hA,TIME_UNITS:()=>w.SY,Transform:()=>l.dL,View:()=>O.S,WEEK:()=>w.V8,Warn:()=>c.P$,YEAR:()=>w.UX,accessor:()=>c.sY,accessorFields:()=>c.nS,accessorName:()=>c.N6,array:()=>c.YO,ascending:()=>c.V_,bandwidthNRD:()=>$.ks,bin:()=>$.e5,bootstrapCI:()=>$.ds,boundClip:()=>S.Th,boundContext:()=>S.aj,boundItem:()=>S.kV,boundMark:()=>S.Od,boundStroke:()=>S.tj,changeset:()=>l.no,clampRange:()=>c.BS,codegenExpression:()=>P.Se,compare:()=>c.UD,constant:()=>c.dY,cumulativeLogNormal:()=>$.$g,cumulativeNormal:()=>$.r$,cumulativeUniform:()=>$.q7,dayofyear:()=>w.xo,debounce:()=>c.sg,defaultLocale:()=>N.q,definition:()=>l.mw,densityLogNormal:()=>$.UD,densityNormal:()=>$.gX,densityUniform:()=>$.fF,domChild:()=>S.tz,domClear:()=>S.AZ,domCreate:()=>S.ri,domFind:()=>S.wt,dotbin:()=>$.VY,error:()=>c.z3,expressionFunction:()=>F.T_,extend:()=>c.X$,extent:()=>c.Xx,extentIndex:()=>c.n,falsy:()=>c.me,fastmap:()=>c.nG,field:()=>c.ZZ,flush:()=>c.bX,font:()=>S.gx,fontFamily:()=>S.mw,fontSize:()=>S.J,format:()=>k.GP,formatLocale:()=>N._5,formats:()=>k.Fx,hasOwnProperty:()=>c.mQ,id:()=>c.id,identity:()=>c.D_,inferType:()=>k.nS,inferTypes:()=>k.WE,ingest:()=>l.NW,inherits:()=>c.B,inrange:()=>c.PK,interpolate:()=>E.GW,interpolateColors:()=>E.Y7,interpolateRange:()=>E.Td,intersect:()=>S.y$,intersectBoxLine:()=>S.Ng,intersectPath:()=>S.hW,intersectPoint:()=>S.C6,intersectRule:()=>S.u6,isArray:()=>c.cy,isBoolean:()=>c.Lm,isDate:()=>c.$P,isFunction:()=>c.Tn,isIterable:()=>c.xZ,isNumber:()=>c.Et,isObject:()=>c.Gv,isRegExp:()=>c.gd,isString:()=>c.Kg,isTuple:()=>l.l0,key:()=>c.Eb,lerp:()=>c.Cc,lineHeight:()=>S.K_,loader:()=>k.wG,locale:()=>N.Hg,logger:()=>c.vF,lruCache:()=>c.EV,markup:()=>S.PT,merge:()=>c.h1,mergeConfig:()=>c.io,multiLineOffset:()=>S.Jj,one:()=>c.xH,pad:()=>c.eV,panLinear:()=>c.VC,panLog:()=>c.KH,panPow:()=>c.co,panSymlog:()=>c.zy,parse:()=>C.qg,parseExpression:()=>P.YK,parseSelector:()=>R.P,path:()=>S.Ae,pathCurves:()=>S.aV,pathEqual:()=>S.qv,pathParse:()=>S.pI,pathRectangle:()=>S.ll,pathRender:()=>S.ge,pathSymbols:()=>S.b_,pathTrail:()=>S.uR,peek:()=>c.se,point:()=>S.zx,projection:()=>D.Qj,quantileLogNormal:()=>$.F4,quantileNormal:()=>$.Zt,quantileUniform:()=>$.Mv,quantiles:()=>$.tI,quantizeInterpolator:()=>E.Ho,quarter:()=>c.$G,quartiles:()=>$.pk,random:()=>$.yT,randomInteger:()=>$.Mn,randomKDE:()=>$.sX,randomLCG:()=>$.AJ,randomLogNormal:()=>$.Rb,randomMixture:()=>$.Ot,randomNormal:()=>$.FE,randomUniform:()=>$.Ye,read:()=>k.LF,regressionConstant:()=>$.sF,regressionExp:()=>$.dh,regressionLinear:()=>$.r3,regressionLoess:()=>$.y5,regressionLog:()=>$.g,regressionPoly:()=>$.eH,regressionPow:()=>$.yR,regressionQuad:()=>$.x1,renderModule:()=>S.Hn,repeat:()=>c.ux,resetDefaultLocale:()=>N.Xs,resetSVGClipId:()=>S.Fq,resetSVGDefIds:()=>S.b$,responseType:()=>k.e5,runtimeContext:()=>T._,sampleCurve:()=>$.mH,sampleLogNormal:()=>$.EJ,sampleNormal:()=>$.y8,sampleUniform:()=>$.dG,scale:()=>E.hs,sceneEqual:()=>S.fj,sceneFromJSON:()=>S.nx,scenePickVisit:()=>S.xS,sceneToJSON:()=>S.WK,sceneVisit:()=>S.mT,sceneZOrder:()=>S.bj,scheme:()=>E.KR,serializeXML:()=>S.YA,setHybridRendererOptions:()=>S.mq,setRandom:()=>$.OE,span:()=>c.Ln,splitAccessPath:()=>c.iv,stringValue:()=>c.r$,textMetrics:()=>S.dT,timeBin:()=>w.rz,timeFloor:()=>w.Qc,timeFormatLocale:()=>N.cA,timeInterval:()=>w.f$,timeOffset:()=>w.TO,timeSequence:()=>w.TD,timeUnitSpecifier:()=>w.Uo,timeUnits:()=>w.F7,toBoolean:()=>c.G4,toDate:()=>c.ay,toNumber:()=>c.Ro,toSet:()=>c.M1,toString:()=>c.dI,transform:()=>l.pd,transforms:()=>l.mY,truncate:()=>c.xv,truthy:()=>c.vN,tupleid:()=>l.uS,typeParsers:()=>k.tr,utcFloor:()=>w.tI,utcInterval:()=>w.Kc,utcOffset:()=>w.SN,utcSequence:()=>w.Yf,utcdayofyear:()=>w.VM,utcquarter:()=>c.vu,utcweek:()=>w.BU,version:()=>_,visitArray:()=>c.rt,week:()=>w.HH,writeConfig:()=>c.AU,zero:()=>c.v_,zoomLinear:()=>c.lL,zoomLog:()=>c.oV,zoomPow:()=>c.SW,zoomSymlog:()=>c.B2});var r={};n.r(r),n.d(r,{accessPathDepth:()=>be,accessPathWithDatum:()=>pe,compile:()=>$h,contains:()=>V,deepEqual:()=>Fe,deleteNestedProperty:()=>fe,duplicate:()=>U,entries:()=>se,every:()=>K,fieldIntersection:()=>ie,flatAccessWithDatum:()=>me,getFirstDefined:()=>xe,hasIntersection:()=>te,hasProperty:()=>Te,hash:()=>H,internalField:()=>Se,isBoolean:()=>ce,isEmpty:()=>re,isEqual:()=>Z,isInternalField:()=>Ee,isNullOrFalse:()=>B,isNumeric:()=>Oe,keys:()=>oe,logicalExpr:()=>ue,mergeDeep:()=>X,never:()=>q,normalize:()=>Pl,normalizeAngle:()=>De,omit:()=>G,pick:()=>W,prefixGenerator:()=>ne,removePathFromField:()=>ve,replaceAll:()=>ye,replacePathInField:()=>ge,resetIdCounter:()=>ke,setEqual:()=>ee,some:()=>Y,stringify:()=>Ce,titleCase:()=>de,unique:()=>J,uniqueId:()=>we,vals:()=>ae,varName:()=>le,version:()=>wh});var o=n(24221),a=n(48487),s=n.n(a),c=n(26372),l=n(24988),u=n(53473),f=n(64322),d=n(73784),p=n(66271),m=n(78232),h=n(54025),g=n(43308),y=n(62804),v=n(60377),b=n(36634),x=n(98897),$=n(48872),w=n(71652),k=n(67809),S=n(70959),E=n(20649),D=n(60374),O=n(45876),N=n(40300),F=n(53002),C=n(36808),T=n(96056),P=n(21720),R=n(45948),_="5.30.0";(0,c.X$)(l.mY,u,f,d,p,m,g,h,y,v,b,x);var A=n(48196);function L(e){return Te(e,"or")}function z(e){return Te(e,"and")}function I(e){return Te(e,"not")}function j(e,t){if(I(e))j(e.not,t);else if(z(e))for(const n of e.and)j(n,t);else if(L(e))for(const n of e.or)j(n,t);else t(e)}function M(e,t){return I(e)?{not:M(e.not,t)}:z(e)?{and:e.and.map((e=>M(e,t)))}:L(e)?{or:e.or.map((e=>M(e,t)))}:t(e)}const U=structuredClone;function q(e){throw new Error(e)}function W(e,t){const n={};for(const i of t)(0,c.mQ)(e,i)&&(n[i]=e[i]);return n}function G(e,t){const n={...e};for(const e of t)delete n[e];return n}function H(e){if((0,c.Et)(e))return e;const t=(0,c.Kg)(e)?e:Ce(e);if(t.length<250)return t;let n=0;for(let e=0;e<t.length;e++){n=(n<<5)-n+t.charCodeAt(e),n|=0}return n}function B(e){return!1===e||null===e}function V(e,t){return e.includes(t)}function Y(e,t){let n=0;for(const[i,r]of e.entries())if(t(r,i,n++))return!0;return!1}function K(e,t){let n=0;for(const[i,r]of e.entries())if(!t(r,i,n++))return!1;return!0}function X(e,...t){for(const n of t)Q(e,n??{});return e}function Q(e,t){for(const n of oe(t))(0,c.AU)(e,n,t[n],!0)}function J(e,t){const n=[],i={};let r;for(const o of e)r=t(o),r in i||(i[r]=1,n.push(o));return n}function Z(e,t){const n=oe(e),i=oe(t);if(n.length!==i.length)return!1;for(const i of n)if(e[i]!==t[i])return!1;return!0}function ee(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function te(e,t){for(const n of e)if(t.has(n))return!0;return!1}function ne(e){const t=new Set;for(const n of e){const e=(0,c.iv)(n).map(((e,t)=>0===t?e:`[${e}]`)),i=e.map(((t,n)=>e.slice(0,n+1).join("")));for(const e of i)t.add(e)}return t}function ie(e,t){return void 0===e||void 0===t||te(ne(e),ne(t))}function re(e){return 0===oe(e).length}Set.prototype.toJSON=function(){return`Set(${[...this].map((e=>Ce(e))).join(",")})`};const oe=Object.keys,ae=Object.values,se=Object.entries;function ce(e){return!0===e||!1===e}function le(e){const t=e.replace(/\W/g,"_");return(e.match(/^\d+/)?"_":"")+t}function ue(e,t){return I(e)?`!(${ue(e.not,t)})`:z(e)?`(${e.and.map((e=>ue(e,t))).join(") && (")})`:L(e)?`(${e.or.map((e=>ue(e,t))).join(") || (")})`:t(e)}function fe(e,t){if(0===t.length)return!0;const n=t.shift();return n in e&&fe(e[n],t)&&delete e[n],re(e)}function de(e){return e.charAt(0).toUpperCase()+e.substr(1)}function pe(e,t="datum"){const n=(0,c.iv)(e),i=[];for(let e=1;e<=n.length;e++){const r=`[${n.slice(0,e).map(c.r$).join("][")}]`;i.push(`${t}${r}`)}return i.join(" && ")}function me(e,t="datum"){return`${t}[${(0,c.r$)((0,c.iv)(e).join("."))}]`}function he(e){return e.replace(/(\[|\]|\.|'|")/g,"\\$1")}function ge(e){return`${(0,c.iv)(e).map(he).join("\\.")}`}function ye(e,t,n){return e.replace(new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),n)}function ve(e){return`${(0,c.iv)(e).join(".")}`}function be(e){return e?(0,c.iv)(e).length:0}function xe(...e){return e.find((e=>void 0!==e))}let $e=42;function we(e){const t=++$e;return e?String(e)+t:t}function ke(){$e=42}function Se(e){return Ee(e)?e:`__${e}`}function Ee(e){return e.startsWith("__")}function De(e){if(void 0!==e)return(e%360+360)%360}function Oe(e){return!!(0,c.Et)(e)||!isNaN(e)&&!isNaN(parseFloat(e))}const Ne=Object.getPrototypeOf(structuredClone({}));function Fe(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor.name!==t.constructor.name)return!1;let n,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(i=n;0!=i--;)if(!Fe(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const n of e.entries())if(!t.has(n[0]))return!1;for(const n of e.entries())if(!Fe(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e.entries())if(!t.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(i=n;0!=i--;)if(e[i]!==t[i])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&e.valueOf!==Ne.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&e.toString!==Ne.toString)return e.toString()===t.toString();const r=Object.keys(e);if(n=r.length,n!==Object.keys(t).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(t,r[i]))return!1;for(i=n;0!=i--;){const n=r[i];if(!Fe(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Ce(e){const t=[];return function e(n){if(n&&n.toJSON&&"function"==typeof n.toJSON&&(n=n.toJSON()),void 0===n)return;if("number"==typeof n)return isFinite(n)?""+n:"null";if("object"!=typeof n)return JSON.stringify(n);let i,r;if(Array.isArray(n)){for(r="[",i=0;i<n.length;i++)i&&(r+=","),r+=e(n[i])||"null";return r+"]"}if(null===n)return"null";if(t.includes(n))throw new TypeError("Converting circular structure to JSON");const o=t.push(n)-1,a=Object.keys(n).sort();for(r="",i=0;i<a.length;i++){const t=a[i],o=e(n[t]);o&&(r&&(r+=","),r+=JSON.stringify(t)+":"+o)}return t.splice(o,1),`{${r}}`}(e)}function Te(e,t){return(0,c.Gv)(e)&&(0,c.mQ)(e,t)&&void 0!==e[t]}const Pe="row",Re="column",_e="facet",Ae="x",Le="y",ze="x2",Ie="y2",je="xOffset",Me="yOffset",Ue="radius",qe="radius2",We="theta",Ge="theta2",He="latitude",Be="longitude",Ve="latitude2",Ye="longitude2",Ke="color",Xe="fill",Qe="stroke",Je="shape",Ze="size",et="angle",tt="opacity",nt="fillOpacity",it="strokeOpacity",rt="strokeWidth",ot="strokeDash",at="text",st="order",ct="detail",lt="key",ut="tooltip",ft="href",dt="url",pt="description",mt={theta:1,theta2:1,radius:1,radius2:1};function ht(e){return(0,c.mQ)(mt,e)}const gt={longitude:1,longitude2:1,latitude:1,latitude2:1};function yt(e){switch(e){case He:return"y";case Ve:return"y2";case Be:return"x";case Ye:return"x2"}}function vt(e){return(0,c.mQ)(gt,e)}const bt=oe(gt),xt={x:1,y:1,x2:1,y2:1,...mt,...gt,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 $t(e){return e===Ke||e===Xe||e===Qe}const wt={row:1,column:1,facet:1},kt=oe(wt),St={...xt,...wt},Et=oe(St),{order:Dt,detail:Ot,tooltip:Nt,...Ft}=St,{row:Ct,column:Tt,facet:Pt,...Rt}=Ft;oe(Ft),oe(Rt);function _t(e){return(0,c.mQ)(St,e)}const At=[ze,Ie,Ve,Ye,Ge,qe];function Lt(e){return zt(e)!==e}function zt(e){switch(e){case ze:return Ae;case Ie:return Le;case Ve:return He;case Ye:return Be;case Ge:return We;case qe:return Ue}return e}function It(e){if(ht(e))switch(e){case We:return"startAngle";case Ge:return"endAngle";case Ue:return"outerRadius";case qe:return"innerRadius"}return e}function jt(e){switch(e){case Ae:return ze;case Le:return Ie;case He:return Ve;case Be:return Ye;case We:return Ge;case Ue:return qe}}function Mt(e){switch(e){case Ae:case ze:return"width";case Le:case Ie:return"height"}}function Ut(e){switch(e){case Ae:return"xOffset";case Le:return"yOffset";case ze:return"x2Offset";case Ie:return"y2Offset";case We:return"thetaOffset";case Ue:return"radiusOffset";case Ge:return"theta2Offset";case qe:return"radius2Offset"}}function qt(e){switch(e){case Ae:return"xOffset";case Le:return"yOffset"}}function Wt(e){switch(e){case"xOffset":return"x";case"yOffset":return"y"}}const Gt=oe(xt),{x:Ht,y:Bt,x2:Vt,y2:Yt,xOffset:Kt,yOffset:Xt,latitude:Qt,longitude:Jt,latitude2:Zt,longitude2:en,theta:tn,theta2:nn,radius:rn,radius2:on,...an}=xt,sn=oe(an),cn={x:1,y:1},ln=oe(cn);function un(e){return(0,c.mQ)(cn,e)}const fn={theta:1,radius:1},dn=oe(fn);function pn(e){return"width"===e?Ae:Le}const mn={xOffset:1,yOffset:1};oe(mn);function hn(e){return(0,c.mQ)(mn,e)}const{text:gn,tooltip:yn,href:vn,url:bn,description:xn,detail:$n,key:wn,order:kn,...Sn}=an,En=oe(Sn);const Dn={...cn,...fn,...mn,...Sn},On=oe(Dn);function Nn(e){return(0,c.mQ)(Dn,e)}function Fn(e,t){return function(e){switch(e){case Ke:case Xe:case Qe:case pt:case ct:case lt:case ut:case ft:case st:case tt:case nt:case it:case rt:case _e:case Pe:case Re:return Cn;case Ae:case Le:case je:case Me:case He:case Be:return Pn;case ze:case Ie:case Ve:case Ye:return{area:"always",bar:"always",image:"always",rect:"always",rule:"always",circle:"binned",point:"binned",square:"binned",tick:"binned",line:"binned",trail:"binned"};case Ze:return{point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",text:"always",line:"always",trail:"always"};case ot:return{line:"always",point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",geoshape:"always"};case Je:return{point:"always",geoshape:"always"};case at:return{text:"always"};case et:return{point:"always",square:"always",text:"always"};case dt:return{image:"always"};case We:case Ue:return{text:"always",arc:"always"};case Ge:case qe:return{arc:"always"}}}(e)[t]}const Cn={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"},{geoshape:Tn,...Pn}=Cn;function Rn(e){switch(e){case Ae:case Le:case We:case Ue:case je:case Me:case Ze:case et:case rt:case tt:case nt:case it:case ze:case Ie:case Ge:case qe:return;case _e:case Pe:case Re:case Je:case ot:case at:case ut:case ft:case dt:case pt:return"discrete";case Ke:case Xe:case Qe:return"flexible";case He:case Be:case Ve:case Ye:case ct:case lt:case st:return}}const _n={argmax:1,argmin:1,average:1,count:1,distinct:1,exponential:1,exponentialb: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},An={count:1,min:1,max:1};function Ln(e){return Te(e,"argmin")}function zn(e){return Te(e,"argmax")}function In(e){return(0,c.Kg)(e)&&(0,c.mQ)(_n,e)}const jn=new Set(["count","valid","missing","distinct"]);function Mn(e){return(0,c.Kg)(e)&&jn.has(e)}const Un=new Set(["count","sum","distinct","valid","missing"]),qn=new Set(["mean","average","median","q1","q3","min","max"]);function Wn(e){return(0,c.Lm)(e)&&(e=os(e,void 0)),"bin"+oe(e).map((t=>Vn(e[t])?le(`_${t}_${se(e[t])}`):le(`_${t}_${e[t]}`))).join("")}function Gn(e){return!0===e||Bn(e)&&!e.binned}function Hn(e){return"binned"===e||Bn(e)&&!0===e.binned}function Bn(e){return(0,c.Gv)(e)}function Vn(e){return Te(e,"param")}function Yn(e){switch(e){case Pe:case Re:case Ze:case Ke:case Xe:case Qe:case rt:case tt:case nt:case it:case Je:return 6;case ot:return 4;default:return 10}}function Kn(e){return Te(e,"expr")}function Xn(e,{level:t}={level:0}){const n=oe(e||{}),i={};for(const r of n)i[r]=0===t?ai(e[r]):Xn(e[r],{level:t-1});return i}function Qn(e){const{anchor:t,frame:n,offset:i,orient:r,angle:o,limit:a,color:s,subtitleColor:c,subtitleFont:l,subtitleFontSize:u,subtitleFontStyle:f,subtitleFontWeight:d,subtitleLineHeight:p,subtitlePadding:m,...h}=e,g={...t?{anchor:t}:{},...n?{frame:n}:{},...i?{offset:i}:{},...r?{orient:r}:{},...void 0!==o?{angle:o}:{},...void 0!==a?{limit:a}:{}},y={...c?{subtitleColor:c}:{},...l?{subtitleFont:l}:{},...u?{subtitleFontSize:u}:{},...f?{subtitleFontStyle:f}:{},...d?{subtitleFontWeight:d}:{},...p?{subtitleLineHeight:p}:{},...m?{subtitlePadding:m}:{}};return{titleMarkConfig:{...h,...s?{fill:s}:{}},subtitleMarkConfig:W(e,["align","baseline","dx","dy","limit"]),nonMarkTitleProperties:g,subtitle:y}}function Jn(e){return(0,c.Kg)(e)||(0,c.cy)(e)&&(0,c.Kg)(e[0])}function Zn(e){return Te(e,"signal")}function ei(e){return Te(e,"step")}function ti(e){return!(0,c.cy)(e)&&(Te(e,"field")&&Te(e,"data"))}const ni=oe({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}),ii={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"];function oi(e){const t=(0,c.cy)(e.condition)?e.condition.map(si):si(e.condition);return{...ai(e),condition:t}}function ai(e){if(Kn(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function si(e){if(Kn(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function ci(e){if(Kn(e)){const{expr:t,...n}=e;return{signal:t,...n}}return Zn(e)?e:void 0!==e?{value:e}:void 0}function li(e){return Zn(e)?e.signal:(0,c.r$)(e.value)}function ui(e){return Zn(e)?e.signal:null==e?null:(0,c.r$)(e)}function fi(e,t,n){for(const i of n){const n=mi(i,t.markDef,t.config);void 0!==n&&(e[i]=ci(n))}return e}function di(e){return[].concat(e.type,e.style??[])}function pi(e,t,n,i={}){const{vgChannel:r,ignoreVgConfig:o}=i;return r&&Te(t,r)?t[r]:void 0!==t[e]?t[e]:!o||r&&r!==e?mi(e,t,n,i):void 0}function mi(e,t,n,{vgChannel:i}={}){const r=hi(e,t,n.style);return xe(i?r:void 0,r,i?n[t.type][i]:void 0,n[t.type][e],i?n.mark[i]:n.mark[e])}function hi(e,t,n){return gi(e,di(t),n)}function gi(e,t,n){let i;t=(0,c.YO)(t);for(const r of t){const t=n[r];Te(t,e)&&(i=t[e])}return i}function yi(e,t){return(0,c.YO)(e).reduce(((e,n)=>(e.field.push(Ha(n,t)),e.order.push(n.sort??"ascending"),e)),{field:[],order:[]})}function vi(e,t){const n=[...e];return t.forEach((e=>{for(const t of n)if(Fe(t,e))return;n.push(e)})),n}function bi(e,t){return Fe(e,t)||!t?e:e?[...(0,c.YO)(e),...(0,c.YO)(t)].join(", "):t}function xi(e,t){const n=e.value,i=t.value;if(null==n||null===i)return{explicit:e.explicit,value:null};if((Jn(n)||Zn(n))&&(Jn(i)||Zn(i)))return{explicit:e.explicit,value:bi(n,i)};if(Jn(n)||Zn(n))return{explicit:e.explicit,value:n};if(Jn(i)||Zn(i))return{explicit:e.explicit,value:i};if(!(Jn(n)||Zn(n)||Jn(i)||Zn(i)))return{explicit:e.explicit,value:vi(n,i)};throw new Error("It should never reach here")}function $i(e){return`Invalid specification ${Ce(e)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}const wi='Autosize "fit" only works for single views and layered views.';function ki(e){return`${"width"==e?"Width":"Height"} "container" only works for single views and layered views.`}function Si(e){return`${"width"==e?"Width":"Height"} "container" only works well with autosize "fit" or "fit-${"width"==e?"x":"y"}".`}function Ei(e){return e?`Dropping "fit-${e}" because spec has discrete ${Mt(e)}.`:'Dropping "fit" because spec has discrete size.'}function Di(e){return`Unknown field for ${e}. Cannot calculate view size.`}function Oi(e){return`Cannot project a selection on encoding channel "${e}", which has no field.`}function Ni(e,t){return`Cannot project a selection on encoding channel "${e}" as it uses an aggregate function ("${t}").`}function Fi(e){return`Selection not supported for ${e} yet.`}const Ci="The same selection must be used to override scale domains in a layered view.";function Ti(e){return`The "columns" property cannot be used when "${e}" has nested row/column.`}function Pi(e,t,n){return`An ancestor parsed field "${e}" as ${n} but a child wants to parse the field as ${t}.`}function Ri(e){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${e} are dropped.`}function _i(e){return`${e}Offset dropped because ${e} is continuous`}function Ai(e){return`Invalid field type "${e}".`}function Li(e,t){const{fill:n,stroke:i}=t;return`Dropping color ${e} as the plot also has ${n&&i?"fill and stroke":n?"fill":"stroke"}.`}function zi(e,t){return`Dropping ${Ce(e)} from channel "${t}" since it does not contain any data field, datum, value, or signal.`}function Ii(e,t,n){return`${e} dropped as it is incompatible with "${t}"${n?` when ${n}`:""}.`}function ji(e){return`${e} encoding should be discrete (ordinal / nominal / binned).`}function Mi(e){return`${e} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function Ui(e,t){return`Using discrete channel "${e}" to encode "${t}" field can be misleading as it does not encode ${"ordinal"===t?"order":"magnitude"}.`}function qi(e){return`Using unaggregated domain with raw field has no effect (${Ce(e)}).`}function Wi(e){return`Unaggregated domain not applicable for "${e}" since it produces values outside the origin domain of the source data.`}function Gi(e){return`Unaggregated domain is currently unsupported for log scale (${Ce(e)}).`}function Hi(e,t,n){return`${n}-scale's "${t}" is dropped as it does not work with ${e} scale.`}function Bi(e){return`The step for "${e}" is dropped because the ${"width"===e?"x":"y"} is continuous.`}const Vi="Domains that should be unioned has conflicting sort properties. Sort will be set to true.";function Yi(e,t){return`Invalid ${e}: ${Ce(t)}.`}function Ki(e){return`1D error band does not support ${e}.`}function Xi(e){return`Channel ${e} is required for "binned" bin.`}const Qi=(0,c.vF)(c.P$);let Ji=Qi;function Zi(){return Ji=Qi,Ji}function er(...e){Ji.warn(...e)}function tr(e){if(e&&(0,c.Gv)(e))for(const t of lr)if(Te(e,t))return!0;return!1}new WeakMap;const nr=["january","february","march","april","may","june","july","august","september","october","november","december"],ir=nr.map((e=>e.substr(0,3))),rr=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],or=rr.map((e=>e.substr(0,3)));function ar(e,t){const n=[];if(t&&void 0!==e.day&&oe(e).length>1&&(er(function(e){return`Dropping day from datetime ${Ce(e)} as day cannot be combined with other units.`}(e)),delete(e=U(e)).day),void 0!==e.year?n.push(e.year):n.push(2012),void 0!==e.month){const i=t?function(e){if(Oe(e)&&(e=+e),(0,c.Et)(e))return e-1;{const t=e.toLowerCase(),n=nr.indexOf(t);if(-1!==n)return n;const i=t.substr(0,3),r=ir.indexOf(i);if(-1!==r)return r;throw new Error(Yi("month",e))}}(e.month):e.month;n.push(i)}else if(void 0!==e.quarter){const i=t?function(e){if(Oe(e)&&(e=+e),(0,c.Et)(e))return e>4&&er(Yi("quarter",e)),e-1;throw new Error(Yi("quarter",e))}(e.quarter):e.quarter;n.push((0,c.Et)(i)?3*i:`${i}*3`)}else n.push(0);if(void 0!==e.date)n.push(e.date);else if(void 0!==e.day){const i=t?function(e){if(Oe(e)&&(e=+e),(0,c.Et)(e))return e%7;{const t=e.toLowerCase(),n=rr.indexOf(t);if(-1!==n)return n;const i=t.substr(0,3),r=or.indexOf(i);if(-1!==r)return r;throw new Error(Yi("day",e))}}(e.day):e.day;n.push((0,c.Et)(i)?i+1:`${i}+1`)}else n.push(1);for(const t of["hours","minutes","seconds","milliseconds"]){const i=e[t];n.push(void 0===i?0:i)}return n}function sr(e){const t=ar(e,!0).join(", ");return e.utc?`utc(${t})`:`datetime(${t})`}const cr={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},lr=oe(cr);function ur(e){return(0,c.Gv)(e)?e.binned:fr(e)}function fr(e){return e&&e.startsWith("binned")}function dr(e){return e.startsWith("utc")}const pr={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function mr(e){return lr.filter((t=>gr(e,t)))}function hr(e){const t=mr(e);return t[t.length-1]}function gr(e,t){const n=e.indexOf(t);return!(n<0)&&(!(n>0&&"seconds"===t&&"i"===e.charAt(n-1))&&(!(e.length>n+3&&"day"===t&&"o"===e.charAt(n+3))&&!(n>0&&"year"===t&&"f"===e.charAt(n-1))))}function yr(e,t,{end:n}={end:!1}){const i=pe(t),r=dr(e)?"utc":"";let o;const a={};for(const t of lr)gr(e,t)&&(a[t]="quarter"===(s=t)?`(${r}quarter(${i})-1)`:`${r}${s}(${i})`,o=t);var s;return n&&(a[o]+="+1"),function(e){const t=ar(e,!1).join(", ");return e.utc?`utc(${t})`:`datetime(${t})`}(a)}function vr(e){if(!e)return;return`timeUnitSpecifier(${Ce(mr(e))}, ${Ce(pr)})`}function br(e){if(!e)return;let t;return(0,c.Kg)(e)?t=fr(e)?{unit:e.substring(6),binned:!0}:{unit:e}:(0,c.Gv)(e)&&(t={...e,...e.unit?{unit:e.unit}:{}}),dr(t.unit)&&(t.utc=!0,t.unit=function(e){return e.substring(3)}(t.unit)),t}function xr(e,t=e=>e){const n=br(e),i=hr(n.unit);if(i&&"day"!==i){const e={year:2001,month:1,date:1,hours:0,minutes:0,seconds:0,milliseconds:0},{step:r,part:o}=wr(i,n.step);return`${t(sr({...e,[o]:+e[o]+r}))} - ${t(sr(e))}`}}const $r={year:1,month:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1};function wr(e,t=1){if(function(e){return(0,c.mQ)($r,e)}(e))return{part:e,step:t};switch(e){case"day":case"dayofyear":return{part:"date",step:t};case"quarter":return{part:"month",step:3*t};case"week":return{part:"date",step:7*t}}}function kr(e){return!!e?.field&&void 0!==e.equal}function Sr(e){return!!e?.field&&void 0!==e.lt}function Er(e){return!!e?.field&&void 0!==e.lte}function Dr(e){return!!e?.field&&void 0!==e.gt}function Or(e){return!!e?.field&&void 0!==e.gte}function Nr(e){if(e?.field){if((0,c.cy)(e.range)&&2===e.range.length)return!0;if(Zn(e.range))return!0}return!1}function Fr(e){return!!e?.field&&((0,c.cy)(e.oneOf)||(0,c.cy)(e.in))}function Cr(e){return Fr(e)||kr(e)||Nr(e)||Sr(e)||Dr(e)||Er(e)||Or(e)}function Tr(e,t){return cs(e,{timeUnit:t,wrapTime:!0})}function Pr(e,t=!0){const{field:n}=e,i=br(e.timeUnit),{unit:r,binned:o}=i||{},a=Ha(e,{expr:"datum"}),s=r?`time(${o?a:yr(r,n)})`:a;if(kr(e))return`${s}===${Tr(e.equal,r)}`;if(Sr(e)){return`${s}<${Tr(e.lt,r)}`}if(Dr(e)){return`${s}>${Tr(e.gt,r)}`}if(Er(e)){return`${s}<=${Tr(e.lte,r)}`}if(Or(e)){return`${s}>=${Tr(e.gte,r)}`}if(Fr(e))return`indexof([${function(e,t){return e.map((e=>Tr(e,t)))}(e.oneOf,r).join(",")}], ${s}) !== -1`;if(function(e){return!!e?.field&&void 0!==e.valid}(e))return Rr(s,e.valid);if(Nr(e)){const{range:n}=Xn(e),i=Zn(n)?{signal:`${n.signal}[0]`}:n[0],o=Zn(n)?{signal:`${n.signal}[1]`}:n[1];if(null!==i&&null!==o&&t)return"inrange("+s+", ["+Tr(i,r)+", "+Tr(o,r)+"])";const a=[];return null!==i&&a.push(`${s} >= ${Tr(i,r)}`),null!==o&&a.push(`${s} <= ${Tr(o,r)}`),a.length>0?a.join(" && "):"true"}throw new Error(`Invalid field predicate: ${Ce(e)}`)}function Rr(e,t=!0){return t?`isValid(${e}) && isFinite(+${e})`:`!isValid(${e}) || !isFinite(+${e})`}function _r(e){return Cr(e)&&e.timeUnit?{...e,timeUnit:br(e.timeUnit)}:e}const Ar={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"};function Lr(e){return"quantitative"===e||"temporal"===e}function zr(e){return"ordinal"===e||"nominal"===e}const Ir=Ar.quantitative,jr=Ar.ordinal,Mr=Ar.temporal,Ur=Ar.nominal,qr=Ar.geojson;oe(Ar);const Wr={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"},Gr={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"};oe(Gr);function Hr(e,t){const n=Gr[e],i=Gr[t];return n===i||"ordinal-position"===n&&"time"===i||"ordinal-position"===i&&"time"===n}const Br={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 Vr(e){return Br[e]}const Yr=new Set(["linear","log","pow","sqrt","symlog"]),Kr=new Set([...Yr,"time","utc"]);function Xr(e){return Yr.has(e)}const Qr=new Set(["quantile","quantize","threshold"]),Jr=new Set([...Kr,...Qr,"sequential","identity"]),Zr=new Set(["ordinal","bin-ordinal","point","band"]);new Set(["time","utc"]);function eo(e){return Zr.has(e)}function to(e){return Jr.has(e)}function no(e){return Kr.has(e)}function io(e){return Qr.has(e)}function ro(e){return Te(e,"param")}const oo={type:1,domain:1,domainMax:1,domainMin:1,domainMid:1,domainRaw: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:ao,domain:so,range:co,rangeMax:lo,rangeMin:uo,scheme:fo,...po}=(oe(oo),oo),mo=oe(po);function ho(e,t){switch(t){case"type":case"domain":case"reverse":case"range":return!0;case"scheme":case"interpolate":return!["point","band","identity"].includes(e);case"bins":return!["point","band","identity","ordinal"].includes(e);case"round":return no(e)||"band"===e||"point"===e;case"padding":case"rangeMin":case"rangeMax":return no(e)||["point","band"].includes(e);case"paddingOuter":case"align":return["point","band"].includes(e);case"paddingInner":return"band"===e;case"domainMax":case"domainMid":case"domainMin":case"domainRaw":case"clamp":return no(e);case"nice":return no(e)||"quantize"===e||"threshold"===e;case"exponent":return"pow"===e;case"base":return"log"===e;case"constant":return"symlog"===e;case"zero":return to(e)&&!V(["log","time","utc","threshold","quantile"],e)}}function go(e,t){switch(t){case"interpolate":case"scheme":case"domainMid":return $t(e)?void 0:`Cannot use the scale property "${t}" with non-color channel.`;case"align":case"type":case"bins":case"domain":case"domainMax":case"domainMin":case"domainRaw":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}}const yo={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"},vo=yo.arc,bo=yo.area,xo=yo.bar,$o=yo.image,wo=yo.line,ko=yo.point,So=yo.rect,Eo=yo.rule,Do=yo.text,Oo=yo.tick,No=yo.trail,Fo=yo.circle,Co=yo.square,To=yo.geoshape;function Po(e){return["line","area","trail"].includes(e)}function Ro(e){return["rect","bar","image","arc","tick"].includes(e)}const _o=new Set(oe(yo));function Ao(e){return Te(e,"type")}const Lo=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit","fill","fillOpacity"],zo=oe({color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBandSize:1,timeUnitBandPosition:1}),Io=["binSpacing","continuousBandSize","discreteBandSize","minBandSize"],jo={area:["line","point"],bar:Io,rect:Io,line:["point"],tick:["bandSize","thickness",...Io]},Mo=oe({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 Uo(e){return Te(e,"band")}const qo={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]},Wo={binSpacing:0,continuousBandSize:5,minBandSize:.25,timeUnitBandPosition:.5},Go={...Wo,binSpacing:1},Ho={...Wo,thickness:1};function Bo(e,{isPath:t}){return void 0===e||"break-paths-show-path-domains"===e?t?"break-paths-show-domains":"filter":null===e?"show":e}function Vo({markDef:e,config:t,scaleChannel:n,scaleType:i,isCountAggregate:r}){if(!i||!to(i)||r)return"always-valid";const o=Bo(pi("invalid",e,t),{isPath:Po(e.type)}),a=t.scale?.invalid?.[n];return void 0!==a?"show":o}function Yo({scaleName:e,scale:t,mode:n}){const i=`domain('${e}')`;if(!t||!e)return;const r=`${i}[0]`,o=`peek(${i})`,a=t.domainHasZero();if("definitely"===a)return{scale:e,value:0};if("maybe"===a){return{signal:`scale('${e}', inrange(0, ${i}) ? 0 : ${"zeroOrMin"===n?r:o})`}}return{signal:`scale('${e}', ${"zeroOrMin"===n?r:o})`}}function Ko({scaleChannel:e,channelDef:t,scale:n,scaleName:i,markDef:r,config:o}){const a=n?.get("type"),s=es(t),c=Vo({scaleChannel:e,markDef:r,config:o,scaleType:a,isCountAggregate:Mn(s?.aggregate)});if(s&&"show"===c){const t=o.scale.invalid?.[e]??"zero-or-min";return{test:Rr(Ha(s,{expr:"datum"}),!1),...Xo(t,n,i)}}}function Xo(e,t,n){if(i=e,(0,c.Gv)(i)&&"value"in i){const{value:t}=e;return Zn(t)?{signal:t.signal}:{value:t}}var i;return Yo({scale:t,scaleName:n,mode:"zeroOrMin"})}function Qo(e){const{channel:t,channelDef:n,markDef:i,scale:r,scaleName:o,config:a}=e,s=zt(t),c=ea(e),l=Ko({scaleChannel:s,channelDef:n,scale:r,scaleName:o,markDef:i,config:a});return void 0!==l?[l,c]:c}function Jo(e,t,n,i){const r={};if(t&&(r.scale=t),Ra(e)){const{datum:t}=e;tr(t)?r.signal=sr(t):Zn(t)?r.signal=t.signal:Kn(t)?r.signal=t.expr:r.value=t}else r.field=Ha(e,n);if(i){const{offset:e,band:t}=i;e&&(r.offset=e),t&&(r.band=t)}return r}function Zo({scaleName:e,fieldOrDatumDef:t,fieldOrDatumDef2:n,offset:i,startSuffix:r,endSuffix:o="end",bandPosition:a=.5}){const s=!Zn(a)&&0<a&&a<1?"datum":void 0,c=Ha(t,{expr:s,suffix:r}),l=void 0!==n?Ha(n,{expr:s}):Ha(t,{suffix:o,expr:s}),u={};if(0===a||1===a){u.scale=e;const t=0===a?c:l;u.field=t}else{const t=Zn(a)?`(1-${a.signal}) * ${c} + ${a.signal} * ${l}`:`${1-a} * ${c} + ${a} * ${l}`;u.signal=`scale("${e}", ${t})`}return i&&(u.offset=i),u}function ea({channel:e,channelDef:t,channel2Def:n,markDef:i,config:r,scaleName:o,scale:a,stack:s,offset:l,defaultRef:u,bandPosition:f}){if(t){if(za(t)){const c=a?.get("type");if(Ia(t)){f??(f=Sa({fieldDef:t,fieldDef2:n,markDef:i,config:r}));const{bin:a,timeUnit:u,type:d}=t;if(Gn(a)||f&&u&&d===Mr)return s?.impute?Jo(t,o,{binSuffix:"mid"},{offset:l}):f&&!eo(c)?Zo({scaleName:o,fieldOrDatumDef:t,bandPosition:f,offset:l}):Jo(t,o,us(t,e)?{binSuffix:"range"}:{},{offset:l});if(Hn(a)){if(Ta(n))return Zo({scaleName:o,fieldOrDatumDef:t,fieldOrDatumDef2:n,bandPosition:f,offset:l});er(Xi(e===Ae?ze:Ie))}}return Jo(t,o,eo(c)?{binSuffix:"range"}:{},{offset:l,band:"band"===c?f??t.bandPosition??.5:void 0})}if(ja(t)){const n=l?{offset:l}:{};return{...ta(e,t.value),...n}}}return(0,c.Tn)(u)&&(u=u()),u?{...u,...l?{offset:l}:{}}:u}function ta(e,t){return V(["x","x2"],e)&&"width"===t?{field:{group:"width"}}:V(["y","y2"],e)&&"height"===t?{field:{group:"height"}}:ci(t)}function na(e){return e&&"number"!==e&&"time"!==e}function ia(e,t,n){return`${e}(${t}${n?`, ${Ce(n)}`:""})`}const ra=" – ";function oa({fieldOrDatumDef:e,format:t,formatType:n,expr:i,normalizeStack:r,config:o}){if(na(n))return sa({fieldOrDatumDef:e,format:t,formatType:n,expr:i,config:o});const a=aa(e,i,r),s=Pa(e);if(void 0===t&&void 0===n&&o.customFormatTypes){if("quantitative"===s){if(r&&o.normalizedNumberFormatType)return sa({fieldOrDatumDef:e,format:o.normalizedNumberFormat,formatType:o.normalizedNumberFormatType,expr:i,config:o});if(o.numberFormatType)return sa({fieldOrDatumDef:e,format:o.numberFormat,formatType:o.numberFormatType,expr:i,config:o})}if("temporal"===s&&o.timeFormatType&&Ta(e)&&void 0===e.timeUnit)return sa({fieldOrDatumDef:e,format:o.timeFormat,formatType:o.timeFormatType,expr:i,config:o})}if(ss(e)){const n=function({field:e,timeUnit:t,format:n,formatType:i,rawTimeFormat:r,isUTCScale:o}){return!t||n?!t&&i?`${i}(${e}, '${n}')`:`${o?"utc":"time"}Format(${e}, '${n=(0,c.Kg)(n)?n:r}')`:function(e,t,n){if(!e)return;const i=vr(e);return`${n||dr(e)?"utc":"time"}Format(${t}, ${i})`}(t,e,o)}({field:a,timeUnit:Ta(e)?br(e.timeUnit)?.unit:void 0,format:t,formatType:o.timeFormatType,rawTimeFormat:o.timeFormat,isUTCScale:Ma(e)&&e.scale?.type===Wr.UTC});return n?{signal:n}:void 0}if(t=ua({type:s,specifiedFormat:t,config:o,normalizeStack:r}),Ta(e)&&Gn(e.bin)){return{signal:pa(a,Ha(e,{expr:i,binSuffix:"end"}),t,n,o)}}return t||"quantitative"===Pa(e)?{signal:`${fa(a,t)}`}:{signal:`isValid(${a}) ? ${a} : ""+${a}`}}function aa(e,t,n){return Ta(e)?n?`${Ha(e,{expr:t,suffix:"end"})}-${Ha(e,{expr:t,suffix:"start"})}`:Ha(e,{expr:t}):function(e){const{datum:t}=e;return tr(t)?sr(t):`${Ce(t)}`}(e)}function sa({fieldOrDatumDef:e,format:t,formatType:n,expr:i,normalizeStack:r,config:o,field:a}){if(a??(a=aa(e,i,r)),"datum.value"!==a&&Ta(e)&&Gn(e.bin)){return{signal:pa(a,Ha(e,{expr:i,binSuffix:"end"}),t,n,o)}}return{signal:ia(n,a,t)}}function ca(e,t,n,i,r,o){if(!(0,c.Kg)(i)||!na(i)){if(void 0===n&&void 0===i&&r.customFormatTypes&&"quantitative"===Pa(e)){if(r.normalizedNumberFormatType&&Ua(e)&&"normalize"===e.stack)return;if(r.numberFormatType)return}if(Ua(e)&&"normalize"===e.stack&&r.normalizedNumberFormat)return ua({type:"quantitative",config:r,normalizeStack:!0});if(ss(e)){const t=Ta(e)?br(e.timeUnit)?.unit:void 0;if(void 0===t&&r.customFormatTypes&&r.timeFormatType)return;return function({specifiedFormat:e,timeUnit:t,config:n,omitTimeFormatConfig:i}){if(e)return e;if(t)return{signal:vr(t)};return i?void 0:n.timeFormat}({specifiedFormat:n,timeUnit:t,config:r,omitTimeFormatConfig:o})}return ua({type:t,specifiedFormat:n,config:r})}}function la(e,t,n){return e&&(Zn(e)||"number"===e||"time"===e)?e:ss(t)&&"time"!==n&&"utc"!==n?Ta(t)&&br(t?.timeUnit)?.utc?"utc":"time":void 0}function ua({type:e,specifiedFormat:t,config:n,normalizeStack:i}){return(0,c.Kg)(t)?t:e===Ir?i?n.normalizedNumberFormat:n.numberFormat:void 0}function fa(e,t){return`format(${e}, "${t||""}")`}function da(e,t,n,i){return na(n)?ia(n,e,t):fa(e,((0,c.Kg)(t)?t:void 0)??i.numberFormat)}function pa(e,t,n,i,r){if(void 0===n&&void 0===i&&r.customFormatTypes&&r.numberFormatType)return pa(e,t,r.numberFormat,r.numberFormatType,r);const o=da(e,n,i,r),a=da(t,n,i,r);return`${Rr(e,!1)} ? "null" : ${o} + "${ra}" + ${a}`}const ma="min",ha={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 ga(e){return(0,c.mQ)(ha,e)}function ya(e){return e&&("count"===e.op||Te(e,"field"))}function va(e){return e&&(0,c.cy)(e)}function ba(e){return Te(e,"row")||Te(e,"column")}function xa(e){return Te(e,"header")}function $a(e){return Te(e,"facet")}function wa(e){const{field:t,timeUnit:n,bin:i,aggregate:r}=e;return{...n?{timeUnit:n}:{},...i?{bin:i}:{},...r?{aggregate:r}:{},field:t}}function ka(e){return Te(e,"sort")}function Sa({fieldDef:e,fieldDef2:t,markDef:n,config:i}){if(za(e)&&void 0!==e.bandPosition)return e.bandPosition;if(Ta(e)){const{timeUnit:r,bin:o}=e;if(r&&!t)return mi("timeUnitBandPosition",n,i);if(Gn(o))return.5}}function Ea({channel:e,fieldDef:t,fieldDef2:n,markDef:i,config:r,scaleType:o,useVlSizeChannel:a}){const s=Mt(e),c=pi(a?"size":s,i,r,{vgChannel:s});if(void 0!==c)return c;if(Ta(t)){const{timeUnit:e,bin:a}=t;if(e&&!n)return{band:mi("timeUnitBandSize",i,r)};if(Gn(a)&&!eo(o))return{band:1}}return Ro(i.type)?o?eo(o)?r[i.type]?.discreteBandSize||{band:1}:r[i.type]?.continuousBandSize:r[i.type]?.discreteBandSize:void 0}function Da(e,t,n,i){return!!(Gn(e.bin)||e.timeUnit&&Ia(e)&&"temporal"===e.type)&&void 0!==Sa({fieldDef:e,fieldDef2:t,markDef:n,config:i})}function Oa(e){return Te(e,"sort")&&!Te(e,"field")}function Na(e){return Te(e,"condition")}function Fa(e){const t=e?.condition;return!!t&&!(0,c.cy)(t)&&Ta(t)}function Ca(e){const t=e?.condition;return!!t&&!(0,c.cy)(t)&&za(t)}function Ta(e){return Te(e,"field")||"count"===e?.aggregate}function Pa(e){return e?.type}function Ra(e){return Te(e,"datum")}function _a(e){return Ia(e)&&!Ba(e)||La(e)}function Aa(e){return Ia(e)&&"quantitative"===e.type&&!e.bin||La(e)}function La(e){return Ra(e)&&(0,c.Et)(e.datum)}function za(e){return Ta(e)||Ra(e)}function Ia(e){return e&&(Te(e,"field")||"count"===e.aggregate)&&Te(e,"type")}function ja(e){return Te(e,"value")}function Ma(e){return Te(e,"scale")||Te(e,"sort")}function Ua(e){return Te(e,"axis")||Te(e,"stack")||Te(e,"impute")}function qa(e){return Te(e,"legend")}function Wa(e){return Te(e,"format")||Te(e,"formatType")}function Ga(e){return G(e,["legend","axis","header","scale"])}function Ha(e,t={}){let n=e.field;const i=t.prefix;let r=t.suffix,o="";if(function(e){return"count"===e.aggregate}(e))n=Se("count");else{let i;if(!t.nofn)if(function(e){return Te(e,"op")}(e))i=e.op;else{const{bin:a,aggregate:s,timeUnit:c}=e;Gn(a)?(i=Wn(a),r=(t.binSuffix??"")+(t.suffix??"")):s?zn(s)?(o=`["${n}"]`,n=`argmax_${s.argmax}`):Ln(s)?(o=`["${n}"]`,n=`argmin_${s.argmin}`):i=String(s):c&&!ur(c)&&(i=function(e){const{utc:t,...n}=br(e);return n.unit?(t?"utc":"")+oe(n).map((e=>le(`${"unit"===e?"":`_${e}_`}${n[e]}`))).join(""):(t?"utc":"")+"timeunit"+oe(n).map((e=>le(`_${e}_${n[e]}`))).join("")}(c),r=(!["range","mid"].includes(t.binSuffix)&&t.binSuffix||"")+(t.suffix??""))}i&&(n=n?`${i}_${n}`:i)}return r&&(n=`${n}_${r}`),i&&(n=`${i}_${n}`),t.forAs?ve(n):t.expr?me(n,t.expr)+o:ge(n)+o}function Ba(e){switch(e.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return Ta(e)&&!!e.bin;case"temporal":return!1}throw new Error(Ai(e.type))}const Va=(e,t)=>{switch(t.fieldTitle){case"plain":return e.field;case"functional":return function(e){const{aggregate:t,bin:n,timeUnit:i,field:r}=e;if(zn(t))return`${r} for argmax(${t.argmax})`;if(Ln(t))return`${r} for argmin(${t.argmin})`;const o=i&&!ur(i)?br(i):void 0,a=t||o?.unit||o?.maxbins&&"timeunit"||Gn(n)&&"bin";return a?`${a.toUpperCase()}(${r})`:r}(e);default:return function(e,t){const{field:n,bin:i,timeUnit:r,aggregate:o}=e;if("count"===o)return t.countTitle;if(Gn(i))return`${n} (binned)`;if(r&&!ur(r)){const e=br(r)?.unit;if(e)return`${n} (${mr(e).join("-")})`}else if(o)return zn(o)?`${n} for max ${o.argmax}`:Ln(o)?`${n} for min ${o.argmin}`:`${de(o)} of ${n}`;return n}(e,t)}};let Ya=Va;function Ka(e){Ya=e}function Xa(e,t,{allowDisabling:n,includeDefault:i=!0}){const r=Qa(e)?.title;if(!Ta(e))return r??e.title;const o=e,a=i?Ja(o,t):void 0;return n?xe(r,o.title,a):r??o.title??a}function Qa(e){return Ua(e)&&e.axis?e.axis:qa(e)&&e.legend?e.legend:xa(e)&&e.header?e.header:void 0}function Ja(e,t){return Ya(e,t)}function Za(e){if(Wa(e)){const{format:t,formatType:n}=e;return{format:t,formatType:n}}{const t=Qa(e)??{},{format:n,formatType:i}=t;return{format:n,formatType:i}}}function es(e){return Ta(e)?e:Fa(e)?e.condition:void 0}function ts(e){return za(e)?e:Ca(e)?e.condition:void 0}function ns(e,t,n,i={}){if((0,c.Kg)(e)||(0,c.Et)(e)||(0,c.Lm)(e)){return er(function(e,t,n){return`Channel ${e} is a ${t}. Converted to {value: ${Ce(n)}}.`}(t,(0,c.Kg)(e)?"string":(0,c.Et)(e)?"number":"boolean",e)),{value:e}}return za(e)?is(e,t,n,i):Ca(e)?{...e,condition:is(e.condition,t,n,i)}:e}function is(e,t,n,i){if(Wa(e)){const{format:r,formatType:o,...a}=e;if(na(o)&&!n.customFormatTypes)return er(Ri(t)),is(a,t,n,i)}else{const r=Ua(e)?"axis":qa(e)?"legend":xa(e)?"header":null;if(r&&e[r]){const{format:o,formatType:a,...s}=e[r];if(na(a)&&!n.customFormatTypes)return er(Ri(t)),is({...e,[r]:s},t,n,i)}}return Ta(e)?rs(e,t,i):function(e){let t=e.type;if(t)return e;const{datum:n}=e;return t=(0,c.Et)(n)?"quantitative":(0,c.Kg)(n)?"nominal":tr(n)?"temporal":void 0,{...e,type:t}}(e)}function rs(e,t,{compositeMark:n=!1}={}){const{aggregate:i,timeUnit:r,bin:o,field:a}=e,s={...e};if(n||!i||In(i)||zn(i)||Ln(i)||(er(function(e){return`Invalid aggregation operator "${e}".`}(i)),delete s.aggregate),r&&(s.timeUnit=br(r)),a&&(s.field=`${a}`),Gn(o)&&(s.bin=os(o,t)),Hn(o)&&!un(t)&&er(function(e){return`Channel ${e} should not be used with "binned" bin.`}(t)),Ia(s)){const{type:e}=s,t=function(e){if(e)switch(e=e.toLowerCase()){case"q":case Ir:return"quantitative";case"t":case Mr:return"temporal";case"o":case jr:return"ordinal";case"n":case Ur:return"nominal";case qr:return"geojson"}}(e);e!==t&&(s.type=t),"quantitative"!==e&&Mn(i)&&(er(function(e,t){return`Invalid field type "${e}" for aggregate: "${t}", using "quantitative" instead.`}(e,i)),s.type="quantitative")}else if(!Lt(t)){const e=function(e,t){switch(t){case"latitude":case"longitude":return"quantitative";case"row":case"column":case"facet":case"shape":case"strokeDash":return"nominal";case"order":return"ordinal"}if(ka(e)&&(0,c.cy)(e.sort))return"ordinal";const{aggregate:n,bin:i,timeUnit:r}=e;if(r)return"temporal";if(i||n&&!zn(n)&&!Ln(n))return"quantitative";if(Ma(e)&&e.scale?.type)switch(Gr[e.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}(s,t);s.type=e}if(Ia(s)){const{compatible:e,warning:n}=function(e,t){const n=e.type;if("geojson"===n&&"shape"!==t)return{compatible:!1,warning:`Channel ${t} should not be used with a geojson data.`};switch(t){case Pe:case Re:case _e:return Ba(e)?as:{compatible:!1,warning:ji(t)};case Ae:case Le:case je:case Me:case Ke:case Xe:case Qe:case at:case ct:case lt:case ut:case ft:case dt:case et:case We:case Ue:case pt:return as;case Be:case Ye:case He:case Ve:return n!==Ir?{compatible:!1,warning:`Channel ${t} should be used with a quantitative field only, not ${e.type} field.`}:as;case tt:case nt:case it:case rt:case Ze:case Ge:case qe:case ze:case Ie:return"nominal"!==n||e.sort?as:{compatible:!1,warning:`Channel ${t} should not be used with an unsorted discrete field.`};case Je:case ot:return Ba(e)||Ma(i=e)&&io(i.scale?.type)?as:{compatible:!1,warning:Mi(t)};case st:return"nominal"!==e.type||"sort"in e?as:{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}}var i}(s,t)||{};!1===e&&er(n)}if(ka(s)&&(0,c.Kg)(s.sort)){const{sort:e}=s;if(ga(e))return{...s,sort:{encoding:e}};const t=e.substring(1);if("-"===e.charAt(0)&&ga(t))return{...s,sort:{encoding:t,order:"descending"}}}if(xa(s)){const{header:e}=s;if(e){const{orient:t,...n}=e;if(t)return{...s,header:{...n,labelOrient:e.labelOrient||t,titleOrient:e.titleOrient||t}}}}return s}function os(e,t){return(0,c.Lm)(e)?{maxbins:Yn(t)}:"binned"===e?{binned:!0}:e.maxbins||e.step?e:{...e,maxbins:Yn(t)}}const as={compatible:!0};function ss(e){const{formatType:t}=Za(e);return"time"===t||!t&&((n=e)&&("temporal"===n.type||Ta(n)&&!!n.timeUnit));var n}function cs(e,{timeUnit:t,type:n,wrapTime:i,undefinedIfExprNotRequired:r}){const o=t&&br(t)?.unit;let a,s=o||"temporal"===n;return Kn(e)?a=e.expr:Zn(e)?a=e.signal:tr(e)?(s=!0,a=sr(e)):((0,c.Kg)(e)||(0,c.Et)(e))&&s&&(a=`datetime(${Ce(e)})`,function(e){return(0,c.mQ)(cr,e)}(o)&&((0,c.Et)(e)&&e<1e4||(0,c.Kg)(e)&&isNaN(Date.parse(e)))&&(a=sr({[o]:e}))),a?i&&s?`time(${a})`:a:r?void 0:Ce(e)}function ls(e,t){const{type:n}=e;return t.map((t=>{const i=cs(t,{timeUnit:Ta(e)&&!ur(e.timeUnit)?e.timeUnit:void 0,type:n,undefinedIfExprNotRequired:!0});return void 0!==i?{signal:i}:t}))}function us(e,t){return Gn(e.bin)?Nn(t)&&["ordinal","nominal"].includes(e.type):(console.warn("Only call this method for binned field defs."),!1)}const fs={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 ds(e){return e?.condition}const ps=["domain","grid","labels","ticks","title"],ms={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"