diff --git a/dist/apparel-top100-showcase/index.html b/dist/apparel-top100-showcase/index.html index 8354391..1217ed2 100644 --- a/dist/apparel-top100-showcase/index.html +++ b/dist/apparel-top100-showcase/index.html @@ -54,5 +54,5 @@ - + diff --git a/dist/apparel-top100-showcase/main.28e0dc45233ac472.js b/dist/apparel-top100-showcase/main.49abfa4acb30c495.js similarity index 99% rename from dist/apparel-top100-showcase/main.28e0dc45233ac472.js rename to dist/apparel-top100-showcase/main.49abfa4acb30c495.js index 87fe923..973d4d0 100644 --- a/dist/apparel-top100-showcase/main.28e0dc45233ac472.js +++ b/dist/apparel-top100-showcase/main.49abfa4acb30c495.js @@ -1 +1 @@ -"use strict";(self.webpackChunkapparel_top100_showcase=self.webpackChunkapparel_top100_showcase||[]).push([[792],{394:(e2,AU,Ct)=>{var Ay={};Ct.r(Ay),Ct.d(Ay,{aggregate:()=>cd,bin:()=>GL,collect:()=>WL,compare:()=>Une,countpattern:()=>qL,cross:()=>YL,density:()=>KL,dotbin:()=>QL,expression:()=>Kne,extent:()=>ZL,facet:()=>qS,field:()=>Xne,filter:()=>e3,flatten:()=>t3,fold:()=>n3,formula:()=>i3,generate:()=>Qne,impute:()=>r3,joinaggregate:()=>o3,kde:()=>s3,key:()=>Zne,load:()=>Jne,lookup:()=>l3,multiextent:()=>eie,multivalues:()=>tie,params:()=>nie,pivot:()=>c3,prefacet:()=>iie,project:()=>u3,proxy:()=>rie,quantile:()=>d3,relay:()=>oie,sample:()=>f3,sequence:()=>h3,sieve:()=>sie,subflow:()=>JL,timeunit:()=>p3,tupleindex:()=>lie,values:()=>cie,window:()=>g3});var t2={};Ct.r(t2),Ct.d(t2,{interpolate:()=>gd,interpolateArray:()=>Kje,interpolateBasis:()=>Yie,interpolateBasisClosed:()=>Kie,interpolateCubehelix:()=>LVe,interpolateCubehelixLong:()=>$Ve,interpolateDate:()=>ere,interpolateDiscrete:()=>bVe,interpolateHcl:()=>RVe,interpolateHclLong:()=>FVe,interpolateHsl:()=>NVe,interpolateHslLong:()=>IVe,interpolateHue:()=>wVe,interpolateLab:()=>OVe,interpolateNumber:()=>Ea,interpolateNumberArray:()=>N3,interpolateObject:()=>tre,interpolateRgb:()=>M3,interpolateRgbBasis:()=>qje,interpolateRgbBasisClosed:()=>Yje,interpolateRound:()=>p1,interpolateString:()=>nre,interpolateTransformCss:()=>DVe,interpolateTransformSvg:()=>SVe,interpolateZoom:()=>MVe,piecewise:()=>U3,quantize:()=>BVe});var n2={};Ct.r(n2),Ct.d(n2,{bound:()=>oae,identifier:()=>hB,mark:()=>aae,overlap:()=>lae,render:()=>pae,viewlayout:()=>bae});var i2={};Ct.r(i2),Ct.d(i2,{axisticks:()=>Eae,datajoin:()=>Cae,encode:()=>Dae,legendentries:()=>Sae,linkpath:()=>pB,pie:()=>gB,scale:()=>Iae,sortitems:()=>Rae,stack:()=>_B});var r2={};Ct.r(r2),Ct.d(r2,{contour:()=>KB,geojson:()=>ZB,geopath:()=>JB,geopoint:()=>e5,geoshape:()=>t5,graticule:()=>n5,heatmap:()=>i5,isocontour:()=>WB,kde2d:()=>YB,projection:()=>Jle});var o2={};Ct.r(o2),Ct.d(o2,{force:()=>c5});var s2={};Ct.r(s2),Ct.d(s2,{nest:()=>y5,pack:()=>b5,partition:()=>E5,stratify:()=>C5,tree:()=>S5,treelinks:()=>T5,treemap:()=>A5});var a2={};Ct.r(a2),Ct.d(a2,{label:()=>$5});var l2={};Ct.r(l2),Ct.d(l2,{loess:()=>B5,regression:()=>V5});var c2={};Ct.r(c2),Ct.d(c2,{voronoi:()=>m8});var u2={};Ct.r(u2),Ct.d(u2,{wordcloud:()=>y8});var d2={};Ct.r(d2),Ct.d(d2,{crossfilter:()=>v8,resolvefilter:()=>b8});var f2={};Ct.r(f2),Ct.d(f2,{Bounds:()=>li,CanvasHandler:()=>F1,CanvasRenderer:()=>tx,DATE:()=>ho,DAY:()=>_r,DAYOFYEAR:()=>Il,Dataflow:()=>Vm,Debug:()=>yee,Error:()=>bP,EventStream:()=>$S,Gradient:()=>Coe,GroupItem:()=>IT,HOURS:()=>Wo,Handler:()=>H$,HybridHandler:()=>$se,HybridRenderer:()=>nB,Info:()=>_ee,Item:()=>NT,MILLISECONDS:()=>ba,MINUTES:()=>qo,MONTH:()=>mr,Marks:()=>Xo,MultiPulse:()=>vL,None:()=>mee,Operator:()=>ln,Parameters:()=>LS,Pulse:()=>ld,QUARTER:()=>fo,RenderType:()=>Td,Renderer:()=>O1,ResourceLoader:()=>Roe,SECONDS:()=>Is,SVGHandler:()=>vse,SVGRenderer:()=>tB,SVGStringRenderer:()=>Lse,Scenegraph:()=>ase,TIME_UNITS:()=>zP,Transform:()=>K,View:()=>Rde,WEEK:()=>bi,Warn:()=>wP,YEAR:()=>Xi,accessor:()=>co,accessorFields:()=>fr,accessorName:()=>$n,array:()=>Ee,ascending:()=>gS,bandwidthNRD:()=>xL,bin:()=>Cne,bootstrapCI:()=>Dne,boundClip:()=>Yse,boundContext:()=>T1,boundItem:()=>U$,boundMark:()=>ise,boundStroke:()=>Zc,changeset:()=>hh,clampRange:()=>Nee,codegenExpression:()=>Mue,compare:()=>TP,constant:()=>gr,cumulativeLogNormal:()=>OL,cumulativeNormal:()=>zS,cumulativeUniform:()=>LL,dayofyear:()=>rte,debounce:()=>xP,defaultLocale:()=>oL,definition:()=>gne,densityLogNormal:()=>kL,densityNormal:()=>AL,densityUniform:()=>PL,domChild:()=>Ei,domClear:()=>Ls,domCreate:()=>Dd,domFind:()=>z$,dotbin:()=>Sne,error:()=>J,expressionFunction:()=>Kn,extend:()=>rt,extent:()=>Al,extentIndex:()=>Iee,falsy:()=>ed,fastmap:()=>xm,field:()=>As,flush:()=>kee,font:()=>HT,fontFamily:()=>I1,fontSize:()=>jl,format:()=>NS,formatLocale:()=>AS,formats:()=>hL,hasOwnProperty:()=>De,id:()=>Pv,identity:()=>hr,inferType:()=>Qte,inferTypes:()=>Zte,ingest:()=>Ft,inherits:()=>me,inrange:()=>Am,interpolate:()=>c$,interpolateColors:()=>ST,interpolateRange:()=>soe,intersect:()=>Hse,intersectBoxLine:()=>n_,intersectPath:()=>x$,intersectPoint:()=>A$,intersectRule:()=>Uoe,isArray:()=>te,isBoolean:()=>td,isDate:()=>nd,isFunction:()=>it,isIterable:()=>Oee,isNumber:()=>At,isObject:()=>we,isRegExp:()=>Ree,isString:()=>Ce,isTuple:()=>RS,key:()=>AP,lerp:()=>Fee,lineHeight:()=>Ed,loader:()=>IS,locale:()=>Yte,logger:()=>EP,lruCache:()=>Pee,markup:()=>eB,merge:()=>Lee,mergeConfig:()=>Sm,multiLineOffset:()=>B$,one:()=>Dm,pad:()=>$ee,panLinear:()=>Dee,panLog:()=>See,panPow:()=>Tee,panSymlog:()=>xee,parse:()=>ont,parseExpression:()=>M8,parseSelector:()=>Ud,path:()=>nT,pathCurves:()=>g$,pathEqual:()=>Kse,pathParse:()=>Jm,pathRectangle:()=>Noe,pathRender:()=>w1,pathSymbols:()=>Moe,pathTrail:()=>Ioe,peek:()=>yt,point:()=>WT,projection:()=>GB,quantileLogNormal:()=>RL,quantileNormal:()=>HS,quantileUniform:()=>$L,quantiles:()=>SL,quantizeInterpolator:()=>aoe,quarter:()=>Aee,quartiles:()=>TL,random:()=>ks,randomInteger:()=>U4e,randomKDE:()=>NL,randomLCG:()=>V4e,randomLogNormal:()=>xne,randomMixture:()=>Ane,randomNormal:()=>ML,randomUniform:()=>Mne,read:()=>nne,regressionConstant:()=>BL,regressionExp:()=>Ine,regressionLinear:()=>jL,regressionLoess:()=>Pne,regressionLog:()=>Nne,regressionPoly:()=>One,regressionPow:()=>kne,regressionQuad:()=>VL,renderModule:()=>ox,repeat:()=>Lv,resetDefaultLocale:()=>F8e,resetSVGClipId:()=>Ooe,resetSVGDefIds:()=>eze,responseType:()=>tne,runtimeContext:()=>pde,sampleCurve:()=>WS,sampleLogNormal:()=>IL,sampleNormal:()=>US,sampleUniform:()=>FL,scale:()=>Nt,sceneEqual:()=>rB,sceneFromJSON:()=>ose,scenePickVisit:()=>$T,sceneToJSON:()=>rse,sceneVisit:()=>Sa,sceneZOrder:()=>M$,scheme:()=>u$,serializeXML:()=>Nse,setHybridRendererOptions:()=>X7e,setRandom:()=>B4e,span:()=>$v,splitAccessPath:()=>xl,stringValue:()=>ge,textMetrics:()=>Ko,timeBin:()=>Cte,timeFloor:()=>dte,timeFormatLocale:()=>Jv,timeInterval:()=>Lm,timeOffset:()=>pte,timeSequence:()=>_te,timeUnitSpecifier:()=>ite,timeUnits:()=>GP,toBoolean:()=>MP,toDate:()=>NP,toNumber:()=>pr,toSet:()=>va,toString:()=>IP,transform:()=>mne,transforms:()=>Um,truncate:()=>Bee,truthy:()=>Ms,tupleid:()=>Fe,typeParsers:()=>uL,utcFloor:()=>fte,utcInterval:()=>$m,utcOffset:()=>gte,utcSequence:()=>yte,utcdayofyear:()=>ate,utcquarter:()=>Mee,utcweek:()=>lte,version:()=>snt,visitArray:()=>id,week:()=>ote,writeConfig:()=>Tm,zero:()=>Ju,zoomLinear:()=>CP,zoomLog:()=>DP,zoomPow:()=>pS,zoomSymlog:()=>SP});var h2={};Ct.r(h2),Ct.d(h2,{accessPathDepth:()=>j_,accessPathWithDatum:()=>z4,compile:()=>xut,contains:()=>pt,deepEqual:()=>as,deleteNestedProperty:()=>eM,duplicate:()=>Ze,entries:()=>Hd,every:()=>B4,fieldIntersection:()=>U4,flatAccessWithDatum:()=>Vfe,getFirstDefined:()=>Xn,hasIntersection:()=>j4,hasProperty:()=>ce,hash:()=>gt,internalField:()=>Hfe,isBoolean:()=>jb,isEmpty:()=>Zt,isEqual:()=>vnt,isInternalField:()=>Gfe,isNullOrFalse:()=>$4,isNumeric:()=>tM,keys:()=>se,logicalExpr:()=>Vb,mergeDeep:()=>Bfe,never:()=>$fe,normalize:()=>Tge,normalizeAngle:()=>zb,omit:()=>Co,pick:()=>L_,prefixGenerator:()=>V4,removePathFromField:()=>B_,replaceAll:()=>tp,replacePathInField:()=>zs,resetIdCounter:()=>wnt,setEqual:()=>jfe,some:()=>$_,stringify:()=>Jt,titleCase:()=>Ub,unique:()=>Jl,uniqueId:()=>zfe,vals:()=>nr,varName:()=>Nn,version:()=>Nut});var p2={};Ct.r(p2),Ct.d(p2,{carbong10:()=>Adt,carbong100:()=>Ndt,carbong90:()=>Mdt,carbonwhite:()=>xdt,dark:()=>Qut,excel:()=>Zut,fivethirtyeight:()=>tdt,ggplot2:()=>ndt,googlecharts:()=>pdt,latimes:()=>sdt,powerbi:()=>Cdt,quartz:()=>adt,urbaninstitute:()=>hdt,version:()=>Idt,vox:()=>ldt});var $w={};function MU(e,t){return Object.is(e,t)}Ct.r($w),Ct.d($w,{afterMain:()=>VZ,afterRead:()=>$Z,afterWrite:()=>HZ,applyStyles:()=>eP,arrow:()=>XF,auto:()=>qD,basePlacements:()=>hm,beforeMain:()=>BZ,beforeRead:()=>PZ,beforeWrite:()=>UZ,bottom:()=>zo,clippingParents:()=>RZ,computeStyles:()=>JF,createPopper:()=>kV,createPopperBase:()=>wLe,createPopperLite:()=>rJ,detectOverflow:()=>vm,end:()=>pm,eventListeners:()=>QF,flip:()=>qF,hide:()=>qye,left:()=>$r,main:()=>jZ,modifierPhases:()=>GZ,offset:()=>tP,placements:()=>BF,popper:()=>gm,popperGenerator:()=>XD,popperOffsets:()=>ZF,preventOverflow:()=>KF,read:()=>LZ,reference:()=>FZ,right:()=>Ho,start:()=>Jf,top:()=>Lr,variationPlacements:()=>$F,viewport:()=>LF,write:()=>zZ});let ui=null,My=!1,Bw=1;const ea=Symbol("SIGNAL");function st(e){const t=ui;return ui=e,t}const jw={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function m2(e){if(My)throw new Error("");if(null===ui)return;ui.consumerOnSignalRead(e);const t=ui.nextProducerIndex++;zw(ui),te.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function y2(e){zw(e);for(let t=0;t0}function zw(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function FU(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}function PU(e){return void 0!==e.producerNode}const b2=Symbol("UNSET"),w2=Symbol("COMPUTING"),Hw=Symbol("ERRORED"),Fve={...jw,value:b2,dirty:!0,error:null,equal:MU,producerMustRecompute:e=>e.value===b2||e.value===w2,producerRecomputeValue(e){if(e.value===w2)throw new Error("Detected cycle in computations.");const t=e.value;e.value=w2;const n=Vw(e);let i;try{i=e.computation()}catch(r){i=Hw,e.error=r}finally{_2(e,n)}t!==b2&&t!==Hw&&i!==Hw&&e.equal(t,i)?e.value=t:(e.value=i,e.version++)}};let LU=function Pve(){throw new Error};function $U(){LU()}let Gw=null;function BU(e,t){kU()||$U(),e.equal(e.value,t)||(e.value=t,function Vve(e){e.version++,function Ove(){Bw++}(),IU(e),Gw?.()}(e))}const jve={...jw,equal:MU,value:void 0};function Tt(e){return"function"==typeof e}function E2(e){const n=e(i=>{Error.call(i),i.stack=(new Error).stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}const C2=E2(e=>function(n){e(this),this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map((i,r)=>`${r+1}) ${i.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=n});function Ww(e,t){if(e){const n=e.indexOf(t);0<=n&&e.splice(n,1)}}class ar{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;const{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(const o of n)o.remove(this);else n.remove(this);const{initialTeardown:i}=this;if(Tt(i))try{i()}catch(o){t=o instanceof C2?o.errors:[o]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const o of r)try{zU(o)}catch(s){t=t??[],s instanceof C2?t=[...t,...s.errors]:t.push(s)}}if(t)throw new C2(t)}}add(t){var n;if(t&&t!==this)if(this.closed)zU(t);else{if(t instanceof ar){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}}_hasParent(t){const{_parentage:n}=this;return n===t||Array.isArray(n)&&n.includes(t)}_addParent(t){const{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t}_removeParent(t){const{_parentage:n}=this;n===t?this._parentage=null:Array.isArray(n)&&Ww(n,t)}remove(t){const{_finalizers:n}=this;n&&Ww(n,t),t instanceof ar&&t._removeParent(this)}}ar.EMPTY=(()=>{const e=new ar;return e.closed=!0,e})();const VU=ar.EMPTY;function UU(e){return e instanceof ar||e&&"closed"in e&&Tt(e.remove)&&Tt(e.add)&&Tt(e.unsubscribe)}function zU(e){Tt(e)?e():e.unsubscribe()}const bf={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},qw={setTimeout(e,t,...n){const{delegate:i}=qw;return i?.setTimeout?i.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){const{delegate:t}=qw;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function HU(e){qw.setTimeout(()=>{const{onUnhandledError:t}=bf;if(!t)throw e;t(e)})}function Iy(){}const zve=D2("C",void 0,void 0);function D2(e,t,n){return{kind:e,value:t,error:n}}let wf=null;function Yw(e){if(bf.useDeprecatedSynchronousErrorHandling){const t=!wf;if(t&&(wf={errorThrown:!1,error:null}),e(),t){const{errorThrown:n,error:i}=wf;if(wf=null,n)throw i}}else e()}class S2 extends ar{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,UU(t)&&t.add(this)):this.destination=Xve}static create(t,n,i){return new x2(t,n,i)}next(t){this.isStopped?A2(function Gve(e){return D2("N",e,void 0)}(t),this):this._next(t)}error(t){this.isStopped?A2(function Hve(e){return D2("E",void 0,e)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?A2(zve,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const qve=Function.prototype.bind;function T2(e,t){return qve.call(e,t)}class Yve{constructor(t){this.partialObserver=t}next(t){const{partialObserver:n}=this;if(n.next)try{n.next(t)}catch(i){Kw(i)}}error(t){const{partialObserver:n}=this;if(n.error)try{n.error(t)}catch(i){Kw(i)}else Kw(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(n){Kw(n)}}}class x2 extends S2{constructor(t,n,i){let r;if(super(),Tt(t)||!t)r={next:t??void 0,error:n??void 0,complete:i??void 0};else{let o;this&&bf.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&T2(t.next,o),error:t.error&&T2(t.error,o),complete:t.complete&&T2(t.complete,o)}):r=t}this.destination=new Yve(r)}}function Kw(e){bf.useDeprecatedSynchronousErrorHandling?function Wve(e){bf.useDeprecatedSynchronousErrorHandling&&wf&&(wf.errorThrown=!0,wf.error=e)}(e):HU(e)}function A2(e,t){const{onStoppedNotification:n}=bf;n&&qw.setTimeout(()=>n(e,t))}const Xve={closed:!0,next:Iy,error:function Kve(e){throw e},complete:Iy},M2="function"==typeof Symbol&&Symbol.observable||"@@observable";function _c(e){return e}function GU(e){return 0===e.length?_c:1===e.length?e[0]:function(n){return e.reduce((i,r)=>r(i),n)}}let cn=(()=>{class e{constructor(n){n&&(this._subscribe=n)}lift(n){const i=new e;return i.source=this,i.operator=n,i}subscribe(n,i,r){const o=function Jve(e){return e&&e instanceof S2||function Zve(e){return e&&Tt(e.next)&&Tt(e.error)&&Tt(e.complete)}(e)&&UU(e)}(n)?n:new x2(n,i,r);return Yw(()=>{const{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(n){try{return this._subscribe(n)}catch(i){n.error(i)}}forEach(n,i){return new(i=WU(i))((r,o)=>{const s=new x2({next:a=>{try{n(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(n){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(n)}[M2](){return this}pipe(...n){return GU(n)(this)}toPromise(n){return new(n=WU(n))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return e.create=t=>new e(t),e})();function WU(e){var t;return null!==(t=e??bf.Promise)&&void 0!==t?t:Promise}const e1e=E2(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let tn=(()=>{class e extends cn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){const i=new qU(this,this);return i.operator=n,i}_throwIfClosed(){if(this.closed)throw new e1e}next(n){Yw(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const i of this.currentObservers)i.next(n)}})}error(n){Yw(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;const{observers:i}=this;for(;i.length;)i.shift().error(n)}})}complete(){Yw(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return(null===(n=this.observers)||void 0===n?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){const{hasError:i,isStopped:r,observers:o}=this;return i||r?VU:(this.currentObservers=null,o.push(n),new ar(()=>{this.currentObservers=null,Ww(o,n)}))}_checkFinalizedStatuses(n){const{hasError:i,thrownError:r,isStopped:o}=this;i?n.error(r):o&&n.complete()}asObservable(){const n=new cn;return n.source=this,n}}return e.create=(t,n)=>new qU(t,n),e})();class qU extends tn{constructor(t,n){super(),this.destination=t,this.source=n}next(t){var n,i;null===(i=null===(n=this.destination)||void 0===n?void 0:n.next)||void 0===i||i.call(n,t)}error(t){var n,i;null===(i=null===(n=this.destination)||void 0===n?void 0:n.error)||void 0===i||i.call(n,t)}complete(){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===n||n.call(t)}_subscribe(t){var n,i;return null!==(i=null===(n=this.source)||void 0===n?void 0:n.subscribe(t))&&void 0!==i?i:VU}}class ps extends tn{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const n=super._subscribe(t);return!n.closed&&t.next(this._value),n}getValue(){const{hasError:t,thrownError:n,_value:i}=this;if(t)throw n;return this._throwIfClosed(),i}next(t){super.next(this._value=t)}}function YU(e){return Tt(e?.lift)}function ei(e){return t=>{if(YU(t))return t.lift(function(n){try{return e(n,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function yn(e,t,n,i,r){return new t1e(e,t,n,i,r)}class t1e extends S2{constructor(t,n,i,r,o,s){super(t),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=n?function(a){try{n(a)}catch(l){t.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){t.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:n}=this;super.unsubscribe(),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}}}function at(e,t){return ei((n,i)=>{let r=0;n.subscribe(yn(i,o=>{i.next(e.call(t,o,r++))}))})}const KU="https://g.co/ng/security#xss";class q extends Error{constructor(t,n){super(function zp(e,t){return`NG0${Math.abs(e)}${t?": "+t:""}`}(t,n)),this.code=t}}function yc(e){return{toString:e}.toString()}const Gp="__parameters__";function qp(e,t,n){return yc(()=>{const i=function N2(e){return function(...n){if(e){const i=e(...n);for(const r in i)this[r]=i[r]}}}(t);function r(...o){if(this instanceof r)return i.apply(this,o),this;const s=new r(...o);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(Gp)?l[Gp]:Object.defineProperty(l,Gp,{value:[]})[Gp];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return n&&(r.prototype=Object.create(n.prototype)),r.prototype.ngMetadataName=e,r.annotationCls=r,r})}const vn=globalThis;function Ut(e){for(let t in e)if(e[t]===Ut)return t;throw Error("Could not find renamed property on target object.")}function n1e(e,t){for(const n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function di(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(di).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;const t=e.toString();if(null==t)return""+t;const n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function I2(e,t){return null==e||""===e?null===t?"":t:null==t||""===t?e:e+" "+t}const i1e=Ut({__forward_ref__:Ut});function Pt(e){return e.__forward_ref__=Pt,e.toString=function(){return di(this())},e}function We(e){return Qw(e)?e():e}function Qw(e){return"function"==typeof e&&e.hasOwnProperty(i1e)&&e.__forward_ref__===Pt}function pe(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Lt(e){return{providers:e.providers||[],imports:e.imports||[]}}function Zw(e){return JU(e,eE)||JU(e,e9)}function JU(e,t){return e.hasOwnProperty(t)?e[t]:null}function Jw(e){return e&&(e.hasOwnProperty(k2)||e.hasOwnProperty(c1e))?e[k2]:null}const eE=Ut({\u0275prov:Ut}),k2=Ut({\u0275inj:Ut}),e9=Ut({ngInjectableDef:Ut}),c1e=Ut({ngInjectorDef:Ut});class _e{constructor(t,n){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof n?this.__NG_ELEMENT_ID__=n:void 0!==n&&(this.\u0275prov=pe({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function L2(e){return e&&!!e.\u0275providers}const ky=Ut({\u0275cmp:Ut}),$2=Ut({\u0275dir:Ut}),B2=Ut({\u0275pipe:Ut}),n9=Ut({\u0275mod:Ut}),vc=Ut({\u0275fac:Ut}),Oy=Ut({__NG_ELEMENT_ID__:Ut}),i9=Ut({__NG_ENV_ID__:Ut});function Je(e){return"string"==typeof e?e:null==e?"":String(e)}function j2(e,t){throw new q(-201,!1)}var ft=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(ft||{});let V2;function r9(){return V2}function no(e){const t=V2;return V2=e,t}function o9(e,t,n){const i=Zw(e);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:n&ft.Optional?null:void 0!==t?t:void j2()}const Ry={},U2="__NG_DI_FLAG__",tE="ngTempTokenPath",g1e=/\n/gm,s9="__source";let Yp;function Au(e){const t=Yp;return Yp=e,t}function y1e(e,t=ft.Default){if(void 0===Yp)throw new q(-203,!1);return null===Yp?o9(e,void 0,t):Yp.get(e,t&ft.Optional?null:void 0,t)}function Ne(e,t=ft.Default){return(r9()||y1e)(We(e),t)}function L(e,t=ft.Default){return Ne(e,nE(t))}function nE(e){return typeof e>"u"||"number"==typeof e?e:(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function z2(e){const t=[];for(let n=0;nArray.isArray(n)?Kp(n,t):t(n))}function l9(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function oE(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function Io(e,t,n){let i=Xp(e,t);return i>=0?e[1|i]=n:(i=~i,function c9(e,t,n,i){let r=e.length;if(r==t)e.push(n,i);else if(1===r)e.push(i,e[0]),e[0]=n;else{for(r--,e.push(e[r-1],e[r]);r>t;)e[r]=e[r-2],r--;e[t]=n,e[t+1]=i}}(e,i,t,n)),i}function G2(e,t){const n=Xp(e,t);if(n>=0)return e[1|n]}function Xp(e,t){return function u9(e,t,n){let i=0,r=e.length>>n;for(;r!==i;){const o=i+(r-i>>1),s=e[o<t?r=o:i=o+1}return~(r<t){s=o-1;break}}}for(;o-1){let o;for(;++ro?"":r[u+1].toLowerCase(),2&i&&c!==d){if(na(i))return!1;s=!0}}}}else{if(!s&&!na(i)&&!na(l))return!1;if(s&&na(l))continue;s=!1,i=l|1&i}}return na(i)||s}function na(e){return!(1&e)}function N1e(e,t,n,i){if(null===t)return-1;let r=0;if(i||!n){let o=!1;for(;r-1)for(n++;n0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!na(s)&&(t+=_9(o,r),r=""),i=s,o=o||!na(i);n++}return""!==r&&(t+=_9(o,r)),t}function Cn(e){return yc(()=>{const t=v9(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===lE.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||ta.Emulated,styles:e.styles||Dt,_:null,schemas:e.schemas||null,tView:null,id:""};b9(n);const i=e.dependencies;return n.directiveDefs=cE(i,!1),n.pipeDefs=cE(i,!0),n.id=function V1e(e){let t=0;const n=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,e.consts,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery].join("|");for(const r of n)t=Math.imul(31,t)+r.charCodeAt(0)|0;return t+=2147483648,"c"+t}(n),n})}function $1e(e){return ut(e)||fi(e)}function B1e(e){return null!==e}function zt(e){return yc(()=>({type:e.type,bootstrap:e.bootstrap||Dt,declarations:e.declarations||Dt,imports:e.imports||Dt,exports:e.exports||Dt,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function y9(e,t){if(null==e)return il;const n={};for(const i in e)if(e.hasOwnProperty(i)){const r=e[i];let o,s,a=Mu.None;Array.isArray(r)?(a=r[0],o=r[1],s=r[2]??o):(o=r,s=r),t?(n[o]=a!==Mu.None?[i,a]:i,t[o]=s):n[o]=i}return n}function be(e){return yc(()=>{const t=v9(e);return b9(t),t})}function lr(e){return{type:e.type,name:e.name,factory:null,pure:!1!==e.pure,standalone:!0===e.standalone,onDestroy:e.type.prototype.ngOnDestroy||null}}function ut(e){return e[ky]||null}function fi(e){return e[$2]||null}function Bi(e){return e[B2]||null}function cr(e,t){const n=e[n9]||null;if(!n&&!0===t)throw new Error(`Type ${di(e)} does not have '\u0275mod' property.`);return n}function v9(e){const t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputTransforms:null,inputConfig:e.inputs||il,exportAs:e.exportAs||null,standalone:!0===e.standalone,signals:!0===e.signals,selectors:e.selectors||Dt,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:y9(e.inputs,t),outputs:y9(e.outputs),debugInfo:null}}function b9(e){e.features?.forEach(t=>t(e))}function cE(e,t){if(!e)return null;const n=t?Bi:$1e;return()=>("function"==typeof e?e():e).map(i=>n(i)).filter(B1e)}function U1e(...e){return{\u0275providers:K2(0,e),\u0275fromNgModule:!0}}function K2(e,...t){const n=[],i=new Set;let r;const o=s=>{n.push(s)};return Kp(t,s=>{const a=s;uE(a,o,[],i)&&(r||=[],r.push(a))}),void 0!==r&&w9(r,o),n}function w9(e,t){for(let n=0;n{t(o,i)})}}function uE(e,t,n,i){if(!(e=We(e)))return!1;let r=null,o=Jw(e);const s=!o&&ut(e);if(o||s){if(s&&!s.standalone)return!1;r=e}else{const l=e.ngModule;if(o=Jw(l),!o)return!1;r=l}const a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){const l="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const c of l)uE(c,t,n,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;i.add(r);try{Kp(o.imports,u=>{uE(u,t,n,i)&&(c||=[],c.push(u))})}finally{}void 0!==c&&w9(c,t)}if(!a){const c=Ef(r)||(()=>new r);t({provide:r,useFactory:c,deps:Dt},r),t({provide:W2,useValue:r,multi:!0},r),t({provide:rl,useValue:()=>Ne(r),multi:!0},r)}const l=o.providers;if(null!=l&&!a){const c=e;X2(l,u=>{t(u,c)})}}}return r!==e&&void 0!==e.providers}function X2(e,t){for(let n of e)L2(n)&&(n=n.\u0275providers),Array.isArray(n)?X2(n,t):t(n)}const z1e=Ut({provide:String,useValue:Ut});function Q2(e){return null!==e&&"object"==typeof e&&z1e in e}function Cf(e){return"function"==typeof e}const Z2=new _e(""),dE={},G1e={};let J2;function fE(){return void 0===J2&&(J2=new aE),J2}class ji{}class Qp extends ji{get destroyed(){return this._destroyed}constructor(t,n,i,r){super(),this.parent=n,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,tI(t,s=>this.processProvider(s)),this.records.set(d9,Zp(void 0,this)),r.has("environment")&&this.records.set(ji,Zp(void 0,this));const o=this.records.get(Z2);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(W2,Dt,ft.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;const t=st(null);try{for(const i of this._ngOnDestroyHooks)i.ngOnDestroy();const n=this._onDestroyHooks;this._onDestroyHooks=[];for(const i of n)i()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),st(t)}}onDestroy(t){return this.assertNotDestroyed(),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){this.assertNotDestroyed();const n=Au(this),i=no(void 0);try{return t()}finally{Au(n),no(i)}}get(t,n=Ry,i=ft.Default){if(this.assertNotDestroyed(),t.hasOwnProperty(i9))return t[i9](this);i=nE(i);const o=Au(this),s=no(void 0);try{if(!(i&ft.SkipSelf)){let l=this.records.get(t);if(void 0===l){const c=function X1e(e){return"function"==typeof e||"object"==typeof e&&e instanceof _e}(t)&&Zw(t);l=c&&this.injectableDefInScope(c)?Zp(eI(t),dE):null,this.records.set(t,l)}if(null!=l)return this.hydrate(t,l)}return(i&ft.Self?fE():this.parent).get(t,n=i&ft.Optional&&n===Ry?null:n)}catch(a){if("NullInjectorError"===a.name){if((a[tE]=a[tE]||[]).unshift(di(t)),o)throw a;return function b1e(e,t,n,i){const r=e[tE];throw t[s9]&&r.unshift(t[s9]),e.message=function w1e(e,t,n,i=null){e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.slice(2):e;let r=di(t);if(Array.isArray(t))r=t.map(di).join(" -> ");else if("object"==typeof t){let o=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):di(a)))}r=`{${o.join(", ")}}`}return`${n}${i?"("+i+")":""}[${r}]: ${e.replace(g1e,"\n ")}`}("\n"+e.message,r,n,i),e.ngTokenPath=r,e[tE]=null,e}(a,t,"R3InjectorError",this.source)}throw a}finally{no(s),Au(o)}}resolveInjectorInitializers(){const t=st(null),n=Au(this),i=no(void 0);try{const o=this.get(rl,Dt,ft.Self);for(const s of o)s()}finally{Au(n),no(i),st(t)}}toString(){const t=[],n=this.records;for(const i of n.keys())t.push(di(i));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new q(205,!1)}processProvider(t){let n=Cf(t=We(t))?t:We(t&&t.provide);const i=function q1e(e){return Q2(e)?Zp(void 0,e.useValue):Zp(D9(e),dE)}(t);if(!Cf(t)&&!0===t.multi){let r=this.records.get(n);r||(r=Zp(void 0,dE,!0),r.factory=()=>z2(r.multi),this.records.set(n,r)),n=t,r.multi.push(t)}this.records.set(n,i)}hydrate(t,n){const i=st(null);try{return n.value===dE&&(n.value=G1e,n.value=n.factory()),"object"==typeof n.value&&n.value&&function K1e(e){return null!==e&&"object"==typeof e&&"function"==typeof e.ngOnDestroy}(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}finally{st(i)}}injectableDefInScope(t){if(!t.providedIn)return!1;const n=We(t.providedIn);return"string"==typeof n?"any"===n||this.scopes.has(n):this.injectorDefTypes.has(n)}removeOnDestroy(t){const n=this._onDestroyHooks.indexOf(t);-1!==n&&this._onDestroyHooks.splice(n,1)}}function eI(e){const t=Zw(e),n=null!==t?t.factory:Ef(e);if(null!==n)return n;if(e instanceof _e)throw new q(204,!1);if(e instanceof Function)return function W1e(e){if(e.length>0)throw new q(204,!1);const n=function l1e(e){return e&&(e[eE]||e[e9])||null}(e);return null!==n?()=>n.factory(e):()=>new e}(e);throw new q(204,!1)}function D9(e,t,n){let i;if(Cf(e)){const r=We(e);return Ef(r)||eI(r)}if(Q2(e))i=()=>We(e.useValue);else if(function C9(e){return!(!e||!e.useFactory)}(e))i=()=>e.useFactory(...z2(e.deps||[]));else if(function E9(e){return!(!e||!e.useExisting)}(e))i=()=>Ne(We(e.useExisting));else{const r=We(e&&(e.useClass||e.provide));if(!function Y1e(e){return!!e.deps}(e))return Ef(r)||eI(r);i=()=>new r(...z2(e.deps))}return i}function Zp(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function tI(e,t){for(const n of e)Array.isArray(n)?tI(n,t):n&&L2(n)?tI(n.\u0275providers,t):t(n)}function ol(e,t){e instanceof Qp&&e.assertNotDestroyed();const i=Au(e),r=no(void 0);try{return t()}finally{Au(i),no(r)}}function S9(){return void 0!==r9()||null!=function _1e(){return Yp}()}const Dn=0,fe=1,Le=2,ti=3,ia=4,Vi=5,xr=6,eg=7,un=8,ni=9,sl=10,qe=11,By=12,x9=13,tg=14,Sn=15,Df=16,ng=17,bc=18,ig=19,A9=20,Iu=21,gE=22,gs=23,Ie=25,iI=1,al=7,rg=9,Un=10;var _E=function(e){return e[e.None=0]="None",e[e.HasTransplantedViews=2]="HasTransplantedViews",e}(_E||{});function pi(e){return Array.isArray(e)&&"object"==typeof e[iI]}function ur(e){return Array.isArray(e)&&!0===e[iI]}function rI(e){return!!(4&e.flags)}function Sf(e){return e.componentOffset>-1}function yE(e){return!(1&~e.flags)}function ra(e){return!!e.template}function Vy(e){return!!(512&e[Le])}class lbe{constructor(t,n,i){this.previousValue=t,this.currentValue=n,this.firstChange=i}isFirstChange(){return this.firstChange}}function O9(e,t,n,i){null!==t?t.applyValueToInputSignal(t,i):e[n]=i}function Ui(){return R9}function R9(e){return e.type.prototype.ngOnChanges&&(e.setInput=ube),cbe}function cbe(){const e=P9(this),t=e?.current;if(t){const n=e.previous;if(n===il)e.previous=t;else for(let i in t)n[i]=t[i];e.current=null,this.ngOnChanges(t)}}function ube(e,t,n,i,r){const o=this.declaredInputs[i],s=P9(e)||function dbe(e,t){return e[F9]=t}(e,{previous:il,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new lbe(c&&c.currentValue,n,l===il),O9(e,t,r,n)}Ui.ngInherit=!0;const F9="__ngSimpleChanges__";function P9(e){return e[F9]||null}const ll=function(e,t,n){};function St(e){for(;Array.isArray(e);)e=e[Dn];return e}function Uy(e,t){return St(t[e])}function Ar(e,t){return St(t[e.index])}function zy(e,t){return e.data[t]}function Tf(e,t){return e[t]}function ko(e,t){const n=t[e];return pi(n)?n:n[Dn]}function cI(e){return!(128&~e[Le])}function ms(e,t){return null==t?null:e[t]}function B9(e){e[ng]=0}function j9(e){1024&e[Le]||(e[Le]|=1024,cI(e)&&bE(e))}function vE(e){return!!(9216&e[Le]||e[gs]?.dirty)}function uI(e){e[sl].changeDetectionScheduler?.notify(8),64&e[Le]&&(e[Le]|=1024),vE(e)&&bE(e)}function bE(e){e[sl].changeDetectionScheduler?.notify(0);let t=wc(e);for(;null!==t&&!(8192&t[Le])&&(t[Le]|=8192,cI(t));)t=wc(t)}function wE(e,t){if(!(256&~e[Le]))throw new q(911,!1);null===e[Iu]&&(e[Iu]=[]),e[Iu].push(t)}function wc(e){const t=e[ti];return ur(t)?t[ti]:t}const Ye={lFrame:J9(null),bindingsEnabled:!0,skipHydrationRootTNode:null};let U9=!1;function z9(){return Ye.bindingsEnabled}function xf(){return null!==Ye.skipHydrationRootTNode}function Q(){return Ye.lFrame.lView}function lt(){return Ye.lFrame.tView}function Fn(e){return Ye.lFrame.contextLView=e,e[un]}function Pn(e){return Ye.lFrame.contextLView=null,e}function Ht(){let e=H9();for(;null!==e&&64===e.type;)e=e.parent;return e}function H9(){return Ye.lFrame.currentTNode}function oa(e,t){const n=Ye.lFrame;n.currentTNode=e,n.isParent=t}function hI(){return Ye.lFrame.isParent}function pI(){Ye.lFrame.isParent=!1}function q9(){return U9}function Y9(e){U9=e}function Mr(){const e=Ye.lFrame;let t=e.bindingRootIndex;return-1===t&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function sa(){return Ye.lFrame.bindingIndex++}function Cc(e){const t=Ye.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function Sbe(e,t){const n=Ye.lFrame;n.bindingIndex=n.bindingRootIndex=e,gI(t)}function gI(e){Ye.lFrame.currentDirectiveIndex=e}function _I(){return Ye.lFrame.currentQueryIndex}function CE(e){Ye.lFrame.currentQueryIndex=e}function xbe(e){const t=e[fe];return 2===t.type?t.declTNode:1===t.type?e[Vi]:null}function Q9(e,t,n){if(n&ft.SkipSelf){let r=t,o=e;for(;!(r=r.parent,null!==r||n&ft.Host||(r=xbe(o),null===r||(o=o[tg],10&r.type))););if(null===r)return!1;t=r,e=o}const i=Ye.lFrame=Z9();return i.currentTNode=t,i.lView=e,!0}function yI(e){const t=Z9(),n=e[fe];Ye.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function Z9(){const e=Ye.lFrame,t=null===e?null:e.child;return null===t?J9(e):t}function J9(e){const t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return null!==e&&(e.child=t),t}function e7(){const e=Ye.lFrame;return Ye.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}const t7=e7;function vI(){const e=e7();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function zi(){return Ye.lFrame.selectedIndex}function Af(e){Ye.lFrame.selectedIndex=e}function dn(){const e=Ye.lFrame;return zy(e.tView,e.selectedIndex)}let i7=!0;function Gy(){return i7}function cl(e){i7=e}function DE(e,t){for(let n=t.directiveStart,i=t.directiveEnd;n=i)break}else t[l]<0&&(e[ng]+=65536),(a>14>16&&(3&e[Le])===t&&(e[Le]+=16384,o7(a,o)):o7(a,o)}const og=-1;class Wy{constructor(t,n,i){this.factory=t,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=i}}const EI={};class Mf{constructor(t,n){this.injector=t,this.parentInjector=n}get(t,n,i){i=nE(i);const r=this.injector.get(t,EI,i);return r!==EI||n===EI?r:this.parentInjector.get(t,n,i)}}function CI(e){return e!==og}function qy(e){return 32767&e}function Yy(e,t){let n=function Bbe(e){return e>>16}(e),i=t;for(;n>0;)i=i[tg],n--;return i}let DI=!0;function xE(e){const t=DI;return DI=e,t}const a7=255,l7=5;let Vbe=0;const ul={};function AE(e,t){const n=c7(e,t);if(-1!==n)return n;const i=t[fe];i.firstCreatePass&&(e.injectorIndex=t.length,SI(i.data,e),SI(t,null),SI(i.blueprint,null));const r=ME(e,t),o=e.injectorIndex;if(CI(r)){const s=qy(r),a=Yy(r,t),l=a[fe].data;for(let c=0;c<8;c++)t[o+c]=a[s+c]|l[s+c]}return t[o+8]=r,o}function SI(e,t){e.push(0,0,0,0,0,0,0,0,t)}function c7(e,t){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===t[e.injectorIndex+8]?-1:e.injectorIndex}function ME(e,t){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;let n=0,i=null,r=t;for(;null!==r;){if(i=m7(r),null===i)return og;if(n++,r=r[tg],-1!==i.injectorIndex)return i.injectorIndex|n<<16}return og}function TI(e,t,n){!function Ube(e,t,n){let i;"string"==typeof n?i=n.charCodeAt(0)||0:n.hasOwnProperty(Oy)&&(i=n[Oy]),null==i&&(i=n[Oy]=Vbe++);const r=i&a7;t.data[e+(r>>l7)]|=1<=0?t&a7:Wbe:t}(n);if("function"==typeof o){if(!Q9(t,e,i))return i&ft.Host?u7(r,0,i):d7(t,n,i,r);try{let s;if(s=o(i),null!=s||i&ft.Optional)return s;j2()}finally{t7()}}else if("number"==typeof o){let s=null,a=c7(e,t),l=og,c=i&ft.Host?t[Sn][Vi]:null;for((-1===a||i&ft.SkipSelf)&&(l=-1===a?ME(e,t):t[a+8],l!==og&&g7(i,!1)?(s=t[fe],a=qy(l),t=Yy(l,t)):a=-1);-1!==a;){const u=t[fe];if(p7(o,a,u.data)){const d=Hbe(a,t,n,s,i,c);if(d!==ul)return d}l=t[a+8],l!==og&&g7(i,t[fe].data[a+8]===c)&&p7(o,a,t)?(s=u,a=qy(l),t=Yy(l,t)):a=-1}}return r}function Hbe(e,t,n,i,r,o){const s=t[fe],a=s.data[e+8],u=NE(a,s,n,null==i?Sf(a)&&DI:i!=s&&!!(3&a.type),r&ft.Host&&o===a);return null!==u?Nf(t,s,u,a):ul}function NE(e,t,n,i,r){const o=e.providerIndexes,s=t.data,a=1048575&o,l=e.directiveStart,u=o>>20,f=r?a+u:e.directiveEnd;for(let h=i?a:a+u;h=l&&p.type===n)return h}if(r){const h=s[l];if(h&&ra(h)&&h.type===n)return l}return null}function Nf(e,t,n,i){let r=e[n];const o=t.data;if(function Fbe(e){return e instanceof Wy}(r)){const s=r;s.resolving&&function f1e(e,t){throw t&&t.join(" > "),new q(-200,e)}(function kt(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():Je(e)}(o[n]));const a=xE(s.canSeeViewProviders);s.resolving=!0;const c=s.injectImpl?no(s.injectImpl):null;Q9(e,i,ft.Default);try{r=e[n]=s.factory(void 0,o,e,i),t.firstCreatePass&&n>=i.directiveStart&&function Obe(e,t,n){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=t.type.prototype;if(i){const s=R9(t);(n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s)}r&&(n.preOrderHooks??=[]).push(0-e,r),o&&((n.preOrderHooks??=[]).push(e,o),(n.preOrderCheckHooks??=[]).push(e,o))}(n,o[n],t)}finally{null!==c&&no(c),xE(a),s.resolving=!1,t7()}}return r}function p7(e,t,n){return!!(n[t+(e>>l7)]&1<{const t=e.prototype.constructor,n=t[vc]||xI(t),i=Object.prototype;let r=Object.getPrototypeOf(e.prototype).constructor;for(;r&&r!==i;){const o=r[vc]||xI(r);if(o&&o!==n)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function xI(e){return Qw(e)?()=>{const t=xI(We(e));return t&&t()}:Ef(e)}function m7(e){const t=e[fe],n=t.type;return 2===n?t.declTNode:1===n?e[Vi]:null}function w7(e,t=null,n=null,i){const r=E7(e,t,n,i);return r.resolveInjectorInitializers(),r}function E7(e,t=null,n=null,i,r=new Set){const o=[n||Dt,U1e(e)];return i=i||("object"==typeof e?void 0:di(e)),new Qp(o,t||fE(),i||null,r)}class nn{static{this.THROW_IF_NOT_FOUND=Ry}static{this.NULL=new aE}static create(t,n){if(Array.isArray(t))return w7({name:""},n,t,"");{const i=t.name??"";return w7({name:i},t.parent,t.providers,i)}}static{this.\u0275prov=pe({token:nn,providedIn:"any",factory:()=>Ne(d9)})}static{this.__NG_ELEMENT_ID__=-1}}new _e("").__NG_ELEMENT_ID__=e=>{const t=Ht();if(null===t)throw new q(204,!1);if(2&t.type)return t.value;if(e&ft.Optional)return null;throw new q(204,!1)};function MI(e){return e.ngOriginalError}const D7=!0;let Dc=(()=>{class e{static{this.__NG_ELEMENT_ID__=iwe}static{this.__NG_ENV_ID__=n=>n}}return e})();class nwe extends Dc{constructor(t){super(),this._lView=t}onDestroy(t){return wE(this._lView,t),()=>function dI(e,t){if(null===e[Iu])return;const n=e[Iu].indexOf(t);-1!==n&&e[Iu].splice(n,1)}(this._lView,t)}}function iwe(){return new nwe(Q())}let Sc=(()=>{class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new ps(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);const n=this.taskId++;return this.pendingTasks.add(n),n}remove(n){this.pendingTasks.delete(n),0===this.pendingTasks.size&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static{this.\u0275prov=pe({token:e,providedIn:"root",factory:()=>new e})}}return e})();const ze=class rwe extends tn{constructor(t=!1){super(),this.destroyRef=void 0,this.pendingTasks=void 0,this.__isAsync=t,S9()&&(this.destroyRef=L(Dc,{optional:!0})??void 0,this.pendingTasks=L(Sc,{optional:!0})??void 0)}emit(t){const n=st(null);try{super.next(t)}finally{st(n)}}subscribe(t,n,i){let r=t,o=n||(()=>null),s=i;if(t&&"object"==typeof t){const l=t;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=this.wrapInTimeout(o),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));const a=super.subscribe({next:r,error:o,complete:s});return t instanceof ar&&t.add(a),a}wrapInTimeout(t){return n=>{const i=this.pendingTasks?.add();setTimeout(()=>{t(n),void 0!==i&&this.pendingTasks?.remove(i)})}}};function kE(...e){}function S7(e){let t,n;function i(){e=kE;try{void 0!==n&&"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(n),void 0!==t&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),i()}),"function"==typeof requestAnimationFrame&&(n=requestAnimationFrame(()=>{e(),i()})),()=>i()}function T7(e){return queueMicrotask(()=>e()),()=>{e=kE}}const NI="isAngularZone",OE=NI+"_ID";let owe=0;class ct{constructor(t){this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new ze(!1),this.onMicrotaskEmpty=new ze(!1),this.onStable=new ze(!1),this.onError=new ze(!1);const{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:i=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=D7}=t;if(typeof Zone>"u")throw new q(908,!1);Zone.assertZonePatched();const s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!r&&i,s.shouldCoalesceRunChangeDetection=r,s.callbackScheduled=!1,s.scheduleInRootZone=o,function lwe(e){const t=()=>{!function awe(e){function t(){S7(()=>{e.callbackScheduled=!1,kI(e),e.isCheckStableRunning=!0,II(e),e.isCheckStableRunning=!1})}e.isCheckStableRunning||e.callbackScheduled||(e.callbackScheduled=!0,e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),kI(e))}(e)},n=owe++;e._inner=e._inner.fork({name:"angular",properties:{[NI]:!0,[OE]:n,[OE+n]:!0},onInvokeTask:(i,r,o,s,a,l)=>{if(function cwe(e){return M7(e,"__ignore_ng_zone__")}(l))return i.invokeTask(o,s,a,l);try{return x7(e),i.invokeTask(o,s,a,l)}finally{(e.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||e.shouldCoalesceRunChangeDetection)&&t(),A7(e)}},onInvoke:(i,r,o,s,a,l,c)=>{try{return x7(e),i.invoke(o,s,a,l,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!function uwe(e){return M7(e,"__scheduler_tick__")}(l)&&t(),A7(e)}},onHasTask:(i,r,o,s)=>{i.hasTask(o,s),r===o&&("microTask"==s.change?(e._hasPendingMicrotasks=s.microTask,kI(e),II(e)):"macroTask"==s.change&&(e.hasPendingMacrotasks=s.macroTask))},onHandleError:(i,r,o,s)=>(i.handleError(o,s),e.runOutsideAngular(()=>e.onError.emit(s)),!1)})}(s)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get(NI)}static assertInAngularZone(){if(!ct.isInAngularZone())throw new q(909,!1)}static assertNotInAngularZone(){if(ct.isInAngularZone())throw new q(909,!1)}run(t,n,i){return this._inner.run(t,n,i)}runTask(t,n,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,t,swe,kE,kE);try{return o.runTask(s,n,i)}finally{o.cancelTask(s)}}runGuarded(t,n,i){return this._inner.runGuarded(t,n,i)}runOutsideAngular(t){return this._outer.run(t)}}const swe={};function II(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function kI(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&!0===e.callbackScheduled)}function x7(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function A7(e){e._nesting--,II(e)}class OI{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new ze,this.onMicrotaskEmpty=new ze,this.onStable=new ze,this.onError=new ze}run(t,n,i){return t.apply(n,i)}runGuarded(t,n,i){return t.apply(n,i)}runOutsideAngular(t){return t()}runTask(t,n,i,r){return t.apply(n,i)}}function M7(e,t){return!(!Array.isArray(e)||1!==e.length)&&!0===e[0]?.data?.[t]}class dl{constructor(){this._console=console}handleError(t){const n=this._findOriginalError(t);this._console.error("ERROR",t),n&&this._console.error("ORIGINAL ERROR",n)}_findOriginalError(t){let n=t&&MI(t);for(;n&&MI(n);)n=MI(n);return n||null}}const fwe=new _e("",{providedIn:"root",factory:()=>{const e=L(ct),t=L(dl);return n=>e.runOutsideAngular(()=>t.handleError(n))}});function hwe(){return lg(Ht(),Q())}function lg(e,t){return new Gt(Ar(e,t))}let Gt=(()=>{class e{constructor(n){this.nativeElement=n}static{this.__NG_ELEMENT_ID__=hwe}}return e})();function I7(e){return e instanceof Gt?e.nativeElement:e}function pwe(){return this._results[Symbol.iterator]()}class RI{get changes(){return this._changes??=new ze}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;const n=RI.prototype;n[Symbol.iterator]||(n[Symbol.iterator]=pwe)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,n){return this._results.reduce(t,n)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,n){this.dirty=!1;const i=function io(e){return e.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function S1e(e,t,n){if(e.length!==t.length)return!1;for(let i=0;iFwe}),Fwe="ng",Q7=new _e(""),Tc=new _e("",{providedIn:"platform",factory:()=>"unknown"}),Z7=new _e(""),J7=new _e("",{providedIn:"root",factory:()=>function Ou(){if(void 0!==BI)return BI;if(typeof document<"u")return document;throw new q(210,!1)}().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});let ez=()=>null;function WI(e,t,n=!1){return ez(e,t,n)}const lz=new _e("",{providedIn:"root",factory:()=>!1});let zE;function hz(e){return function ZI(){if(void 0===zE&&(zE=null,vn.trustedTypes))try{zE=vn.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return zE}()?.createScriptURL(e)||e}class pz{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${KU})`}}function Ru(e){return e instanceof pz?e.changingThisBreaksApplicationSecurity:e}function r0(e,t){const n=function eEe(e){return e instanceof pz&&e.getTypeName()||null}(e);if(null!=n&&n!==t){if("ResourceURL"===n&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${KU})`)}return n===t}const rEe=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;var pg=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(pg||{});function Oo(e){const t=s0();return t?t.sanitize(pg.URL,e)||"":r0(e,"URL")?Ru(e):function JI(e){return(e=String(e)).match(rEe)?e:"unsafe:"+e}(Je(e))}function Cz(e){const t=s0();if(t)return hz(t.sanitize(pg.RESOURCE_URL,e)||"");if(r0(e,"ResourceURL"))return hz(Ru(e));throw new q(904,!1)}function s0(){const e=Q();return e&&e[sl].sanitizer}function Mz(e){return e.ownerDocument.defaultView}function Ro(e){return e instanceof Function?e():e}var Fu=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Fu||{});let ok;function sk(e,t){return ok(e,t)}function mg(e,t,n,i,r){if(null!=i){let o,s=!1;ur(i)?o=i:pi(i)&&(s=!0,i=i[Dn]);const a=St(i);0===e&&null!==n?null==r?$z(t,n,a):kf(t,n,a,r||null,!0):1===e&&null!==n?kf(t,n,a,r||null,!0):2===e?function l0(e,t,n){e.removeChild(null,t,n)}(t,a,s):3===e&&t.destroyNode(a),null!=o&&function VEe(e,t,n,i,r){const o=n[al];o!==St(n)&&mg(t,e,i,o,r);for(let a=Un;a0&&(e[n-1][ia]=i[ia]);const o=oE(e,Un+t);!function OEe(e,t){Fz(e,t),t[Dn]=null,t[Vi]=null}(i[fe],i);const s=o[bc];null!==s&&s.detachView(o[fe]),i[ti]=null,i[ia]=null,i[Le]&=-129}return i}function YE(e,t){if(!(256&t[Le])){const n=t[qe];n.destroyNode&&XE(e,t,n,3,null,null),function FEe(e){let t=e[By];if(!t)return uk(e[fe],e);for(;t;){let n=null;if(pi(t))n=t[By];else{const i=t[Un];i&&(n=i)}if(!n){for(;t&&!t[ia]&&t!==e;)pi(t)&&uk(t[fe],t),t=t[ti];null===t&&(t=e),pi(t)&&uk(t[fe],t),n=t&&t[ia]}t=n}}(t)}}function uk(e,t){if(256&t[Le])return;const n=st(null);try{t[Le]&=-129,t[Le]|=256,t[gs]&&v2(t[gs]),function $Ee(e,t){let n;if(null!=e&&null!=(n=e.destroyHooks))for(let i=0;i=0?i[s]():i[-s].unsubscribe(),o+=2}else n[o].call(i[n[o+1]]);null!==i&&(t[eg]=null);const r=t[Iu];if(null!==r){t[Iu]=null;for(let o=0;o-1){const{encapsulation:o}=e.data[i.directiveStart+r];if(o===ta.None||o===ta.Emulated)return null}return Ar(i,n)}}(e,t.parent,n)}function kf(e,t,n,i,r){e.insertBefore(t,n,i,r)}function $z(e,t,n){e.appendChild(t,n)}function Bz(e,t,n,i,r){null!==i?kf(e,t,n,i,r):$z(e,t,n)}function fk(e,t){return e.parentNode(t)}function jz(e,t,n){return Uz(e,t,n)}let hk,Uz=function Vz(e,t,n){return 40&e.type?Ar(e,n):null};function KE(e,t,n,i){const r=dk(e,i,t),o=t[qe],a=jz(i.parent||t[Vi],i,t);if(null!=r)if(Array.isArray(n))for(let l=0;lIe&&Kz(e,t,Ie,!1),ll(s?2:0,r),n(i,r)}finally{Af(o),ll(s?3:1,r)}}function _k(e,t,n){if(rI(t)){const i=st(null);try{const o=t.directiveEnd;for(let s=t.directiveStart;snull;function tH(e,t,n,i,r){for(let o in t){if(!t.hasOwnProperty(o))continue;const s=t[o];if(void 0===s)continue;i??={};let a,l=Mu.None;Array.isArray(s)?(a=s[0],l=s[1]):a=s;let c=o;if(null!==r){if(!r.hasOwnProperty(o))continue;c=r[o]}0===e?nH(i,n,c,a,l):nH(i,n,c,a)}return i}function nH(e,t,n,i,r){let o;e.hasOwnProperty(n)?(o=e[n]).push(t,i):o=e[n]=[t,i],void 0!==r&&o.push(r)}function oo(e,t,n,i,r,o,s,a){const l=Ar(t,n);let u,c=t.inputs;!a&&null!=c&&(u=c[i])?(Sk(e,n,u,i,r),Sf(t)&&function eCe(e,t){const n=ko(t,e);16&n[Le]||(n[Le]|=64)}(n,t.index)):3&t.type&&(i=function JEe(e){return"class"===e?"className":"for"===e?"htmlFor":"formaction"===e?"formAction":"innerHtml"===e?"innerHTML":"readonly"===e?"readOnly":"tabindex"===e?"tabIndex":e}(i),r=null!=s?s(r,t.value||"",i):r,o.setProperty(l,i,r))}function wk(e,t,n,i){if(z9()){const r=null===i?null:{"":-1},o=function sCe(e,t){const n=e.directiveRegistry;let i=null,r=null;if(n)for(let o=0;o0;){const n=e[--t];if("number"==typeof n&&n<0)return n}return 0})(s)!=a&&s.push(a),s.push(n,i,o)}}(e,t,i,c0(e,n,r.hostVars,et),r)}function fl(e,t,n,i,r,o){const s=Ar(e,t);!function Ck(e,t,n,i,r,o,s){if(null==o)e.removeAttribute(t,r,n);else{const a=null==s?Je(o):s(o,i||"",r);e.setAttribute(t,r,a,n)}}(t[qe],s,o,e.value,n,i,r)}function fCe(e,t,n,i,r,o){const s=o[t];if(null!==s)for(let a=0;a0&&(n[r-1][ia]=t),i{bE(e.lView)},consumerOnSignalRead(){this.lView[gs]=this}},ECe={...jw,consumerIsAlwaysLive:!0,consumerMarkedDirty:e=>{let t=wc(e.lView);for(;t&&!hH(t[fe]);)t=wc(t);t&&j9(t)},consumerOnSignalRead(){this.lView[gs]=this}};function hH(e){return 2!==e.type}const CCe=100;function eC(e,t=!0,n=0){const i=e[sl],r=i.rendererFactory;r.begin?.();try{!function DCe(e,t){const n=q9();try{Y9(!0),Ak(e,t);let i=0;for(;vE(e);){if(i===CCe)throw new q(103,!1);i++,Ak(e,1)}}finally{Y9(n)}}(e,n)}catch(s){throw t&&JE(e,s),s}finally{r.end?.(),i.inlineEffectRunner?.flush()}}function SCe(e,t,n,i){const r=t[Le];if(!(256&~r))return;t[sl].inlineEffectRunner?.flush(),yI(t);let a=!0,l=null,c=null;hH(e)?(c=function _Ce(e){return e[gs]??function yCe(e){const t=fH.pop()??Object.create(bCe);return t.lView=e,t}(e)}(t),l=Vw(c)):null===function g2(){return ui}()?(a=!1,c=function wCe(e){const t=e[gs]??Object.create(ECe);return t.lView=e,t}(t),l=Vw(c)):t[gs]&&(v2(t[gs]),t[gs]=null);try{B9(t),function K9(e){return Ye.lFrame.bindingIndex=e}(e.bindingStartIndex),null!==n&&Zz(e,t,n,2,i);const u=!(3&~r);if(u){const h=e.preOrderCheckHooks;null!==h&&SE(t,h,null)}else{const h=e.preOrderHooks;null!==h&&TE(t,h,0,null),bI(t,0)}if(function TCe(e){for(let t=V7(e);null!==t;t=U7(t)){if(!(t[Le]&_E.HasTransplantedViews))continue;const n=t[rg];for(let i=0;i-1&&(a0(t,i),oE(n,i))}this._attachedToViewContainer=!1}YE(this._lView[fe],this._lView)}onDestroy(t){wE(this._lView,t)}markForCheck(){d0(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[Le]&=-129}reattach(){uI(this._lView),this._lView[Le]|=128}detectChanges(){this._lView[Le]|=1024,eC(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new q(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;const t=Vy(this._lView),n=this._lView[Df];null!==n&&!t&&ck(n,this._lView),Fz(this._lView[fe],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new q(902,!1);this._appRef=t;const n=Vy(this._lView),i=this._lView[Df];null!==i&&!n&&Pz(i,this._lView),uI(this._lView)}}let ii=(()=>{class e{static{this.__NG_ELEMENT_ID__=NCe}}return e})();const ACe=ii,MCe=class extends ACe{constructor(t,n,i){super(),this._declarationLView=t,this._declarationTContainer=n,this.elementRef=i}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,n){return this.createEmbeddedViewImpl(t,n)}createEmbeddedViewImpl(t,n,i){const r=_g(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:n,dehydratedView:i});return new f0(r)}};function NCe(){return tC(Ht(),Q())}function tC(e,t){return 4&e.type?new MCe(t,e,lg(e,t)):null}let $H=()=>null;function Lf(e,t){return $H(e,t)}class bg{}const b0=new _e("",{providedIn:"root",factory:()=>!1}),BH=new _e(""),Bk=new _e("");class EDe{}class jH{}class DDe{resolveComponentFactory(t){throw function CDe(e){const t=Error(`No component factory found for ${di(e)}.`);return t.ngComponent=e,t}(t)}}class aC{static{this.NULL=new DDe}}class lC{}let aa=(()=>{class e{constructor(){this.destroyNode=null}static{this.__NG_ELEMENT_ID__=()=>function SDe(){const e=Q(),n=ko(Ht().index,e);return(pi(n)?n:e)[qe]}()}}return e})(),TDe=(()=>{class e{static{this.\u0275prov=pe({token:e,providedIn:"root",factory:()=>null})}}return e})();function uC(e,t,n){let i=n?e.styles:null,r=n?e.classes:null,o=0;if(null!==t)for(let s=0;s0&&qz(e,n,o.join(" "))}}(f,C,p,i),void 0!==n&&function PDe(e,t,n){const i=e.projection=[];for(let r=0;r{class e{static{this.__NG_ELEMENT_ID__=$De}}return e})();function $De(){return YH(Ht(),Q())}const BDe=Po,WH=class extends BDe{constructor(t,n,i){super(),this._lContainer=t,this._hostTNode=n,this._hostLView=i}get element(){return lg(this._hostTNode,this._hostLView)}get injector(){return new gi(this._hostTNode,this._hostLView)}get parentInjector(){const t=ME(this._hostTNode,this._hostLView);if(CI(t)){const n=Yy(t,this._hostLView),i=qy(t);return new gi(n[fe].data[i+8],n)}return new gi(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const n=qH(this._lContainer);return null!==n&&n[t]||null}get length(){return this._lContainer.length-Un}createEmbeddedView(t,n,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);const s=Lf(this._lContainer,t.ssrId),a=t.createEmbeddedViewImpl(n||{},o,s);return this.insertImpl(a,r,Ff(this._hostTNode,s)),a}createComponent(t,n,i,r,o){const s=t&&!function $y(e){return"function"==typeof e}(t);let a;if(s)a=n;else{const p=n||{};a=p.index,i=p.injector,r=p.projectableNodes,o=p.environmentInjector||p.ngModuleRef}const l=s?t:new C0(ut(t)),c=i||this.parentInjector;if(!o&&null==l.ngModule){const g=(s?c:this.parentInjector).get(ji,null);g&&(o=g)}const u=ut(l.componentType??{}),d=Lf(this._lContainer,u?.id??null),h=l.create(c,r,d?.firstChild??null,o);return this.insertImpl(h.hostView,a,Ff(this._hostTNode,d)),h}insert(t,n){return this.insertImpl(t,n,!0)}insertImpl(t,n,i){const r=t._lView;if(function gbe(e){return ur(e[ti])}(r)){const a=this.indexOf(t);if(-1!==a)this.detach(a);else{const l=r[ti],c=new WH(l,l[Vi],l[ti]);c.detach(c.indexOf(t))}}const o=this._adjustIndex(n),s=this._lContainer;return yg(s,r,o,i),t.attachToViewContainerRef(),l9(Uk(s),o,t),t}move(t,n){return this.insert(t,n)}indexOf(t){const n=qH(this._lContainer);return null!==n?n.indexOf(t):-1}remove(t){const n=this._adjustIndex(t,-1),i=a0(this._lContainer,n);i&&(oE(Uk(this._lContainer),n),YE(i[fe],i))}detach(t){const n=this._adjustIndex(t,-1),i=a0(this._lContainer,n);return i&&null!=oE(Uk(this._lContainer),n)?new f0(i):null}_adjustIndex(t,n=0){return t??this.length+n}};function qH(e){return e[8]}function Uk(e){return e[8]||(e[8]=[])}function YH(e,t){let n;const i=t[e.index];return ur(i)?n=i:(n=oH(i,t,null,e),t[e.index]=n,ZE(t,n)),KH(n,t,e,i),new WH(n,e,t)}let KH=function QH(e,t,n,i){if(e[al])return;let r;r=8&n.type?St(i):function jDe(e,t){const n=e[qe],i=n.createComment(""),r=Ar(t,e);return kf(n,fk(n,r),i,function BEe(e,t){return e.nextSibling(t)}(n,r),!1),i}(t,n),e[al]=r},zk=()=>!1;class Hk{constructor(t){this.queryList=t,this.matches=null}clone(){return new Hk(this.queryList)}setDirty(){this.queryList.setDirty()}}class Gk{constructor(t=[]){this.queries=t}createEmbeddedView(t){const n=t.queries;if(null!==n){const i=null!==t.contentQueries?t.contentQueries[0]:n.length,r=[];for(let o=0;ot.trim())}(t):t}}class Wk{constructor(t=[]){this.queries=t}elementStart(t,n){for(let i=0;i0)i.push(s[a/2]);else{const c=o[a+1],u=t[-l];for(let d=Un;d(m2(t),t.value);return n[ea]=t,n}(e),i=n[ea];return t?.equal&&(i.equal=t.equal),n.set=r=>BU(i,r),n.update=r=>function Bve(e,t){kU()||$U(),BU(e,t(e.value))}(i,r),n.asReadonly=aG.bind(n),n}function aG(){const e=this[ea];if(void 0===e.readonlyFn){const t=()=>this();t[ea]=e,e.readonlyFn=t}return e.readonlyFn}function lG(e){return function sG(e){return"function"==typeof e&&void 0!==e[ea]}(e)&&"function"==typeof e.set}function xt(e){let t=function vG(e){return Object.getPrototypeOf(e.prototype).constructor}(e.type),n=!0;const i=[e];for(;t;){let r;if(ra(e))r=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new q(903,!1);r=t.\u0275dir}if(r){if(n){i.push(r);const s=e;s.inputs=fC(e.inputs),s.inputTransforms=fC(e.inputTransforms),s.declaredInputs=fC(e.declaredInputs),s.outputs=fC(e.outputs);const a=r.hostBindings;a&&cSe(e,a);const l=r.viewQuery,c=r.contentQueries;if(l&&aSe(e,l),c&&lSe(e,c),oSe(e,r),n1e(e.outputs,r.outputs),ra(r)&&r.data.animation){const u=e.data;u.animation=(u.animation||[]).concat(r.data.animation)}}const o=r.features;if(o)for(let s=0;s=0;i--){const r=e[i];r.hostVars=t+=r.hostVars,r.hostAttrs=Py(r.hostAttrs,n=Py(n,r.hostAttrs))}}(i)}function oSe(e,t){for(const n in t.inputs){if(!t.inputs.hasOwnProperty(n)||e.inputs.hasOwnProperty(n))continue;const i=t.inputs[n];if(void 0!==i&&(e.inputs[n]=i,e.declaredInputs[n]=t.declaredInputs[n],null!==t.inputTransforms)){const r=Array.isArray(i)?i[0]:i;if(!t.inputTransforms.hasOwnProperty(r))continue;e.inputTransforms??={},e.inputTransforms[r]=t.inputTransforms[r]}}}function fC(e){return e===il?{}:e===Dt?[]:e}function aSe(e,t){const n=e.viewQuery;e.viewQuery=n?(i,r)=>{t(i,r),n(i,r)}:t}function lSe(e,t){const n=e.contentQueries;e.contentQueries=n?(i,r,o)=>{t(i,r,o),n(i,r,o)}:t}function cSe(e,t){const n=e.hostBindings;e.hostBindings=n?(i,r)=>{t(i,r),n(i,r)}:t}function DG(e){const t=e.inputConfig,n={};for(const i in t)if(t.hasOwnProperty(i)){const r=t[i];Array.isArray(r)&&r[3]&&(n[i]=r[3])}e.inputTransforms=n}class $f{}class SG{}class eO extends $f{constructor(t,n,i,r=!0){super(),this.ngModuleType=t,this._parent=n,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new HH(this);const o=cr(t);this._bootstrapComponents=Ro(o.bootstrap),this._r3Injector=E7(t,n,[{provide:$f,useValue:this},{provide:aC,useValue:this.componentFactoryResolver},...i],di(t),new Set(["environment"])),r&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(n=>n()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class tO extends SG{constructor(t){super(),this.moduleType=t}create(t){return new eO(this.moduleType,t,[])}}class TG extends $f{constructor(t){super(),this.componentFactoryResolver=new HH(this),this.instance=null;const n=new Qp([...t.providers,{provide:$f,useValue:this},{provide:aC,useValue:this.componentFactoryResolver}],t.parent||fE(),t.debugName,new Set(["environment"]));this.injector=n,t.runEnvironmentInitializers&&n.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function hC(e,t,n=null){return new TG({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}function pC(e){return!!nO(e)&&(Array.isArray(e)||!(e instanceof Map)&&Symbol.iterator in e)}function nO(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function hl(e,t,n){return e[t]=n}function zn(e,t,n){return!Object.is(e[t],n)&&(e[t]=n,!0)}function T0(e,t,n,i,r,o,s,a,l,c){const u=n+Ie,d=t.firstCreatePass?function bSe(e,t,n,i,r,o,s,a,l){const c=t.consts,u=Rf(t,e,4,s||null,a||null);wk(t,n,u,ms(c,l)),DE(t,u);const d=u.tView=bk(2,u,i,r,o,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c,null);return null!==t.queries&&(t.queries.template(t,u),d.queries=t.queries.embeddedTView(u)),u}(u,t,e,i,r,o,s,a,l):t.data[u];oa(d,!1);const f=xG(t,e,d,n);Gy()&&KE(t,e,f,d),dr(f,e);const h=oH(f,e,f,d);return e[u]=h,ZE(e,h),function XH(e,t,n){return zk(e,t,n)}(h,d,e),yE(d)&&yk(t,e,d),null!=l&&vk(e,d,c),d}function mt(e,t,n,i,r,o,s,a){const l=Q(),c=lt();return T0(l,c,e,t,n,i,r,ms(c.consts,o),s,a),mt}let xG=function AG(e,t,n,i){return cl(!0),t[qe].createComment("")};var ys=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(ys||{});let RG=(()=>{class e{constructor(){this.impl=null}execute(){this.impl?.execute()}static{this.\u0275prov=pe({token:e,providedIn:"root",factory:()=>new e})}}return e})();class M0{constructor(){this.ngZone=L(ct),this.scheduler=L(bg),this.errorHandler=L(dl,{optional:!0}),this.sequences=new Set,this.deferredRegistrations=new Set,this.executing=!1}static{this.PHASES=[ys.EarlyRead,ys.Write,ys.MixedReadWrite,ys.Read]}execute(){this.executing=!0;for(const t of M0.PHASES)for(const n of this.sequences)if(!n.erroredOrDestroyed&&n.hooks[t])try{n.pipelinedValue=this.ngZone.runOutsideAngular(()=>n.hooks[t](n.pipelinedValue))}catch(i){n.erroredOrDestroyed=!0,this.errorHandler?.handleError(i)}this.executing=!1;for(const t of this.sequences)t.afterRun(),t.once&&(this.sequences.delete(t),t.destroy());for(const t of this.deferredRegistrations)this.sequences.add(t);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear()}register(t){this.executing?this.deferredRegistrations.add(t):(this.sequences.add(t),this.scheduler.notify(6))}unregister(t){this.executing&&this.sequences.has(t)?(t.erroredOrDestroyed=!0,t.pipelinedValue=void 0,t.once=!0):(this.sequences.delete(t),this.deferredRegistrations.delete(t))}static{this.\u0275prov=pe({token:M0,providedIn:"root",factory:()=>new M0})}}class DSe{constructor(t,n,i,r){this.impl=t,this.hooks=n,this.once=i,this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.unregisterOnDestroy=r?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.()}}function $u(e,t){!t?.injector&&function hE(e){if(!S9())throw new q(-203,!1)}();const n=t?.injector??L(nn);return function Fo(e){return"browser"===(e??L(nn)).get(Tc)}(n)?(Nr("NgAfterNextRender"),function FG(e,t,n,i){const r=t.get(RG);r.impl??=t.get(M0);const o=n?.phase??ys.MixedReadWrite,s=!0!==n?.manualCleanup?t.get(Dc):null,a=new DSe(r.impl,function SSe(e,t){if(e instanceof Function){const n=[void 0,void 0,void 0,void 0];return n[t]=e,n}return[e.earlyRead,e.write,e.mixedReadWrite,e.read]}(e,o),i,s);return r.impl.register(a),a}(e,n,t,!0)):PG}const PG={destroy(){}};function rn(e,t,n,i){const r=Q();return zn(r,sa(),t)&&(lt(),fl(dn(),r,e,t,n,i)),rn}function Ig(e,t,n,i){return zn(e,sa(),n)?t+Je(n)+i:et}function wC(e,t){return e<<17|t<<2}function ju(e){return e>>17&32767}function pO(e){return 2|e}function Vf(e){return(131068&e)>>2}function gO(e,t){return-131069&e|t<<2}function mO(e){return 1|e}function lW(e,t,n,i){const r=e[n+1],o=null===t;let s=i?ju(r):Vf(r),a=!1;for(;0!==s&&(!1===a||o);){const c=e[s+1];aTe(e[s],t)&&(a=!0,e[s+1]=i?mO(c):pO(c)),s=i?ju(c):Vf(c)}a&&(e[n+1]=i?pO(r):mO(r))}function aTe(e,t){return null===e||null==t||(Array.isArray(e)?e[1]:e)===t||!(!Array.isArray(e)||"string"!=typeof t)&&Xp(e,t)>=0}const mi={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function cW(e){return e.substring(mi.key,mi.keyEnd)}function uW(e,t){const n=mi.textEnd;return n===t?-1:(t=mi.keyEnd=function dTe(e,t,n){for(;t32;)t++;return t}(e,mi.key=t,n),Bg(e,t,n))}function Bg(e,t,n){for(;t=0;n=uW(t,n))Io(e,cW(t),!0)}function mW(e,t){return t>=e.expandoStartIndex}function _W(e,t,n,i){const r=e.data;if(null===r[n+1]){const o=r[zi()],s=mW(e,n);wW(o,i)&&null===t&&!s&&(t=!1),t=function gTe(e,t,n,i){const r=function mI(e){const t=Ye.lFrame.currentDirectiveIndex;return-1===t?null:e[t]}(e);let o=i?t.residualClasses:t.residualStyles;if(null===r)0===(i?t.classBindings:t.styleBindings)&&(n=k0(n=yO(null,e,t,n,i),t.attrs,i),o=null);else{const s=t.directiveStylingLast;if(-1===s||e[s]!==r)if(n=yO(r,e,t,n,i),null===o){let l=function mTe(e,t,n){const i=n?t.classBindings:t.styleBindings;if(0!==Vf(i))return e[ju(i)]}(e,t,i);void 0!==l&&Array.isArray(l)&&(l=yO(null,e,t,l[1],i),l=k0(l,t.attrs,i),function _Te(e,t,n,i){e[ju(n?t.classBindings:t.styleBindings)]=i}(e,t,i,l))}else o=function yTe(e,t,n){let i;const r=t.directiveEnd;for(let o=1+t.directiveStylingLast;o0)&&(c=!0)):u=n,r)if(0!==l){const f=ju(e[a+1]);e[i+1]=wC(f,a),0!==f&&(e[f+1]=gO(e[f+1],i)),e[a+1]=function iTe(e,t){return 131071&e|t<<17}(e[a+1],i)}else e[i+1]=wC(a,0),0!==a&&(e[a+1]=gO(e[a+1],i)),a=i;else e[i+1]=wC(l,0),0===a?a=i:e[l+1]=gO(e[l+1],i),l=i;c&&(e[i+1]=pO(e[i+1])),lW(e,u,i,!0),lW(e,u,i,!1),function sTe(e,t,n,i,r){const o=r?e.residualClasses:e.residualStyles;null!=o&&"string"==typeof t&&Xp(o,t)>=0&&(n[i+1]=mO(n[i+1]))}(t,u,e,i,o),s=wC(a,l),o?t.classBindings=s:t.styleBindings=s}(r,o,t,n,s,i)}}function yO(e,t,n,i,r){let o=null;const s=n.directiveEnd;let a=n.directiveStylingLast;for(-1===a?a=n.directiveStart:a++;a0;){const l=e[r],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let f=n[r+1];f===et&&(f=d?Dt:void 0);let h=d?G2(f,i):u===i?f:void 0;if(c&&!EC(h)&&(h=G2(l,i)),EC(h)&&(a=h,s))return a;const p=e[r+1];r=s?ju(p):Vf(p)}if(null!==t){let l=o?t.residualClasses:t.residualStyles;null!=l&&(a=G2(l,i))}return a}function EC(e){return void 0!==e}function wW(e,t){return!!(e.flags&(t?8:16))}function U(e,t,n,i){const r=Q(),o=lt(),s=Ie+e,a=r[qe],l=o.firstCreatePass?function jTe(e,t,n,i,r,o){const s=t.consts,l=Rf(t,e,2,i,ms(s,r));return wk(t,n,l,ms(s,o)),null!==l.attrs&&uC(l,l.attrs,!1),null!==l.mergedAttrs&&uC(l,l.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,l),l}(s,o,r,t,n,i):o.data[s],c=SW(o,r,l,a,t,e);r[s]=c;const u=yE(l);return oa(l,!0),Yz(a,c,l),!function Cg(e){return!(32&~e.flags)}(l)&&Gy()&&KE(o,r,c,l),0===function mbe(){return Ye.lFrame.elementDepthCount}()&&dr(c,r),function _be(){Ye.lFrame.elementDepthCount++}(),u&&(yk(o,r,l),_k(o,l,r)),null!==i&&vk(r,l),U}function z(){let e=Ht();hI()?pI():(e=e.parent,oa(e,!1));const t=e;(function vbe(e){return Ye.skipHydrationRootTNode===e})(t)&&function Cbe(){Ye.skipHydrationRootTNode=null}(),function ybe(){Ye.lFrame.elementDepthCount--}();const n=lt();return n.firstCreatePass&&(DE(n,e),rI(e)&&n.queries.elementEnd(e)),null!=t.classesWithoutHost&&function Lbe(e){return!!(8&e.flags)}(t)&&_O(n,t,Q(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function $be(e){return!!(16&e.flags)}(t)&&_O(n,t,Q(),t.stylesWithoutHost,!1),z}function Ke(e,t,n,i){return U(e,t,n,i),z(),Ke}let SW=(e,t,n,i,r,o)=>(cl(!0),qE(i,r,function n7(){return Ye.lFrame.currentNamespace}()));function $o(){return Q()}const DC="en-US";let IW=DC,KW=(e,t,n)=>{};function nt(e,t,n,i){const r=Q(),o=lt(),s=Ht();return xO(o,r,r[qe],s,e,t,i),nt}function xO(e,t,n,i,r,o,s){const a=yE(i),c=e.firstCreatePass&&lH(e),u=t[un],d=aH(t);let f=!0;if(3&i.type||s){const g=Ar(i,t),m=s?s(g):g,_=d.length,y=s?b=>s(St(b[i.index])):i.index;let v=null;if(!s&&a&&(v=function Fxe(e,t,n,i){const r=e.cleanup;if(null!=r)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(e,t,r,i.index)),null!==v)(v.__ngLastListenerFn__||v).__ngNextListenerFn__=o,v.__ngLastListenerFn__=o,f=!1;else{o=JW(i,t,u,o),KW(g,r,o);const b=n.listen(m,r,o);d.push(o,b),c&&c.push(r,y,_,_+1)}}else o=JW(i,t,u,o);const h=i.outputs;let p;if(f&&null!==h&&(p=h[r])){const g=p.length;if(g)for(let m=0;m-1?ko(e.index,t):t,5);let a=ZW(t,n,i,o),l=r.__ngNextListenerFn__;for(;l;)a=ZW(t,n,l,o)&&a,l=l.__ngNextListenerFn__;return a}}function Qe(e=1){return function Abe(e){return(Ye.lFrame.contextLView=function V9(e,t){for(;e>0;)t=t[tg],e--;return t}(e,Ye.lFrame.contextLView))[un]}(e)}function Pxe(e,t){let n=null;const i=function I1e(e){const t=e.attrs;if(null!=t){const n=t.indexOf(5);if(!(1&n))return t[n+1]}return null}(e);for(let r=0;r(cl(!0),function ak(e,t){return e.createText(t)}(t[qe],i));function kr(e){return Or("",e,""),kr}function Or(e,t,n){const i=Q(),r=Ig(i,e,t,n);return r!==et&&function Ac(e,t,n){const i=Uy(t,e);!function Rz(e,t,n){e.setValue(t,n)}(e[qe],i,n)}(i,zi(),r),Or}function Ic(e,t,n){lG(t)&&(t=t());const i=Q();return zn(i,sa(),t)&&oo(lt(),dn(),i,e,t,i[qe],n,!1),Ic}function zu(e,t){const n=lG(e);return n&&e.set(t),n}function kc(e,t){const n=Q(),i=lt(),r=Ht();return xO(i,n,n[qe],r,e,t),kc}function MO(e,t,n,i,r){if(e=We(e),Array.isArray(e))for(let o=0;o>20;if(Cf(e)||!e.multi){const h=new Wy(c,r,ee),p=IO(l,t,r?u:u+f,d);-1===p?(TI(AE(a,s),o,l),NO(o,e,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),n.push(h),s.push(h)):(n[p]=h,s[p]=h)}else{const h=IO(l,t,u+f,d),p=IO(l,t,u,u+f),m=p>=0&&n[p];if(r&&!m||!r&&!(h>=0&&n[h])){TI(AE(a,s),o,l);const _=function iAe(e,t,n,i,r){const o=new Wy(e,n,ee);return o.multi=[],o.index=t,o.componentProviders=0,Nq(o,r,i&&!n),o}(r?nAe:tAe,n.length,r,i,c);!r&&m&&(n[p].providerFactory=_),NO(o,e,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),n.push(_),s.push(_)}else NO(o,e,h>-1?h:p,Nq(n[r?p:h],c,!r&&i));!r&&i&&m&&n[p].componentProviders++}}}function NO(e,t,n,i){const r=Cf(t),o=function H1e(e){return!!e.useClass}(t);if(r||o){const l=(o?We(t.useClass):t).prototype.ngOnDestroy;if(l){const c=e.destroyHooks||(e.destroyHooks=[]);if(!r&&t.multi){const u=c.indexOf(n);-1===u?c.push(n,[i,l]):c[u+1].push(i,l)}else c.push(n,l)}}}function Nq(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function IO(e,t,n,i){for(let r=n;r{n.providersResolver=(i,r)=>function eAe(e,t,n){const i=lt();if(i.firstCreatePass){const r=ra(e);MO(n,i.data,i.blueprint,r,!0),MO(t,i.data,i.blueprint,r,!1)}}(i,r?r(e):e,t)}}let rAe=(()=>{class e{constructor(n){this._injector=n,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){const i=K2(0,n.type),r=i.length>0?hC([i],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,r)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(const n of this.cachedInjectors.values())null!==n&&n.destroy()}finally{this.cachedInjectors.clear()}}static{this.\u0275prov=pe({token:e,providedIn:"environment",factory:()=>new e(Ne(ji))})}}return e})();function da(e){Nr("NgStandalone"),e.getStandaloneInjector=t=>t.get(rAe).getOrCreateStandaloneInjector(e)}function B0(e,t){const n=e[t];return n===et?void 0:n}function Oq(e,t,n,i,r,o){const s=t+n;return zn(e,s,r)?hl(e,s+1,o?i.call(o,r):i(r)):B0(e,s+1)}function Rq(e,t,n,i,r,o,s){const a=t+n;return function Bf(e,t,n,i){const r=zn(e,t,n);return zn(e,t+1,i)||r}(e,a,r,o)?hl(e,a+2,s?i.call(s,r,o):i(r,o)):B0(e,a+2)}function Ug(e,t){const n=lt();let i;const r=e+Ie;n.firstCreatePass?(i=function gAe(e,t){if(t)for(let n=t.length-1;n>=0;n--){const i=t[n];if(e===i.name)return i}}(t,n.pipeRegistry),n.data[r]=i,i.onDestroy&&(n.destroyHooks??=[]).push(r,i.onDestroy)):i=n.data[r];const o=i.factory||(i.factory=Ef(i.type)),a=no(ee);try{const l=xE(!1),c=o();return xE(l),function AO(e,t,n,i){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=i}(n,Q(),r,c),c}finally{no(a)}}function j0(e,t,n,i){const r=e+Ie,o=Q(),s=Tf(o,r);return V0(o,r)?Rq(o,Mr(),t,s.transform,n,i,s):s.transform(n,i)}function V0(e,t){return e[fe].data[t].pure}let eY=(()=>{class e{log(n){console.log(n)}warn(n){console.warn(n)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"platform"})}}return e})();const oY=new _e(""),OC=new _e("");let VO,BO=(()=>{class e{constructor(n,i,r){this._ngZone=n,this.registry=i,this._isZoneStable=!0,this._callbacks=[],this.taskTrackingZone=null,VO||(function dMe(e){VO=e}(r),r.addToWindow(i)),this._watchAngularEvents(),n.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{ct.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}isStable(){return this._isZoneStable&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;0!==this._callbacks.length;){let n=this._callbacks.pop();clearTimeout(n.timeoutId),n.doneCb()}});else{let n=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(n)||(clearTimeout(i.timeoutId),!1))}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(n=>({source:n.source,creationLocation:n.creationLocation,data:n.data})):[]}addCallback(n,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),n()},i)),this._callbacks.push({doneCb:n,timeoutId:o,updateCb:r})}whenStable(n,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(n,i,r),this._runCallbacksIfReady()}registerApplication(n){this.registry.registerApplication(n,this)}unregisterApplication(n){this.registry.unregisterApplication(n)}findProviders(n,i,r){return[]}static{this.\u0275fac=function(i){return new(i||e)(Ne(ct),Ne(jO),Ne(OC))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})(),jO=(()=>{class e{constructor(){this._applications=new Map}registerApplication(n,i){this._applications.set(n,i)}unregisterApplication(n){this._applications.delete(n)}unregisterAllApplications(){this._applications.clear()}getTestability(n){return this._applications.get(n)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(n,i=!0){return VO?.findTestabilityInTree(this,n,i)??null}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"platform"})}}return e})();function G0(e){return!!e&&"function"==typeof e.then}function sY(e){return!!e&&"function"==typeof e.subscribe}const UO=new _e("");let aY=(()=>{class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,i)=>{this.resolve=n,this.reject=i}),this.appInits=L(UO,{optional:!0})??[]}runInitializers(){if(this.initialized)return;const n=[];for(const r of this.appInits){const o=r();if(G0(o))n.push(o);else if(sY(o)){const s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});n.push(s)}}const i=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{i()}).catch(r=>{this.reject(r)}),0===n.length&&i(),this.initialized=!0}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const RC=new _e("");function cY(e,t){return Array.isArray(t)?t.reduce(cY,e):{...e,...t}}let fa=(()=>{class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=L(fwe),this.afterRenderManager=L(RG),this.zonelessEnabled=L(b0),this.dirtyFlags=0,this.deferredDirtyFlags=0,this.externalTestViews=new Set,this.beforeRender=new tn,this.afterTick=new tn,this.componentTypes=[],this.components=[],this.isStable=L(Sc).hasPendingTasks.pipe(at(n=>!n)),this._injector=L(ji)}get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}whenStable(){let n;return new Promise(i=>{n=this.isStable.subscribe({next:r=>{r&&i()}})}).finally(()=>{n.unsubscribe()})}get injector(){return this._injector}bootstrap(n,i){const r=n instanceof jH;if(!this._injector.get(aY).done)throw!r&&function Nu(e){const t=ut(e)||fi(e)||Bi(e);return null!==t&&t.standalone}(n),new q(405,!1);let s;s=r?n:this._injector.get(aC).resolveComponentFactory(n),this.componentTypes.push(s.componentType);const a=function fMe(e){return e.isBoundToModule}(s)?void 0:this._injector.get($f),c=s.create(nn.NULL,[],i||s.selector,a),u=c.location.nativeElement,d=c.injector.get(oY,null);return d?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),FC(this.components,c),d?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){if(this._runningTick)throw new q(101,!1);const n=st(null);try{this._runningTick=!0,this.synchronize()}catch(i){this.internalErrorHandler(i)}finally{this._runningTick=!1,st(n),this.afterTick.next()}}synchronize(){let n=null;this._injector.destroyed||(n=this._injector.get(lC,null,{optional:!0})),this.dirtyFlags|=this.deferredDirtyFlags,this.deferredDirtyFlags=0;let i=0;for(;0!==this.dirtyFlags&&i++<10;)this.synchronizeOnce(n)}synchronizeOnce(n){if(this.dirtyFlags|=this.deferredDirtyFlags,this.deferredDirtyFlags=0,7&this.dirtyFlags){const i=!!(1&this.dirtyFlags);this.dirtyFlags&=-8,this.dirtyFlags|=8,this.beforeRender.next(i);for(let{_lView:r,notifyErrorHandler:o}of this._views)gMe(r,o,i,this.zonelessEnabled);if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),7&this.dirtyFlags)return}else n?.begin?.(),n?.end?.();8&this.dirtyFlags&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){this.allViews.some(({_lView:n})=>vE(n))?this.dirtyFlags|=2:this.dirtyFlags&=-8}attachView(n){const i=n;this._views.push(i),i.attachToAppRef(this)}detachView(n){const i=n;FC(this._views,i),i.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n);const i=this._injector.get(RC,[]);[...this._bootstrapListeners,...i].forEach(r=>r(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>FC(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new q(406,!1);const n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function FC(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function gMe(e,t,n,i){(n||vE(e))&&eC(e,t,n&&!i?0:1)}class mMe{constructor(t,n){this.ngModuleFactory=t,this.componentFactories=n}}let dY=(()=>{class e{compileModuleSync(n){return new tO(n)}compileModuleAsync(n){return Promise.resolve(this.compileModuleSync(n))}compileModuleAndAllComponentsSync(n){const i=this.compileModuleSync(n),o=Ro(cr(n).declarations).reduce((s,a)=>{const l=ut(a);return l&&s.push(new C0(l)),s},[]);return new mMe(i,o)}compileModuleAndAllComponentsAsync(n){return Promise.resolve(this.compileModuleAndAllComponentsSync(n))}clearCache(){}clearCacheFor(n){}getModuleId(n){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),vMe=(()=>{class e{constructor(){this.zone=L(ct),this.changeDetectionScheduler=L(bg),this.applicationRef=L(fa)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function zO({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:n}){return e??=()=>new ct({...HO(),scheduleInRootZone:n}),[{provide:ct,useFactory:e},{provide:rl,multi:!0,useFactory:()=>{const i=L(vMe,{optional:!0});return()=>i.initialize()}},{provide:rl,multi:!0,useFactory:()=>{const i=L(wMe);return()=>{i.initialize()}}},!0===t?{provide:BH,useValue:!0}:[],{provide:Bk,useValue:n??D7}]}function HO(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}let wMe=(()=>{class e{constructor(){this.subscription=new ar,this.initialized=!1,this.zone=L(ct),this.pendingTasks=L(Sc)}initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{ct.assertNotInAngularZone(),queueMicrotask(()=>{null!==n&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{ct.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),W0=(()=>{class e{constructor(){this.appRef=L(fa),this.taskService=L(Sc),this.ngZone=L(ct),this.zonelessEnabled=L(b0),this.disableScheduling=L(BH,{optional:!0})??!1,this.zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run,this.schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}],this.subscriptions=new ar,this.angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(OE):null,this.scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(L(Bk,{optional:!0})??!1),this.cancelScheduledCallback=null,this.useMicrotaskScheduler=!1,this.runningTick=!1,this.pendingRenderTaskId=null,this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof OI||!this.zoneIsDefined)}notify(n){if(!this.zonelessEnabled&&5===n)return;switch(n){case 0:this.appRef.dirtyFlags|=2;break;case 3:case 2:case 4:case 5:case 1:this.appRef.dirtyFlags|=4;break;case 7:this.appRef.deferredDirtyFlags|=8;break;default:this.appRef.dirtyFlags|=8}if(!this.shouldScheduleTick())return;const i=this.useMicrotaskScheduler?T7:S7;this.pendingRenderTaskId=this.taskService.add(),this.cancelScheduledCallback=this.scheduleInRootZone?Zone.root.run(()=>i(()=>this.tick())):this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(){return!(this.disableScheduling||null!==this.pendingRenderTaskId||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(OE+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;!this.zonelessEnabled&&7&this.appRef.dirtyFlags&&(this.appRef.dirtyFlags|=1);const n=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(i){throw this.taskService.remove(n),i}finally{this.cleanup()}this.useMicrotaskScheduler=!0,T7(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,null!==this.pendingRenderTaskId){const n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const Oc=new _e("",{providedIn:"root",factory:()=>L(Oc,ft.Optional|ft.SkipSelf)||function EMe(){return typeof $localize<"u"&&$localize.locale||DC}()}),LC=new _e("");function $C(e){return!e.moduleRef}let _Y=(()=>{class e{constructor(n){this._injector=n,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(n,i){const r=i?.scheduleInRootZone,s=i?.ignoreChangesOutsideZone,a=[zO({ngZoneFactory:()=>function dwe(e="zone.js",t){return"noop"===e?new OI:"zone.js"===e?new ct(t):e}(i?.ngZone,{...HO({eventCoalescing:i?.ngZoneEventCoalescing,runCoalescing:i?.ngZoneRunCoalescing}),scheduleInRootZone:r}),ignoreChangesOutsideZone:s}),{provide:bg,useExisting:W0}],l=function gSe(e,t,n){return new eO(e,t,n,!1)}(n.moduleType,this.injector,a);return function mY(e){const t=$C(e)?e.r3Injector:e.moduleRef.injector,n=t.get(ct);return n.run(()=>{$C(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();const i=t.get(dl,null);let r;if(n.runOutsideAngular(()=>{r=n.onError.subscribe({next:o=>{i.handleError(o)}})}),$C(e)){const o=()=>t.destroy(),s=e.platformInjector.get(LC);s.add(o),t.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else{const o=()=>e.moduleRef.destroy(),s=e.platformInjector.get(LC);s.add(o),e.moduleRef.onDestroy(()=>{FC(e.allPlatformModules,e.moduleRef),r.unsubscribe(),s.delete(o)})}return function pMe(e,t,n){try{const i=n();return G0(i)?i.catch(r=>{throw t.runOutsideAngular(()=>e.handleError(r)),r}):i}catch(i){throw t.runOutsideAngular(()=>e.handleError(i)),i}}(i,n,()=>{const o=t.get(aY);return o.runInitializers(),o.donePromise.then(()=>{if(function ZTe(e){"string"==typeof e&&(IW=e.toLowerCase().replace(/_/g,"-"))}(t.get(Oc,DC)||DC),$C(e)){const a=t.get(fa);return void 0!==e.rootComponent&&a.bootstrap(e.rootComponent),a}return function AMe(e,t){const n=e.injector.get(fa);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(i=>n.bootstrap(i));else{if(!e.instance.ngDoBootstrap)throw new q(-403,!1);e.instance.ngDoBootstrap(n)}t.push(e)}(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}({moduleRef:l,allPlatformModules:this._modules,platformInjector:this.injector})}bootstrapModule(n,i=[]){const r=cY({},i);return function yMe(e,t,n){const i=new tO(n);return Promise.resolve(i)}(0,0,n).then(o=>this.bootstrapModuleFactory(o,r))}onDestroy(n){this._destroyListeners.push(n)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new q(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const n=this._injector.get(LC,null);n&&(n.forEach(i=>i()),n.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static{this.\u0275fac=function(i){return new(i||e)(Ne(nn))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"platform"})}}return e})(),Hu=null;const yY=new _e("");function vY(e,t,n=[]){const i=`Platform: ${t}`,r=new _e(i);return(o=[])=>{let s=WO();if(!s||s.injector.get(yY,!1)){const a=[...n,...o,{provide:r,useValue:!0}];e?e(a):function MMe(e){if(Hu&&!Hu.get(yY,!1))throw new q(400,!1);(function lY(){!function Lve(e){LU=e}(()=>{throw new q(600,!1)})})(),Hu=e;const t=e.get(_Y);(function wY(e){e.get(Q7,null)?.forEach(n=>n())})(e)}(function bY(e=[],t){return nn.create({name:t,providers:[{provide:Z2,useValue:"platform"},{provide:LC,useValue:new Set([()=>Hu=null])},...e]})}(a,i))}return function NMe(){const t=WO();if(!t)throw new q(401,!1);return t}()}}function WO(){return Hu?.get(_Y)??null}let ha=(()=>{class e{static{this.__NG_ELEMENT_ID__=kMe}}return e})();function kMe(e){return function OMe(e,t,n){if(Sf(e)&&!n){const i=ko(e.index,t);return new f0(i,i)}return 175&e.type?new f0(t[Sn],t):null}(Ht(),Q(),!(16&~e))}class TY{constructor(){}supports(t){return pC(t)}create(t){return new $Me(t)}}const LMe=(e,t)=>t;class $Me{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||LMe}forEachItem(t){let n;for(n=this._itHead;null!==n;n=n._next)t(n)}forEachOperation(t){let n=this._itHead,i=this._removalsHead,r=0,o=null;for(;n||i;){const s=!i||n&&n.currentIndex{s=this._trackByFn(r,a),null!==n&&Object.is(n.trackById,s)?(i&&(n=this._verifyReinsertion(n,a,s,r)),Object.is(n.item,a)||this._addIdentityChange(n,a)):(n=this._mismatch(n,a,s,r),i=!0),n=n._next,r++}),this.length=r;return this._truncate(n),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,n,i,r){let o;return null===t?o=this._itTail:(o=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(t.item,n)||this._addIdentityChange(t,n),this._reinsertAfter(t,o,r)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(t.item,n)||this._addIdentityChange(t,n),this._moveAfter(t,o,r)):t=this._addAfter(new BMe(n,i),o,r),t}_verifyReinsertion(t,n,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?t=this._reinsertAfter(o,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;null!==t;){const n=t._next;this._addToRemovals(this._unlink(t)),t=n}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,n,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const r=t._prevRemoved,o=t._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(t,n,i),this._addToMoves(t,i),t}_moveAfter(t,n,i){return this._unlink(t),this._insertAfter(t,n,i),this._addToMoves(t,i),t}_addAfter(t,n,i){return this._insertAfter(t,n,i),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,n,i){const r=null===n?this._itHead:n._next;return t._next=r,t._prev=n,null===r?this._itTail=t:r._prev=t,null===n?this._itHead=t:n._next=t,null===this._linkedRecords&&(this._linkedRecords=new xY),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const n=t._prev,i=t._next;return null===n?this._itHead=i:n._next=i,null===i?this._itTail=n:i._prev=n,t}_addToMoves(t,n){return t.previousIndex===n||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new xY),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,n){return t.item=n,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class BMe{constructor(t,n){this.item=t,this.trackById=n,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class jMe{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,n){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===n||n<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){const n=t._prevDup,i=t._nextDup;return null===n?this._head=i:n._nextDup=i,null===i?this._tail=n:i._prevDup=n,null===this._head}}class xY{constructor(){this.map=new Map}put(t){const n=t.trackById;let i=this.map.get(n);i||(i=new jMe,this.map.set(n,i)),i.add(t)}get(t,n){const r=this.map.get(t);return r?r.get(t,n):null}remove(t){const n=t.trackById;return this.map.get(n).remove(t)&&this.map.delete(n),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function AY(e,t,n){const i=e.previousIndex;if(null===i)return i;let r=0;return n&&i{if(n&&n.key===r)this._maybeAddToChanges(n,i),this._appendAfter=n,n=n._next;else{const o=this._getOrCreateRecordForKey(r,i);n=this._insertBeforeOrAppend(n,o)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(let i=n;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,n){if(t){const i=t._prev;return n._next=t,n._prev=i,t._prev=n,i&&(i._next=n),t===this._mapHead&&(this._mapHead=n),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=n,n._prev=this._appendAfter):this._mapHead=n,this._appendAfter=n,null}_getOrCreateRecordForKey(t,n){if(this._records.has(t)){const r=this._records.get(t);this._maybeAddToChanges(r,n);const o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}const i=new UMe(t);return this._records.set(t,i),i.currentValue=n,this._addToAdditions(i),i}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,n){Object.is(n,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=n,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,n){t instanceof Map?t.forEach(n):Object.keys(t).forEach(i=>n(t[i],i))}}class UMe{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function NY(){return new QO([new TY])}let QO=(()=>{class e{static{this.\u0275prov=pe({token:e,providedIn:"root",factory:NY})}constructor(n){this.factories=n}static create(n,i){if(null!=i){const r=i.factories.slice();n=n.concat(r)}return new e(n)}static extend(n){return{provide:e,useFactory:i=>e.create(n,i||NY()),deps:[[e,new rE,new iE]]}}find(n){const i=this.factories.find(r=>r.supports(n));if(null!=i)return i;throw new q(901,!1)}}return e})();function IY(){return new VC([new MY])}let VC=(()=>{class e{static{this.\u0275prov=pe({token:e,providedIn:"root",factory:IY})}constructor(n){this.factories=n}static create(n,i){if(i){const r=i.factories.slice();n=n.concat(r)}return new e(n)}static extend(n){return{provide:e,useFactory:i=>e.create(n,i||IY()),deps:[[e,new rE,new iE]]}}find(n){const i=this.factories.find(r=>r.supports(n));if(i)return i;throw new q(901,!1)}}return e})();const GMe=vY(null,"core",[]);let WMe=(()=>{class e{constructor(n){}static{this.\u0275fac=function(i){return new(i||e)(Ne(fa))}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})();function Gg(e){return"boolean"==typeof e?e:null!=e&&"false"!==e}function X0(e,t){Nr("NgSignals");const n=function Rve(e){const t=Object.create(Fve);t.computation=e;const n=()=>{if(NU(t),m2(t),t.value===Hw)throw t.error;return t.value};return n[ea]=t,n}(e);return t?.equal&&(n[ea].equal=t.equal),n}function vl(e){const t=st(null);try{return e()}finally{st(t)}}function eR(e,t){const n=ut(e),i=t.elementInjector||fE();return new C0(n).create(i,t.projectableNodes,t.hostElement,t.environmentInjector)}let eK=null;function Rc(){return eK}class INe{}const Ln=new _e("");let tR=(()=>{class e{historyGo(n){throw new Error("")}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:()=>L(ONe),providedIn:"platform"})}}return e})();const kNe=new _e("");let ONe=(()=>{class e extends tR{constructor(){super(),this._doc=L(Ln),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Rc().getBaseHref(this._doc)}onPopState(n){const i=Rc().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",n,!1),()=>i.removeEventListener("popstate",n)}onHashChange(n){const i=Rc().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",n,!1),()=>i.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,i,r){this._history.pushState(n,i,r)}replaceState(n,i,r){this._history.replaceState(n,i,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:()=>new e,providedIn:"platform"})}}return e})();function nR(e,t){if(0==e.length)return t;if(0==t.length)return e;let n=0;return e.endsWith("/")&&n++,t.startsWith("/")&&n++,2==n?e+t.substring(1):1==n?e+t:e+"/"+t}function tK(e){const t=e.match(/#|\?|$/),n=t&&t.index||e.length;return e.slice(0,n-("/"===e[n-1]?1:0))+e.slice(n)}function Fc(e){return e&&"?"!==e[0]?"?"+e:e}let Gu=(()=>{class e{historyGo(n){throw new Error("")}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:()=>L(iR),providedIn:"root"})}}return e})();const nK=new _e("");let iR=(()=>{class e extends Gu{constructor(n,i){super(),this._platformLocation=n,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??L(Ln).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return nR(this._baseHref,n)}path(n=!1){const i=this._platformLocation.pathname+Fc(this._platformLocation.search),r=this._platformLocation.hash;return r&&n?`${i}${r}`:i}pushState(n,i,r,o){const s=this.prepareExternalUrl(r+Fc(o));this._platformLocation.pushState(n,i,s)}replaceState(n,i,r,o){const s=this.prepareExternalUrl(r+Fc(o));this._platformLocation.replaceState(n,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static{this.\u0275fac=function(i){return new(i||e)(Ne(tR),Ne(nK,8))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),RNe=(()=>{class e extends Gu{constructor(n,i){super(),this._platformLocation=n,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}path(n=!1){const i=this._platformLocation.hash??"#";return i.length>0?i.substring(1):i}prepareExternalUrl(n){const i=nR(this._baseHref,n);return i.length>0?"#"+i:i}pushState(n,i,r,o){let s=this.prepareExternalUrl(r+Fc(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(n,i,s)}replaceState(n,i,r,o){let s=this.prepareExternalUrl(r+Fc(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(n,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static{this.\u0275fac=function(i){return new(i||e)(Ne(tR),Ne(nK,8))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})(),Q0=(()=>{class e{constructor(n){this._subject=new ze,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=n;const i=this._locationStrategy.getBaseHref();this._basePath=function LNe(e){if(new RegExp("^(https?:)?//").test(e)){const[,n]=e.split(/\/\/[^\/]+/);return n}return e}(tK(iK(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,i=""){return this.path()==this.normalize(n+Fc(i))}normalize(n){return e.stripTrailingSlash(function PNe(e,t){if(!e||!t.startsWith(e))return t;const n=t.substring(e.length);return""===n||["/",";","?","#"].includes(n[0])?n:t}(this._basePath,iK(n)))}prepareExternalUrl(n){return n&&"/"!==n[0]&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,i="",r=null){this._locationStrategy.pushState(r,"",n,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Fc(i)),r)}replaceState(n,i="",r=null){this._locationStrategy.replaceState(r,"",n,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Fc(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)}),()=>{const i=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",i){this._urlChangeListeners.forEach(r=>r(n,i))}subscribe(n,i,r){return this._subject.subscribe({next:n,error:i,complete:r})}static{this.normalizeQueryParams=Fc}static{this.joinWithSlash=nR}static{this.stripTrailingSlash=tK}static{this.\u0275fac=function(i){return new(i||e)(Ne(Gu))}}static{this.\u0275prov=pe({token:e,factory:()=>function FNe(){return new Q0(Ne(Gu))}(),providedIn:"root"})}}return e})();function iK(e){return e.replace(/\/index.html$/,"")}function hK(e,t){t=encodeURIComponent(t);for(const n of e.split(";")){const i=n.indexOf("="),[r,o]=-1==i?[n,""]:[n.slice(0,i),n.slice(i+1)];if(r.trim()===t)return decodeURIComponent(o)}return null}class E2e{constructor(t,n,i,r){this.$implicit=t,this.ngForOf=n,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let oD=(()=>{class e{set ngForOf(n){this._ngForOf=n,this._ngForOfDirty=!0}set ngForTrackBy(n){this._trackByFn=n}get ngForTrackBy(){return this._trackByFn}constructor(n,i,r){this._viewContainer=n,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(n){n&&(this._template=n)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const n=this._ngForOf;!this._differ&&n&&(this._differ=this._differs.find(n).create(this.ngForTrackBy))}if(this._differ){const n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}_applyChanges(n){const i=this._viewContainer;n.forEachOperation((r,o,s)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new E2e(r.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)i.remove(null===o?void 0:o);else if(null!==o){const a=i.get(o);i.move(a,s),mK(a,r)}});for(let r=0,o=i.length;r{mK(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(n,i){return!0}static{this.\u0275fac=function(i){return new(i||e)(ee(Po),ee(ii),ee(QO))}}static{this.\u0275dir=be({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0})}}return e})();function mK(e,t){e.context.$implicit=t.item}let J0=(()=>{class e{constructor(n,i){this._viewContainer=n,this._context=new C2e,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(n){this._context.$implicit=this._context.ngIf=n,this._updateView()}set ngIfThen(n){_K("ngIfThen",n),this._thenTemplateRef=n,this._thenViewRef=null,this._updateView()}set ngIfElse(n){_K("ngIfElse",n),this._elseTemplateRef=n,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(n,i){return!0}static{this.\u0275fac=function(i){return new(i||e)(ee(Po),ee(ii))}}static{this.\u0275dir=be({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}}return e})();class C2e{constructor(){this.$implicit=null,this.ngIf=null}}function _K(e,t){if(t&&!t.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${di(t)}'.`)}let vK=(()=>{class e{constructor(n,i,r){this._ngEl=n,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(n){this._ngStyle=n,!this._differ&&n&&(this._differ=this._differs.find(n).create())}ngDoCheck(){if(this._differ){const n=this._differ.diff(this._ngStyle);n&&this._applyChanges(n)}}_setStyle(n,i){const[r,o]=n.split("."),s=-1===r.indexOf("-")?void 0:Fu.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_applyChanges(n){n.forEachRemovedItem(i=>this._setStyle(i.key,null)),n.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),n.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}static{this.\u0275fac=function(i){return new(i||e)(ee(Gt),ee(VC),ee(aa))}}static{this.\u0275dir=be({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0})}}return e})(),K2e=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})();const wK="browser";function EK(e){return"server"===e}let tv=(()=>{class e{static{this.\u0275prov=pe({token:e,providedIn:"root",factory:()=>function Q2e(e){return e===wK}(L(Tc))?new Z2e(L(Ln),window):new eIe})}}return e})();class Z2e{constructor(t,n){this.document=t,this.window=n,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(t){this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){const n=function J2e(e,t){const n=e.getElementById(t)||e.getElementsByName(t)[0];if(n)return n;if("function"==typeof e.createTreeWalker&&e.body&&"function"==typeof e.body.attachShadow){const i=e.createTreeWalker(e.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const o=r.shadowRoot;if(o){const s=o.getElementById(t)||o.querySelector(`[name="${t}"]`);if(s)return s}r=i.nextNode()}}return null}(this.document,t);n&&(this.scrollToElement(n),n.focus())}setHistoryScrollRestoration(t){this.window.history.scrollRestoration=t}scrollToElement(t){const n=t.getBoundingClientRect(),i=n.left+this.window.pageXOffset,r=n.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}}class eIe{setOffset(t){}getScrollPosition(){return[0,0]}scrollToPosition(t){}scrollToAnchor(t){}setHistoryScrollRestoration(t){}}class CK{}class AIe extends INe{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class wR extends AIe{static makeCurrent(){!function NNe(e){eK??=e}(new wR)}onAndCancel(t,n,i){return t.addEventListener(n,i),()=>{t.removeEventListener(n,i)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.remove()}createElement(t,n){return(n=n||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return"window"===n?window:"document"===n?t:"body"===n?t.body:null}getBaseHref(t){const n=function MIe(){return rv=rv||document.querySelector("base"),rv?rv.getAttribute("href"):null}();return null==n?null:function NIe(e){return new URL(e,document.baseURI).pathname}(n)}resetBaseElement(){rv=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return hK(document.cookie,t)}}let rv=null,kIe=(()=>{class e{build(){return new XMLHttpRequest}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();const ER=new _e("");let RK=(()=>{class e{constructor(n,i){this._zone=i,this._eventNameToPlugin=new Map,n.forEach(r=>{r.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,i,r){return this._findPluginFor(i).addEventListener(n,i,r)}getZone(){return this._zone}_findPluginFor(n){let i=this._eventNameToPlugin.get(n);if(i)return i;if(i=this._plugins.find(o=>o.supports(n)),!i)throw new q(5101,!1);return this._eventNameToPlugin.set(n,i),i}static{this.\u0275fac=function(i){return new(i||e)(Ne(ER),Ne(ct))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();class FK{constructor(t){this._doc=t}}const CR="ng-app-id";let PK=(()=>{class e{constructor(n,i,r,o={}){this.doc=n,this.appId=i,this.nonce=r,this.platformId=o,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=EK(o),this.resetHostNodes()}addStyles(n){for(const i of n)1===this.changeUsageCount(i,1)&&this.onStyleAdded(i)}removeStyles(n){for(const i of n)this.changeUsageCount(i,-1)<=0&&this.onStyleRemoved(i)}ngOnDestroy(){const n=this.styleNodesInDOM;n&&(n.forEach(i=>i.remove()),n.clear());for(const i of this.getAllStyles())this.onStyleRemoved(i);this.resetHostNodes()}addHost(n){this.hostNodes.add(n);for(const i of this.getAllStyles())this.addStyleToHost(n,i)}removeHost(n){this.hostNodes.delete(n)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(n){for(const i of this.hostNodes)this.addStyleToHost(i,n)}onStyleRemoved(n){const i=this.styleRef;i.get(n)?.elements?.forEach(r=>r.remove()),i.delete(n)}collectServerRenderedStyles(){const n=this.doc.head?.querySelectorAll(`style[${CR}="${this.appId}"]`);if(n?.length){const i=new Map;return n.forEach(r=>{null!=r.textContent&&i.set(r.textContent,r)}),i}return null}changeUsageCount(n,i){const r=this.styleRef;if(r.has(n)){const o=r.get(n);return o.usage+=i,o.usage}return r.set(n,{usage:i,elements:[]}),i}getStyleElement(n,i){const r=this.styleNodesInDOM,o=r?.get(i);if(o?.parentNode===n)return r.delete(i),o.removeAttribute(CR),o;{const s=this.doc.createElement("style");return this.nonce&&s.setAttribute("nonce",this.nonce),s.textContent=i,this.platformIsServer&&s.setAttribute(CR,this.appId),n.appendChild(s),s}}addStyleToHost(n,i){const r=this.getStyleElement(n,i),o=this.styleRef,s=o.get(i)?.elements;s?s.push(r):o.set(i,{elements:[r],usage:1})}resetHostNodes(){const n=this.hostNodes;n.clear(),n.add(this.doc.head)}static{this.\u0275fac=function(i){return new(i||e)(Ne(Ln),Ne(ug),Ne(J7,8),Ne(Tc))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();const DR={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},SR=/%COMP%/g,PIe=new _e("",{providedIn:"root",factory:()=>!0});function $K(e,t){return t.map(n=>n.replace(SR,e))}let TR=(()=>{class e{constructor(n,i,r,o,s,a,l,c=null){this.eventManager=n,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=s,this.platformId=a,this.ngZone=l,this.nonce=c,this.rendererByCompId=new Map,this.platformIsServer=EK(a),this.defaultRenderer=new xR(n,s,l,this.platformIsServer)}createRenderer(n,i){if(!n||!i)return this.defaultRenderer;this.platformIsServer&&i.encapsulation===ta.ShadowDom&&(i={...i,encapsulation:ta.Emulated});const r=this.getOrCreateRenderer(n,i);return r instanceof jK?r.applyToHost(n):r instanceof AR&&r.applyStyles(),r}getOrCreateRenderer(n,i){const r=this.rendererByCompId;let o=r.get(i.id);if(!o){const s=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,u=this.removeStylesOnCompDestroy,d=this.platformIsServer;switch(i.encapsulation){case ta.Emulated:o=new jK(l,c,i,this.appId,u,s,a,d);break;case ta.ShadowDom:return new jIe(l,c,n,i,s,a,this.nonce,d);default:o=new AR(l,c,i,u,s,a,d)}r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}static{this.\u0275fac=function(i){return new(i||e)(Ne(RK),Ne(PK),Ne(ug),Ne(PIe),Ne(Ln),Ne(Tc),Ne(ct),Ne(J7))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();class xR{constructor(t,n,i,r){this.eventManager=t,this.doc=n,this.ngZone=i,this.platformIsServer=r,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(t,n){return n?this.doc.createElementNS(DR[n]||n,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,n){(BK(t)?t.content:t).appendChild(n)}insertBefore(t,n,i){t&&(BK(t)?t.content:t).insertBefore(n,i)}removeChild(t,n){n.remove()}selectRootElement(t,n){let i="string"==typeof t?this.doc.querySelector(t):t;if(!i)throw new q(-5104,!1);return n||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,n,i,r){if(r){n=r+":"+n;const o=DR[r];o?t.setAttributeNS(o,n,i):t.setAttribute(n,i)}else t.setAttribute(n,i)}removeAttribute(t,n,i){if(i){const r=DR[i];r?t.removeAttributeNS(r,n):t.removeAttribute(`${i}:${n}`)}else t.removeAttribute(n)}addClass(t,n){t.classList.add(n)}removeClass(t,n){t.classList.remove(n)}setStyle(t,n,i,r){r&(Fu.DashCase|Fu.Important)?t.style.setProperty(n,i,r&Fu.Important?"important":""):t.style[n]=i}removeStyle(t,n,i){i&Fu.DashCase?t.style.removeProperty(n):t.style[n]=""}setProperty(t,n,i){null!=t&&(t[n]=i)}setValue(t,n){t.nodeValue=n}listen(t,n,i){if("string"==typeof t&&!(t=Rc().getGlobalEventTarget(this.doc,t)))throw new Error(`Unsupported event target ${t} for event ${n}`);return this.eventManager.addEventListener(t,n,this.decoratePreventDefault(i))}decoratePreventDefault(t){return n=>{if("__ngUnwrap__"===n)return t;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>t(n)):t(n))&&n.preventDefault()}}}function BK(e){return"TEMPLATE"===e.tagName&&void 0!==e.content}class jIe extends xR{constructor(t,n,i,r,o,s,a,l){super(t,o,s,l),this.sharedStylesHost=n,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const c=$K(r.id,r.styles);for(const u of c){const d=document.createElement("style");a&&d.setAttribute("nonce",a),d.textContent=u,this.shadowRoot.appendChild(d)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,n){return super.appendChild(this.nodeOrShadowRoot(t),n)}insertBefore(t,n,i){return super.insertBefore(this.nodeOrShadowRoot(t),n,i)}removeChild(t,n){return super.removeChild(null,n)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class AR extends xR{constructor(t,n,i,r,o,s,a,l){super(t,o,s,a),this.sharedStylesHost=n,this.removeStylesOnCompDestroy=r,this.styles=l?$K(l,i.styles):i.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class jK extends AR{constructor(t,n,i,r,o,s,a,l){const c=r+"-"+i.id;super(t,n,i,o,s,a,l,c),this.contentAttr=function LIe(e){return"_ngcontent-%COMP%".replace(SR,e)}(c),this.hostAttr=function $Ie(e){return"_nghost-%COMP%".replace(SR,e)}(c)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,n){const i=super.createElement(t,n);return super.setAttribute(i,this.contentAttr,""),i}}let VIe=(()=>{class e extends FK{constructor(n){super(n)}supports(n){return!0}addEventListener(n,i,r){return n.addEventListener(i,r,!1),()=>this.removeEventListener(n,i,r)}removeEventListener(n,i,r){return n.removeEventListener(i,r)}static{this.\u0275fac=function(i){return new(i||e)(Ne(Ln))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();const VK=["alt","control","meta","shift"],UIe={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},zIe={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};let HIe=(()=>{class e extends FK{constructor(n){super(n)}supports(n){return null!=e.parseEventName(n)}addEventListener(n,i,r){const o=e.parseEventName(i),s=e.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Rc().onAndCancel(n,o.domEventName,s))}static parseEventName(n){const i=n.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const o=e._normalizeKey(i.pop());let s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),VK.forEach(c=>{const u=i.indexOf(c);u>-1&&(i.splice(u,1),s+=c+".")}),s+=o,0!=i.length||0===o.length)return null;const l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(n,i){let r=UIe[n.key]||n.key,o="";return i.indexOf("code.")>-1&&(r=n.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),VK.forEach(s=>{s!==r&&(0,zIe[s])(n)&&(o+=s+".")}),o+=r,o===i)}static eventCallback(n,i,r){return o=>{e.matchEventFullKeyCode(o,n)&&r.runGuarded(()=>i(o))}}static _normalizeKey(n){return"esc"===n?"escape":n}static{this.\u0275fac=function(i){return new(i||e)(Ne(Ln))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();const YIe=vY(GMe,"browser",[{provide:Tc,useValue:wK},{provide:Q7,useValue:function GIe(){wR.makeCurrent()},multi:!0},{provide:Ln,useFactory:function qIe(){return function Rwe(e){BI=e}(document),document},deps:[]}]),KIe=new _e(""),HK=[{provide:OC,useClass:class IIe{addToWindow(t){vn.getAngularTestability=(i,r=!0)=>{const o=t.findTestabilityInTree(i,r);if(null==o)throw new q(5103,!1);return o},vn.getAllAngularTestabilities=()=>t.getAllTestabilities(),vn.getAllAngularRootElements=()=>t.getAllRootElements(),vn.frameworkStabilizers||(vn.frameworkStabilizers=[]),vn.frameworkStabilizers.push(i=>{const r=vn.getAllAngularTestabilities();let o=r.length;const s=function(){o--,0==o&&i()};r.forEach(a=>{a.whenStable(s)})})}findTestabilityInTree(t,n,i){return null==n?null:t.getTestability(n)??(i?Rc().isShadowRoot(n)?this.findTestabilityInTree(t,n.host,!0):this.findTestabilityInTree(t,n.parentElement,!0):null)}},deps:[]},{provide:oY,useClass:BO,deps:[ct,jO,OC]},{provide:BO,useClass:BO,deps:[ct,jO,OC]}],GK=[{provide:Z2,useValue:"root"},{provide:dl,useFactory:function WIe(){return new dl},deps:[]},{provide:ER,useClass:VIe,multi:!0,deps:[Ln,ct,Tc]},{provide:ER,useClass:HIe,multi:!0,deps:[Ln]},TR,PK,RK,{provide:lC,useExisting:TR},{provide:CK,useClass:kIe,deps:[]},[]];let WK=(()=>{class e{constructor(n){}static withServerTransition(n){return{ngModule:e,providers:[{provide:ug,useValue:n.appId}]}}static{this.\u0275fac=function(i){return new(i||e)(Ne(KIe,12))}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({providers:[...GK,...HK],imports:[K2e,WMe]})}}return e})(),qK=(()=>{class e{constructor(n){this._doc=n,this._dom=Rc()}addTag(n,i=!1){return n?this._getOrCreateElement(n,i):null}addTags(n,i=!1){return n?n.reduce((r,o)=>(o&&r.push(this._getOrCreateElement(o,i)),r),[]):[]}getTag(n){return n&&this._doc.querySelector(`meta[${n}]`)||null}getTags(n){if(!n)return[];const i=this._doc.querySelectorAll(`meta[${n}]`);return i?[].slice.call(i):[]}updateTag(n,i){if(!n)return null;i=i||this._parseSelector(n);const r=this.getTag(i);return r?this._setMetaElementAttributes(n,r):this._getOrCreateElement(n,!0)}removeTag(n){this.removeTagElement(this.getTag(n))}removeTagElement(n){n&&this._dom.remove(n)}_getOrCreateElement(n,i=!1){if(!i){const s=this._parseSelector(n),a=this.getTags(s).filter(l=>this._containsAttributes(n,l))[0];if(void 0!==a)return a}const r=this._dom.createElement("meta");return this._setMetaElementAttributes(n,r),this._doc.getElementsByTagName("head")[0].appendChild(r),r}_setMetaElementAttributes(n,i){return Object.keys(n).forEach(r=>i.setAttribute(this._getMetaKeyMap(r),n[r])),i}_parseSelector(n){const i=n.name?"name":"property";return`${i}="${n[i]}"`}_containsAttributes(n,i){return Object.keys(n).every(r=>i.getAttribute(this._getMetaKeyMap(r))===n[r])}_getMetaKeyMap(n){return XIe[n]||n}static{this.\u0275fac=function(i){return new(i||e)(Ne(Ln))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const XIe={httpEquiv:"http-equiv"};let MR=(()=>{class e{constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}static{this.\u0275fac=function(i){return new(i||e)(Ne(Ln))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Wu(e){return this instanceof Wu?(this.v=e,this):new Wu(e)}function JK(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,t=e[Symbol.asyncIterator];return t?t.call(e):(e=function OR(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n);function i(o){n[o]=e[o]&&function(s){return new Promise(function(a,l){!function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}(a,l,(s=e[o](s)).done,s.value)})}}}"function"==typeof SuppressedError&&SuppressedError;const FR=e=>e&&"number"==typeof e.length&&"function"!=typeof e;function eX(e){return Tt(e?.then)}function tX(e){return Tt(e[M2])}function nX(e){return Symbol.asyncIterator&&Tt(e?.[Symbol.asyncIterator])}function iX(e){return new TypeError(`You provided ${null!==e&&"object"==typeof e?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const rX=function xke(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function oX(e){return Tt(e?.[rX])}function sX(e){return function ZK(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function s(h){return function(p){return Promise.resolve(p).then(h,d)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(h,p){i[h]&&(r[h]=function(g){return new Promise(function(m,_){o.push([h,g,m,_])>1||l(h,g)})},p&&(r[h]=p(r[h])))}function l(h,p){try{!function c(h){h.value instanceof Wu?Promise.resolve(h.value.v).then(u,d):f(o[0][2],h)}(i[h](p))}catch(g){f(o[0][3],g)}}function u(h){l("next",h)}function d(h){l("throw",h)}function f(h,p){h(p),o.shift(),o.length&&l(o[0][0],o[0][1])}}(this,arguments,function*(){const n=e.getReader();try{for(;;){const{value:i,done:r}=yield Wu(n.read());if(r)return yield Wu(void 0);yield yield Wu(i)}}finally{n.releaseLock()}})}function aX(e){return Tt(e?.getReader)}function Hi(e){if(e instanceof cn)return e;if(null!=e){if(tX(e))return function Ake(e){return new cn(t=>{const n=e[M2]();if(Tt(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(e);if(FR(e))return function Mke(e){return new cn(t=>{for(let n=0;n{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,HU)})}(e);if(nX(e))return lX(e);if(oX(e))return function Ike(e){return new cn(t=>{for(const n of e)if(t.next(n),t.closed)return;t.complete()})}(e);if(aX(e))return function kke(e){return lX(sX(e))}(e)}throw iX(e)}function lX(e){return new cn(t=>{(function Oke(e,t){var n,i,r,o;return function XK(e,t,n,i){return new(n||(n=Promise))(function(o,s){function a(u){try{c(i.next(u))}catch(d){s(d)}}function l(u){try{c(i.throw(u))}catch(d){s(d)}}function c(u){u.done?o(u.value):function r(o){return o instanceof n?o:new n(function(s){s(o)})}(u.value).then(a,l)}c((i=i.apply(e,t||[])).next())})}(this,void 0,void 0,function*(){try{for(n=JK(e);!(i=yield n.next()).done;)if(t.next(i.value),t.closed)return}catch(s){r={error:s}}finally{try{i&&!i.done&&(o=n.return)&&(yield o.call(n))}finally{if(r)throw r.error}}t.complete()})})(e,t).catch(n=>t.error(n))})}function $c(e,t,n,i=0,r=!1){const o=t.schedule(function(){n(),r?e.add(this.schedule(null,i)):this.unsubscribe()},i);if(e.add(o),!r)return o}function cX(e,t=0){return ei((n,i)=>{n.subscribe(yn(i,r=>$c(i,e,()=>i.next(r),t),()=>$c(i,e,()=>i.complete(),t),r=>$c(i,e,()=>i.error(r),t)))})}function uX(e,t=0){return ei((n,i)=>{i.add(e.schedule(()=>n.subscribe(i),t))})}function dX(e,t){if(!e)throw new Error("Iterable cannot be null");return new cn(n=>{$c(n,t,()=>{const i=e[Symbol.asyncIterator]();$c(n,t,()=>{i.next().then(r=>{r.done?n.complete():n.next(r.value)})},0,!0)})})}function si(e,t){return t?function Bke(e,t){if(null!=e){if(tX(e))return function Rke(e,t){return Hi(e).pipe(uX(t),cX(t))}(e,t);if(FR(e))return function Pke(e,t){return new cn(n=>{let i=0;return t.schedule(function(){i===e.length?n.complete():(n.next(e[i++]),n.closed||this.schedule())})})}(e,t);if(eX(e))return function Fke(e,t){return Hi(e).pipe(uX(t),cX(t))}(e,t);if(nX(e))return dX(e,t);if(oX(e))return function Lke(e,t){return new cn(n=>{let i;return $c(n,t,()=>{i=e[rX](),$c(n,t,()=>{let r,o;try{({value:r,done:o}=i.next())}catch(s){return void n.error(s)}o?n.complete():n.next(r)},0,!0)}),()=>Tt(i?.return)&&i.return()})}(e,t);if(aX(e))return function $ke(e,t){return dX(sX(e),t)}(e,t)}throw iX(e)}(e,t):Hi(e)}function fX(e){return e&&Tt(e.schedule)}function PR(e){return e[e.length-1]}function uD(e){return Tt(PR(e))?e.pop():void 0}function ov(e){return fX(PR(e))?e.pop():void 0}function Ge(...e){return si(e,ov(e))}const{isArray:Vke}=Array,{getPrototypeOf:Uke,prototype:zke,keys:Hke}=Object;function hX(e){if(1===e.length){const t=e[0];if(Vke(t))return{args:t,keys:null};if(function Gke(e){return e&&"object"==typeof e&&Uke(e)===zke}(t)){const n=Hke(t);return{args:n.map(i=>t[i]),keys:n}}}return{args:e,keys:null}}const{isArray:Wke}=Array;function LR(e){return at(t=>function qke(e,t){return Wke(t)?e(...t):e(t)}(e,t))}function pX(e,t){return e.reduce((n,i,r)=>(n[i]=t[r],n),{})}function $R(...e){const t=ov(e),n=uD(e),{args:i,keys:r}=hX(e);if(0===i.length)return si([],t);const o=new cn(function Yke(e,t,n=_c){return i=>{gX(t,()=>{const{length:r}=e,o=new Array(r);let s=r,a=r;for(let l=0;l{const c=si(e[l],t);let u=!1;c.subscribe(yn(i,d=>{o[l]=d,u||(u=!0,a--),a||i.next(n(o.slice()))},()=>{--s||i.complete()}))},i)},i)}}(i,t,r?s=>pX(r,s):_c));return n?o.pipe(LR(n)):o}function gX(e,t,n){e?$c(n,e,t):t()}const dD=E2(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function Ai(e,t,n=1/0){return Tt(t)?Ai((i,r)=>at((o,s)=>t(i,o,r,s))(Hi(e(i,r))),n):("number"==typeof t&&(n=t),ei((i,r)=>function Kke(e,t,n,i,r,o,s,a){const l=[];let c=0,u=0,d=!1;const f=()=>{d&&!l.length&&!c&&t.complete()},h=g=>c{o&&t.next(g),c++;let m=!1;Hi(n(g,u++)).subscribe(yn(t,_=>{r?.(_),o?h(_):t.next(_)},()=>{m=!0},void 0,()=>{if(m)try{for(c--;l.length&&cp(_)):p(_)}f()}catch(_){t.error(_)}}))};return e.subscribe(yn(t,h,()=>{d=!0,f()})),()=>{a?.()}}(i,r,e,n)))}function Yg(e=1/0){return Ai(_c,e)}function sv(...e){return function Xke(){return Yg(1)}()(si(e,ov(e)))}function mX(e){return new cn(t=>{Hi(e()).subscribe(t)})}function fD(e,t){const n=Tt(e)?e:()=>e,i=r=>r.error(n());return new cn(t?r=>t.schedule(i,0,r):i)}const jo=new cn(e=>e.complete());function BR(){return ei((e,t)=>{let n=null;e._refCount++;const i=yn(t,void 0,void 0,void 0,()=>{if(!e||e._refCount<=0||0<--e._refCount)return void(n=null);const r=e._connection,o=n;n=null,r&&(!o||r===o)&&r.unsubscribe(),t.unsubscribe()});e.subscribe(i),i.closed||(n=e.connect())})}class _X extends cn{constructor(t,n){super(),this.source=t,this.subjectFactory=n,this._subject=null,this._refCount=0,this._connection=null,YU(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:t}=this;this._subject=this._connection=null,t?.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new ar;const n=this.getSubject();t.add(this.source.subscribe(yn(n,void 0,()=>{this._teardown(),n.complete()},i=>{this._teardown(),n.error(i)},()=>this._teardown()))),t.closed&&(this._connection=null,t=ar.EMPTY)}return t}refCount(){return BR()(this)}}function Es(e,t){return ei((n,i)=>{let r=null,o=0,s=!1;const a=()=>s&&!r&&i.complete();n.subscribe(yn(i,l=>{r?.unsubscribe();let c=0;const u=o++;Hi(e(l,u)).subscribe(r=yn(i,d=>i.next(t?t(l,d,u,c++):d),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function Cs(e){return e<=0?()=>jo:ei((t,n)=>{let i=0;t.subscribe(yn(n,r=>{++i<=e&&(n.next(r),e<=i&&n.complete())}))})}function Wn(e,t){return ei((n,i)=>{let r=0;n.subscribe(yn(i,o=>e.call(t,o,r++)&&i.next(o)))})}function hD(e){return ei((t,n)=>{let i=!1;t.subscribe(yn(n,r=>{i=!0,n.next(r)},()=>{i||n.next(e),n.complete()}))})}function vX(e=Zke){return ei((t,n)=>{let i=!1;t.subscribe(yn(n,r=>{i=!0,n.next(r)},()=>i?n.complete():n.error(e())))})}function Zke(){return new dD}function Gf(e,t){const n=arguments.length>=2;return i=>i.pipe(e?Wn((r,o)=>e(r,o,i)):_c,Cs(1),n?hD(t):vX(()=>new dD))}function Kg(e,t){return Tt(t)?Ai(e,t,1):Ai(e,1)}function Gi(e,t,n){const i=Tt(e)||t||n?{next:e,error:t,complete:n}:e;return i?ei((r,o)=>{var s;null===(s=i.subscribe)||void 0===s||s.call(i);let a=!0;r.subscribe(yn(o,l=>{var c;null===(c=i.next)||void 0===c||c.call(i,l),o.next(l)},()=>{var l;a=!1,null===(l=i.complete)||void 0===l||l.call(i),o.complete()},l=>{var c;a=!1,null===(c=i.error)||void 0===c||c.call(i,l),o.error(l)},()=>{var l,c;a&&(null===(l=i.unsubscribe)||void 0===l||l.call(i)),null===(c=i.finalize)||void 0===c||c.call(i)}))}):_c}function Xg(e){return ei((t,n)=>{let o,i=null,r=!1;i=t.subscribe(yn(n,void 0,void 0,s=>{o=Hi(e(s,Xg(e)(t))),i?(i.unsubscribe(),i=null,o.subscribe(n)):r=!0})),r&&(i.unsubscribe(),i=null,o.subscribe(n))})}function jR(e){return e<=0?()=>jo:ei((t,n)=>{let i=[];t.subscribe(yn(n,r=>{i.push(r),e{for(const r of i)n.next(r);n.complete()},void 0,()=>{i=null}))})}function av(e){return ei((t,n)=>{try{t.subscribe(n)}finally{n.add(e)}})}function Wi(e){return ei((t,n)=>{Hi(e).subscribe(yn(n,()=>n.complete(),Iy)),!n.closed&&t.subscribe(n)})}const ot="primary",lv=Symbol("RouteTitle");class nOe{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const n=this.params[t];return Array.isArray(n)?n[0]:n}return null}getAll(t){if(this.has(t)){const n=this.params[t];return Array.isArray(n)?n:[n]}return[]}get keys(){return Object.keys(this.params)}}function Qg(e){return new nOe(e)}function iOe(e,t,n){const i=n.path.split("/");if(i.length>e.length||"full"===n.pathMatch&&(t.hasChildren()||i.lengthi[o]===r)}return e===t}function EX(e){return e.length>0?e[e.length-1]:null}function qu(e){return function eke(e){return!!e&&(e instanceof cn||Tt(e.lift)&&Tt(e.subscribe))}(e)?e:G0(e)?si(Promise.resolve(e)):Ge(e)}const oOe={exact:function SX(e,t,n){if(!qf(e.segments,t.segments)||!pD(e.segments,t.segments,n)||e.numberOfChildren!==t.numberOfChildren)return!1;for(const i in t.children)if(!e.children[i]||!SX(e.children[i],t.children[i],n))return!1;return!0},subset:TX},CX={exact:function sOe(e,t){return bl(e,t)},subset:function aOe(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(n=>wX(e[n],t[n]))},ignored:()=>!0};function DX(e,t,n){return oOe[n.paths](e.root,t.root,n.matrixParams)&&CX[n.queryParams](e.queryParams,t.queryParams)&&!("exact"===n.fragment&&e.fragment!==t.fragment)}function TX(e,t,n){return xX(e,t,t.segments,n)}function xX(e,t,n,i){if(e.segments.length>n.length){const r=e.segments.slice(0,n.length);return!(!qf(r,n)||t.hasChildren()||!pD(r,n,i))}if(e.segments.length===n.length){if(!qf(e.segments,n)||!pD(e.segments,n,i))return!1;for(const r in t.children)if(!e.children[r]||!TX(e.children[r],t.children[r],i))return!1;return!0}{const r=n.slice(0,e.segments.length),o=n.slice(e.segments.length);return!!(qf(e.segments,r)&&pD(e.segments,r,i)&&e.children[ot])&&xX(e.children[ot],t,o,i)}}function pD(e,t,n){return t.every((i,r)=>CX[n](e[r].parameters,i.parameters))}class Wf{constructor(t=new Xt([],{}),n={},i=null){this.root=t,this.queryParams=n,this.fragment=i}get queryParamMap(){return this._queryParamMap??=Qg(this.queryParams),this._queryParamMap}toString(){return uOe.serialize(this)}}class Xt{constructor(t,n){this.segments=t,this.children=n,this.parent=null,Object.values(n).forEach(i=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return mD(this)}}class cv{constructor(t,n){this.path=t,this.parameters=n}get parameterMap(){return this._parameterMap??=Qg(this.parameters),this._parameterMap}toString(){return NX(this)}}function qf(e,t){return e.length===t.length&&e.every((n,i)=>n.path===t[i].path)}let Zg=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:()=>new gD,providedIn:"root"})}}return e})();class gD{parse(t){const n=new wOe(t);return new Wf(n.parseRootSegment(),n.parseQueryParams(),n.parseFragment())}serialize(t){const n=`/${uv(t.root,!0)}`,i=function hOe(e){const t=Object.entries(e).map(([n,i])=>Array.isArray(i)?i.map(r=>`${_D(n)}=${_D(r)}`).join("&"):`${_D(n)}=${_D(i)}`).filter(n=>n);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${n}${i}${"string"==typeof t.fragment?`#${function dOe(e){return encodeURI(e)}(t.fragment)}`:""}`}}const uOe=new gD;function mD(e){return e.segments.map(t=>NX(t)).join("/")}function uv(e,t){if(!e.hasChildren())return mD(e);if(t){const n=e.children[ot]?uv(e.children[ot],!1):"",i=[];return Object.entries(e.children).forEach(([r,o])=>{r!==ot&&i.push(`${r}:${uv(o,!1)}`)}),i.length>0?`${n}(${i.join("//")})`:n}{const n=function cOe(e,t){let n=[];return Object.entries(e.children).forEach(([i,r])=>{i===ot&&(n=n.concat(t(r,i)))}),Object.entries(e.children).forEach(([i,r])=>{i!==ot&&(n=n.concat(t(r,i)))}),n}(e,(i,r)=>r===ot?[uv(e.children[ot],!1)]:[`${r}:${uv(i,!1)}`]);return 1===Object.keys(e.children).length&&null!=e.children[ot]?`${mD(e)}/${n[0]}`:`${mD(e)}/(${n.join("//")})`}}function AX(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function _D(e){return AX(e).replace(/%3B/gi,";")}function UR(e){return AX(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function yD(e){return decodeURIComponent(e)}function MX(e){return yD(e.replace(/\+/g,"%20"))}function NX(e){return`${UR(e.path)}${function fOe(e){return Object.entries(e).map(([t,n])=>`;${UR(t)}=${UR(n)}`).join("")}(e.parameters)}`}const pOe=/^[^\/()?;#]+/;function zR(e){const t=e.match(pOe);return t?t[0]:""}const gOe=/^[^\/()?;=#]+/,_Oe=/^[^=?&#]+/,vOe=/^[^&#]+/;class wOe{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Xt([],{}):new Xt([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let n={};this.peekStartsWith("/(")&&(this.capture("/"),n=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(t.length>0||Object.keys(n).length>0)&&(i[ot]=new Xt(t,n)),i}parseSegment(){const t=zR(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new q(4009,!1);return this.capture(t),new cv(yD(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const n=function mOe(e){const t=e.match(gOe);return t?t[0]:""}(this.remaining);if(!n)return;this.capture(n);let i="";if(this.consumeOptional("=")){const r=zR(this.remaining);r&&(i=r,this.capture(i))}t[yD(n)]=yD(i)}parseQueryParam(t){const n=function yOe(e){const t=e.match(_Oe);return t?t[0]:""}(this.remaining);if(!n)return;this.capture(n);let i="";if(this.consumeOptional("=")){const s=function bOe(e){const t=e.match(vOe);return t?t[0]:""}(this.remaining);s&&(i=s,this.capture(i))}const r=MX(n),o=MX(i);if(t.hasOwnProperty(r)){let s=t[r];Array.isArray(s)||(s=[s],t[r]=s),s.push(o)}else t[r]=o}parseParens(t){const n={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=zR(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new q(4010,!1);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):t&&(o=ot);const s=this.parseChildren();n[o]=1===Object.keys(s).length?s[ot]:new Xt([],s),this.consumeOptional("//")}return n}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new q(4011,!1)}}function IX(e){return e.segments.length>0?new Xt([],{[ot]:e}):e}function kX(e){const t={};for(const[i,r]of Object.entries(e.children)){const o=kX(r);if(i===ot&&0===o.segments.length&&o.hasChildren())for(const[s,a]of Object.entries(o.children))t[s]=a;else(o.segments.length>0||o.hasChildren())&&(t[i]=o)}return function EOe(e){if(1===e.numberOfChildren&&e.children[ot]){const t=e.children[ot];return new Xt(e.segments.concat(t.segments),t.children)}return e}(new Xt(e.segments,t))}function Yf(e){return e instanceof Wf}function OX(e){let t;const r=IX(function n(o){const s={};for(const l of o.children){const c=n(l);s[l.outlet]=c}const a=new Xt(o.url,s);return o===e&&(t=a),a}(e.root));return t??r}function RX(e,t,n,i){let r=e;for(;r.parent;)r=r.parent;if(0===t.length)return HR(r,r,r,n,i);const o=function DOe(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new PX(!0,0,e);let t=0,n=!1;const i=e.reduce((r,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Object.entries(o.outlets).forEach(([l,c])=>{a[l]="string"==typeof c?c.split("/"):c}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return"string"!=typeof o?[...r,o]:0===s?(o.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?n=!0:".."===a?t++:""!=a&&r.push(a))}),r):[...r,o]},[]);return new PX(n,t,i)}(t);if(o.toRoot())return HR(r,r,new Xt([],{}),n,i);const s=function SOe(e,t,n){if(e.isAbsolute)return new bD(t,!0,0);if(!n)return new bD(t,!1,NaN);if(null===n.parent)return new bD(n,!0,0);const i=vD(e.commands[0])?0:1;return function TOe(e,t,n){let i=e,r=t,o=n;for(;o>r;){if(o-=r,i=i.parent,!i)throw new q(4005,!1);r=i.segments.length}return new bD(i,!1,r-o)}(n,n.segments.length-1+i,e.numberOfDoubleDots)}(o,r,e),a=s.processChildren?fv(s.segmentGroup,s.index,o.commands):LX(s.segmentGroup,s.index,o.commands);return HR(r,s.segmentGroup,a,n,i)}function vD(e){return"object"==typeof e&&null!=e&&!e.outlets&&!e.segmentPath}function dv(e){return"object"==typeof e&&null!=e&&e.outlets}function HR(e,t,n,i,r){let s,o={};i&&Object.entries(i).forEach(([l,c])=>{o[l]=Array.isArray(c)?c.map(u=>`${u}`):`${c}`}),s=e===t?n:FX(e,t,n);const a=IX(kX(s));return new Wf(a,o,r)}function FX(e,t,n){const i={};return Object.entries(e.children).forEach(([r,o])=>{i[r]=o===t?n:FX(o,t,n)}),new Xt(e.segments,i)}class PX{constructor(t,n,i){if(this.isAbsolute=t,this.numberOfDoubleDots=n,this.commands=i,t&&i.length>0&&vD(i[0]))throw new q(4003,!1);const r=i.find(dv);if(r&&r!==EX(i))throw new q(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class bD{constructor(t,n,i){this.segmentGroup=t,this.processChildren=n,this.index=i}}function LX(e,t,n){if(e??=new Xt([],{}),0===e.segments.length&&e.hasChildren())return fv(e,t,n);const i=function AOe(e,t,n){let i=0,r=t;const o={match:!1,pathIndex:0,commandIndex:0};for(;r=n.length)return o;const s=e.segments[r],a=n[i];if(dv(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!BX(l,c,s))return o;i+=2}else{if(!BX(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(e,t,n),r=n.slice(i.commandIndex);if(i.match&&i.pathIndexo!==ot)&&e.children[ot]&&1===e.numberOfChildren&&0===e.children[ot].segments.length){const o=fv(e.children[ot],t,n);return new Xt(e.segments,o.children)}return Object.entries(i).forEach(([o,s])=>{"string"==typeof s&&(s=[s]),null!==s&&(r[o]=LX(e.children[o],t,s))}),Object.entries(e.children).forEach(([o,s])=>{void 0===i[o]&&(r[o]=s)}),new Xt(e.segments,r)}}function GR(e,t,n){const i=e.segments.slice(0,t);let r=0;for(;r{"string"==typeof i&&(i=[i]),null!==i&&(t[n]=GR(new Xt([],{}),0,i))}),t}function $X(e){const t={};return Object.entries(e).forEach(([n,i])=>t[n]=`${i}`),t}function BX(e,t,n){return e==n.path&&bl(t,n.parameters)}const hv="imperative";var _t=function(e){return e[e.NavigationStart=0]="NavigationStart",e[e.NavigationEnd=1]="NavigationEnd",e[e.NavigationCancel=2]="NavigationCancel",e[e.NavigationError=3]="NavigationError",e[e.RoutesRecognized=4]="RoutesRecognized",e[e.ResolveStart=5]="ResolveStart",e[e.ResolveEnd=6]="ResolveEnd",e[e.GuardsCheckStart=7]="GuardsCheckStart",e[e.GuardsCheckEnd=8]="GuardsCheckEnd",e[e.RouteConfigLoadStart=9]="RouteConfigLoadStart",e[e.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",e[e.ChildActivationStart=11]="ChildActivationStart",e[e.ChildActivationEnd=12]="ChildActivationEnd",e[e.ActivationStart=13]="ActivationStart",e[e.ActivationEnd=14]="ActivationEnd",e[e.Scroll=15]="Scroll",e[e.NavigationSkipped=16]="NavigationSkipped",e}(_t||{});class wl{constructor(t,n){this.id=t,this.url=n}}class wD extends wl{constructor(t,n,i="imperative",r=null){super(t,n),this.type=_t.NavigationStart,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class El extends wl{constructor(t,n,i){super(t,n),this.urlAfterRedirects=i,this.type=_t.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}var Vo=function(e){return e[e.Redirect=0]="Redirect",e[e.SupersededByNewNavigation=1]="SupersededByNewNavigation",e[e.NoDataFromResolver=2]="NoDataFromResolver",e[e.GuardRejected=3]="GuardRejected",e}(Vo||{}),ED=function(e){return e[e.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",e[e.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",e}(ED||{});class Kf extends wl{constructor(t,n,i,r){super(t,n),this.reason=i,this.code=r,this.type=_t.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Jg extends wl{constructor(t,n,i,r){super(t,n),this.reason=i,this.code=r,this.type=_t.NavigationSkipped}}class WR extends wl{constructor(t,n,i,r){super(t,n),this.error=i,this.target=r,this.type=_t.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class jX extends wl{constructor(t,n,i,r){super(t,n),this.urlAfterRedirects=i,this.state=r,this.type=_t.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class NOe extends wl{constructor(t,n,i,r){super(t,n),this.urlAfterRedirects=i,this.state=r,this.type=_t.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class IOe extends wl{constructor(t,n,i,r,o){super(t,n),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o,this.type=_t.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class kOe extends wl{constructor(t,n,i,r){super(t,n),this.urlAfterRedirects=i,this.state=r,this.type=_t.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class OOe extends wl{constructor(t,n,i,r){super(t,n),this.urlAfterRedirects=i,this.state=r,this.type=_t.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class ROe{constructor(t){this.route=t,this.type=_t.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class FOe{constructor(t){this.route=t,this.type=_t.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class POe{constructor(t){this.snapshot=t,this.type=_t.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class LOe{constructor(t){this.snapshot=t,this.type=_t.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class $Oe{constructor(t){this.snapshot=t,this.type=_t.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class qR{constructor(t){this.snapshot=t,this.type=_t.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class VX{constructor(t,n,i){this.routerEvent=t,this.position=n,this.anchor=i,this.type=_t.Scroll}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class YR{}class CD{constructor(t,n){this.url=t,this.navigationBehaviorOptions=n}}function ma(e){return e.outlet||ot}function pv(e){if(!e)return null;if(e.routeConfig?._injector)return e.routeConfig._injector;for(let t=e.parent;t;t=t.parent){const n=t.routeConfig;if(n?._loadedInjector)return n._loadedInjector;if(n?._injector)return n._injector}return null}class HOe{get injector(){return pv(this.route?.snapshot)??this.rootInjector}set injector(t){}constructor(t){this.rootInjector=t,this.outlet=null,this.route=null,this.children=new gv(this.rootInjector),this.attachRef=null}}let gv=(()=>{class e{constructor(n){this.rootInjector=n,this.contexts=new Map}onChildOutletCreated(n,i){const r=this.getOrCreateContext(n);r.outlet=i,this.contexts.set(n,r)}onChildOutletDestroyed(n){const i=this.getContext(n);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let i=this.getContext(n);return i||(i=new HOe(this.rootInjector),this.contexts.set(n,i)),i}getContext(n){return this.contexts.get(n)||null}static{this.\u0275fac=function(i){return new(i||e)(Ne(ji))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();class UX{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const n=this.pathFromRoot(t);return n.length>1?n[n.length-2]:null}children(t){const n=KR(t,this._root);return n?n.children.map(i=>i.value):[]}firstChild(t){const n=KR(t,this._root);return n&&n.children.length>0?n.children[0].value:null}siblings(t){const n=XR(t,this._root);return n.length<2?[]:n[n.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return XR(t,this._root).map(n=>n.value)}}function KR(e,t){if(e===t.value)return t;for(const n of t.children){const i=KR(e,n);if(i)return i}return null}function XR(e,t){if(e===t.value)return[t];for(const n of t.children){const i=XR(e,n);if(i.length)return i.unshift(t),i}return[]}class _a{constructor(t,n){this.value=t,this.children=n}toString(){return`TreeNode(${this.value})`}}function em(e){const t={};return e&&e.children.forEach(n=>t[n.value.outlet]=n),t}class zX extends UX{constructor(t,n){super(t),this.snapshot=n,QR(this,t)}toString(){return this.snapshot.toString()}}function HX(e){const t=function GOe(e){const o=new SD([],{},{},"",{},ot,e,null,{});return new GX("",new _a(o,[]))}(e),n=new ps([new cv("",{})]),i=new ps({}),r=new ps({}),o=new ps({}),s=new ps(""),a=new Cl(n,i,o,s,r,ot,e,t.root);return a.snapshot=t.root,new zX(new _a(a,[]),t)}class Cl{constructor(t,n,i,r,o,s,a,l){this.urlSubject=t,this.paramsSubject=n,this.queryParamsSubject=i,this.fragmentSubject=r,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=l,this.title=this.dataSubject?.pipe(at(c=>c[lv]))??Ge(void 0),this.url=t,this.params=n,this.queryParams=i,this.fragment=r,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(at(t=>Qg(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(at(t=>Qg(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function DD(e,t,n="emptyOnly"){let i;const{routeConfig:r}=e;return i=null===t||"always"!==n&&""!==r?.path&&(t.component||t.routeConfig?.loadComponent)?{params:{...e.params},data:{...e.data},resolve:{...e.data,...e._resolvedData??{}}}:{params:{...t.params,...e.params},data:{...t.data,...e.data},resolve:{...e.data,...t.data,...r?.data,...e._resolvedData}},r&&qX(r)&&(i.resolve[lv]=r.title),i}class SD{get title(){return this.data?.[lv]}constructor(t,n,i,r,o,s,a,l,c){this.url=t,this.params=n,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=Qg(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Qg(this.queryParams),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class GX extends UX{constructor(t,n){super(n),this.url=t,QR(this,n)}toString(){return WX(this._root)}}function QR(e,t){t.value._routerState=e,t.children.forEach(n=>QR(e,n))}function WX(e){const t=e.children.length>0?` { ${e.children.map(WX).join(", ")} } `:"";return`${e.value}${t}`}function ZR(e){if(e.snapshot){const t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,bl(t.queryParams,n.queryParams)||e.queryParamsSubject.next(n.queryParams),t.fragment!==n.fragment&&e.fragmentSubject.next(n.fragment),bl(t.params,n.params)||e.paramsSubject.next(n.params),function rOe(e,t){if(e.length!==t.length)return!1;for(let n=0;nbl(n.parameters,t[i].parameters))}(e.url,t.url);return n&&!(!e.parent!=!t.parent)&&(!e.parent||JR(e.parent,t.parent))}function qX(e){return"string"==typeof e.title||null===e.title}let eF=(()=>{class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=ot,this.activateEvents=new ze,this.deactivateEvents=new ze,this.attachEvents=new ze,this.detachEvents=new ze,this.parentContexts=L(gv),this.location=L(Po),this.changeDetector=L(ha),this.inputBinder=L(TD,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(n){if(n.name){const{firstChange:i,previousValue:r}=n.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new q(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new q(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new q(4012,!1);this.location.detach();const n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,i){this.activated=n,this._activatedRoute=i,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){const n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,i){if(this.isActivated)throw new q(4013,!1);this._activatedRoute=n;const r=this.location,s=n.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new tF(n,a,r.injector);this.activated=r.createComponent(s,{index:r.length,injector:l,environmentInjector:i}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=be({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Ui]})}}return e})();class tF{__ngOutletInjector(t){return new tF(this.route,this.childContexts,t)}constructor(t,n,i){this.route=t,this.childContexts=n,this.parent=i}get(t,n){return t===Cl?this.route:t===gv?this.childContexts:this.parent.get(t,n)}}const TD=new _e("");let YX=(()=>{class e{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(n){this.unsubscribeFromRouteData(n),this.subscribeToRouteData(n)}unsubscribeFromRouteData(n){this.outletDataSubscriptions.get(n)?.unsubscribe(),this.outletDataSubscriptions.delete(n)}subscribeToRouteData(n){const{activatedRoute:i}=n,r=$R([i.queryParams,i.params,i.data]).pipe(Es(([o,s,a],l)=>(a={...o,...s,...a},0===l?Ge(a):Promise.resolve(a)))).subscribe(o=>{if(!n.isActivated||!n.activatedComponentRef||n.activatedRoute!==i||null===i.component)return void this.unsubscribeFromRouteData(n);const s=function MNe(e){const t=ut(e);if(!t)return null;const n=new C0(t);return{get selector(){return n.selector},get type(){return n.componentType},get inputs(){return n.inputs},get outputs(){return n.outputs},get ngContentSelectors(){return n.ngContentSelectors},get isStandalone(){return t.standalone},get isSignal(){return t.signals}}}(i.component);if(s)for(const{templateName:a}of s.inputs)n.activatedComponentRef.setInput(a,o[a]);else this.unsubscribeFromRouteData(n)});this.outletDataSubscriptions.set(n,r)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();function mv(e,t,n){if(n&&e.shouldReuseRoute(t.value,n.value.snapshot)){const i=n.value;i._futureSnapshot=t.value;const r=function qOe(e,t,n){return t.children.map(i=>{for(const r of n.children)if(e.shouldReuseRoute(i.value,r.value.snapshot))return mv(e,i,r);return mv(e,i)})}(e,t,n);return new _a(i,r)}{if(e.shouldAttach(t.value)){const o=e.retrieve(t.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=t.value,s.children=t.children.map(a=>mv(e,a)),s}}const i=function YOe(e){return new Cl(new ps(e.url),new ps(e.params),new ps(e.queryParams),new ps(e.fragment),new ps(e.data),e.outlet,e.component,e)}(t.value),r=t.children.map(o=>mv(e,o));return new _a(i,r)}}class nF{constructor(t,n){this.redirectTo=t,this.navigationBehaviorOptions=n}}const KX="ngNavigationCancelingError";function xD(e,t){const{redirectTo:n,navigationBehaviorOptions:i}=Yf(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=XX(!1,Vo.Redirect);return r.url=n,r.navigationBehaviorOptions=i,r}function XX(e,t){const n=new Error(`NavigationCancelingError: ${e||""}`);return n[KX]=!0,n.cancellationCode=t,n}function QX(e){return!!e&&e[KX]}class QOe{constructor(t,n,i,r,o){this.routeReuseStrategy=t,this.futureState=n,this.currState=i,this.forwardEvent=r,this.inputBindingEnabled=o}activate(t){const n=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(n,i,t),ZR(this.futureState.root),this.activateChildRoutes(n,i,t)}deactivateChildRoutes(t,n,i){const r=em(n);t.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Object.values(r).forEach(o=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(t,n,i){const r=t.value,o=n?n.value:null;if(r===o)if(r.component){const s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(t,n,s.children)}else this.deactivateChildRoutes(t,n,i);else o&&this.deactivateRouteAndItsChildren(n,i)}deactivateRouteAndItsChildren(t,n){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,n):this.deactivateRouteAndOutlet(t,n)}detachAndStoreRouteSubtree(t,n){const i=n.getContext(t.value.outlet),r=i&&t.value.component?i.children:n,o=em(t);for(const s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);if(i&&i.outlet){const s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,n){const i=n.getContext(t.value.outlet),r=i&&t.value.component?i.children:n,o=em(t);for(const s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.route=null)}activateChildRoutes(t,n,i){const r=em(n);t.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new qR(o.value.snapshot))}),t.children.length&&this.forwardEvent(new LOe(t.value.snapshot))}activateRoutes(t,n,i){const r=t.value,o=n?n.value:null;if(ZR(r),r===o)if(r.component){const s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(t,n,s.children)}else this.activateChildRoutes(t,n,i);else if(r.component){const s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),ZR(a.route.value),this.activateChildRoutes(t,null,s.children)}else s.attachRef=null,s.route=r,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(t,null,s.children)}else this.activateChildRoutes(t,null,i)}}class ZX{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class AD{constructor(t,n){this.component=t,this.route=n}}function ZOe(e,t,n){const i=e._root;return _v(i,t?t._root:null,n,[i.value])}function tm(e,t){const n=Symbol(),i=t.get(e,n);return i===n?"function"!=typeof e||function a1e(e){return null!==Zw(e)}(e)?t.get(e):e:i}function _v(e,t,n,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=em(t);return e.children.forEach(s=>{(function eRe(e,t,n,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=e.value,s=t?t.value:null,a=n?n.getContext(e.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function tRe(e,t,n){if("function"==typeof n)return n(e,t);switch(n){case"pathParamsChange":return!qf(e.url,t.url);case"pathParamsOrQueryParamsChange":return!qf(e.url,t.url)||!bl(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!JR(e,t)||!bl(e.queryParams,t.queryParams);default:return!JR(e,t)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new ZX(i)):(o.data=s.data,o._resolvedData=s._resolvedData),_v(e,t,o.component?a?a.children:null:n,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new AD(a.outlet.component,s))}else s&&yv(t,a,r),r.canActivateChecks.push(new ZX(i)),_v(e,null,o.component?a?a.children:null:n,i,r)})(s,o[s.value.outlet],n,i.concat([s.value]),r),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>yv(a,n.getContext(s),r)),r}function yv(e,t,n){const i=em(e),r=e.value;Object.entries(i).forEach(([o,s])=>{yv(s,r.component?t?t.children.getContext(o):null:t,n)}),n.canDeactivateChecks.push(new AD(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function vv(e){return"function"==typeof e}function JX(e){return e instanceof dD||"EmptyError"===e?.name}const MD=Symbol("INITIAL_VALUE");function nm(){return Es(e=>$R(e.map(t=>t.pipe(Cs(1),function yX(...e){const t=ov(e);return ei((n,i)=>{(t?sv(e,n,t):sv(e,n)).subscribe(i)})}(MD)))).pipe(at(t=>{for(const n of t)if(!0!==n){if(n===MD)return MD;if(!1===n||lRe(n))return n}return!0}),Wn(t=>t!==MD),Cs(1)))}function lRe(e){return Yf(e)||e instanceof nF}function eQ(e){return function Qve(...e){return GU(e)}(Gi(t=>{if("boolean"!=typeof t)throw xD(0,t)}),at(t=>!0===t))}class iF{constructor(t){this.segmentGroup=t||null}}class ND extends Error{constructor(t){super(),this.urlTree=t}}function im(e){return fD(new iF(e))}class wRe{constructor(t,n){this.urlSerializer=t,this.urlTree=n}lineralizeSegments(t,n){let i=[],r=n.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return Ge(i);if(r.numberOfChildren>1||!r.children[ot])return fD(new q(4e3,!1));r=r.children[ot]}}applyRedirectCommands(t,n,i,r,o){if("string"!=typeof n){const a=n,{queryParams:l,fragment:c,routeConfig:u,url:d,outlet:f,params:h,data:p,title:g}=r,m=ol(o,()=>a({params:h,data:p,queryParams:l,fragment:c,routeConfig:u,url:d,outlet:f,title:g}));if(m instanceof Wf)throw new ND(m);n=m}const s=this.applyRedirectCreateUrlTree(n,this.urlSerializer.parse(n),t,i);if("/"===n[0])throw new ND(s);return s}applyRedirectCreateUrlTree(t,n,i,r){const o=this.createSegmentGroup(t,n.root,i,r);return new Wf(o,this.createQueryParams(n.queryParams,this.urlTree.queryParams),n.fragment)}createQueryParams(t,n){const i={};return Object.entries(t).forEach(([r,o])=>{if("string"==typeof o&&":"===o[0]){const a=o.substring(1);i[r]=n[a]}else i[r]=o}),i}createSegmentGroup(t,n,i,r){const o=this.createSegments(t,n.segments,i,r);let s={};return Object.entries(n.children).forEach(([a,l])=>{s[a]=this.createSegmentGroup(t,l,i,r)}),new Xt(o,s)}createSegments(t,n,i,r){return n.map(o=>":"===o.path[0]?this.findPosParam(t,o,r):this.findOrReturn(o,i))}findPosParam(t,n,i){const r=i[n.path.substring(1)];if(!r)throw new q(4001,!1);return r}findOrReturn(t,n){let i=0;for(const r of n){if(r.path===t.path)return n.splice(i),r;i++}return t}}const rF={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function ERe(e,t,n,i,r){const o=tQ(e,t,n);return o.matched?(i=function BOe(e,t){return e.providers&&!e._injector&&(e._injector=hC(e.providers,t,`Route: ${e.path}`)),e._injector??t}(t,i),function yRe(e,t,n,i){const r=t.canMatch;return r&&0!==r.length?Ge(r.map(s=>{const a=tm(s,e);return qu(function aRe(e){return e&&vv(e.canMatch)}(a)?a.canMatch(t,n):ol(e,()=>a(t,n)))})).pipe(nm(),eQ()):Ge(!0)}(i,t,n).pipe(at(s=>!0===s?o:{...rF}))):Ge(o)}function tQ(e,t,n){if("**"===t.path)return function CRe(e){return{matched:!0,parameters:e.length>0?EX(e).parameters:{},consumedSegments:e,remainingSegments:[],positionalParamSegments:{}}}(n);if(""===t.path)return"full"===t.pathMatch&&(e.hasChildren()||n.length>0)?{...rF}:{matched:!0,consumedSegments:[],remainingSegments:n,parameters:{},positionalParamSegments:{}};const r=(t.matcher||iOe)(n,e,t);if(!r)return{...rF};const o={};Object.entries(r.posParams??{}).forEach(([a,l])=>{o[a]=l.path});const s=r.consumed.length>0?{...o,...r.consumed[r.consumed.length-1].parameters}:o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:n.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function nQ(e,t,n,i){return n.length>0&&function TRe(e,t,n){return n.some(i=>ID(e,t,i)&&ma(i)!==ot)}(e,n,i)?{segmentGroup:new Xt(t,SRe(i,new Xt(n,e.children))),slicedSegments:[]}:0===n.length&&function xRe(e,t,n){return n.some(i=>ID(e,t,i))}(e,n,i)?{segmentGroup:new Xt(e.segments,DRe(e,n,i,e.children)),slicedSegments:n}:{segmentGroup:new Xt(e.segments,e.children),slicedSegments:n}}function DRe(e,t,n,i){const r={};for(const o of n)if(ID(e,t,o)&&!i[ma(o)]){const s=new Xt([],{});r[ma(o)]=s}return{...i,...r}}function SRe(e,t){const n={};n[ot]=t;for(const i of e)if(""===i.path&&ma(i)!==ot){const r=new Xt([],{});n[ma(i)]=r}return n}function ID(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path}class MRe{}class kRe{constructor(t,n,i,r,o,s,a){this.injector=t,this.configLoader=n,this.rootComponentType=i,this.config=r,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new wRe(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(t){return new q(4002,`'${t.segmentGroup}'`)}recognize(){const t=nQ(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe(at(({children:n,rootSnapshot:i})=>{const r=new _a(i,n),o=new GX("",r),s=function COe(e,t,n=null,i=null){return RX(OX(e),t,n,i)}(i,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(t){const n=new SD([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,Object.freeze({}),ot,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,t,ot,n).pipe(at(i=>({children:i,rootSnapshot:n})),Xg(i=>{if(i instanceof ND)return this.urlTree=i.urlTree,this.match(i.urlTree.root);throw i instanceof iF?this.noMatchError(i):i}))}processSegmentGroup(t,n,i,r,o){return 0===i.segments.length&&i.hasChildren()?this.processChildren(t,n,i,o):this.processSegment(t,n,i,i.segments,r,!0,o).pipe(at(s=>s instanceof _a?[s]:[]))}processChildren(t,n,i,r){const o=[];for(const s of Object.keys(i.children))"primary"===s?o.unshift(s):o.push(s);return si(o).pipe(Kg(s=>{const a=i.children[s],l=function zOe(e,t){const n=e.filter(i=>ma(i)===t);return n.push(...e.filter(i=>ma(i)!==t)),n}(n,s);return this.processSegmentGroup(t,l,a,s,r)}),function eOe(e,t){return ei(function Jke(e,t,n,i,r){return(o,s)=>{let a=n,l=t,c=0;o.subscribe(yn(s,u=>{const d=c++;l=a?e(l,u,d):(a=!0,u),i&&s.next(l)},r&&(()=>{a&&s.next(l),s.complete()})))}}(e,t,arguments.length>=2,!0))}((s,a)=>(s.push(...a),s)),hD(null),function tOe(e,t){const n=arguments.length>=2;return i=>i.pipe(e?Wn((r,o)=>e(r,o,i)):_c,jR(1),n?hD(t):vX(()=>new dD))}(),Ai(s=>{if(null===s)return im(i);const a=iQ(s);return function ORe(e){e.sort((t,n)=>t.value.outlet===ot?-1:n.value.outlet===ot?1:t.value.outlet.localeCompare(n.value.outlet))}(a),Ge(a)}))}processSegment(t,n,i,r,o,s,a){return si(n).pipe(Kg(l=>this.processSegmentAgainstRoute(l._injector??t,n,l,i,r,o,s,a).pipe(Xg(c=>{if(c instanceof iF)return Ge(null);throw c}))),Gf(l=>!!l),Xg(l=>{if(JX(l))return function ARe(e,t,n){return 0===t.length&&!e.children[n]}(i,r,o)?Ge(new MRe):im(i);throw l}))}processSegmentAgainstRoute(t,n,i,r,o,s,a,l){return ma(i)===s||s!==ot&&ID(r,o,i)?void 0===i.redirectTo?this.matchSegmentAgainstRoute(t,r,i,o,s,l):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(t,r,n,i,o,s,l):im(r):im(r)}expandSegmentAgainstRouteUsingRedirect(t,n,i,r,o,s,a){const{matched:l,parameters:c,consumedSegments:u,positionalParamSegments:d,remainingSegments:f}=tQ(n,r,o);if(!l)return im(n);"string"==typeof r.redirectTo&&"/"===r.redirectTo[0]&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>31&&(this.allowRedirects=!1));const h=new SD(o,c,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,rQ(r),ma(r),r.component??r._loadedComponent??null,r,oQ(r)),p=DD(h,a,this.paramsInheritanceStrategy);h.params=Object.freeze(p.params),h.data=Object.freeze(p.data);const g=this.applyRedirects.applyRedirectCommands(u,r.redirectTo,d,h,t);return this.applyRedirects.lineralizeSegments(r,g).pipe(Ai(m=>this.processSegment(t,i,n,m.concat(f),s,!1,a)))}matchSegmentAgainstRoute(t,n,i,r,o,s){const a=ERe(n,i,r,t);return"**"===i.path&&(n.children={}),a.pipe(Es(l=>l.matched?this.getChildConfig(t=i._injector??t,i,r).pipe(Es(({routes:c})=>{const u=i._loadedInjector??t,{parameters:d,consumedSegments:f,remainingSegments:h}=l,p=new SD(f,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,rQ(i),ma(i),i.component??i._loadedComponent??null,i,oQ(i)),g=DD(p,s,this.paramsInheritanceStrategy);p.params=Object.freeze(g.params),p.data=Object.freeze(g.data);const{segmentGroup:m,slicedSegments:_}=nQ(n,f,h,c);if(0===_.length&&m.hasChildren())return this.processChildren(u,c,m,p).pipe(at(v=>new _a(p,v)));if(0===c.length&&0===_.length)return Ge(new _a(p,[]));const y=ma(i)===o;return this.processSegment(u,c,m,_,y?ot:o,!0,p).pipe(at(v=>new _a(p,v instanceof _a?[v]:[])))})):im(n)))}getChildConfig(t,n,i){return n.children?Ge({routes:n.children,injector:t}):n.loadChildren?void 0!==n._loadedRoutes?Ge({routes:n._loadedRoutes,injector:n._loadedInjector}):function _Re(e,t,n,i){const r=t.canLoad;return void 0===r||0===r.length?Ge(!0):Ge(r.map(s=>{const a=tm(s,e);return qu(function iRe(e){return e&&vv(e.canLoad)}(a)?a.canLoad(t,n):ol(e,()=>a(t,n)))})).pipe(nm(),eQ())}(t,n,i).pipe(Ai(r=>r?this.configLoader.loadChildren(t,n).pipe(Gi(o=>{n._loadedRoutes=o.routes,n._loadedInjector=o.injector})):function bRe(){return fD(XX(!1,Vo.GuardRejected))}())):Ge({routes:[],injector:t})}}function RRe(e){const t=e.value.routeConfig;return t&&""===t.path}function iQ(e){const t=[],n=new Set;for(const i of e){if(!RRe(i)){t.push(i);continue}const r=t.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==r?(r.children.push(...i.children),n.add(r)):t.push(i)}for(const i of n){const r=iQ(i.children);t.push(new _a(i.value,r))}return t.filter(i=>!n.has(i))}function rQ(e){return e.data||{}}function oQ(e){return e.resolve||{}}function PRe(e,t){return Ai(n=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=n;if(!r.length)return Ge(n);const o=new Set(r.map(l=>l.route)),s=new Set;for(const l of o)if(!s.has(l))for(const c of sQ(l))s.add(c);let a=0;return si(s).pipe(Kg(l=>o.has(l)?function LRe(e,t,n,i){const r=e.routeConfig,o=e._resolve;return void 0!==r?.title&&!qX(r)&&(o[lv]=r.title),function $Re(e,t,n,i){const r=VR(e);if(0===r.length)return Ge({});const o={};return si(r).pipe(Ai(s=>function BRe(e,t,n,i){const r=pv(t)??i,o=tm(e,r);return qu(o.resolve?o.resolve(t,n):ol(r,()=>o(t,n)))}(e[s],t,n,i).pipe(Gf(),Gi(a=>{if(a instanceof nF)throw xD(new gD,a);o[s]=a}))),jR(1),function bX(e){return at(()=>e)}(o),Xg(s=>JX(s)?jo:fD(s)))}(o,e,t,i).pipe(at(s=>(e._resolvedData=s,e.data=DD(e,e.parent,n).resolve,null)))}(l,i,e,t):(l.data=DD(l,l.parent,e).resolve,Ge(void 0))),Gi(()=>a++),jR(1),Ai(l=>a===s.size?Ge(n):jo))})}function sQ(e){const t=e.children.map(n=>sQ(n)).flat();return[e,...t]}function oF(e){return Es(t=>{const n=e(t);return n?si(n).pipe(at(()=>t)):Ge(t)})}let aQ=(()=>{class e{buildTitle(n){let i,r=n.root;for(;void 0!==r;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(o=>o.outlet===ot);return i}getResolvedTitleForRoute(n){return n.data[lv]}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:()=>L(jRe),providedIn:"root"})}}return e})(),jRe=(()=>{class e extends aQ{constructor(n){super(),this.title=n}updateTitle(n){const i=this.buildTitle(n);void 0!==i&&this.title.setTitle(i)}static{this.\u0275fac=function(i){return new(i||e)(Ne(MR))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const rm=new _e("",{providedIn:"root",factory:()=>({})});let lQ=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=Cn({type:e,selectors:[["ng-component"]],standalone:!0,features:[da],decls:1,vars:0,template:function(i,r){1&i&&Ke(0,"router-outlet")},dependencies:[eF],encapsulation:2})}}return e})();function sF(e){const t=e.children&&e.children.map(sF),n=t?{...e,children:t}:{...e};return!n.component&&!n.loadComponent&&(t||n.loadChildren)&&n.outlet&&n.outlet!==ot&&(n.component=lQ),n}const om=new _e("");let aF=(()=>{class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=L(dY)}loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return Ge(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);const i=qu(n.loadComponent()).pipe(at(cQ),Gi(o=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=o}),av(()=>{this.componentLoaders.delete(n)})),r=new _X(i,()=>new tn).pipe(BR());return this.componentLoaders.set(n,r),r}loadChildren(n,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return Ge({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const o=function VRe(e,t,n,i){return qu(e.loadChildren()).pipe(at(cQ),Ai(r=>r instanceof SG||Array.isArray(r)?Ge(r):si(t.compileModuleAsync(r))),at(r=>{i&&i(e);let o,s,a=!1;return Array.isArray(r)?(s=r,!0):(o=r.create(n).injector,s=o.get(om,[],{optional:!0,self:!0}).flat()),{routes:s.map(sF),injector:o}}))}(i,this.compiler,n,this.onLoadEndListener).pipe(av(()=>{this.childrenLoaders.delete(i)})),s=new _X(o,()=>new tn).pipe(BR());return this.childrenLoaders.set(i,s),s}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function cQ(e){return function URe(e){return e&&"object"==typeof e&&"default"in e}(e)?e.default:e}let lF=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:()=>L(zRe),providedIn:"root"})}}return e})(),zRe=(()=>{class e{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,i){return n}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const uQ=new _e(""),dQ=new _e("");function HRe(e,t,n){const i=e.get(dQ),r=e.get(Ln);return e.get(ct).runOutsideAngular(()=>{if(!r.startViewTransition||i.skipNextTransition)return i.skipNextTransition=!1,new Promise(c=>setTimeout(c));let o;const s=new Promise(c=>{o=c}),a=r.startViewTransition(()=>(o(),function GRe(e){return new Promise(t=>{$u({read:()=>setTimeout(t)},{injector:e})})}(e))),{onViewTransitionCreated:l}=i;return l&&ol(e,()=>l({transition:a,from:t,to:n})),s})}const fQ=new _e("");let kD=(()=>{class e{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new tn,this.transitionAbortSubject=new tn,this.configLoader=L(aF),this.environmentInjector=L(ji),this.urlSerializer=L(Zg),this.rootContexts=L(gv),this.location=L(Q0),this.inputBindingEnabled=null!==L(TD,{optional:!0}),this.titleStrategy=L(aQ),this.options=L(rm,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=L(lF),this.createViewTransition=L(uQ,{optional:!0}),this.navigationErrorHandler=L(fQ,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>Ge(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new FOe(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new ROe(r))}complete(){this.transitions?.complete()}handleNavigationRequest(n){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...n,id:i})}setupNavigations(n,i,r){return this.transitions=new ps({id:0,currentUrlTree:i,currentRawUrl:i,extractedUrl:this.urlHandlingStrategy.extract(i),urlAfterRedirects:this.urlHandlingStrategy.extract(i),rawUrl:i,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:hv,restoredState:null,currentSnapshot:r.snapshot,targetSnapshot:null,currentRouterState:r,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(Wn(o=>0!==o.id),at(o=>({...o,extractedUrl:this.urlHandlingStrategy.extract(o.rawUrl)})),Es(o=>{let s=!1,a=!1;return Ge(o).pipe(Es(l=>{if(this.navigationId>o.id)return this.cancelNavigationTransition(o,"",Vo.SupersededByNewNavigation),jo;this.currentTransition=o,this.currentNavigation={id:l.id,initialUrl:l.rawUrl,extractedUrl:l.extractedUrl,targetBrowserUrl:"string"==typeof l.extras.browserUrl?this.urlSerializer.parse(l.extras.browserUrl):l.extras.browserUrl,trigger:l.source,extras:l.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null};const c=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl();if(!c&&"reload"!==(l.extras.onSameUrlNavigation??n.onSameUrlNavigation)){const d="";return this.events.next(new Jg(l.id,this.urlSerializer.serialize(l.rawUrl),d,ED.IgnoredSameUrlNavigation)),l.resolve(!1),jo}if(this.urlHandlingStrategy.shouldProcessUrl(l.rawUrl))return Ge(l).pipe(Es(d=>{const f=this.transitions?.getValue();return this.events.next(new wD(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),f!==this.transitions?.getValue()?jo:Promise.resolve(d)}),function FRe(e,t,n,i,r,o){return Ai(s=>function NRe(e,t,n,i,r,o,s="emptyOnly"){return new kRe(e,t,n,i,r,s,o).recognize()}(e,t,n,i,s.extractedUrl,r,o).pipe(at(({state:a,tree:l})=>({...s,targetSnapshot:a,urlAfterRedirects:l}))))}(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy),Gi(d=>{o.targetSnapshot=d.targetSnapshot,o.urlAfterRedirects=d.urlAfterRedirects,this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects};const f=new jX(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(f)}));if(c&&this.urlHandlingStrategy.shouldProcessUrl(l.currentRawUrl)){const{id:d,extractedUrl:f,source:h,restoredState:p,extras:g}=l,m=new wD(d,this.urlSerializer.serialize(f),h,p);this.events.next(m);const _=HX(this.rootComponentType).snapshot;return this.currentTransition=o={...l,targetSnapshot:_,urlAfterRedirects:f,extras:{...g,skipLocationChange:!1,replaceUrl:!1}},this.currentNavigation.finalUrl=f,Ge(o)}{const d="";return this.events.next(new Jg(l.id,this.urlSerializer.serialize(l.extractedUrl),d,ED.IgnoredByUrlHandlingStrategy)),l.resolve(!1),jo}}),Gi(l=>{const c=new NOe(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(c)}),at(l=>(this.currentTransition=o={...l,guards:ZOe(l.targetSnapshot,l.currentSnapshot,this.rootContexts)},o)),function cRe(e,t){return Ai(n=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=n;return 0===s.length&&0===o.length?Ge({...n,guardsResult:!0}):function uRe(e,t,n,i){return si(e).pipe(Ai(r=>function mRe(e,t,n,i,r){const o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return o&&0!==o.length?Ge(o.map(a=>{const l=pv(t)??r,c=tm(a,l);return qu(function sRe(e){return e&&vv(e.canDeactivate)}(c)?c.canDeactivate(e,t,n,i):ol(l,()=>c(e,t,n,i))).pipe(Gf())})).pipe(nm()):Ge(!0)}(r.component,r.route,n,t,i)),Gf(r=>!0!==r,!0))}(s,i,r,e).pipe(Ai(a=>a&&function nRe(e){return"boolean"==typeof e}(a)?function dRe(e,t,n,i){return si(t).pipe(Kg(r=>sv(function hRe(e,t){return null!==e&&t&&t(new POe(e)),Ge(!0)}(r.route.parent,i),function fRe(e,t){return null!==e&&t&&t(new $Oe(e)),Ge(!0)}(r.route,i),function gRe(e,t,n){const i=t[t.length-1],o=t.slice(0,t.length-1).reverse().map(s=>function JOe(e){const t=e.routeConfig?e.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:e,guards:t}:null}(s)).filter(s=>null!==s).map(s=>mX(()=>Ge(s.guards.map(l=>{const c=pv(s.node)??n,u=tm(l,c);return qu(function oRe(e){return e&&vv(e.canActivateChild)}(u)?u.canActivateChild(i,e):ol(c,()=>u(i,e))).pipe(Gf())})).pipe(nm())));return Ge(o).pipe(nm())}(e,r.path,n),function pRe(e,t,n){const i=t.routeConfig?t.routeConfig.canActivate:null;if(!i||0===i.length)return Ge(!0);const r=i.map(o=>mX(()=>{const s=pv(t)??n,a=tm(o,s);return qu(function rRe(e){return e&&vv(e.canActivate)}(a)?a.canActivate(t,e):ol(s,()=>a(t,e))).pipe(Gf())}));return Ge(r).pipe(nm())}(e,r.route,n))),Gf(r=>!0!==r,!0))}(i,o,e,t):Ge(a)),at(a=>({...n,guardsResult:a})))})}(this.environmentInjector,l=>this.events.next(l)),Gi(l=>{if(o.guardsResult=l.guardsResult,l.guardsResult&&"boolean"!=typeof l.guardsResult)throw xD(0,l.guardsResult);const c=new IOe(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot,!!l.guardsResult);this.events.next(c)}),Wn(l=>!!l.guardsResult||(this.cancelNavigationTransition(l,"",Vo.GuardRejected),!1)),oF(l=>{if(l.guards.canActivateChecks.length)return Ge(l).pipe(Gi(c=>{const u=new kOe(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(u)}),Es(c=>{let u=!1;return Ge(c).pipe(PRe(this.paramsInheritanceStrategy,this.environmentInjector),Gi({next:()=>u=!0,complete:()=>{u||this.cancelNavigationTransition(c,"",Vo.NoDataFromResolver)}}))}),Gi(c=>{const u=new OOe(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(u)}))}),oF(l=>{const c=u=>{const d=[];u.routeConfig?.loadComponent&&!u.routeConfig._loadedComponent&&d.push(this.configLoader.loadComponent(u.routeConfig).pipe(Gi(f=>{u.component=f}),at(()=>{})));for(const f of u.children)d.push(...c(f));return d};return $R(c(l.targetSnapshot.root)).pipe(hD(null),Cs(1))}),oF(()=>this.afterPreactivation()),Es(()=>{const{currentSnapshot:l,targetSnapshot:c}=o,u=this.createViewTransition?.(this.environmentInjector,l.root,c.root);return u?si(u).pipe(at(()=>o)):Ge(o)}),at(l=>{const c=function WOe(e,t,n){const i=mv(e,t._root,n?n._root:void 0);return new zX(i,t)}(n.routeReuseStrategy,l.targetSnapshot,l.currentRouterState);return this.currentTransition=o={...l,targetRouterState:c},this.currentNavigation.targetRouterState=c,o}),Gi(()=>{this.events.next(new YR)}),((e,t,n,i)=>at(r=>(new QOe(t,r.targetRouterState,r.currentRouterState,n,i).activate(e),r)))(this.rootContexts,n.routeReuseStrategy,l=>this.events.next(l),this.inputBindingEnabled),Cs(1),Gi({next:l=>{s=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new El(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects))),this.titleStrategy?.updateTitle(l.targetRouterState.snapshot),l.resolve(!0)},complete:()=>{s=!0}}),Wi(this.transitionAbortSubject.pipe(Gi(l=>{throw l}))),av(()=>{!s&&!a&&this.cancelNavigationTransition(o,"",Vo.SupersededByNewNavigation),this.currentTransition?.id===o.id&&(this.currentNavigation=null,this.currentTransition=null)}),Xg(l=>{if(a=!0,QX(l))this.events.next(new Kf(o.id,this.urlSerializer.serialize(o.extractedUrl),l.message,l.cancellationCode)),function KOe(e){return QX(e)&&Yf(e.url)}(l)?this.events.next(new CD(l.url,l.navigationBehaviorOptions)):o.resolve(!1);else{const c=new WR(o.id,this.urlSerializer.serialize(o.extractedUrl),l,o.targetSnapshot??void 0);try{const u=ol(this.environmentInjector,()=>this.navigationErrorHandler?.(c));if(u instanceof nF){const{message:d,cancellationCode:f}=xD(0,u);this.events.next(new Kf(o.id,this.urlSerializer.serialize(o.extractedUrl),d,f)),this.events.next(new CD(u.redirectTo,u.navigationBehaviorOptions))}else{this.events.next(c);const d=n.errorHandler(l);o.resolve(!!d)}}catch(u){this.options.resolveNavigationPromiseOnError?o.resolve(!1):o.reject(u)}}return jo}))}))}cancelNavigationTransition(n,i,r){const o=new Kf(n.id,this.urlSerializer.serialize(n.extractedUrl),i,r);this.events.next(o),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){const n=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),i=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return n.toString()!==i?.toString()&&!this.currentNavigation?.extras.skipLocationChange}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function WRe(e){return e!==hv}let qRe=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:()=>L(KRe),providedIn:"root"})}}return e})();class YRe{shouldDetach(t){return!1}store(t,n){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,n){return t.routeConfig===n.routeConfig}}let KRe=(()=>{class e extends YRe{static{this.\u0275fac=(()=>{let n;return function(r){return(n||(n=fn(e)))(r||e)}})()}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),hQ=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:()=>L(XRe),providedIn:"root"})}}return e})(),XRe=(()=>{class e extends hQ{constructor(){super(...arguments),this.location=L(Q0),this.urlSerializer=L(Zg),this.options=L(rm,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=L(lF),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Wf,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=HX(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return"computed"!==this.canceledNavigationResolution?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(i=>{"popstate"===i.type&&n(i.url,i.state)})}handleRouterEvent(n,i){if(n instanceof wD)this.stateMemento=this.createStateMemento();else if(n instanceof Jg)this.rawUrlTree=i.initialUrl;else if(n instanceof jX){if("eager"===this.urlUpdateStrategy&&!i.extras.skipLocationChange){const r=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl);this.setBrowserUrl(i.targetBrowserUrl??r,i)}}else n instanceof YR?(this.currentUrlTree=i.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl),this.routerState=i.targetRouterState,"deferred"===this.urlUpdateStrategy&&!i.extras.skipLocationChange&&this.setBrowserUrl(i.targetBrowserUrl??this.rawUrlTree,i)):n instanceof Kf&&(n.code===Vo.GuardRejected||n.code===Vo.NoDataFromResolver)?this.restoreHistory(i):n instanceof WR?this.restoreHistory(i,!0):n instanceof El&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,i){const r=n instanceof Wf?this.urlSerializer.serialize(n):n;if(this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl){const s={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId)};this.location.replaceState(r,"",s)}else{const o={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId+1)};this.location.go(r,"",o)}}restoreHistory(n,i=!1){if("computed"===this.canceledNavigationResolution){const o=this.currentPageId-this.browserPageId;0!==o?this.location.historyGo(o):this.currentUrlTree===n.finalUrl&&0===o&&(this.resetState(n),this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(n),this.resetUrlToCurrentUrlTree())}resetState(n){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,i){return"computed"===this.canceledNavigationResolution?{navigationId:n,\u0275routerPageId:i}:{navigationId:n}}static{this.\u0275fac=(()=>{let n;return function(r){return(n||(n=fn(e)))(r||e)}})()}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var bv=function(e){return e[e.COMPLETE=0]="COMPLETE",e[e.FAILED=1]="FAILED",e[e.REDIRECTING=2]="REDIRECTING",e}(bv||{});function pQ(e,t){e.events.pipe(Wn(n=>n instanceof El||n instanceof Kf||n instanceof WR||n instanceof Jg),at(n=>n instanceof El||n instanceof Jg?bv.COMPLETE:n instanceof Kf&&(n.code===Vo.Redirect||n.code===Vo.SupersededByNewNavigation)?bv.REDIRECTING:bv.FAILED),Wn(n=>n!==bv.REDIRECTING),Cs(1)).subscribe(()=>{t()})}function QRe(e){throw e}const ZRe={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},JRe={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Uo=(()=>{class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.console=L(eY),this.stateManager=L(hQ),this.options=L(rm,{optional:!0})||{},this.pendingTasks=L(Sc),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=L(kD),this.urlSerializer=L(Zg),this.location=L(Q0),this.urlHandlingStrategy=L(lF),this._events=new tn,this.errorHandler=this.options.errorHandler||QRe,this.navigated=!1,this.routeReuseStrategy=L(qRe),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=L(om,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!L(TD,{optional:!0}),this.eventsSubscription=new ar,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:n=>{this.console.warn(n)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){const n=this.navigationTransitions.events.subscribe(i=>{try{const r=this.navigationTransitions.currentTransition,o=this.navigationTransitions.currentNavigation;if(null!==r&&null!==o)if(this.stateManager.handleRouterEvent(i,o),i instanceof Kf&&i.code!==Vo.Redirect&&i.code!==Vo.SupersededByNewNavigation)this.navigated=!0;else if(i instanceof El)this.navigated=!0;else if(i instanceof CD){const s=i.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(i.url,r.currentRawUrl),l={browserUrl:r.extras.browserUrl,info:r.extras.info,skipLocationChange:r.extras.skipLocationChange,replaceUrl:r.extras.replaceUrl||"eager"===this.urlUpdateStrategy||WRe(r.source),...s};this.scheduleNavigation(a,hv,null,l,{resolve:r.resolve,reject:r.reject,promise:r.promise})}(function tFe(e){return!(e instanceof YR||e instanceof CD)})(i)&&this._events.next(i)}catch(r){this.navigationTransitions.transitionAbortSubject.next(r)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),hv,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,i)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(n,"popstate",i)},0)})}navigateToSyncWithBrowser(n,i,r){const o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){const l={...r};delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(o.state=l)}const a=this.parseUrl(n);this.scheduleNavigation(a,i,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(sF),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,i={}){const{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=i,c=l?this.currentUrlTree.fragment:s;let d,u=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":u={...this.currentUrlTree.queryParams,...o};break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=o||null}null!==u&&(u=this.removeEmptyProps(u));try{d=OX(r?r.snapshot:this.routerState.snapshot.root)}catch{("string"!=typeof n[0]||"/"!==n[0][0])&&(n=[]),d=this.currentUrlTree.root}return RX(d,n,u,c??null)}navigateByUrl(n,i={skipLocationChange:!1}){const r=Yf(n)?n:this.parseUrl(n),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,hv,null,i)}navigate(n,i={skipLocationChange:!1}){return function eFe(e){for(let t=0;t(null!=o&&(i[r]=o),i),{})}scheduleNavigation(n,i,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,l,c;s?(a=s.resolve,l=s.reject,c=s.promise):c=new Promise((d,f)=>{a=d,l=f});const u=this.pendingTasks.add();return pQ(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(u))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(d=>Promise.reject(d))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),OD=(()=>{class e{constructor(n,i,r,o,s,a){this.router=n,this.route=i,this.tabIndexAttribute=r,this.renderer=o,this.el=s,this.locationStrategy=a,this.href=null,this.onChanges=new tn,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1,this.routerLinkInput=null;const l=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===l||"area"===l,this.isAnchorElement?this.subscription=n.events.subscribe(c=>{c instanceof El&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(n){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",n)}ngOnChanges(n){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(n){null==n?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(this.routerLinkInput=Yf(n)||Array.isArray(n)?n:[n],this.setTabIndexIfNotOnNativeEl("0"))}onClick(n,i,r,o,s){const a=this.urlTree;return!!(null===a||this.isAnchorElement&&(0!==n||i||r||o||s||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(a,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){const n=this.urlTree;this.href=null!==n&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(n)):null;const i=null===this.href?null:function Dz(e,t,n){return function vEe(e,t){return"src"===t&&("embed"===e||"frame"===e||"iframe"===e||"media"===e||"script"===e)||"href"===t&&("base"===e||"link"===e)?Cz:Oo}(t,n)(e)}(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",i)}applyAttributeValue(n,i){const r=this.renderer,o=this.el.nativeElement;null!==i?r.setAttribute(o,n,i):r.removeAttribute(o,n)}get urlTree(){return null===this.routerLinkInput?null:Yf(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static{this.\u0275fac=function(i){return new(i||e)(ee(Uo),ee(Cl),function ku(e){return function zbe(e,t){if("class"===t)return e.classes;if("style"===t)return e.styles;const n=e.attrs;if(n){const i=n.length;let r=0;for(;r{class e{constructor(n,i,r,o,s){this.router=n,this.injector=r,this.preloadingStrategy=o,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(Wn(n=>n instanceof El),Kg(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(n,i){const r=[];for(const o of i){o.providers&&!o._injector&&(o._injector=hC(o.providers,n,`Route: ${o.path}`));const s=o._injector??n,a=o._loadedInjector??s;(o.loadChildren&&!o._loadedRoutes&&void 0===o.canLoad||o.loadComponent&&!o._loadedComponent)&&r.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return si(r).pipe(Yg())}preloadConfig(n,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(n,i):Ge(null);const o=r.pipe(Ai(s=>null===s?Ge(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??n,s.routes))));return i.loadComponent&&!i._loadedComponent?si([o,this.loader.loadComponent(i)]).pipe(Yg()):o})}static{this.\u0275fac=function(i){return new(i||e)(Ne(Uo),Ne(dY),Ne(ji),Ne(gQ),Ne(aF))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const cF=new _e("");let mQ=(()=>{class e{constructor(n,i,r,o,s={}){this.urlSerializer=n,this.transitions=i,this.viewportScroller=r,this.zone=o,this.options=s,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},s.scrollPositionRestoration||="disabled",s.anchorScrolling||="disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof wD?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=n.navigationTrigger,this.restoredId=n.restoredState?n.restoredState.navigationId:0):n instanceof El?(this.lastId=n.id,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.urlAfterRedirects).fragment)):n instanceof Jg&&n.code===ED.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof VX&&(n.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(n.position):n.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(n.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(n,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new VX(n,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static{this.\u0275fac=function(i){!function Xz(){throw new Error("invalid")}()}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();function Dl(e,t){return{\u0275kind:e,\u0275providers:t}}function yQ(){const e=L(nn);return t=>{const n=e.get(fa);if(t!==n.components[0])return;const i=e.get(Uo),r=e.get(vQ);1===e.get(uF)&&i.initialNavigation(),e.get(bQ,null,ft.Optional)?.setUpPreloading(),e.get(cF,null,ft.Optional)?.init(),i.resetRootComponentType(n.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const vQ=new _e("",{factory:()=>new tn}),uF=new _e("",{providedIn:"root",factory:()=>1}),bQ=new _e("");function lFe(e){return Dl(0,[{provide:bQ,useExisting:rFe},{provide:gQ,useExisting:e}])}function uFe(e){return Dl(9,[{provide:uQ,useValue:HRe},{provide:dQ,useValue:{skipNextTransition:!!e?.skipInitialTransition,...e}}])}const wQ=new _e("ROUTER_FORROOT_GUARD"),dFe=[Q0,{provide:Zg,useClass:gD},Uo,gv,{provide:Cl,useFactory:function _Q(e){return e.routerState.root},deps:[Uo]},aF,[]];let dF=(()=>{class e{constructor(n){}static forRoot(n,i){return{ngModule:e,providers:[dFe,[],{provide:om,multi:!0,useValue:n},{provide:wQ,useFactory:gFe,deps:[[Uo,new iE,new rE]]},{provide:rm,useValue:i||{}},i?.useHash?{provide:Gu,useClass:RNe}:{provide:Gu,useClass:iR},{provide:cF,useFactory:()=>{const e=L(tv),t=L(ct),n=L(rm),i=L(kD),r=L(Zg);return n.scrollOffset&&e.setOffset(n.scrollOffset),new mQ(r,i,e,t,n)}},i?.preloadingStrategy?lFe(i.preloadingStrategy).\u0275providers:[],i?.initialNavigation?mFe(i):[],i?.bindToComponentInputs?Dl(8,[YX,{provide:TD,useExisting:YX}]).\u0275providers:[],i?.enableViewTransitions?uFe().\u0275providers:[],[{provide:EQ,useFactory:yQ},{provide:RC,multi:!0,useExisting:EQ}]]}}static forChild(n){return{ngModule:e,providers:[{provide:om,multi:!0,useValue:n}]}}static{this.\u0275fac=function(i){return new(i||e)(Ne(wQ,8))}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})();function gFe(e){return"guarded"}function mFe(e){return["disabled"===e.initialNavigation?Dl(3,[{provide:UO,multi:!0,useFactory:()=>{const t=L(Uo);return()=>{t.setUpLocationChangeListener()}}},{provide:uF,useValue:2}]).\u0275providers:[],"enabledBlocking"===e.initialNavigation?Dl(2,[{provide:uF,useValue:0},{provide:UO,multi:!0,deps:[nn],useFactory:t=>{const n=t.get(kNe,Promise.resolve());return()=>n.then(()=>new Promise(i=>{const r=t.get(Uo),o=t.get(vQ);pQ(r,()=>{i(!0)}),t.get(kD).afterPreactivation=()=>(i(!0),o.closed?Ge(void 0):o),r.initialNavigation()}))}}]).\u0275providers:[]]}const EQ=new _e("");var Xe=function(e){return e[e.State=0]="State",e[e.Transition=1]="Transition",e[e.Sequence=2]="Sequence",e[e.Group=3]="Group",e[e.Animate=4]="Animate",e[e.Keyframes=5]="Keyframes",e[e.Style=6]="Style",e[e.Trigger=7]="Trigger",e[e.Reference=8]="Reference",e[e.AnimateChild=9]="AnimateChild",e[e.AnimateRef=10]="AnimateRef",e[e.Query=11]="Query",e[e.Stagger=12]="Stagger",e}(Xe||{});const Bc="*";function wv(e,t){return{type:Xe.Trigger,name:e,definitions:t,options:{}}}function Ev(e,t=null){return{type:Xe.Animate,styles:t,timings:e}}function Ds(e){return{type:Xe.Style,styles:e,offset:null}}function Cv(e,t,n=null){return{type:Xe.Transition,expr:e,animation:t,options:n}}class Dv{constructor(t=0,n=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+n}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){const n="start"==t?this._onStartFns:this._onDoneFns;n.forEach(i=>i()),n.length=0}}class CQ{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let n=0,i=0,r=0;const o=this.players.length;0==o?queueMicrotask(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++n==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const n=t*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,n/i.totalTime):1;i.setPosition(r)})}getPosition(){const t=this.players.reduce((n,i)=>null===n||i.totalTime>n.totalTime?i:n,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const n="start"==t?this._onStartFns:this._onDoneFns;n.forEach(i=>i()),n.length=0}}const CFe=JSON.parse('{"r":["assets/logos/abercrombieandfitch.jpg","assets/logos/adidas.png","assets/logos/Aditya.jpg","assets/logos/arvind.png","assets/logos/asics.png","assets/logos/asos.png","assets/logos/boohoo.jpg","assets/logos/buckle.svg","assets/logos/burberry.jpg","assets/logos/burlington.png","assets/logos/canada-goose.png","assets/logos/capri_holdings.png","assets/logos/esprit.png","assets/logos/fast-retail.png","assets/logos/footlocker.jpg","assets/logos/gap.png","assets/logos/havaianas.png","assets/logos/nike.png","assets/logos/vf.svg","assets/logos/zalando.png"]}'),DFe=JSON.parse('[{"id":0,"name":"All Companies"},{"id":5590,"name":"H&M","url":"https://wikirate.org/H_M","headquarters":"Sweden"},{"id":5505,"name":"Gap inc.","url":"https://wikirate.org/Gap_inc","headquarters":"California (United States)"},{"id":5301,"name":"Inditex","url":"https://wikirate.org/Inditex","headquarters":"Spain"},{"id":9269,"name":"Marks and Spencer Group plc","url":"https://wikirate.org/Marks_and_Spencer_Group_plc","headquarters":"United Kingdom"},{"id":7217,"name":"Adidas AG","url":"https://wikirate.org/Adidas_AG","headquarters":"Germany"},{"id":1829050,"name":"Asos","url":"https://wikirate.org/Asos","headquarters":"United Kingdom"},{"id":9139,"name":"Burberry Group plc","url":"https://wikirate.org/Burberry_Group_plc","headquarters":"United Kingdom"},{"id":8979,"name":"Louis Vuitton Malletier SA (LVMH)","url":"https://wikirate.org/Louis_Vuitton_Malletier_SA_LVMH","headquarters":"France"},{"id":5800,"name":"Nike Inc.","url":"https://wikirate.org/Nike_Inc","headquarters":"Oregon (United States)"},{"id":49386,"name":"Tapestry Inc","url":"https://wikirate.org/Tapestry_Inc","headquarters":"New York (United States)"},{"id":18109,"name":"Puma","url":"https://wikirate.org/Puma","headquarters":"Germany"},{"id":776737,"name":"Tiffany & Co.","url":"https://wikirate.org/Tiffany_Co","headquarters":"New York (United States)"},{"id":56584,"name":"Fast Retailing","url":"https://wikirate.org/Fast_Retailing","headquarters":"Japan"},{"id":61104,"name":"VF","url":"https://wikirate.org/VF","headquarters":"North Carolina (United States)"},{"id":61050,"name":"PVH","url":"https://wikirate.org/PVH","headquarters":"New York (United States)"},{"id":2608717,"name":"Zalando SE","url":"https://wikirate.org/Zalando_SE","headquarters":"Germany"},{"id":866194,"name":"Guess? Inc","url":"https://wikirate.org/Guess_Inc","headquarters":"California (United States)"},{"id":116498,"name":"Under Armour","url":"https://wikirate.org/Under_Armour","headquarters":"Maryland (United States)"},{"id":8362,"name":"Kering","url":"https://wikirate.org/Kering","headquarters":"France"},{"id":61065,"name":"Prada","url":"https://wikirate.org/Prada","headquarters":"Italy"},{"id":56597,"name":"L Brands","url":"https://wikirate.org/L_Brands","headquarters":"Ohio (United States)"},{"id":42714,"name":"Hugo Boss AG","url":"https://wikirate.org/Hugo_Boss_AG","headquarters":"Germany"},{"id":56618,"name":"Nordstrom","url":"https://wikirate.org/Nordstrom","headquarters":"Washington (United States)"},{"id":861862,"name":"Columbia Sportswear","url":"https://wikirate.org/Columbia_Sportswear","headquarters":"Oregon (United States)"},{"id":859389,"name":"Urban Outfitters","url":"https://wikirate.org/Urban_Outfitters","headquarters":"Pennsylvania (United States)"},{"id":2265395,"name":"Ralph Lauren Corporation","url":"https://wikirate.org/Ralph_Lauren_Corporation","headquarters":"New York (United States)"},{"id":858415,"name":"Fossil Group, Inc.","url":"https://wikirate.org/Fossil_Group_Inc","headquarters":"Texas (United States)"},{"id":866417,"name":"Skechers USA Inc","url":"https://wikirate.org/Skechers_USA_Inc","headquarters":"California (United States)"},{"id":862441,"name":"American Eagle Outfitters","url":"https://wikirate.org/American_Eagle_Outfitters","headquarters":"Pennsylvania (United States)"},{"id":60982,"name":"Hanesbrands","url":"https://wikirate.org/Hanesbrands","headquarters":"North Carolina (United States)"},{"id":945115,"name":"Lojas Renner S.A.","url":"https://wikirate.org/Lojas_Renner_S_A","headquarters":"Brazil"},{"id":58500,"name":"Foot Locker Inc.","url":"https://wikirate.org/Foot_Locker_Inc","headquarters":"New York (United States)"},{"id":957395,"name":"TJX","url":"https://wikirate.org/TJX","headquarters":"Massachusetts (United States)"},{"id":776749,"name":"G-III Apparel Group, LTD.","url":"https://wikirate.org/G_III_Apparel_Group_LTD","headquarters":"New York (United States)"},{"id":866117,"name":"Deckers Outdoor Corporation","url":"https://wikirate.org/Deckers_Outdoor_Corporation","headquarters":"California (United States)"},{"id":57653,"name":"Ross Stores","url":"https://wikirate.org/Ross_Stores","headquarters":"California (United States)"},{"id":861719,"name":"Wolverine World Wide","url":"https://wikirate.org/Wolverine_World_Wide","headquarters":"Michigan (United States)"},{"id":865187,"name":"Caleres Inc","url":"https://wikirate.org/Caleres_Inc","headquarters":"Missouri (United States)"},{"id":49209,"name":"Next","url":"https://wikirate.org/Next","headquarters":"United Kingdom"},{"id":866341,"name":"Oxford Industries Inc","url":"https://wikirate.org/Oxford_Industries_Inc","headquarters":"Georgia (United States)"},{"id":2274181,"name":"Genesco Inc.","url":"https://wikirate.org/Genesco_Inc","headquarters":"Tennessee (United States)"},{"id":2632311,"name":"Chico\'s FAS Inc","url":"https://wikirate.org/Chico_s_FAS_Inc","headquarters":"Florida (United States)"},{"id":61176,"name":"Macy\'s","url":"https://wikirate.org/Macy_s","headquarters":"Ohio (United States)"},{"id":792992,"name":"Moncler","url":"https://wikirate.org/Moncler","headquarters":"Italy"},{"id":2241782,"name":"DSW Inc.","url":"https://wikirate.org/DSW_Inc","headquarters":"Ohio (United States)"},{"id":60914,"name":"Abercrombie & Fitch","url":"https://wikirate.org/Abercrombie_Fitch","headquarters":"New York (United States)"},{"id":57485,"name":"Luxottica Group SpA","url":"https://wikirate.org/Luxottica_Group_SpA","headquarters":"Italy"},{"id":2632233,"name":"Ascena Retail Group Inc","url":"https://wikirate.org/Ascena_Retail_Group_Inc","headquarters":"New Jersey (United States)"},{"id":776665,"name":"Dillard\'s, Inc.","url":"https://wikirate.org/Dillard_s_Inc","headquarters":"Arkansas (United States)"},{"id":50638,"name":"Dick\'s Sporting Goods","url":"https://wikirate.org/Dick_s_Sporting_Goods","headquarters":"Pennsylvania (United States)"},{"id":2605005,"name":"Carter\'s Inc","url":"https://wikirate.org/Carter_s_Inc","headquarters":"Georgia (United States)"},{"id":2632164,"name":"Express Inc","url":"https://wikirate.org/Express_Inc","headquarters":"Ohio (United States)"},{"id":2979682,"name":"Vera Bradley Inc.","url":"https://wikirate.org/Vera_Bradley_Inc","headquarters":"Indiana (United States)"},{"id":170564,"name":"Asics Corporation","url":"https://wikirate.org/Asics_Corporation","headquarters":"Japan"},{"id":116138,"name":"Gildan Activewear Inc.","url":"https://wikirate.org/Gildan_Activewear_Inc","headquarters":"Canada"},{"id":2632287,"name":"Burlington Stores Inc","url":"https://wikirate.org/Burlington_Stores_Inc","headquarters":"New Jersey (United States)"},{"id":2980808,"name":"Buckle Inc","url":"https://wikirate.org/Buckle_Inc","headquarters":"Nebraska (United States)"},{"id":1825510,"name":"lululemon athletica","url":"https://wikirate.org/lululemon_athletica","headquarters":"Quebec (Canada)"},{"id":2632400,"name":"Francesca\'s","url":"https://wikirate.org/Francesca_s","headquarters":"Texas (United States)"},{"id":9127,"name":"Esprit Holdings Limited","url":"https://wikirate.org/Esprit_Holdings_Limited","headquarters":"Hong Kong"},{"id":3052157,"name":"Cato Corp","url":"https://wikirate.org/Cato_Corp","headquarters":"North Carolina (United States)"},{"id":48305,"name":"Christian Dior","url":"https://wikirate.org/Christian_Dior","headquarters":"France"},{"id":2931751,"name":"Arvind Limited","url":"https://wikirate.org/Arvind_Limited","headquarters":"India"},{"id":3081310,"name":"Mulberry Group Plc","url":"https://wikirate.org/Mulberry_Group_Plc","headquarters":"United Kingdom"},{"id":3151635,"name":"Ted Baker","url":"https://wikirate.org/Ted_Baker","headquarters":"United Kingdom"},{"id":3152073,"name":"Capri Holdings Ltd (formerly Michael Kors)","url":"https://wikirate.org/Capri_Holdings_Ltd_formerly_Michael_Kors","headquarters":"United Kingdom"},{"id":48284,"name":"Hermes International","url":"https://wikirate.org/Hermes_International","headquarters":"France"},{"id":2608722,"name":"Salvatore Ferragamo SpA","url":"https://wikirate.org/Salvatore_Ferragamo_SpA","headquarters":"Italy"},{"id":56413,"name":"Richemont","url":"https://wikirate.org/Richemont","headquarters":"Switzerland"},{"id":3075761,"name":"Boot Barn Holdings Inc.","url":"https://wikirate.org/Boot_Barn_Holdings_Inc","headquarters":"California (United States)"},{"id":2624117,"name":"Geox SpA","url":"https://wikirate.org/Geox_SpA","headquarters":"Italy"},{"id":3098198,"name":"Hudson\'s Bay Company","url":"https://wikirate.org/Hudson_s_Bay_Company","headquarters":"Ontario, Canada"},{"id":57272,"name":"Swatch Group","url":"https://wikirate.org/Swatch_Group","headquarters":"Switzerland"},{"id":3624592,"name":"JD Sports Fashion plc","url":"https://wikirate.org/JD_Sports_Fashion_plc","headquarters":"United Kingdom"},{"id":44618,"name":"Sports Direct","url":"https://wikirate.org/Sports_Direct","headquarters":"United Kingdom"},{"id":3624482,"name":"Superdry plc","url":"https://wikirate.org/Superdry_plc","headquarters":"United Kingdom"},{"id":2632436,"name":"Children\'s Place Inc","url":"https://wikirate.org/Children_s_Place_Inc","headquarters":"New Jersey (United States)"},{"id":2623713,"name":"YOOX NET-A-PORTER Group SpA","url":"https://wikirate.org/YOOX_NET_A_PORTER_Group_SpA","headquarters":"Italy"},{"id":3624475,"name":"Brunello Cucinelli","url":"https://wikirate.org/Brunello_Cucinelli","headquarters":"Italy"},{"id":1173485,"name":"Li-Ning","url":"https://wikirate.org/Li_Ning","headquarters":"Beijing (China)"},{"id":3624461,"name":"TOD\'S","url":"https://wikirate.org/TOD_S","headquarters":"Italy"},{"id":3624440,"name":"Boohoo.com","url":"https://wikirate.org/Boohoo_com","headquarters":"United Kingdom"},{"id":3624468,"name":"Alpargatas - Havaianas","url":"https://wikirate.org/Alpargatas_Havaianas","headquarters":"Brazil"},{"id":3624718,"name":"Gerry Weber","url":"https://wikirate.org/Gerry_Weber","headquarters":"Germany"},{"id":3624454,"name":"Grendene","url":"https://wikirate.org/Grendene","headquarters":"Brazil"},{"id":48991,"name":"Chow Tai Fook","url":"https://wikirate.org/Chow_Tai_Fook","headquarters":"Hong Kong"},{"id":3624510,"name":"Cia Hering","url":"https://wikirate.org/Cia_Hering","headquarters":"Brazil"},{"id":3624496,"name":"United Arrows","url":"https://wikirate.org/United_Arrows","headquarters":"Japan"},{"id":3624517,"name":"Van de Velde","url":"https://wikirate.org/Van_de_Velde","headquarters":"Belgium"},{"id":2631100,"name":"Vipshop Holdings","url":"https://wikirate.org/Vipshop_Holdings","headquarters":"Guangdong (China)"},{"id":51397,"name":"JC Penney","url":"https://wikirate.org/JC_Penney","headquarters":"Texas (United States)"},{"id":3624433,"name":"Lao Feng Xiang Jewelry","url":"https://wikirate.org/Lao_Feng_Xiang_Jewelry","headquarters":"China"},{"id":3624447,"name":"Steve Madden","url":"https://wikirate.org/Steve_Madden","headquarters":"New York (United States)"},{"id":5294114,"name":"Onward Holdings","url":"https://wikirate.org/Onward_Holdings","headquarters":"Japan"},{"id":3624503,"name":"Metersbonwe","url":"https://wikirate.org/Metersbonwe","headquarters":"Shanghai (China)"},{"id":3624489,"name":"Aditya Birla Fashion & Retail Ltd","url":"https://wikirate.org/Aditya_Birla_Fashion_Retail_Ltd","headquarters":"India"},{"id":3624425,"name":"Semir","url":"https://wikirate.org/Semir","headquarters":"China"},{"id":5294189,"name":"Bosideng International Holdings Limited","url":"https://wikirate.org/Bosideng_International_Holdings_Limited","headquarters":"Shanghai (China)"},{"id":5408890,"name":"Canada Goose","url":"https://wikirate.org/Canada_Goose","headquarters":"Ontario, Canada"},{"id":5424735,"name":"Anta Sports Products","url":"https://wikirate.org/Anta_Sports_Products","headquarters":"Fujian (China)"}]');let sm=(()=>{class e{constructor(){this.companies=DFe,this.exploreMore=new ze(!1)}getCompany(n){return this.companies.find(r=>r.id===n)}getCompanies(){return this.companies.slice().sort((n,i)=>this.compare(n,i))}compare(n,i){return"All Companies"==n.name?-1:"All Companies"==i.name?1:n.name.localeCompare(i.name)}setExploreMore(){this.exploreMore.emit(!0),setTimeout(()=>{this.unsetExploreMore()},3e3)}unsetExploreMore(){this.exploreMore.emit(!1)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();const MFe=["addListener","removeListener"],NFe=["addEventListener","removeEventListener"],IFe=["on","off"];function qi(e,t,n,i){if(Tt(n)&&(i=n,n=void 0),i)return qi(e,t,n).pipe(LR(i));const[r,o]=function RFe(e){return Tt(e.addEventListener)&&Tt(e.removeEventListener)}(e)?NFe.map(s=>a=>e[s](t,a,n)):function kFe(e){return Tt(e.addListener)&&Tt(e.removeListener)}(e)?MFe.map(DQ(e,t)):function OFe(e){return Tt(e.on)&&Tt(e.off)}(e)?IFe.map(DQ(e,t)):[];if(!r&&FR(e))return Ai(s=>qi(s,t,n))(Hi(e));if(!r)throw new TypeError("Invalid event target");return new cn(s=>{const a=(...l)=>s.next(1o(a)})}function DQ(e,t){return n=>i=>e[n](t,i)}class FFe extends ar{constructor(t,n){super()}schedule(t,n=0){return this}}const RD={setInterval(e,t,...n){const{delegate:i}=RD;return i?.setInterval?i.setInterval(e,t,...n):setInterval(e,t,...n)},clearInterval(e){const{delegate:t}=RD;return(t?.clearInterval||clearInterval)(e)},delegate:void 0},SQ={now:()=>(SQ.delegate||Date).now(),delegate:void 0};class Sv{constructor(t,n=Sv.now){this.schedulerActionCtor=t,this.now=n}schedule(t,n=0,i){return new this.schedulerActionCtor(this,t).schedule(i,n)}}Sv.now=SQ.now;const $Fe=new class LFe extends Sv{constructor(t,n=Sv.now){super(t,n),this.actions=[],this._active=!1}flush(t){const{actions:n}=this;if(this._active)return void n.push(t);let i;this._active=!0;do{if(i=t.execute(t.state,t.delay))break}while(t=n.shift());if(this._active=!1,i){for(;t=n.shift();)t.unsubscribe();throw i}}}(class PFe extends FFe{constructor(t,n){super(t,n),this.scheduler=t,this.work=n,this.pending=!1}schedule(t,n=0){var i;if(this.closed)return this;this.state=t;const r=this.id,o=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(o,r,n)),this.pending=!0,this.delay=n,this.id=null!==(i=this.id)&&void 0!==i?i:this.requestAsyncId(o,this.id,n),this}requestAsyncId(t,n,i=0){return RD.setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,n,i=0){if(null!=i&&this.delay===i&&!1===this.pending)return n;null!=n&&RD.clearInterval(n)}execute(t,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(t,n);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,n){let r,i=!1;try{this.work(t)}catch(o){i=!0,r=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){const{id:t,scheduler:n}=this,{actions:i}=n;this.work=this.state=this.scheduler=null,this.pending=!1,Ww(i,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,super.unsubscribe()}}});const{isArray:jFe}=Array;function AQ(e){return 1===e.length&&jFe(e[0])?e[0]:e}function hF(...e){const t=uD(e),n=AQ(e);return n.length?new cn(i=>{let r=n.map(()=>[]),o=n.map(()=>!1);i.add(()=>{r=o=null});for(let s=0;!i.closed&&s{if(r[s].push(a),r.every(l=>l.length)){const l=r.map(c=>c.shift());i.next(t?t(...l):l),r.some((c,u)=>!c.length&&o[u])&&i.complete()}},()=>{o[s]=!0,!r[s].length&&i.complete()}));return()=>{r=o=null}}):jo}function pF(...e){const t=uD(e);return ei((n,i)=>{const r=e.length,o=new Array(r);let s=e.map(()=>!1),a=!1;for(let l=0;l{o[l]=c,!a&&!s[l]&&(s[l]=!0,(a=s.every(_c))&&(s=null))},Iy));n.subscribe(yn(i,l=>{if(a){const c=[l,...o];i.next(t?t(...c):c)}}))})}let IQ=(()=>{class e{constructor(n,i){this._renderer=n,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(n,i){this._renderer.setProperty(this._elementRef.nativeElement,n,i)}registerOnTouched(n){this.onTouched=n}registerOnChange(n){this.onChange=n}setDisabledState(n){this.setProperty("disabled",n)}static{this.\u0275fac=function(i){return new(i||e)(ee(aa),ee(Gt))}}static{this.\u0275dir=be({type:e})}}return e})(),Xf=(()=>{class e extends IQ{static{this.\u0275fac=(()=>{let n;return function(r){return(n||(n=fn(e)))(r||e)}})()}static{this.\u0275dir=be({type:e,features:[xt]})}}return e})();const Ss=new _e(""),QFe={provide:Ss,useExisting:Pt(()=>gF),multi:!0},JFe=new _e("");let gF=(()=>{class e extends IQ{constructor(n,i,r){super(n,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function ZFe(){const e=Rc()?Rc().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}())}writeValue(n){this.setProperty("value",n??"")}_handleInput(n){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(n)}_compositionStart(){this._composing=!0}_compositionEnd(n){this._composing=!1,this._compositionMode&&this.onChange(n)}static{this.\u0275fac=function(i){return new(i||e)(ee(aa),ee(Gt),ee(JFe,8))}}static{this.\u0275dir=be({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){1&i&&nt("input",function(s){return r._handleInput(s.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(s){return r._compositionEnd(s.target.value)})},features:[on([QFe]),xt]})}}return e})();const Yi=new _e(""),Ku=new _e("");function UQ(e){return null!=e}function zQ(e){return G0(e)?si(e):e}function HQ(e){let t={};return e.forEach(n=>{t=null!=n?{...t,...n}:t}),0===Object.keys(t).length?null:t}function GQ(e,t){return t.map(n=>n(e))}function WQ(e){return e.map(t=>function tPe(e){return!e.validate}(t)?t:n=>t.validate(n))}function mF(e){return null!=e?function qQ(e){if(!e)return null;const t=e.filter(UQ);return 0==t.length?null:function(n){return HQ(GQ(n,t))}}(WQ(e)):null}function _F(e){return null!=e?function YQ(e){if(!e)return null;const t=e.filter(UQ);return 0==t.length?null:function(n){return function KFe(...e){const t=uD(e),{args:n,keys:i}=hX(e),r=new cn(o=>{const{length:s}=n;if(!s)return void o.complete();const a=new Array(s);let l=s,c=s;for(let u=0;u{d||(d=!0,c--),a[u]=f},()=>l--,void 0,()=>{(!l||!d)&&(c||o.next(i?pX(i,a):a),o.complete())}))}});return t?r.pipe(LR(t)):r}(GQ(n,t).map(zQ)).pipe(at(HQ))}}(WQ(e)):null}function KQ(e,t){return null===e?[t]:Array.isArray(e)?[...e,t]:[e,t]}function yF(e){return e?Array.isArray(e)?e:[e]:[]}function PD(e,t){return Array.isArray(e)?e.includes(t):e===t}function ZQ(e,t){const n=yF(t);return yF(e).forEach(r=>{PD(n,r)||n.push(r)}),n}function JQ(e,t){return yF(t).filter(n=>!PD(e,n))}class eZ{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=mF(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=_F(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,n){return!!this.control&&this.control.hasError(t,n)}getError(t,n){return this.control?this.control.getError(t,n):null}}class Pr extends eZ{get formDirective(){return null}get path(){return null}}class Xu extends eZ{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class tZ{constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}}let am=(()=>{class e extends tZ{constructor(n){super(n)}static{this.\u0275fac=function(i){return new(i||e)(ee(Xu,2))}}static{this.\u0275dir=be({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){2&i&&hn("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[xt]})}}return e})();const Tv="VALID",$D="INVALID",lm="PENDING",xv="DISABLED";class cm{}class iZ extends cm{constructor(t,n){super(),this.value=t,this.source=n}}class wF extends cm{constructor(t,n){super(),this.pristine=t,this.source=n}}class EF extends cm{constructor(t,n){super(),this.touched=t,this.source=n}}class BD extends cm{constructor(t,n){super(),this.status=t,this.source=n}}function jD(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}class SF{constructor(t,n){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=X0(()=>this.statusReactive()),this.statusReactive=wg(void 0),this._pristine=X0(()=>this.pristineReactive()),this.pristineReactive=wg(!0),this._touched=X0(()=>this.touchedReactive()),this.touchedReactive=wg(!1),this._events=new tn,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(n)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return vl(this.statusReactive)}set status(t){vl(()=>this.statusReactive.set(t))}get valid(){return this.status===Tv}get invalid(){return this.status===$D}get pending(){return this.status==lm}get disabled(){return this.status===xv}get enabled(){return this.status!==xv}get pristine(){return vl(this.pristineReactive)}set pristine(t){vl(()=>this.pristineReactive.set(t))}get dirty(){return!this.pristine}get touched(){return vl(this.touchedReactive)}set touched(t){vl(()=>this.touchedReactive.set(t))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(ZQ(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(ZQ(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(JQ(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(JQ(t,this._rawAsyncValidators))}hasValidator(t){return PD(this._rawValidators,t)}hasAsyncValidator(t){return PD(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){const n=!1===this.touched;this.touched=!0;const i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched({...t,sourceControl:i}),n&&!1!==t.emitEvent&&this._events.next(new EF(!0,i))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(n=>n.markAllAsTouched(t))}markAsUntouched(t={}){const n=!0===this.touched;this.touched=!1,this._pendingTouched=!1;const i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),n&&!1!==t.emitEvent&&this._events.next(new EF(!1,i))}markAsDirty(t={}){const n=!0===this.pristine;this.pristine=!1;const i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty({...t,sourceControl:i}),n&&!1!==t.emitEvent&&this._events.next(new wF(!1,i))}markAsPristine(t={}){const n=!1===this.pristine;this.pristine=!0,this._pendingDirty=!1;const i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),n&&!1!==t.emitEvent&&this._events.next(new wF(!0,i))}markAsPending(t={}){this.status=lm;const n=t.sourceControl??this;!1!==t.emitEvent&&(this._events.next(new BD(this.status,n)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending({...t,sourceControl:n})}disable(t={}){const n=this._parentMarkedDirty(t.onlySelf);this.status=xv,this.errors=null,this._forEachChild(r=>{r.disable({...t,onlySelf:!0})}),this._updateValue();const i=t.sourceControl??this;!1!==t.emitEvent&&(this._events.next(new iZ(this.value,i)),this._events.next(new BD(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...t,skipPristineCheck:n},this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){const n=this._parentMarkedDirty(t.onlySelf);this.status=Tv,this._forEachChild(i=>{i.enable({...t,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors({...t,skipPristineCheck:n},this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,n){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},n),this._parent._updateTouched({},n))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){const i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Tv||this.status===lm)&&this._runAsyncValidator(i,t.emitEvent)}const n=t.sourceControl??this;!1!==t.emitEvent&&(this._events.next(new iZ(this.value,n)),this._events.next(new BD(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity({...t,sourceControl:n})}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(n=>n._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?xv:Tv}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,n){if(this.asyncValidator){this.status=lm,this._hasOwnPendingAsyncValidator={emitEvent:!1!==n};const i=zQ(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:n,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();const t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,n={}){this.errors=t,this._updateControlsErrors(!1!==n.emitEvent,this,n.shouldHaveEmitted)}get(t){let n=t;return null==n||(Array.isArray(n)||(n=n.split(".")),0===n.length)?null:n.reduce((i,r)=>i&&i._find(r),this)}getError(t,n){const i=n?this.get(n):this;return i&&i.errors?i.errors[t]:null}hasError(t,n){return!!this.getError(t,n)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,n,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new BD(this.status,n)),this._parent&&this._parent._updateControlsErrors(t,n,i)}_initObservables(){this.valueChanges=new ze,this.statusChanges=new ze}_calculateStatus(){return this._allControlsDisabled()?xv:this.errors?$D:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(lm)?lm:this._anyControlsHaveStatus($D)?$D:Tv}_anyControlsHaveStatus(t){return this._anyControls(n=>n.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,n){const i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,n),r&&this._events.next(new wF(this.pristine,n))}_updateTouched(t={},n){this.touched=this._anyControlsTouched(),this._events.next(new EF(this.touched,n)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,n)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){jD(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=function cPe(e){return Array.isArray(e)?mF(e):e||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function uPe(e){return Array.isArray(e)?_F(e):e||null}(this._rawAsyncValidators)}}const um=new _e("CallSetDisabledState",{providedIn:"root",factory:()=>VD}),VD="always";function Av(e,t,n=VD){(function xF(e,t){const n=function XQ(e){return e._rawValidators}(e);null!==t.validator?e.setValidators(KQ(n,t.validator)):"function"==typeof n&&e.setValidators([n]);const i=function QQ(e){return e._rawAsyncValidators}(e);null!==t.asyncValidator?e.setAsyncValidators(KQ(i,t.asyncValidator)):"function"==typeof i&&e.setAsyncValidators([i]);const r=()=>e.updateValueAndValidity();HD(t._rawValidators,r),HD(t._rawAsyncValidators,r)})(e,t),t.valueAccessor.writeValue(e.value),(e.disabled||"always"===n)&&t.valueAccessor.setDisabledState?.(e.disabled),function hPe(e,t){t.valueAccessor.registerOnChange(n=>{e._pendingValue=n,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&sZ(e,t)})}(e,t),function gPe(e,t){const n=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};e.registerOnChange(n),t._registerOnDestroy(()=>{e._unregisterOnChange(n)})}(e,t),function pPe(e,t){t.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&sZ(e,t),"submit"!==e.updateOn&&e.markAsTouched()})}(e,t),function fPe(e,t){if(t.valueAccessor.setDisabledState){const n=i=>{t.valueAccessor.setDisabledState(i)};e.registerOnDisabledChange(n),t._registerOnDestroy(()=>{e._unregisterOnDisabledChange(n)})}}(e,t)}function HD(e,t){e.forEach(n=>{n.registerOnValidatorChange&&n.registerOnValidatorChange(t)})}function sZ(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function cZ(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function uZ(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}Promise.resolve();const dZ=class extends SF{constructor(t=null,n,i){super(function CF(e){return(jD(e)?e.validators:e)||null}(n),function DF(e,t){return(jD(t)?t.asyncValidators:e)||null}(i,n)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(n),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),jD(n)&&(n.nonNullable||n.initialValueIsDefault)&&(this.defaultValue=uZ(t)?t.value:t)}setValue(t,n={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==n.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==n.emitViewToModelChange)),this.updateValueAndValidity(n)}patchValue(t,n={}){this.setValue(t,n)}reset(t=this.defaultValue,n={}){this._applyFormState(t),this.markAsPristine(n),this.markAsUntouched(n),this.setValue(this.value,n),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){cZ(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){cZ(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(t){uZ(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},CPe={provide:Xu,useExisting:Pt(()=>Qf)},pZ=Promise.resolve();let Qf=(()=>{class e extends Xu{constructor(n,i,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this.control=new dZ,this._registered=!1,this.name="",this.update=new ze,this._parent=n,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=function NF(e,t){if(!t)return null;let n,i,r;return Array.isArray(t),t.forEach(o=>{o.constructor===gF?n=o:function yPe(e){return Object.getPrototypeOf(e.constructor)===Xf}(o)?i=o:r=o}),r||i||n||null}(0,o)}ngOnChanges(n){if(this._checkForErrors(),!this._registered||"name"in n){if(this._registered&&(this._checkName(),this.formDirective)){const i=n.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in n&&this._updateDisabled(n),function MF(e,t){if(!e.hasOwnProperty("model"))return!1;const n=e.model;return!!n.isFirstChange()||!Object.is(t,n.currentValue)}(n,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Av(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(n){pZ.then(()=>{this.control.setValue(n,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(n){const i=n.isDisabled.currentValue,r=0!==i&&Gg(i);pZ.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(n){return this._parent?function UD(e,t){return[...t.path,e]}(n,this._parent):[n]}static{this.\u0275fac=function(i){return new(i||e)(ee(Pr,9),ee(Yi,10),ee(Ku,10),ee(Ss,10),ee(ha,8),ee(um,8))}}static{this.\u0275dir=be({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[on([CPe]),xt,Ui]})}}return e})();const RPe={provide:Ss,useExisting:Pt(()=>Qu),multi:!0};function EZ(e,t){return null==e?`${t}`:(t&&"object"==typeof t&&(t="Object"),`${e}: ${t}`.slice(0,50))}let Qu=(()=>{class e extends Xf{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(n){this._compareWith=n}writeValue(n){this.value=n;const r=EZ(this._getOptionId(n),n);this.setProperty("value",r)}registerOnChange(n){this.onChange=i=>{this.value=this._getOptionValue(i),n(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(n){for(const i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),n))return i;return null}_getOptionValue(n){const i=function FPe(e){return e.split(":")[0]}(n);return this._optionMap.has(i)?this._optionMap.get(i):n}static{this.\u0275fac=(()=>{let n;return function(r){return(n||(n=fn(e)))(r||e)}})()}static{this.\u0275dir=be({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){1&i&&nt("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[on([RPe]),xt]})}}return e})(),dm=(()=>{class e{constructor(n,i,r){this._element=n,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(n){null!=this._select&&(this._select._optionMap.set(this.id,n),this._setElementValue(EZ(this.id,n)),this._select.writeValue(this._select.value))}set value(n){this._setElementValue(n),this._select&&this._select.writeValue(this._select.value)}_setElementValue(n){this._renderer.setProperty(this._element.nativeElement,"value",n)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static{this.\u0275fac=function(i){return new(i||e)(ee(Gt),ee(aa),ee(Qu,9))}}static{this.\u0275dir=be({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}}return e})();const PPe={provide:Ss,useExisting:Pt(()=>FF),multi:!0};function CZ(e,t){return null==e?`${t}`:("string"==typeof t&&(t=`'${t}'`),t&&"object"==typeof t&&(t="Object"),`${e}: ${t}`.slice(0,50))}let FF=(()=>{class e extends Xf{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(n){this._compareWith=n}writeValue(n){let i;if(this.value=n,Array.isArray(n)){const r=n.map(o=>this._getOptionId(o));i=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(n){this.onChange=i=>{const r=[],o=i.selectedOptions;if(void 0!==o){const s=o;for(let a=0;a{let n;return function(r){return(n||(n=fn(e)))(r||e)}})()}static{this.\u0275dir=be({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){1&i&&nt("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[on([PPe]),xt]})}}return e})(),fm=(()=>{class e{constructor(n,i,r){this._element=n,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(n){null!=this._select&&(this._value=n,this._setElementValue(CZ(this.id,n)),this._select.writeValue(this._select.value))}set value(n){this._select?(this._value=n,this._setElementValue(CZ(this.id,n)),this._select.writeValue(this._select.value)):this._setElementValue(n)}_setElementValue(n){this._renderer.setProperty(this._element.nativeElement,"value",n)}_setSelected(n){this._renderer.setProperty(this._element.nativeElement,"selected",n)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static{this.\u0275fac=function(i){return new(i||e)(ee(Gt),ee(aa),ee(FF,9))}}static{this.\u0275dir=be({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}}return e})(),WPe=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),YPe=(()=>{class e{static withConfig(n){return{ngModule:e,providers:[{provide:um,useValue:n.callSetDisabledState??VD}]}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({imports:[WPe]})}}return e})();var KPe={left:"right",right:"left",bottom:"top",top:"bottom"};function WD(e){return e.replace(/left|right|bottom|top/g,function(t){return KPe[t]})}function Sl(e){return e.split("-")[0]}var XPe={start:"end",end:"start"};function OZ(e){return e.replace(/start|end/g,function(t){return XPe[t]})}var Lr="top",zo="bottom",Ho="right",$r="left",qD="auto",hm=[Lr,zo,Ho,$r],Jf="start",pm="end",RZ="clippingParents",LF="viewport",gm="popper",FZ="reference",$F=hm.reduce(function(e,t){return e.concat([t+"-"+Jf,t+"-"+pm])},[]),BF=[].concat(hm,[qD]).reduce(function(e,t){return e.concat([t,t+"-"+Jf,t+"-"+pm])},[]),PZ="beforeRead",LZ="read",$Z="afterRead",BZ="beforeMain",jZ="main",VZ="afterMain",UZ="beforeWrite",zZ="write",HZ="afterWrite",GZ=[PZ,LZ,$Z,BZ,jZ,VZ,UZ,zZ,HZ];function Go(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function eh(e){return e instanceof Go(e).Element||e instanceof Element}function Ts(e){return e instanceof Go(e).HTMLElement||e instanceof HTMLElement}function jF(e){return!(typeof ShadowRoot>"u")&&(e instanceof Go(e).ShadowRoot||e instanceof ShadowRoot)}function Zu(e){return((eh(e)?e.ownerDocument:e.document)||window.document).documentElement}var th=Math.max,YD=Math.min,mm=Math.round;function VF(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function WZ(){return!/^((?!chrome|android).)*safari/i.test(VF())}function _m(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var i=e.getBoundingClientRect(),r=1,o=1;t&&Ts(e)&&(r=e.offsetWidth>0&&mm(i.width)/e.offsetWidth||1,o=e.offsetHeight>0&&mm(i.height)/e.offsetHeight||1);var a=(eh(e)?Go(e):window).visualViewport,l=!WZ()&&n,c=(i.left+(l&&a?a.offsetLeft:0))/r,u=(i.top+(l&&a?a.offsetTop:0))/o,d=i.width/r,f=i.height/o;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function UF(e){var t=Go(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function zF(e){return _m(Zu(e)).left+UF(e).scrollLeft}function Vc(e){return Go(e).getComputedStyle(e)}function Tl(e){return e?(e.nodeName||"").toLowerCase():null}function KD(e){return"html"===Tl(e)?e:e.assignedSlot||e.parentNode||(jF(e)?e.host:null)||Zu(e)}function HF(e){var t=Vc(e);return/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function qZ(e){return["html","body","#document"].indexOf(Tl(e))>=0?e.ownerDocument.body:Ts(e)&&HF(e)?e:qZ(KD(e))}function Nv(e,t){var n;void 0===t&&(t=[]);var i=qZ(e),r=i===(null==(n=e.ownerDocument)?void 0:n.body),o=Go(i),s=r?[o].concat(o.visualViewport||[],HF(i)?i:[]):i,a=t.concat(s);return r?a:a.concat(Nv(KD(s)))}function JPe(e){return["table","td","th"].indexOf(Tl(e))>=0}function YZ(e){return Ts(e)&&"fixed"!==Vc(e).position?e.offsetParent:null}function Iv(e){for(var t=Go(e),n=YZ(e);n&&JPe(n)&&"static"===Vc(n).position;)n=YZ(n);return n&&("html"===Tl(n)||"body"===Tl(n)&&"static"===Vc(n).position)?t:n||function eLe(e){var t=/firefox/i.test(VF());if(/Trident/i.test(VF())&&Ts(e)&&"fixed"===Vc(e).position)return null;var r=KD(e);for(jF(r)&&(r=r.host);Ts(r)&&["html","body"].indexOf(Tl(r))<0;){var o=Vc(r);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return r;r=r.parentNode}return null}(e)||t}function KZ(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&jF(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function GF(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function XZ(e,t,n){return t===LF?GF(function QPe(e,t){var n=Go(e),i=Zu(e),r=n.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=WZ();(c||!c&&"fixed"===t)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+zF(e),y:l}}(e,n)):eh(t)?function tLe(e,t){var n=_m(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):GF(function ZPe(e){var t,n=Zu(e),i=UF(e),r=null==(t=e.ownerDocument)?void 0:t.body,o=th(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=th(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+zF(e),l=-i.scrollTop;return"rtl"===Vc(r||n).direction&&(a+=th(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(Zu(e)))}function ym(e){return e.split("-")[1]}function WF(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function QZ(e){var l,t=e.reference,n=e.element,i=e.placement,r=i?Sl(i):null,o=i?ym(i):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2;switch(r){case Lr:l={x:s,y:t.y-n.height};break;case zo:l={x:s,y:t.y+t.height};break;case Ho:l={x:t.x+t.width,y:a};break;case $r:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=r?WF(r):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case Jf:l[c]=l[c]-(t[u]/2-n[u]/2);break;case pm:l[c]=l[c]+(t[u]/2-n[u]/2)}}return l}function JZ(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function eJ(e,t){return t.reduce(function(n,i){return n[i]=e,n},{})}function vm(e,t){void 0===t&&(t={});var i=t.placement,r=void 0===i?e.placement:i,o=t.strategy,s=void 0===o?e.strategy:o,a=t.boundary,l=void 0===a?RZ:a,c=t.rootBoundary,u=void 0===c?LF:c,d=t.elementContext,f=void 0===d?gm:d,h=t.altBoundary,p=void 0!==h&&h,g=t.padding,m=void 0===g?0:g,_=JZ("number"!=typeof m?m:eJ(m,hm)),v=e.rects.popper,b=e.elements[p?f===gm?FZ:gm:f],w=function iLe(e,t,n,i){var r="clippingParents"===t?function nLe(e){var t=Nv(KD(e)),i=["absolute","fixed"].indexOf(Vc(e).position)>=0&&Ts(e)?Iv(e):e;return eh(i)?t.filter(function(r){return eh(r)&&KZ(r,i)&&"body"!==Tl(r)}):[]}(e):[].concat(t),o=[].concat(r,[n]),a=o.reduce(function(l,c){var u=XZ(e,c,i);return l.top=th(u.top,l.top),l.right=YD(u.right,l.right),l.bottom=YD(u.bottom,l.bottom),l.left=th(u.left,l.left),l},XZ(e,o[0],i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(eh(b)?b:b.contextElement||Zu(e.elements.popper),l,u,s),C=_m(e.elements.reference),E=QZ({reference:C,element:v,strategy:"absolute",placement:r}),D=GF(Object.assign({},v,E)),M=f===gm?D:C,k={top:w.top-M.top+_.top,bottom:M.bottom-w.bottom+_.bottom,left:w.left-M.left+_.left,right:M.right-w.right+_.right},R=e.modifiersData.offset;if(f===gm&&R){var F=R[r];Object.keys(k).forEach(function(P){var T=[Ho,zo].indexOf(P)>=0?1:-1,S=[Lr,zo].indexOf(P)>=0?"y":"x";k[P]+=F[S]*T})}return k}const qF={name:"flip",enabled:!0,phase:"main",fn:function sLe(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var r=n.mainAxis,o=void 0===r||r,s=n.altAxis,a=void 0===s||s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,p=void 0===h||h,g=n.allowedAutoPlacements,m=t.options.placement,_=Sl(m),v=l||(_!==m&&p?function oLe(e){if(Sl(e)===qD)return[];var t=WD(e);return[OZ(e),t,OZ(t)]}(m):[WD(m)]),b=[m].concat(v).reduce(function(j,H){return j.concat(Sl(H)===qD?function rLe(e,t){void 0===t&&(t={});var r=t.boundary,o=t.rootBoundary,s=t.padding,a=t.flipVariations,l=t.allowedAutoPlacements,c=void 0===l?BF:l,u=ym(t.placement),d=u?a?$F:$F.filter(function(p){return ym(p)===u}):hm,f=d.filter(function(p){return c.indexOf(p)>=0});0===f.length&&(f=d);var h=f.reduce(function(p,g){return p[g]=vm(e,{placement:g,boundary:r,rootBoundary:o,padding:s})[Sl(g)],p},{});return Object.keys(h).sort(function(p,g){return h[p]-h[g]})}(t,{placement:H,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:g}):H)},[]),w=t.rects.reference,C=t.rects.popper,E=new Map,D=!0,M=b[0],k=0;k=0,S=T?"width":"height",x=vm(t,{placement:R,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),I=T?P?Ho:$r:P?zo:Lr;w[S]>C[S]&&(I=WD(I));var A=WD(I),N=[];if(o&&N.push(x[F]<=0),a&&N.push(x[I]<=0,x[A]<=0),N.every(function(j){return j})){M=R,D=!1;break}E.set(R,N)}if(D)for(var $=function(H){var oe=b.find(function(Y){var ue=E.get(Y);if(ue)return ue.slice(0,H).every(function(W){return W})});if(oe)return M=oe,"break"},B=p?3:1;B>0&&"break"!==$(B);B--);t.placement!==M&&(t.modifiersData[i]._skip=!0,t.placement=M,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function kv(e,t,n){return th(e,YD(t,n))}function YF(e){var t=_m(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}const KF={name:"preventOverflow",enabled:!0,phase:"main",fn:function cLe(e){var t=e.state,n=e.options,i=e.name,r=n.mainAxis,o=void 0===r||r,s=n.altAxis,a=void 0!==s&&s,f=n.tether,h=void 0===f||f,p=n.tetherOffset,g=void 0===p?0:p,m=vm(t,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),_=Sl(t.placement),y=ym(t.placement),v=!y,b=WF(_),w=function aLe(e){return"x"===e?"y":"x"}(b),C=t.modifiersData.popperOffsets,E=t.rects.reference,D=t.rects.popper,M="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,k="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(C){if(o){var P,T="y"===b?Lr:$r,S="y"===b?zo:Ho,x="y"===b?"height":"width",I=C[b],A=I+m[T],N=I-m[S],O=h?-D[x]/2:0,$=y===Jf?E[x]:D[x],B=y===Jf?-D[x]:-E[x],V=t.elements.arrow,j=h&&V?YF(V):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},oe=H[T],Y=H[S],ue=kv(0,E[x],j[x]),W=v?E[x]/2-O-ue-oe-k.mainAxis:$-ue-oe-k.mainAxis,ne=v?-E[x]/2+O+ue+Y+k.mainAxis:B+ue+Y+k.mainAxis,ie=t.elements.arrow&&Iv(t.elements.arrow),G=ie?"y"===b?ie.clientTop||0:ie.clientLeft||0:0,ye=null!=(P=R?.[b])?P:0,Ue=I+ne-ye,Te=kv(h?YD(A,I+W-ye-G):A,I,h?th(N,Ue):N);C[b]=Te,F[b]=Te-I}if(a){var Oe,_n=C[w],Rn="y"===w?"height":"width",Jn=_n+m["x"===b?Lr:$r],Up=_n-m["x"===b?zo:Ho],Tr=-1!==[Lr,$r].indexOf(_),nl=null!=(Oe=R?.[w])?Oe:0,Fw=Tr?Jn:_n-E[Rn]-D[Rn]-nl+k.altAxis,Pw=Tr?_n+E[Rn]+D[Rn]-nl-k.altAxis:Up,Lw=h&&Tr?function lLe(e,t,n){var i=kv(e,t,n);return i>n?n:i}(Fw,_n,Pw):kv(h?Fw:Jn,_n,h?Pw:Up);C[w]=Lw,F[w]=Lw-_n}t.modifiersData[i]=F}},requiresIfExists:["offset"]},XF={name:"arrow",enabled:!0,phase:"main",fn:function dLe(e){var t,n=e.state,i=e.name,r=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Sl(n.placement),l=WF(a),u=[$r,Ho].indexOf(a)>=0?"height":"width";if(o&&s){var d=function(t,n){return JZ("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:eJ(t,hm))}(r.padding,n),f=YF(o),h="y"===l?Lr:$r,p="y"===l?zo:Ho,g=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],m=s[l]-n.rects.reference[l],_=Iv(o),y=_?"y"===l?_.clientHeight||0:_.clientWidth||0:0,C=y/2-f[u]/2+(g/2-m/2),E=kv(d[h],C,y-f[u]-d[p]);n.modifiersData[i]=((t={})[l]=E,t.centerOffset=E-C,t)}},effect:function fLe(e){var t=e.state,i=e.options.element,r=void 0===i?"[data-popper-arrow]":i;null!=r&&("string"==typeof r&&!(r=t.elements.popper.querySelector(r))||KZ(t.elements.popper,r)&&(t.elements.arrow=r))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function mLe(e,t,n){void 0===n&&(n=!1);var i=Ts(t),r=Ts(t)&&function gLe(e){var t=e.getBoundingClientRect(),n=mm(t.width)/e.offsetWidth||1,i=mm(t.height)/e.offsetHeight||1;return 1!==n||1!==i}(t),o=Zu(t),s=_m(e,r,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&(("body"!==Tl(t)||HF(o))&&(a=function pLe(e){return e!==Go(e)&&Ts(e)?function hLe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}(e):UF(e)}(t)),Ts(t)?((l=_m(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=zF(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function _Le(e){var t=new Map,n=new Set,i=[];function r(o){n.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&r(l)}}),i.push(o)}return e.forEach(function(o){t.set(o.name,o)}),e.forEach(function(o){n.has(o.name)||r(o)}),i}function vLe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}var tJ={placement:"bottom",modifiers:[],strategy:"absolute"};function nJ(){for(var e=arguments.length,t=new Array(e),n=0;n=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[$r,Ho].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(d,t.rects,o),u},{}),a=s[t.placement],c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=a.x,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=s}},kLe=["*"],l3e=["dialog"],sJ={animation:!0,transitionTimerDelayMs:5};let ZD=(()=>{class e{constructor(){this.animation=sJ.animation}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function bm(e){return"string"==typeof e}function nh(e){return null!=e}function wm(e){return(e||document.body).getBoundingClientRect()}const t$e=()=>{},{transitionTimerDelayMs:n$e}=sJ,Ov=new Map,xs=(e,t,n,i)=>{let r=i.context||{};const o=Ov.get(t);if(o)switch(i.runningTransition){case"continue":return jo;case"stop":e.run(()=>o.transition$.complete()),r=Object.assign(o.context,r),Ov.delete(t)}const s=n(t,i.animation,r)||t$e;if(!i.animation||"none"===window.getComputedStyle(t).transitionProperty)return e.run(()=>s()),Ge(void 0).pipe(function e$e(e){return t=>new cn(n=>t.subscribe({next:s=>e.run(()=>n.next(s)),error:s=>e.run(()=>n.error(s)),complete:()=>e.run(()=>n.complete())}))}(e));const a=new tn,l=new tn,c=a.pipe(function zFe(...e){return t=>sv(t,Ge(...e))}(!0));Ov.set(t,{transition$:a,complete:()=>{l.next(),l.complete()},context:r});const u=function Q3e(e){const{transitionDelay:t,transitionDuration:n}=window.getComputedStyle(e);return 1e3*(parseFloat(t)+parseFloat(n))}(t);return e.runOutsideAngular(()=>{const d=qi(t,"transitionend").pipe(Wi(c),Wn(({target:h})=>h===t));(function MQ(...e){return 1===(e=AQ(e)).length?Hi(e[0]):new cn(function VFe(e){return t=>{let n=[];for(let i=0;n&&!t.closed&&i{if(n){for(let o=0;o{let o=function BFe(e){return e instanceof Date&&!isNaN(e)}(e)?+e-n.now():e;o<0&&(o=0);let s=0;return n.schedule(function(){r.closed||(r.next(s++),0<=i?this.schedule(void 0,i):r.complete())},o)})}(u+n$e).pipe(Wi(c)),d,l).pipe(Wi(c)).subscribe(()=>{Ov.delete(t),e.run(()=>{s(),a.next(),a.complete()})})}),a.asObservable()};let hJ=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),pJ=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),_J=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),yJ=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})();typeof navigator<"u"&&navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent));const SJ=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function TJ(e){const t=Array.from(e.querySelectorAll(SJ)).filter(n=>-1!==n.tabIndex);return[t[0],t[t.length-1]]}new Date(1882,10,12),new Date(2174,10,25);let UJ=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),HJ=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),oBe=(()=>{class e{constructor(){this._ngbConfig=L(ZD),this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(n){this._animation=n}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();class ah{constructor(t,n,i){this.nodes=t,this.viewRef=n,this.componentRef=i}}let sBe=(()=>{class e{constructor(){this._document=L(Ln)}hide(){const n=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),i=this._document.body,r=i.style,{overflow:o,paddingRight:s}=r;if(n>0){const a=parseFloat(window.getComputedStyle(i).paddingRight);r.paddingRight=`${a+n}px`}return r.overflow="hidden",()=>{n>0&&(r.paddingRight=s),r.overflow=o}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),aBe=(()=>{class e{constructor(){this._nativeElement=L(Gt).nativeElement,this._zone=L(ct),this._injector=L(nn)}ngOnInit(){$u(()=>xs(this._zone,this._nativeElement,(n,i)=>{i&&wm(n),n.classList.add("show")},{animation:this.animation,runningTransition:"continue"}),{injector:this._injector,phase:ys.MixedReadWrite})}hide(){return xs(this._zone,this._nativeElement,({classList:n})=>n.remove("show"),{animation:this.animation,runningTransition:"stop"})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=Cn({type:e,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1055"],hostVars:6,hostBindings:function(i,r){2&i&&(I0("modal-backdrop"+(r.backdropClass?" "+r.backdropClass:"")),hn("show",!r.animation)("fade",r.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},standalone:!0,features:[da],decls:0,vars:0,template:function(i,r){},encapsulation:2})}}return e})();class GJ{update(t){}close(t){}dismiss(t){}}const lBe=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","scrollable","size","windowClass","modalDialogClass"],cBe=["animation","backdropClass"];class uBe{_applyWindowOptions(t,n){lBe.forEach(i=>{nh(n[i])&&(t[i]=n[i])})}_applyBackdropOptions(t,n){cBe.forEach(i=>{nh(n[i])&&(t[i]=n[i])})}update(t){this._applyWindowOptions(this._windowCmptRef.instance,t),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._applyBackdropOptions(this._backdropCmptRef.instance,t)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(Wi(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(Wi(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}constructor(t,n,i,r){this._windowCmptRef=t,this._contentRef=n,this._backdropCmptRef=i,this._beforeDismiss=r,this._closed=new tn,this._dismissed=new tn,this._hidden=new tn,t.instance.dismissEvent.subscribe(o=>{this.dismiss(o)}),this.result=new Promise((o,s)=>{this._resolve=o,this._reject=s}),this.result.then(null,()=>{})}close(t){this._windowCmptRef&&(this._closed.next(t),this._resolve(t),this._removeModalElements())}_dismiss(t){this._dismissed.next(t),this._reject(t),this._removeModalElements()}dismiss(t){if(this._windowCmptRef)if(this._beforeDismiss){const n=this._beforeDismiss();!function aJ(e){return e&&e.then}(n)?!1!==n&&this._dismiss(t):n.then(i=>{!1!==i&&this._dismiss(t)},()=>{})}else this._dismiss(t)}_removeModalElements(){const t=this._windowCmptRef.instance.hide(),n=this._backdropCmptRef?this._backdropCmptRef.instance.hide():Ge(void 0);t.subscribe(()=>{const{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),this._contentRef?.viewRef?.destroy(),this._windowCmptRef=null,this._contentRef=null}),n.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),hF(t,n).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var mP=function(e){return e[e.BACKDROP_CLICK=0]="BACKDROP_CLICK",e[e.ESC=1]="ESC",e}(mP||{});let dBe=(()=>{class e{constructor(){this._document=L(Ln),this._elRef=L(Gt),this._zone=L(ct),this._injector=L(nn),this._closed$=new tn,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new ze,this.shown=new tn,this.hidden=new tn}get fullscreenClass(){return!0===this.fullscreen?" modal-fullscreen":bm(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(n){this.dismissEvent.emit(n)}ngOnInit(){this._elWithFocus=this._document.activeElement,$u(()=>this._show(),{injector:this._injector,phase:ys.MixedReadWrite})}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:n}=this._elRef,i={animation:this.animation,runningTransition:"stop"},s=hF(xs(this._zone,n,()=>n.classList.remove("show"),i),xs(this._zone,this._dialogEl.nativeElement,()=>{},i));return s.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),s}_show(){const n={animation:this.animation,runningTransition:"continue"};hF(xs(this._zone,this._elRef.nativeElement,(o,s)=>{s&&wm(o),o.classList.add("show")},n),xs(this._zone,this._dialogEl.nativeElement,()=>{},n)).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:n}=this._elRef;this._zone.runOutsideAngular(()=>{qi(n,"keydown").pipe(Wi(this._closed$),Wn(r=>"Escape"===r.key)).subscribe(r=>{this.keyboard?requestAnimationFrame(()=>{r.defaultPrevented||this._zone.run(()=>this.dismiss(mP.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let i=!1;qi(this._dialogEl.nativeElement,"mousedown").pipe(Wi(this._closed$),Gi(()=>i=!1),Es(()=>qi(n,"mouseup").pipe(Wi(this._closed$),Cs(1))),Wn(({target:r})=>n===r)).subscribe(()=>{i=!0}),qi(n,"click").pipe(Wi(this._closed$)).subscribe(({target:r})=>{n===r&&("static"===this.backdrop?this._bumpBackdrop():!0===this.backdrop&&!i&&this._zone.run(()=>this.dismiss(mP.BACKDROP_CLICK))),i=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:n}=this._elRef;if(!n.contains(document.activeElement)){const i=n.querySelector("[ngbAutofocus]"),r=TJ(n)[0];(i||r||n).focus()}}_restoreFocus(){const n=this._document.body,i=this._elWithFocus;let r;r=i&&i.focus&&n.contains(i)?i:n,this._zone.runOutsideAngular(()=>{setTimeout(()=>r.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&xs(this._zone,this._elRef.nativeElement,({classList:n})=>(n.add("modal-static"),()=>n.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=Cn({type:e,selectors:[["ngb-modal-window"]],viewQuery:function(i,r){if(1&i&&ua(l3e,7),2&i){let o;Wt(o=qt())&&(r._dialogEl=o.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(i,r){2&i&&(rn("aria-modal",!0)("aria-labelledby",r.ariaLabelledBy)("aria-describedby",r.ariaDescribedBy),I0("modal d-block"+(r.windowClass?" "+r.windowClass:"")),hn("fade",r.animation))},inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",fullscreen:"fullscreen",keyboard:"keyboard",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},standalone:!0,features:[da],ngContentSelectors:kLe,decls:4,vars:2,consts:[["dialog",""],["role","document"],[1,"modal-content"]],template:function(i,r){1&i&&(function eq(e){const t=Q()[Sn][Vi];if(!t.projection){const i=t.projection=function sE(e,t){const n=[];for(let i=0;i{class e{constructor(){this._applicationRef=L(fa),this._injector=L(nn),this._environmentInjector=L(ji),this._document=L(Ln),this._scrollBar=L(sBe),this._activeWindowCmptHasChanged=new tn,this._ariaHiddenValues=new Map,this._scrollBarRestoreFn=null,this._modalRefs=[],this._windowCmpts=[],this._activeInstances=new ze;const n=L(ct);this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const i=this._windowCmpts[this._windowCmpts.length-1];((e,t,n,i=!1)=>{e.runOutsideAngular(()=>{const r=qi(t,"focusin").pipe(Wi(n),at(o=>o.target));qi(t,"keydown").pipe(Wi(n),Wn(o=>"Tab"===o.key),pF(r)).subscribe(([o,s])=>{const[a,l]=TJ(t);(s===a||s===t)&&o.shiftKey&&(l.focus(),o.preventDefault()),s===l&&!o.shiftKey&&(a.focus(),o.preventDefault())}),i&&qi(t,"click").pipe(Wi(n),pF(r),at(o=>o[1])).subscribe(o=>o.focus())})})(n,i.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(i.location.nativeElement)}})}_restoreScrollBar(){const n=this._scrollBarRestoreFn;n&&(this._scrollBarRestoreFn=null,n())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(n,i,r){const o=r.container instanceof HTMLElement?r.container:nh(r.container)?this._document.querySelector(r.container):this._document.body;if(!o)throw new Error(`The specified modal container "${r.container||"body"}" was not found in the DOM.`);this._hideScrollBar();const s=new GJ,a=(n=r.injector||n).get(ji,null)||this._environmentInjector,l=this._getContentRef(n,a,i,s,r);let c=!1!==r.backdrop?this._attachBackdrop(o):void 0,u=this._attachWindowComponent(o,l.nodes),d=new uBe(u,l,c,r.beforeDismiss);return this._registerModalRef(d),this._registerWindowCmpt(u),d.hidden.pipe(Cs(1)).subscribe(()=>Promise.resolve(!0).then(()=>{this._modalRefs.length||(this._document.body.classList.remove("modal-open"),this._restoreScrollBar(),this._revertAriaHidden())})),s.close=f=>{d.close(f)},s.dismiss=f=>{d.dismiss(f)},s.update=f=>{d.update(f)},d.update(r),1===this._modalRefs.length&&this._document.body.classList.add("modal-open"),c&&c.instance&&c.changeDetectorRef.detectChanges(),u.changeDetectorRef.detectChanges(),d}get activeInstances(){return this._activeInstances}dismissAll(n){this._modalRefs.forEach(i=>i.dismiss(n))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(n){let i=eR(aBe,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(i.hostView),n.appendChild(i.location.nativeElement),i}_attachWindowComponent(n,i){let r=eR(dBe,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:i});return this._applicationRef.attachView(r.hostView),n.appendChild(r.location.nativeElement),r}_getContentRef(n,i,r,o,s){return r?r instanceof ii?this._createFromTemplateRef(r,o):bm(r)?this._createFromString(r):this._createFromComponent(n,i,r,o,s):new ah([])}_createFromTemplateRef(n,i){const o=n.createEmbeddedView({$implicit:i,close(s){i.close(s)},dismiss(s){i.dismiss(s)}});return this._applicationRef.attachView(o),new ah([o.rootNodes],o)}_createFromString(n){const i=this._document.createTextNode(`${n}`);return new ah([[i]])}_createFromComponent(n,i,r,o,s){const l=eR(r,{environmentInjector:i,elementInjector:nn.create({providers:[{provide:GJ,useValue:o}],parent:n})}),c=l.location.nativeElement;return s.scrollable&&c.classList.add("component-host-scrollable"),this._applicationRef.attachView(l.hostView),new ah([[c]],l.hostView,l)}_setAriaHidden(n){const i=n.parentElement;i&&n!==this._document.body&&(Array.from(i.children).forEach(r=>{r!==n&&"SCRIPT"!==r.nodeName&&(this._ariaHiddenValues.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}),this._setAriaHidden(i))}_revertAriaHidden(){this._ariaHiddenValues.forEach((n,i)=>{n?i.setAttribute("aria-hidden",n):i.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(n){const i=()=>{const r=this._modalRefs.indexOf(n);r>-1&&(this._modalRefs.splice(r,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(n),this._activeInstances.emit(this._modalRefs),n.result.then(i,i)}_registerWindowCmpt(n){this._windowCmpts.push(n),this._activeWindowCmptHasChanged.next(),n.onDestroy(()=>{const i=this._windowCmpts.indexOf(n);i>-1&&(this._windowCmpts.splice(i,1),this._activeWindowCmptHasChanged.next())})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),WJ=(()=>{class e{constructor(){this._injector=L(nn),this._modalStack=L(fBe),this._config=L(oBe)}open(n,i={}){const r={...this._config,animation:this._config.animation,...i};return this._modalStack.open(this._injector,n,r)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(n){this._modalStack.dismissAll(n)}hasOpenModals(){return this._modalStack.hasOpenModals()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),qJ=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({providers:[WJ]})}}return e})(),XJ=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),ree=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),oee=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),see=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),aee=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),lee=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),cee=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),uee=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),dee=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})();new _e("live announcer delay",{providedIn:"root",factory:()=>100});let fee=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),hee=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})();const xBe=[hJ,pJ,_J,yJ,UJ,HJ,qJ,XJ,hee,ree,oee,see,aee,lee,cee,uee,dee,fee];let ABe=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({imports:[xBe,hJ,pJ,_J,yJ,UJ,HJ,qJ,XJ,hee,ree,oee,see,aee,lee,cee,uee,dee,fee]})}}return e})(),MBe=(()=>{class e{constructor(n,i,r){this.apparelService=n,this.modalService=i,this.viewportScroller=r,this.logos=CFe.r,this.selectedLogos=[]}ngOnInit(){this.selectedLogos=[];for(var n=0;n<=5;n++){let i="";do{i=this.logos[this.getRandomInt(20)]}while(this.selectedLogos.includes(i));this.selectedLogos.push(i)}}open(n){this.modalService.open(n)}onExploreMore(){this.apparelService.setExploreMore()}getRandomInt(n){return Math.floor(Math.random()*n)}onClick(n){this.viewportScroller.scrollToAnchor(n)}static{this.\u0275fac=function(i){return new(i||e)(ee(sm),ee(WJ),ee(tv))}}static{this.\u0275cmp=Cn({type:e,selectors:[["intro"]],decls:32,vars:10,consts:[[1,"intro","wikirate-box"],[1,"wikirate-container"],[1,"row","mt-5","mb-3"],[1,"col-md-8","nopadding"],[1,"showcase-main-title","call-to-action-title"],[1,"highlight-text"],[1,"main-text"],[1,"col-md-4"],[1,"row"],[1,"scroll",3,"click"],[1,"bi","bi-chevron-down"],[1,"ml-2"],[1,"animation","d-none","d-md-block"],[1,"logo-1","d-block","corporate-logo-xl","rounded-circle","p-3","bg-white","shadow-lg","ml-auto"],[1,"logo-img",3,"src"],[1,"logo-2","d-block","corporate-logo-xl","bg-white","rounded-circle","shadow-lg","p-3","ms-auto"],[1,"logo-3","d-block","corporate-logo-xl","rounded-circle","p-3","bg-white","shadow-lg","ml-auto"],[1,"logo-4","d-block","corporate-logo-xl","rounded-circle","p-3","bg-white","shadow-lg","ml-auto"],[1,"logo-5","d-block","corporate-logo-xl","bg-white","rounded-circle","shadow-lg","p-3","ms-auto"]],template:function(i,r){1&i&&(U(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h1",4)(5,"span",5),X(6,"Apparel 100"),z(),Ke(7,"br"),X(8," an ESG data and supply chain transparency showcase "),z(),Ke(9,"br"),U(10,"div",6)(11,"p"),X(12,"Discover what we do and don't know about the top 100 apparel companies through interactive maps and infographics. "),z(),U(13,"p"),X(14,"WikiRate's biggest data showcase unearths; who the top 100 are, how much we know about their environmental, social and governance performance, and where their suppliers are located."),z()()(),Ke(15,"div",7),z(),U(16,"div",8)(17,"a",9),nt("click",function(){return r.onClick("market-cap-map")}),Ke(18,"i",10),U(19,"span",11),X(20,"Scroll down"),z()()()()(),U(21,"div",12)(22,"div",13),Ke(23,"img",14),z(),U(24,"div",15),Ke(25,"img",14),z(),U(26,"div",16),Ke(27,"img",14),z(),U(28,"div",17),Ke(29,"img",14),z(),U(30,"div",18),Ke(31,"img",14),z()()),2&i&&(re(22),Ae("@slide-in",void 0),re(),Mc("src",r.selectedLogos[0],Oo),re(),Ae("@slide-in-delay-sm",void 0),re(),Mc("src",r.selectedLogos[1],Oo),re(),Ae("@slide-in-delay-md",void 0),re(),Mc("src",r.selectedLogos[2],Oo),re(),Ae("@slide-in-delay-lg",void 0),re(),Mc("src",r.selectedLogos[3],Oo),re(),Ae("@slide-in-delay-xl",void 0),re(),Mc("src",r.selectedLogos[4],Oo))},styles:[".intro[_ngcontent-%COMP%]{min-height:450px;display:flex;align-items:center}h1.showcase-main-title[_ngcontent-%COMP%]{font-style:normal;font-weight:400!important;font-size:2.6rem;line-height:135%;color:#484c9d;max-width:600px}.main-text[_ngcontent-%COMP%]{font-style:normal;font-weight:400;font-size:1.25rem;color:#34343b;line-height:155%;margin-bottom:30px;max-width:600px}.corporate-logo-xl[_ngcontent-%COMP%]{height:5.25rem;width:5.25rem;position:relative}.corporate-logo-sm[_ngcontent-%COMP%]{height:4.25rem;width:4.25rem;position:relative}.logo-1[_ngcontent-%COMP%]{position:absolute;left:85%;right:15%;top:7em}.logo-2[_ngcontent-%COMP%]{position:absolute;left:65%;right:35%;top:17em}.logo-3[_ngcontent-%COMP%]{position:absolute;left:93%;right:7%;top:23em}.logo-4[_ngcontent-%COMP%]{position:absolute;left:80%;right:20%;top:30em}.logo-5[_ngcontent-%COMP%]{position:absolute;left:64%;right:36%;top:39em}a.scroll[_ngcontent-%COMP%]{color:#f7733d;cursor:pointer;text-decoration:inherit}"],data:{animation:[wv("slide-in",[Cv(":enter",[Ds({opacity:0,transform:"translateY(50px)"}),Ev("600ms 50ms",Ds({opacity:1,transform:"translateY(0)"}))])]),wv("slide-in-delay-sm",[Cv(":enter",[Ds({opacity:0,transform:"translateY(50px)"}),Ev("600ms 150ms",Ds({opacity:1,transform:"translateY(0)"}))])]),wv("slide-in-delay-md",[Cv(":enter",[Ds({opacity:0,transform:"translateY(50px)"}),Ev("600ms 250ms",Ds({opacity:1,transform:"translateY(0)"}))])]),wv("slide-in-delay-lg",[Cv(":enter",[Ds({opacity:0,transform:"translateY(50px)"}),Ev("600ms 350ms",Ds({opacity:1,transform:"translateY(0)"}))])]),wv("slide-in-delay-xl",[Cv(":enter",[Ds({opacity:0,transform:"translateY(50px)"}),Ev("600ms 450ms",Ds({opacity:1,transform:"translateY(0)"}))])])]}})}}return e})();function pee(e,t,n,i,r,o,s){try{var a=e[o](s),l=a.value}catch(c){return void n(c)}a.done?t(l):Promise.resolve(l).then(i,r)}function qn(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function s(l){pee(o,i,r,s,a,"next",l)}function a(l){pee(o,i,r,s,a,"throw",l)}s(void 0)})}}const NBe=/("(?:[^\\"]|\\.)*")|[:,]/g;function vP(e,t={}){const n=JSON.stringify([1],void 0,void 0===t.indent?2:t.indent).slice(2,-3),i=""===n?1/0:void 0===t.maxLength?80:t.maxLength;let{replacer:r}=t;return function o(s,a,l){s&&"function"==typeof s.toJSON&&(s=s.toJSON());const c=JSON.stringify(s,r);if(void 0===c)return c;const u=i-a.length-l;if(c.length<=u){const d=c.replace(NBe,(f,h)=>h||`${f} `);if(d.length<=u)return d}if(null!=r&&(s=JSON.parse(c),r=void 0),"object"==typeof s&&null!==s){const d=a+n,f=[];let p,g,h=0;if(Array.isArray(s)){p="[",g="]";const{length:m}=s;for(;h0)return[p,n+f.join(`,\n${d}`),g].join(`\n${a}`)}return c}(e,"",0)}function co(e,t,n){return e.fields=t||[],e.fname=n,e}function $n(e){return null==e?null:e.fname}function fr(e){return null==e?null:e.fields}function gee(e){return 1===e.length?IBe(e[0]):kBe(e)}const IBe=e=>function(t){return t[e]},kBe=e=>{const t=e.length;return function(n){for(let i=0;is&&c(),r=s=a+1):"]"===l&&(r||J("Access path missing open bracket: "+e),r>0&&c(),r=0,s=a+1):a>s?c():s=a+1}return r&&J("Access path missing closing bracket: "+e),i&&J("Access path missing closing quote: "+e),a>s&&(a++,c()),t}function As(e,t,n){const i=xl(e);return e=1===i.length?i[0]:e,co((n&&n.get||gee)(i),[e],t||e)}const Pv=As("id"),hr=co(e=>e,[],"identity"),Ju=co(()=>0,[],"zero"),Dm=co(()=>1,[],"one"),Ms=co(()=>!0,[],"true"),ed=co(()=>!1,[],"false");function OBe(e,t,n){const i=[t].concat([].slice.call(n));console[e].apply(console,i)}const mee=0,bP=1,wP=2,_ee=3,yee=4;function EP(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:OBe,i=e||mee;return{level(r){return arguments.length?(i=+r,this):i},error(){return i>=bP&&n(t||"error","ERROR",arguments),this},warn(){return i>=wP&&n(t||"warn","WARN",arguments),this},info(){return i>=_ee&&n(t||"log","INFO",arguments),this},debug(){return i>=yee&&n(t||"log","DEBUG",arguments),this}}}var te=Array.isArray;function we(e){return e===Object(e)}const vee=e=>"__proto__"!==e;function Sm(){for(var e=arguments.length,t=new Array(e),n=0;n{for(const o in r)"signals"===o?i.signals=RBe(i.signals,r.signals):Tm(i,o,r[o],"legend"===o?{layout:1}:"style"===o||null);return i},{})}function Tm(e,t,n,i){if(!vee(t))return;let r,o;if(we(n)&&!te(n))for(r in o=we(e[t])?e[t]:e[t]={},n)i&&(!0===i||i[r])?Tm(o,r,n[r]):vee(r)&&(o[r]=n[r]);else e[t]=n}function RBe(e,t){if(null==e)return t;const n={},i=[];function r(o){n[o.name]||(n[o.name]=1,i.push(o))}return t.forEach(r),e.forEach(r),i}function yt(e){return e[e.length-1]}function pr(e){return null==e||""===e?null:+e}const bee=e=>t=>e*Math.exp(t),wee=e=>t=>Math.log(e*t),Eee=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),Cee=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,dS=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function fS(e,t,n,i){const r=n(e[0]),o=n(yt(e)),s=(o-r)*t;return[i(r-s),i(o-s)]}function Dee(e,t){return fS(e,t,pr,hr)}function See(e,t){var n=Math.sign(e[0]);return fS(e,t,wee(n),bee(n))}function Tee(e,t,n){return fS(e,t,dS(n),dS(1/n))}function xee(e,t,n){return fS(e,t,Eee(n),Cee(n))}function hS(e,t,n,i,r){const o=i(e[0]),s=i(yt(e)),a=null!=t?i(t):(o+s)/2;return[r(a+(o-a)*n),r(a+(s-a)*n)]}function CP(e,t,n){return hS(e,t,n,pr,hr)}function DP(e,t,n){const i=Math.sign(e[0]);return hS(e,t,n,wee(i),bee(i))}function pS(e,t,n,i){return hS(e,t,n,dS(i),dS(1/i))}function SP(e,t,n,i){return hS(e,t,n,Eee(i),Cee(i))}function Aee(e){return 1+~~(new Date(e).getMonth()/3)}function Mee(e){return 1+~~(new Date(e).getUTCMonth()/3)}function Ee(e){return null!=e?te(e)?e:[e]:[]}function Nee(e,t,n){let o,i=e[0],r=e[1];return r=n-t?[t,n]:[i=Math.min(Math.max(i,t),n-o),i+o]}function it(e){return"function"==typeof e}const FBe="descending";function TP(e,t,n){n=n||{},t=Ee(t)||[];const i=[],r=[],o={},s=n.comparator||PBe;return Ee(e).forEach((a,l)=>{null!=a&&(i.push(t[l]===FBe?-1:1),r.push(a=it(a)?a:As(a,null,n)),(fr(a)||[]).forEach(c=>o[c]=1))}),0===r.length?null:co(s(r,i),Object.keys(o))}const gS=(e,t)=>(et||null==t)&&null!=e?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t==t?-1:t!=t&&e==e?1:0),PBe=(e,t)=>1===e.length?LBe(e[0],t[0]):$Be(e,t,e.length),LBe=(e,t)=>function(n,i){return gS(e(n),e(i))*t},$Be=(e,t,n)=>(t.push(0),function(i,r){let o,s=0,a=-1;for(;0===s&&++ae}function xP(e,t){let n;return i=>{n&&clearTimeout(n),n=setTimeout(()=>(t(i),n=null),e)}}function rt(e){for(let t,n,i=1,r=arguments.length;is&&(s=r))}else{for(r=t(e[n]);ns&&(s=r))}return[o,s]}function Iee(e,t){const n=e.length;let r,o,s,a,l,i=-1;if(null==t){for(;++i=o){r=s=o;break}if(i===n)return[-1,-1];for(a=l=i;++io&&(r=o,a=i),s=o){r=s=o;break}if(i===n)return[-1,-1];for(a=l=i;++io&&(r=o,a=i),si(o)?t[o]:void 0,set(o,s){return i(o)||(++r.size,t[o]===mS&&--r.empty),t[o]=s,this},delete(o){return i(o)&&(--r.size,++r.empty,t[o]=mS),this},clear(){r.size=r.empty=0,r.object=t={}},test(o){return arguments.length?(n=o,r):n},clean(){const o={};let s=0;for(const a in t){const l=t[a];l!==mS&&(!n||!n(l))&&(o[a]=l,++s)}r.size=s,r.empty=0,r.object=t=o}};return e&&Object.keys(e).forEach(o=>{r.set(o,e[o])}),r}function kee(e,t,n,i,r,o){if(!n&&0!==n)return o;const s=+n;let c,a=e[0],l=yt(e);lo&&(s=r,r=o,o=s),i=void 0===i||i,((n=void 0===n||n)?r<=e:ra.replace(/\\(.)/g,"$1")):Ee(e));const i=e&&e.length,r=n&&n.get||gee,o=a=>r(t?[a]:xl(a));let s;if(i)if(1===i){const a=o(e[0]);s=function(l){return""+a(l)}}else{const a=e.map(o);s=function(l){let c=""+a[0](l),u=0;for(;++u{t={},n={},i=0},o=(s,a)=>(++i>e&&(n=t,t={},i=1),t[s]=a);return r(),{clear:r,has:s=>De(t,s)||De(n,s),get:s=>De(t,s)?t[s]:De(n,s)?o(s,n[s]):void 0,set:(s,a)=>De(t,s)?t[s]=a:o(s,a)}}function Lee(e,t,n,i){const r=t.length,o=n.length;if(!o)return t;if(!r)return n;const s=i||new t.constructor(r+o);let a=0,l=0,c=0;for(;a0?n[l++]:t[a++];for(;a=0;)n+=e;return n}function $ee(e,t,n,i){const r=n||" ",o=e+"",s=t-o.length;return s<=0?o:"left"===i?Lv(r,s)+o:"center"===i?Lv(r,~~(s/2))+o+Lv(r,Math.ceil(s/2)):o+Lv(r,s)}function $v(e){return e&&yt(e)-e[0]||0}function ge(e){return te(e)?"["+e.map(ge)+"]":we(e)||Ce(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function MP(e){return null==e||""===e?null:!(!e||"false"===e||"0"===e||!e)}const VBe=e=>At(e)||nd(e)?e:Date.parse(e);function NP(e,t){return t=t||VBe,null==e||""===e?null:t(e)}function IP(e){return null==e||""===e?null:e+""}function va(e){const t={},n=e.length;for(let i=0;i=p?y=!0:(D=d.charCodeAt(g++))===Bv?v=!0:D===RP&&(v=!0,d.charCodeAt(g)===Bv&&++g),d.slice(E+1,C-1).replace(/""/g,'"')}for(;g9999?"+"+uo(e,6):uo(e,4)}(e.getUTCFullYear())+"-"+uo(e.getUTCMonth()+1,2)+"-"+uo(e.getUTCDate(),2)+(r?"T"+uo(t,2)+":"+uo(n,2)+":"+uo(i,2)+"."+uo(r,3)+"Z":i?"T"+uo(t,2)+":"+uo(n,2)+":"+uo(i,2)+"Z":n||t?"T"+uo(t,2)+":"+uo(n,2)+"Z":"")}(d):t.test(d+="")?'"'+d.replace(/"/g,'""')+'"':d}return{parse:function i(d,f){var h,p,g=r(d,function(m,_){if(h)return h(m,_-1);p=m,h=f?function UBe(e,t){var n=Vee(e);return function(i,r){return t(n(i),r,e)}}(m,f):Vee(m)});return g.columns=p||[],g},parseRows:r,format:function s(d,f){return null==f&&(f=Uee(d)),[f.map(u).join(e)].concat(o(d,f)).join("\n")},formatBody:function a(d,f){return null==f&&(f=Uee(d)),o(d,f).join("\n")},formatRows:function l(d){return d.map(c).join("\n")},formatRow:c,formatValue:u}}function qBe(e){return e}function KBe(e,t){return"string"==typeof t&&(t=e.objects[t]),"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map(function(n){return zee(e,n)})}:zee(e,t)}function zee(e,t){var n=t.id,i=t.bbox,r=null==t.properties?{}:t.properties,o=Hee(e,t);return null==n&&null==i?{type:"Feature",properties:r,geometry:o}:null==i?{type:"Feature",id:n,properties:r,geometry:o}:{type:"Feature",id:n,bbox:i,properties:r,geometry:o}}function Hee(e,t){var n=function YBe(e){if(null==e)return qBe;var t,n,i=e.scale[0],r=e.scale[1],o=e.translate[0],s=e.translate[1];return function(a,l){l||(t=n=0);var c=2,u=a.length,d=new Array(u);for(d[0]=(t+=a[0])*i+o,d[1]=(n+=a[1])*r+s;c1)i=function JBe(e,t,n){var o,i=[],r=[];function s(d){var f=d<0?~d:d;(r[f]||(r[f]=[])).push({i:d,g:o})}function a(d){d.forEach(s)}function l(d){d.forEach(a)}return function u(d){switch(o=d,d.type){case"GeometryCollection":d.geometries.forEach(u);break;case"LineString":a(d.arcs);break;case"MultiLineString":case"Polygon":l(d.arcs);break;case"MultiPolygon":!function c(d){d.forEach(l)}(d.arcs)}}(t),r.forEach(null==n?function(d){i.push(d[0].i)}:function(d){n(d[0].g,d[d.length-1].g)&&i.push(d[0].i)}),i}(0,t,n);else for(r=0,i=new Array(o=e.arcs.length);r=e5e?10:o>=t5e?5:o>=n5e?2:1;let a,l,c;return r<0?(c=Math.pow(10,-r)/s,a=Math.round(e*c),l=Math.round(t*c),a/ct&&--l,c=-c):(c=Math.pow(10,r)*s,a=Math.round(e/c),l=Math.round(t/c),a*ct&&--l),l0))return[];if((e=+e)==(t=+t))return[e];const i=t=r))return[];const a=o-r+1,l=new Array(a);if(i)if(s<0)for(let c=0;c=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function lh(e){if(!(t=i5e.exec(e)))throw new Error("invalid format: "+e);var t;return new LP({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function LP(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function yS(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,i=e.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function Mm(e){return(e=yS(Math.abs(e)))?e[1]:NaN}function Gee(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Mm(t)/3)))-Mm(Math.abs(e)))}function Wee(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Mm(t)-Mm(e))+1}function qee(e){return Math.max(0,-Mm(Math.abs(e)))}function Kee(e,t){var n=yS(e,t);if(!n)return e+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}lh.prototype=LP.prototype,LP.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Xee={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function r5e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Kee(100*e,t),r:Kee,s:function l5e(e,t){var n=yS(e,t);if(!n)return e+"";var i=n[0],r=n[1],o=r-(Yee=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+yS(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Qee(e){return e}var vS,bS,$P,Zee=Array.prototype.map,Jee=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function ete(e){var t=void 0===e.grouping||void 0===e.thousands?Qee:function o5e(e,t){return function(n,i){for(var r=n.length,o=[],s=0,a=e[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(n.substring(r-=a,r+a)),!((l+=a+1)>i));)a=e[s=(s+1)%e.length];return o.reverse().join(t)}}(Zee.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",r=void 0===e.decimal?".":e.decimal+"",o=void 0===e.numerals?Qee:function s5e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}(Zee.call(e.numerals,String)),s=void 0===e.percent?"%":e.percent+"",a=void 0===e.minus?"\u2212":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(d){var f=(d=lh(d)).fill,h=d.align,p=d.sign,g=d.symbol,m=d.zero,_=d.width,y=d.comma,v=d.precision,b=d.trim,w=d.type;"n"===w?(y=!0,w="g"):Xee[w]||(void 0===v&&(v=12),b=!0,w="g"),(m||"0"===f&&"="===h)&&(m=!0,f="0",h="=");var C="$"===g?n:"#"===g&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",E="$"===g?i:/[%p]/.test(w)?s:"",D=Xee[w],M=/[defgprs%]/.test(w);function k(R){var T,S,x,F=C,P=E;if("c"===w)P=D(R)+P,R="";else{var I=(R=+R)<0||1/R<0;if(R=isNaN(R)?l:D(Math.abs(R),v),b&&(R=function a5e(e){e:for(var r,t=e.length,n=1,i=-1;n0&&(i=0)}return i>0?e.slice(0,i)+e.slice(r+1):e}(R)),I&&0==+R&&"+"!==p&&(I=!1),F=(I?"("===p?p:a:"-"===p||"("===p?"":p)+F,P=("s"===w?Jee[8+Yee/3]:"")+P+(I&&"("===p?")":""),M)for(T=-1,S=R.length;++T(x=R.charCodeAt(T))||x>57){P=(46===x?r+R.slice(T+1):R.slice(T))+P,R=R.slice(0,T);break}}y&&!m&&(R=t(R,1/0));var A=F.length+R.length+P.length,N=A<_?new Array(_-A+1).join(f):"";switch(y&&m&&(R=t(N+R,N.length?_-P.length:1/0),N=""),h){case"<":R=F+R+P+N;break;case"=":R=F+N+R+P;break;case"^":R=N.slice(0,A=N.length>>1)+F+R+P+N.slice(A);break;default:R=N+F+R+P}return o(R)}return v=void 0===v?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),k.toString=function(){return d+""},k}return{format:c,formatPrefix:function u(d,f){var h=c(((d=lh(d)).type="f",d)),p=3*Math.max(-8,Math.min(8,Math.floor(Mm(f)/3))),g=Math.pow(10,-p),m=Jee[8+p/3];return function(_){return h(g*_)+m}}}}!function c5e(e){vS=ete(e),bS=vS.format,$P=vS.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const BP=new Date,jP=new Date;function vi(e,t,n,i){function r(o){return e(o=0===arguments.length?new Date:new Date(+o)),o}return r.floor=o=>(e(o=new Date(+o)),o),r.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),r.round=o=>{const s=r(o),a=r.ceil(o);return o-s(t(o=new Date(+o),null==s?1:Math.floor(s)),o),r.range=(o,s,a)=>{const l=[];if(o=r.ceil(o),a=null==a?1:Math.floor(a),!(o0))return l;let c;do{l.push(c=new Date(+o)),t(o,a),e(o)}while(cvi(s=>{if(s>=s)for(;e(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;t(s,-1),!o(s););else for(;--a>=0;)for(;t(s,1),!o(s););}),n&&(r.count=(o,s)=>(BP.setTime(+o),jP.setTime(+s),e(BP),e(jP),Math.floor(n(BP,jP))),r.every=o=>(o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?s=>i(s)%o==0:s=>r.count(0,s)%o==0):r:null)),r}const Uc=1e3,Ns=6e4,zc=60*Ns,Hc=24*zc,VP=7*Hc,tte=30*Hc,UP=365*Hc,Gc=vi(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ns)/Hc,e=>e.getDate()-1),od=vi(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Hc,e=>e.getUTCDate()-1),nte=vi(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Hc,e=>Math.floor(e/Hc));function ch(e){return vi(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+7*n)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Ns)/VP)}const Nm=ch(0),wS=ch(1),Im=(ch(2),ch(3),ch(4));function uh(e){return vi(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+7*n)},(t,n)=>(n-t)/VP)}ch(5),ch(6);const km=uh(0),ES=uh(1),Om=(uh(2),uh(3),uh(4)),Ml=(uh(5),uh(6),vi(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear()));Ml.every=e=>isFinite(e=Math.floor(e))&&e>0?vi(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null;const Nl=vi(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Nl.every=e=>isFinite(e=Math.floor(e))&&e>0?vi(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null;const jv=vi(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth()),Vv=vi(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth()),CS=vi(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Uc-e.getMinutes()*Ns)},(e,t)=>{e.setTime(+e+t*zc)},(e,t)=>(t-e)/zc,e=>e.getHours()),DS=vi(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*zc)},(e,t)=>(t-e)/zc,e=>e.getUTCHours()),SS=vi(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Uc)},(e,t)=>{e.setTime(+e+t*Ns)},(e,t)=>(t-e)/Ns,e=>e.getMinutes()),TS=vi(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ns)},(e,t)=>(t-e)/Ns,e=>e.getUTCMinutes()),Wc=vi(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Uc)},(e,t)=>(t-e)/Uc,e=>e.getUTCSeconds()),Rm=vi(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);function qc(e,t){return null==e||null==t?NaN:et?1:e>=t?0:NaN}function y5e(e,t){return null==e||null==t?NaN:te?1:t>=e?0:NaN}function Fm(e){let t,n,i;function r(a,l,c=0,u=a.length){if(c>>1;n(a[d],l)<0?c=d+1:u=d}while(cqc(e(a),l),i=(a,l)=>e(a)-l):(t=e===qc||e===y5e?e:v5e,n=e,i=e),{left:r,center:function s(a,l,c=0,u=a.length){const d=r(a,l,c,u-1);return d>c&&i(a[d-1],l)>-i(a[d],l)?d-1:d},right:function o(a,l,c=0,u=a.length){if(c>>1;n(a[d],l)<=0?c=d+1:u=d}while(c(e=Math.floor(e),isFinite(e)&&e>0?e>1?vi(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Rm:null);const Xi="year",fo="quarter",mr="month",bi="week",ho="date",_r="day",Il="dayofyear",Wo="hours",qo="minutes",Is="seconds",ba="milliseconds",zP=[Xi,fo,mr,bi,ho,_r,Il,Wo,qo,Is,ba],HP=zP.reduce((e,t,n)=>(e[t]=1+n,e),{});function GP(e){const t=Ee(e).slice(),n={};return t.length||J("Missing time unit."),t.forEach(r=>{De(HP,r)?n[r]=1:J(`Invalid time unit: ${r}.`)}),(n[bi]||n[_r]?1:0)+(n[fo]||n[mr]||n[ho]?1:0)+(n[Il]?1:0)>1&&J(`Incompatible time units: ${e}`),t.sort((r,o)=>HP[r]-HP[o]),t}const b5e={[Xi]:"%Y ",[fo]:"Q%q ",[mr]:"%b ",[ho]:"%d ",[bi]:"W%U ",[_r]:"%a ",[Il]:"%j ",[Wo]:"%H:00",[qo]:"00:%M",[Is]:":%S",[ba]:".%L",[`${Xi}-${mr}`]:"%Y-%m ",[`${Xi}-${mr}-${ho}`]:"%Y-%m-%d ",[`${Wo}-${qo}`]:"%H:%M"};function ite(e,t){const n=rt({},b5e,t),i=GP(e),r=i.length;let a,l,o="",s=0;for(s=0;ss;--a)if(l=i.slice(s,a).join("-"),null!=n[l]){o+=n[l],s=a;break}return o.trim()}const dh=new Date;function WP(e){return dh.setFullYear(e),dh.setMonth(0),dh.setDate(1),dh.setHours(0,0,0,0),dh}function rte(e){return ste(new Date(e))}function ote(e){return qP(new Date(e))}function ste(e){return Gc.count(WP(e.getFullYear())-1,e)}function qP(e){return Nm.count(WP(e.getFullYear())-1,e)}function YP(e){return WP(e).getDay()}function w5e(e,t,n,i,r,o,s){if(0<=e&&e<100){const a=new Date(-1,t,n,i,r,o,s);return a.setFullYear(e),a}return new Date(e,t,n,i,r,o,s)}function ate(e){return cte(new Date(e))}function lte(e){return KP(new Date(e))}function cte(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return od.count(t-1,e)}function KP(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return km.count(t-1,e)}function XP(e){return dh.setTime(Date.UTC(e,0,1)),dh.getUTCDay()}function E5e(e,t,n,i,r,o,s){if(0<=e&&e<100){const a=new Date(Date.UTC(-1,t,n,i,r,o,s));return a.setUTCFullYear(n.y),a}return new Date(Date.UTC(e,t,n,i,r,o,s))}function ute(e,t,n,i,r){const o=t||1,s=yt(e),a=(_,y,v)=>function C5e(e,t,n,i){const r=n<=1?e:i?(o,s)=>i+n*Math.floor((e(o,s)-i)/n):(o,s)=>n*Math.floor(e(o,s)/n);return t?(o,s)=>t(r(o,s),s):r}(n[v=v||_],i[v],_===s&&o,y),l=new Date,c=va(e),u=c[Xi]?a(Xi):gr(2012),d=c[mr]?a(mr):c[fo]?a(fo):Ju,f=c[bi]&&c[_r]?a(_r,1,bi+_r):c[bi]?a(bi,1):c[_r]?a(_r,1):c[ho]?a(ho,1):c[Il]?a(Il,1):Dm,h=c[Wo]?a(Wo):Ju,p=c[qo]?a(qo):Ju,g=c[Is]?a(Is):Ju,m=c[ba]?a(ba):Ju;return function(_){l.setTime(+_);const y=u(l);return r(y,d(l),f(l,y),h(l),p(l),g(l),m(l))}}function Pm(e,t,n){return t+7*e-(n+6)%7}const D5e={[Xi]:e=>e.getFullYear(),[fo]:e=>Math.floor(e.getMonth()/3),[mr]:e=>e.getMonth(),[ho]:e=>e.getDate(),[Wo]:e=>e.getHours(),[qo]:e=>e.getMinutes(),[Is]:e=>e.getSeconds(),[ba]:e=>e.getMilliseconds(),[Il]:e=>ste(e),[bi]:e=>qP(e),[bi+_r]:(e,t)=>Pm(qP(e),e.getDay(),YP(t)),[_r]:(e,t)=>Pm(1,e.getDay(),YP(t))},S5e={[fo]:e=>3*e,[bi]:(e,t)=>Pm(e,0,YP(t))};function dte(e,t){return ute(e,t||1,D5e,S5e,w5e)}const T5e={[Xi]:e=>e.getUTCFullYear(),[fo]:e=>Math.floor(e.getUTCMonth()/3),[mr]:e=>e.getUTCMonth(),[ho]:e=>e.getUTCDate(),[Wo]:e=>e.getUTCHours(),[qo]:e=>e.getUTCMinutes(),[Is]:e=>e.getUTCSeconds(),[ba]:e=>e.getUTCMilliseconds(),[Il]:e=>cte(e),[bi]:e=>KP(e),[_r]:(e,t)=>Pm(1,e.getUTCDay(),XP(t)),[bi+_r]:(e,t)=>Pm(KP(e),e.getUTCDay(),XP(t))},x5e={[fo]:e=>3*e,[bi]:(e,t)=>Pm(e,0,XP(t))};function fte(e,t){return ute(e,t||1,T5e,x5e,E5e)}const A5e={[Xi]:Ml,[fo]:jv.every(3),[mr]:jv,[bi]:Nm,[ho]:Gc,[_r]:Gc,[Il]:Gc,[Wo]:CS,[qo]:SS,[Is]:Wc,[ba]:Rm},M5e={[Xi]:Nl,[fo]:Vv.every(3),[mr]:Vv,[bi]:km,[ho]:od,[_r]:od,[Il]:od,[Wo]:DS,[qo]:TS,[Is]:Wc,[ba]:Rm};function Lm(e){return A5e[e]}function $m(e){return M5e[e]}function hte(e,t,n){return e?e.offset(t,n):void 0}function pte(e,t,n){return hte(Lm(e),t,n)}function gte(e,t,n){return hte($m(e),t,n)}function mte(e,t,n,i){return e?e.range(t,n,i):void 0}function _te(e,t,n,i){return mte(Lm(e),t,n,i)}function yte(e,t,n,i){return mte($m(e),t,n,i)}const zv=6e4,Hv=60*zv,xS=24*Hv,vte=30*xS,QP=365*xS,bte=[Xi,mr,ho,Wo,qo,Is,ba],Gv=bte.slice(0,-1),Wv=Gv.slice(0,-1),qv=Wv.slice(0,-1),I5e=qv.slice(0,-1),wte=[Xi,mr],Ete=[Xi],Yv=[[Gv,1,1e3],[Gv,5,5e3],[Gv,15,15e3],[Gv,30,3e4],[Wv,1,zv],[Wv,5,5*zv],[Wv,15,15*zv],[Wv,30,30*zv],[qv,1,Hv],[qv,3,3*Hv],[qv,6,6*Hv],[qv,12,12*Hv],[I5e,1,xS],[[Xi,bi],1,6048e5],[wte,1,vte],[wte,3,3*vte],[Ete,1,QP]];function Cte(e){const t=e.extent,n=e.maxbins||40,i=Math.abs($v(t))/n;let o,s,r=Fm(a=>a[2]).right(Yv,i);return r===Yv.length?(o=Ete,s=rd(t[0]/QP,t[1]/QP,n)):r?(r=Yv[i/Yv[r-1][2]=12)]},q:function B(W){return 1+~~(W.getMonth()/3)},Q:Lte,s:$te,S:r8e,u:o8e,U:s8e,V:a8e,w:l8e,W:c8e,x:null,X:null,y:u8e,Y:f8e,Z:p8e,"%":Pte},b={a:function V(W){return s[W.getUTCDay()]},A:function j(W){return o[W.getUTCDay()]},b:function H(W){return l[W.getUTCMonth()]},B:function oe(W){return a[W.getUTCMonth()]},c:null,d:Ote,e:Ote,f:y8e,g:A8e,G:N8e,H:g8e,I:m8e,j:_8e,L:Rte,m:v8e,M:b8e,p:function Y(W){return r[+(W.getUTCHours()>=12)]},q:function ue(W){return 1+~~(W.getUTCMonth()/3)},Q:Lte,s:$te,S:w8e,u:E8e,U:C8e,V:D8e,w:S8e,W:T8e,x:null,X:null,y:x8e,Y:M8e,Z:I8e,"%":Pte},w={a:function k(W,ne,ie){var G=h.exec(ne.slice(ie));return G?(W.w=p.get(G[0].toLowerCase()),ie+G[0].length):-1},A:function R(W,ne,ie){var G=d.exec(ne.slice(ie));return G?(W.w=f.get(G[0].toLowerCase()),ie+G[0].length):-1},b:function F(W,ne,ie){var G=_.exec(ne.slice(ie));return G?(W.m=y.get(G[0].toLowerCase()),ie+G[0].length):-1},B:function P(W,ne,ie){var G=g.exec(ne.slice(ie));return G?(W.m=m.get(G[0].toLowerCase()),ie+G[0].length):-1},c:function T(W,ne,ie){return D(W,t,ne,ie)},d:Ate,e:Ate,f:Y5e,g:xte,G:Tte,H:Mte,I:Mte,j:H5e,L:q5e,m:z5e,M:G5e,p:function M(W,ne,ie){var G=c.exec(ne.slice(ie));return G?(W.p=u.get(G[0].toLowerCase()),ie+G[0].length):-1},q:U5e,Q:X5e,s:Q5e,S:W5e,u:L5e,U:$5e,V:B5e,w:P5e,W:j5e,x:function S(W,ne,ie){return D(W,n,ne,ie)},X:function x(W,ne,ie){return D(W,i,ne,ie)},y:xte,Y:Tte,Z:V5e,"%":K5e};function C(W,ne){return function(ie){var Te,Oe,Et,G=[],ye=-1,Se=0,Ue=W.length;for(ie instanceof Date||(ie=new Date(+ie));++ye53)return null;"w"in G||(G.w=1),"Z"in G?(Ue=(Se=JP(Kv(G.y,0,1))).getUTCDay(),Se=Ue>4||0===Ue?ES.ceil(Se):ES(Se),Se=od.offset(Se,7*(G.V-1)),G.y=Se.getUTCFullYear(),G.m=Se.getUTCMonth(),G.d=Se.getUTCDate()+(G.w+6)%7):(Ue=(Se=ZP(Kv(G.y,0,1))).getDay(),Se=Ue>4||0===Ue?wS.ceil(Se):wS(Se),Se=Gc.offset(Se,7*(G.V-1)),G.y=Se.getFullYear(),G.m=Se.getMonth(),G.d=Se.getDate()+(G.w+6)%7)}else("W"in G||"U"in G)&&("w"in G||(G.w="u"in G?G.u%7:"W"in G?1:0),Ue="Z"in G?JP(Kv(G.y,0,1)).getUTCDay():ZP(Kv(G.y,0,1)).getDay(),G.m=0,G.d="W"in G?(G.w+6)%7+7*G.W-(Ue+5)%7:G.w+7*G.U-(Ue+6)%7);return"Z"in G?(G.H+=G.Z/100|0,G.M+=G.Z%100,JP(G)):ZP(G)}}function D(W,ne,ie,G){for(var Te,Oe,ye=0,Se=ne.length,Ue=ie.length;ye=Ue)return-1;if(37===(Te=ne.charCodeAt(ye++))){if(Te=ne.charAt(ye++),!(Oe=w[Te in Ste?ne.charAt(ye++):Te])||(G=Oe(W,ie,G))<0)return-1}else if(Te!=ie.charCodeAt(G++))return-1}return G}return v.x=C(n,v),v.X=C(i,v),v.c=C(t,v),b.x=C(n,b),b.X=C(i,b),b.c=C(t,b),{format:function(W){var ne=C(W+="",v);return ne.toString=function(){return W},ne},parse:function(W){var ne=E(W+="",!1);return ne.toString=function(){return W},ne},utcFormat:function(W){var ne=C(W+="",b);return ne.toString=function(){return W},ne},utcParse:function(W){var ne=E(W+="",!0);return ne.toString=function(){return W},ne}}}var Bm,eL,Bte,tL,jte,Ste={"-":"",_:" ",0:"0"},Mi=/^\s*\d+/,O5e=/^%/,R5e=/[\\^$*+?|[\]().{}]/g;function Mt(e,t,n){var i=e<0?"-":"",r=(i?-e:e)+"",o=r.length;return i+(o[t.toLowerCase(),n]))}function P5e(e,t,n){var i=Mi.exec(t.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function L5e(e,t,n){var i=Mi.exec(t.slice(n,n+1));return i?(e.u=+i[0],n+i[0].length):-1}function $5e(e,t,n){var i=Mi.exec(t.slice(n,n+2));return i?(e.U=+i[0],n+i[0].length):-1}function B5e(e,t,n){var i=Mi.exec(t.slice(n,n+2));return i?(e.V=+i[0],n+i[0].length):-1}function j5e(e,t,n){var i=Mi.exec(t.slice(n,n+2));return i?(e.W=+i[0],n+i[0].length):-1}function Tte(e,t,n){var i=Mi.exec(t.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function xte(e,t,n){var i=Mi.exec(t.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function V5e(e,t,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function U5e(e,t,n){var i=Mi.exec(t.slice(n,n+1));return i?(e.q=3*i[0]-3,n+i[0].length):-1}function z5e(e,t,n){var i=Mi.exec(t.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function Ate(e,t,n){var i=Mi.exec(t.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function H5e(e,t,n){var i=Mi.exec(t.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function Mte(e,t,n){var i=Mi.exec(t.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function G5e(e,t,n){var i=Mi.exec(t.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function W5e(e,t,n){var i=Mi.exec(t.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function q5e(e,t,n){var i=Mi.exec(t.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function Y5e(e,t,n){var i=Mi.exec(t.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function K5e(e,t,n){var i=O5e.exec(t.slice(n,n+1));return i?n+i[0].length:-1}function X5e(e,t,n){var i=Mi.exec(t.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function Q5e(e,t,n){var i=Mi.exec(t.slice(n));return i?(e.s=+i[0],n+i[0].length):-1}function Nte(e,t){return Mt(e.getDate(),t,2)}function Z5e(e,t){return Mt(e.getHours(),t,2)}function J5e(e,t){return Mt(e.getHours()%12||12,t,2)}function e8e(e,t){return Mt(1+Gc.count(Ml(e),e),t,3)}function Ite(e,t){return Mt(e.getMilliseconds(),t,3)}function t8e(e,t){return Ite(e,t)+"000"}function n8e(e,t){return Mt(e.getMonth()+1,t,2)}function i8e(e,t){return Mt(e.getMinutes(),t,2)}function r8e(e,t){return Mt(e.getSeconds(),t,2)}function o8e(e){var t=e.getDay();return 0===t?7:t}function s8e(e,t){return Mt(Nm.count(Ml(e)-1,e),t,2)}function kte(e){var t=e.getDay();return t>=4||0===t?Im(e):Im.ceil(e)}function a8e(e,t){return e=kte(e),Mt(Im.count(Ml(e),e)+(4===Ml(e).getDay()),t,2)}function l8e(e){return e.getDay()}function c8e(e,t){return Mt(wS.count(Ml(e)-1,e),t,2)}function u8e(e,t){return Mt(e.getFullYear()%100,t,2)}function d8e(e,t){return Mt((e=kte(e)).getFullYear()%100,t,2)}function f8e(e,t){return Mt(e.getFullYear()%1e4,t,4)}function h8e(e,t){var n=e.getDay();return Mt((e=n>=4||0===n?Im(e):Im.ceil(e)).getFullYear()%1e4,t,4)}function p8e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Mt(t/60|0,"0",2)+Mt(t%60,"0",2)}function Ote(e,t){return Mt(e.getUTCDate(),t,2)}function g8e(e,t){return Mt(e.getUTCHours(),t,2)}function m8e(e,t){return Mt(e.getUTCHours()%12||12,t,2)}function _8e(e,t){return Mt(1+od.count(Nl(e),e),t,3)}function Rte(e,t){return Mt(e.getUTCMilliseconds(),t,3)}function y8e(e,t){return Rte(e,t)+"000"}function v8e(e,t){return Mt(e.getUTCMonth()+1,t,2)}function b8e(e,t){return Mt(e.getUTCMinutes(),t,2)}function w8e(e,t){return Mt(e.getUTCSeconds(),t,2)}function E8e(e){var t=e.getUTCDay();return 0===t?7:t}function C8e(e,t){return Mt(km.count(Nl(e)-1,e),t,2)}function Fte(e){var t=e.getUTCDay();return t>=4||0===t?Om(e):Om.ceil(e)}function D8e(e,t){return e=Fte(e),Mt(Om.count(Nl(e),e)+(4===Nl(e).getUTCDay()),t,2)}function S8e(e){return e.getUTCDay()}function T8e(e,t){return Mt(ES.count(Nl(e)-1,e),t,2)}function x8e(e,t){return Mt(e.getUTCFullYear()%100,t,2)}function A8e(e,t){return Mt((e=Fte(e)).getUTCFullYear()%100,t,2)}function M8e(e,t){return Mt(e.getUTCFullYear()%1e4,t,4)}function N8e(e,t){var n=e.getUTCDay();return Mt((e=n>=4||0===n?Om(e):Om.ceil(e)).getUTCFullYear()%1e4,t,4)}function I8e(){return"+0000"}function Pte(){return"%"}function Lte(e){return+e}function $te(e){return Math.floor(+e/1e3)}function Zv(e){const t={};return n=>t[n]||(t[n]=e(n))}function Vte(e){const t=Zv(e.format),n=e.formatPrefix;return{format:t,formatPrefix:n,formatFloat(i){const r=lh(i||",");if(null==r.precision){switch(r.precision=12,r.type){case"%":r.precision-=2;break;case"e":r.precision-=1}return function O8e(e,t){return n=>{const i=e(n),r=i.indexOf(t);if(r<0)return i;let o=function R8e(e,t){let i,n=e.lastIndexOf("e");if(n>0)return n;for(n=e.length;--n>t;)if(i=e.charCodeAt(n),i>=48&&i<=57)return n+1}(i,r);const s=or;)if("0"!==i[o]){++o;break}return i.slice(0,o)+s}}(t(r),t(".1f")(1)[1])}return t(r)},formatSpan(i,r,o,s){s=lh(s??",f");const a=rd(i,r,o),l=Math.max(Math.abs(i),Math.abs(r));let c;if(null==s.precision)switch(s.type){case"s":return isNaN(c=Gee(a,l))||(s.precision=c),n(s,l);case"":case"e":case"g":case"p":case"r":isNaN(c=Wee(a,l))||(s.precision=c-("e"===s.type));break;case"f":case"%":isNaN(c=qee(a))||(s.precision=c-2*("%"===s.type))}return t(s)}}}let nL,iL;function Ute(){return nL=Vte({format:bS,formatPrefix:$P})}function zte(e){return Vte(ete(e))}function AS(e){return arguments.length?nL=zte(e):nL}function Hte(e,t,n){we(n=n||{})||J(`Invalid time multi-format specifier: ${n}`);const i=t(Is),r=t(qo),o=t(Wo),s=t(ho),a=t(bi),l=t(mr),c=t(fo),u=t(Xi),d=e(n[ba]||".%L"),f=e(n[Is]||":%S"),h=e(n[qo]||"%I:%M"),p=e(n[Wo]||"%I %p"),g=e(n[ho]||n[_r]||"%a %d"),m=e(n[bi]||"%b %d"),_=e(n[mr]||"%B"),y=e(n[fo]||"%B"),v=e(n[Xi]||"%Y");return b=>(i(b)Ce(i)?t(i):Hte(t,Lm,i),utcFormat:i=>Ce(i)?n(i):Hte(n,$m,i),timeParse:Zv(e.parse),utcParse:Zv(e.utcParse)}}function Wte(){return iL=Gte({format:eL,parse:Bte,utcFormat:tL,utcParse:jte})}function qte(e){return Gte(Dte(e))}function Jv(e){return arguments.length?iL=qte(e):iL}!function k8e(e){Bm=Dte(e),eL=Bm.format,Bte=Bm.parse,tL=Bm.utcFormat,jte=Bm.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Ute(),Wte();const rL=(e,t)=>rt({},e,t);function Yte(e,t){const n=e?zte(e):AS(),i=t?qte(t):Jv();return rL(n,i)}function oL(e,t){const n=arguments.length;return n&&2!==n&&J("defaultLocale expects either zero or two arguments."),n?rL(AS(e),Jv(t)):rL(AS(),Jv())}function F8e(){return Ute(),Wte(),oL()}const P8e=/^(data:|([A-Za-z]+:)?\/\/)/,L8e=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,$8e=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,Kte="file://";function j8e(e,t){return sL.apply(this,arguments)}function sL(){return(sL=qn(function*(e,t){const n=yield this.sanitize(e,t),i=n.href;return n.localFile?this.file(i):this.http(i,t)})).apply(this,arguments)}function V8e(e,t){return aL.apply(this,arguments)}function aL(){return(aL=qn(function*(e,t){t=rt({},this.options,t);const n=this.fileAccess,i={href:null};let r,o,s;const a=L8e.test(e.replace($8e,""));(null==e||"string"!=typeof e||!a)&&J("Sanitize failure, invalid URI: "+ge(e));const l=P8e.test(e);return(s=t.baseURL)&&!l&&(!e.startsWith("/")&&!s.endsWith("/")&&(e="/"+e),e=s+e),o=(r=e.startsWith(Kte))||"file"===t.mode||"http"!==t.mode&&!l&&n,r?e=e.slice(Kte.length):e.startsWith("//")&&("file"===t.defaultProtocol?(e=e.slice(2),o=!0):e=(t.defaultProtocol||"http")+":"+e),Object.defineProperty(i,"localFile",{value:!!o}),i.href=e,t.target&&(i.target=t.target+""),t.rel&&(i.rel=t.rel+""),"image"===t.context&&t.crossOrigin&&(i.crossOrigin=t.crossOrigin+""),i})).apply(this,arguments)}function U8e(e){return e?t=>new Promise((n,i)=>{e.readFile(t,(r,o)=>{r?i(r):n(o)})}):z8e}function z8e(){return lL.apply(this,arguments)}function lL(){return(lL=qn(function*(){J("No file system access.")})).apply(this,arguments)}function H8e(e){return e?function(){var t=qn(function*(n,i){const r=rt({},this.options.http,i),o=i&&i.response,s=yield e(n,r);return s.ok?it(s[o])?s[o]():s.text():J(s.status+""+s.statusText)});return function(n,i){return t.apply(this,arguments)}}():G8e}function G8e(){return cL.apply(this,arguments)}function cL(){return(cL=qn(function*(){J("No HTTP fetch method available.")})).apply(this,arguments)}const W8e=e=>null!=e&&e==e,Xte=e=>!(Number.isNaN(+e)||e instanceof Date),uL={boolean:MP,integer:pr,number:pr,date:NP,string:IP,unknown:hr},MS=[e=>"true"===e||"false"===e||!0===e||!1===e,e=>Xte(e)&&Number.isInteger(+e),Xte,e=>!Number.isNaN(Date.parse(e))],X8e=["boolean","integer","number","date"];function Qte(e,t){if(!e||!e.length)return"unknown";const n=e.length,i=MS.length,r=MS.map((o,s)=>s+1);for(let a,l,o=0,s=0;o0===o?s:o,0)-1]}function Zte(e,t){return t.reduce((n,i)=>(n[i]=Qte(e,i),n),{})}function Jte(e){const t=function(n,i){const r={delimiter:e};return dL(n,i?rt(i,r):r)};return t.responseType="text",t}function dL(e,t){return t.header&&(e=t.header.map(ge).join(t.delimiter)+"\n"+e),GBe(t.delimiter).parse(e+"")}function fL(e,t){const n=t&&t.property?As(t.property):hr;return we(e)&&!function Q8e(e){return!("function"!=typeof Buffer||!it(Buffer.isBuffer))&&Buffer.isBuffer(e)}(e)?function Z8e(e,t){return!te(e)&&Oee(e)&&(e=[...e]),t&&t.copy?JSON.parse(JSON.stringify(e)):e}(n(e),t):n(JSON.parse(e))}dL.responseType="text",fL.responseType="json";const J8e={interior:(e,t)=>e!==t,exterior:(e,t)=>e===t};function ene(e,t){let n,i,r,o;return e=fL(e,t),t&&t.feature?(n=KBe,r=t.feature):t&&t.mesh?(n=QBe,r=t.mesh,o=J8e[t.filter]):J("Missing TopoJSON feature or mesh parameter."),i=(i=e.objects[r])?n(e,i,o):J("Invalid TopoJSON object: "+r),i&&i.features||[i]}ene.responseType="json";const NS={dsv:dL,csv:Jte(","),tsv:Jte("\t"),json:fL,topojson:ene};function hL(e,t){return arguments.length>1?(NS[e]=t,this):De(NS,e)?NS[e]:null}function tne(e){const t=hL(e);return t&&t.responseType||"text"}function nne(e,t,n,i){const r=hL((t=t||{}).type||"json");return r||J("Unknown data format type: "+t.type),e=r(e,t),t.parse&&function e4e(e,t,n,i){if(!e.length)return;const r=Jv();n=n||r.timeParse,i=i||r.utcParse;let s,a,l,c,u,d,o=e.columns||Object.keys(e[0]);"auto"===t&&(t=Zte(e,o)),o=Object.keys(t);const f=o.map(h=>{const p=t[h];let g,m;if(p&&(p.startsWith("date:")||p.startsWith("utc:")))return g=p.split(/:(.+)?/,2),m=g[1],("'"===m[0]&&"'"===m[m.length-1]||'"'===m[0]&&'"'===m[m.length-1])&&(m=m.slice(1,-1)),("utc"===g[0]?i:n)(m);if(!uL[p])throw Error("Illegal format pattern: "+h+":"+p);return uL[p]});for(l=0,u=e.length,d=o.length;l({options:n||{},sanitize:V8e,load:j8e,fileAccess:!!t,file:U8e(t),http:H8e(e)})}(typeof fetch<"u"&&fetch,null);function kS(e){const t=e||hr,n=[],i={};return n.add=r=>{const o=t(r);return i[o]||(i[o]=1,n.push(r)),n},n.remove=r=>{const o=t(r);if(i[o]){i[o]=0;const s=n.indexOf(r);s>=0&&n.splice(s,1)}return n},n}function OS(e,t){return pL.apply(this,arguments)}function pL(){return(pL=qn(function*(e,t){try{yield t(e)}catch(n){e.error(n)}})).apply(this,arguments)}const ine=Symbol("vega_id");let t4e=1;function RS(e){return!(!e||!Fe(e))}function Fe(e){return e[ine]}function rne(e,t){return e[ine]=t,e}function Ft(e){const t=e===Object(e)?e:{data:e};return Fe(t)?t:rne(t,t4e++)}function gL(e){return FS(e,Ft({}))}function FS(e,t){for(const n in e)t[n]=e[n];return t}function one(e,t){return rne(t,Fe(e))}function fh(e,t){return e?t?(n,i)=>e(n,i)||Fe(t(n))-Fe(t(i)):(n,i)=>e(n,i)||Fe(n)-Fe(i):null}function sne(e){return e&&e.constructor===hh}function hh(){const e=[],t=[],n=[],i=[],r=[];let o=null,s=!1;return{constructor:hh,insert(a){const l=Ee(a),c=l.length;for(let u=0;u{p(y)&&(c[Fe(y)]=-1)});for(d=0,f=e.length;d0&&(_(g,p,h.value),a.modifies(p));for(d=0,f=r.length;d{p(y)&&c[Fe(y)]>0&&_(y,h.field,h.value)}),a.modifies(h.field);if(s)a.mod=t.length||i.length?l.filter(y=>c[Fe(y)]>0):l.slice();else for(m in u)a.mod.push(u[m]);return(o||null==o&&(t.length||i.length))&&a.clean(!0),a}}}const PS="_:mod:_";function LS(){Object.defineProperty(this,PS,{writable:!0,value:{}})}LS.prototype={set(e,t,n,i){const r=this,o=r[e],s=r[PS];return null!=t&&t>=0?(o[t]!==n||i)&&(o[t]=n,s[t+":"+e]=-1,s[e]=-1):(o!==n||i)&&(r[e]=n,s[e]=te(n)?1+n.length:-1),r},modified(e,t){const n=this[PS];if(!arguments.length){for(const i in n)if(n[i])return!0;return!1}if(te(e)){for(let i=0;i=0?t+1{h instanceof ln?(h!==this&&(t&&h.targets().add(this),o.push(h)),r.push({op:h,name:d,index:f})):i.set(d,f,h)};for(s in e)if(a=e[s],"pulse"===s)Ee(a).forEach(d=>{d instanceof ln?d!==this&&(d.targets().add(this),o.push(d)):J("Pulse parameters must be operator instances.")}),this.source=a;else if(te(a))for(i.set(s,-1,Array(l=a.length)),c=0;ct=i);return n.requests=0,n.done=()=>{0==--n.requests&&(e._pending=null,t(e))},e._pending=n}(i);r.requests+=1;const o=yield i.request(t,n);return i.pulse(e,i.changeset().remove(Ms).insert(o.data||[])),r.done(),o})).apply(this,arguments)}$S.prototype={_filter:Ms,_apply:hr,targets(){return this._targets||(this._targets=kS(Pv))},consume(e){return arguments.length?(this._consume=!!e,this):!!this._consume},receive(e){if(this._filter(e)){const t=this.value=this._apply(e),n=this._targets,i=n?n.length:0;for(let r=0;r{const n=Date.now();return n-t>e?(t=n,1):0})},debounce(e){const t=sd();return this.targets().add(sd(null,null,xP(e,n=>{const i=n.dataflow;t.receive(n),i&&i.run&&i.run()}))),t},between(e,t){let n=!1;return e.targets().add(sd(null,null,()=>n=!0)),t.targets().add(sd(null,null,()=>n=!1)),this.filter(()=>n)},detach(){this._filter=Ms,this._targets=null}};const m4e={skip:!0};function y4e(e,t,n,i,r,o){const s=rt({},o,m4e);let a,l;it(n)||(n=gr(n)),void 0===i?a=c=>e.touch(n(c)):it(i)?(l=new ln(null,i,r,!1),a=c=>{l.evaluate(c);const u=n(c),d=l.value;sne(d)?e.pulse(u,d,o):e.update(u,d,s)}):a=c=>e.update(n(c),i,s),t.apply(a)}function v4e(e,t,n,i,r,o){if(void 0===i)t.targets().add(n);else{const s=o||{},a=new ln(null,function b4e(e,t){return t=it(t)?t:gr(t),e?function(n,i){const r=t(n,i);return e.skip()||(e.skip(r!==this.value).value=r),r}:t}(n,i),r,!1);a.modified(s.force),a.rank=t.rank,t.targets().add(a),n&&(a.skip(!0),a.value=n.value,a.targets().add(n),e.connect(n,[a]))}}const BS={};function ld(e,t,n){this.dataflow=e,this.stamp=t??-1,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=n||null}function yL(e,t){const n=[];return id(e,t,i=>n.push(i)),n}function fne(e,t){const n={};return e.visit(t,i=>{n[Fe(i)]=1}),i=>n[Fe(i)]?null:i}function jS(e,t){return e?(n,i)=>e(n,i)&&t(n,i):t}function vL(e,t,n,i){const r=this;let o=0;this.dataflow=e,this.stamp=t,this.fields=null,this.encode=i||null,this.pulses=n;for(const s of n)if(s.stamp===t){if(s.fields){const a=r.fields||(r.fields={});for(const l in s.fields)a[l]=1}s.changed(r.ADD)&&(o|=r.ADD),s.changed(r.REM)&&(o|=r.REM),s.changed(r.MOD)&&(o|=r.MOD)}this.changes=o}function bL(){return(bL=qn(function*(e,t,n){const i=this,r=[];if(i._pulse)return hne(i);if(i._pending&&(yield i._pending),t&&(yield OS(i,t)),!i._touched.length)return i.debug("Dataflow invoked, but nothing to do."),i;const o=++i._clock;i._pulse=new ld(i,o,e),i._touched.forEach(u=>i._enqueue(u,!0)),i._touched=kS(Pv);let a,l,c,s=0;try{for(;i._heap.size()>0;)a=i._heap.pop(),a.rank===a.qrank?(l=a.run(i._getPulse(a,e)),l.then?l=yield l:l.async&&(r.push(l.async),l=BS),l!==BS&&a._targets&&a._targets.forEach(u=>i._enqueue(u)),++s):i._enqueue(a,!0)}catch(u){i._heap.clear(),c=u}if(i._input={},i._pulse=null,i.debug(`Pulse ${o}: ${s} operators`),c&&(i._postrun=[],i.error(c)),i._postrun.length){const u=i._postrun.sort((d,f)=>f.priority-d.priority);i._postrun=[];for(let d=0;di.runAsync(null,()=>{u.forEach(d=>{try{d(i)}catch(f){i.error(f)}})})),i})).apply(this,arguments)}function wL(){return(wL=qn(function*(e,t,n){for(;this._running;)yield this._running;const i=()=>this._running=null;return(this._running=this.evaluate(e,t,n)).then(i,i),this._running})).apply(this,arguments)}function hne(e){return e.error("Dataflow already running. Use runAsync() to chain invocations."),e}ld.prototype={StopPropagation:BS,ADD:1,REM:2,MOD:4,ADD_REM:3,ADD_MOD:5,ALL:7,REFLOW:8,SOURCE:16,NO_SOURCE:32,NO_FIELDS:64,fork(e){return new ld(this.dataflow).init(this,e)},clone(){const e=this.fork(7);return e.add=e.add.slice(),e.rem=e.rem.slice(),e.mod=e.mod.slice(),e.source&&(e.source=e.source.slice()),e.materialize(23)},addAll(){let e=this;return!e.source||e.add===e.rem||!e.rem.length&&e.source.length===e.add.length||(e=new ld(this.dataflow).init(this),e.add=e.source,e.rem=[]),e},init(e,t){const n=this;return n.stamp=e.stamp,n.encode=e.encode,e.fields&&!(64&t)&&(n.fields=e.fields),1&t?(n.addF=e.addF,n.add=e.add):(n.addF=null,n.add=[]),2&t?(n.remF=e.remF,n.rem=e.rem):(n.remF=null,n.rem=[]),4&t?(n.modF=e.modF,n.mod=e.mod):(n.modF=null,n.mod=[]),32&t?(n.srcF=null,n.source=null):(n.srcF=e.srcF,n.source=e.source,e.cleans&&(n.cleans=e.cleans)),n},runAfter(e){this.dataflow.runAfter(e)},changed(e){const t=e||7;return 1&t&&this.add.length||2&t&&this.rem.length||4&t&&this.mod.length},reflow(e){if(e)return this.fork(7).reflow();const t=this.add.length,n=this.source&&this.source.length;return n&&n!==t&&(this.mod=this.source,t&&this.filter(4,fne(this,1))),this},clean(e){return arguments.length?(this.cleans=!!e,this):this.cleans},modifies(e){const t=this.fields||(this.fields={});return te(e)?e.forEach(n=>t[n]=!0):t[e]=!0,this},modified(e,t){const n=this.fields;return!(!t&&!this.mod.length||!n)&&(arguments.length?te(e)?e.some(i=>n[i]):n[e]:!!n)},filter(e,t){const n=this;return 1&e&&(n.addF=jS(n.addF,t)),2&e&&(n.remF=jS(n.remF,t)),4&e&&(n.modF=jS(n.modF,t)),16&e&&(n.srcF=jS(n.srcF,t)),n},materialize(e){const t=this;return 1&(e=e||7)&&t.addF&&(t.add=yL(t.add,t.addF),t.addF=null),2&e&&t.remF&&(t.rem=yL(t.rem,t.remF),t.remF=null),4&e&&t.modF&&(t.mod=yL(t.mod,t.modF),t.modF=null),16&e&&t.srcF&&(t.source=t.source.filter(t.srcF),t.srcF=null),t},visit(e,t){const n=this,i=t;if(16&e)return id(n.source,n.srcF,i),n;1&e&&id(n.add,n.addF,i),2&e&&id(n.rem,n.remF,i),4&e&&id(n.mod,n.modF,i);const r=n.source;if(8&e&&r){const o=n.add.length+n.mod.length;o===r.length||id(r,o?fne(n,5):n.srcF,i)}return n}},me(vL,ld,{fork(e){const t=new ld(this.dataflow).init(this,e&this.NO_FIELDS);return void 0!==e&&(e&t.ADD&&this.visit(t.ADD,n=>t.add.push(n)),e&t.REM&&this.visit(t.REM,n=>t.rem.push(n)),e&t.MOD&&this.visit(t.MOD,n=>t.mod.push(n))),t},changed(e){return this.changes&e},modified(e){const t=this,n=t.fields;return n&&t.changes&t.MOD?te(e)?e.some(i=>n[i]):n[e]:0},filter(){J("MultiPulse does not support filtering.")},materialize(){J("MultiPulse does not support materialization.")},visit(e,t){const n=this,i=n.pulses,r=i.length;let o=0;if(e&n.SOURCE)for(;ot&&(o=n-1>>1,r=e[o],i(s,r)<0);)e[n]=r,n=o;return e[n]=s}function Vm(){this.logger(EP()),this.logLevel(bP),this._clock=0,this._rank=0,this._locale=oL();try{this._loader=IS()}catch{}this._touched=kS(Pv),this._input={},this._pulse=null,this._heap=function R4e(e){let t=[];return{clear:()=>t=[],size:()=>t.length,peek:()=>t[0],push:n=>(t.push(n),pne(t,0,t.length-1,e)),pop:()=>{const n=t.pop();let i;return t.length?(i=t[0],t[0]=n,function F4e(e,t,n){const i=t,r=e.length,o=e[t];let a,s=1+(t<<1);for(;s=0&&(s=a),e[t]=e[s],s=1+((t=s)<<1);e[t]=o,pne(e,i,t,n)}(t,0,e)):i=n,i}}}((e,t)=>e.qrank-t.qrank),this._postrun=[]}function t1(e){return function(){return this._log[e].apply(this,arguments)}}function K(e,t){ln.call(this,e,null,t)}Vm.prototype={stamp(){return this._clock},loader(e){return arguments.length?(this._loader=e,this):this._loader},locale(e){return arguments.length?(this._locale=e,this):this._locale},logger(e){return arguments.length?(this._log=e,this):this._log},error:t1("error"),warn:t1("warn"),info:t1("info"),debug:t1("debug"),logLevel:t1("level"),cleanThreshold:1e4,add:function a4e(e,t,n,i){let o,r=1;return e instanceof ln?o=e:e&&e.prototype instanceof ln?o=new e:it(e)?o=new ln(null,e):(r=0,o=new ln(e,t)),this.rank(o),r&&(i=n,n=t),n&&this.connect(o,o.parameters(n,i)),this.touch(o),o},connect:function l4e(e,t){const n=e.rank,i=t.length;for(let r=0;r=0;)t.push(n=i[r]),n===e&&J("Cycle detected in dataflow graph.")},pulse:function O4e(e,t,n){this.touch(e,n||EL);const i=new ld(this,this._clock+(this._pulse?0:1)),r=e.pulse&&e.pulse.source||[];return i.target=e,this._input[e.id]=t.pulse(i,r),this},touch:function I4e(e,t){const n=t||EL;return this._pulse?this._enqueue(e):this._touched.add(e),n.skip&&e.skip(!0),this},update:function k4e(e,t,n){const i=n||EL;return(e.set(t)||i.force)&&this.touch(e,i),this},changeset:hh,ingest:function f4e(e,t,n){return t=this.parse(t,n),this.pulse(e,this.changeset().insert(t))},parse:function d4e(e,t){const n=this.locale();return nne(e,t,n.timeParse,n.utcParse)},preload:function p4e(e,t,n){return _L.apply(this,arguments)},request:function h4e(e,t){return mL.apply(this,arguments)},events:function u4e(e,t,n,i){const r=this,o=sd(n,i),s=function(c){c.dataflow=r;try{o.receive(c)}catch(u){r.error(u)}finally{r.run()}};let a;a="string"==typeof e&&typeof document<"u"?document.querySelectorAll(e):Ee(e);const l=a.length;for(let c=0;cr.pulse),t):this._input[e.id]||function N4e(e,t){return t&&t.stamp===e.stamp?t:(e=e.fork(),t&&t!==BS&&(e.source=t.source),e)}(this._pulse,n&&n.pulse)}},me(K,ln,{run(e){if(e.stampthis.pulse=n):t!==e.StopPropagation&&(this.pulse=t),t},evaluate(e){const t=this.marshall(e.stamp),n=this.transform(t,e);return t.clear(),n},transform(){}});const Um={};function gne(e){const t=mne(e);return t&&t.Definition||null}function mne(e){return e=e&&e.toLowerCase(),De(Um,e)?Um[e]:null}function ph(e,t){let n;if(void 0===t)for(const i of e)null!=i&&(n=i)&&(n=i);else{let i=-1;for(let r of e)null!=(r=t(r,++i,e))&&(n=r)&&(n=r)}return n}function CL(e,t){let n;if(void 0===t)for(const i of e)null!=i&&(n>i||void 0===n&&i>=i)&&(n=i);else{let i=-1;for(let r of e)null!=(r=t(r,++i,e))&&(n>r||void 0===n&&r>=r)&&(n=r)}return n}function VS(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(et?1:0)}function yne(e,t,n=0,i=1/0,r){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),i=Math.floor(Math.min(e.length-1,i)),!(n<=t&&t<=i))return e;for(r=void 0===r?VS:function _ne(e=qc){if(e===qc)return VS;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const i=e(t,n);return i||0===i?i:(0===e(n,n))-(0===e(t,t))}}(r);i>n;){if(i-n>600){const l=i-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1);yne(e,t,Math.max(n,Math.floor(t-c*d/l+f)),Math.min(i,Math.floor(t+(l-c)*d/l+f)),r)}const o=e[t];let s=n,a=i;for(n1(e,n,t),r(e[i],o)>0&&n1(e,n,i);s0;)--a}0===r(e[n],o)?n1(e,n,a):(++a,n1(e,a,i)),a<=t&&(n=a+1),t<=a&&(i=a-1)}return e}function n1(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function vne(e){return null===e?NaN:+e}function DL(e,t,n){if(e=Float64Array.from(function*P4e(e,t){if(void 0===t)for(let n of e)null!=n&&(n=+n)>=n&&(yield n);else{let n=-1;for(let i of e)null!=(i=t(i,++n,e))&&(i=+i)>=i&&(yield i)}}(e,n)),(i=e.length)&&!isNaN(t=+t)){if(t<=0||i<2)return CL(e);if(t>=1)return ph(e);var i,r=(i-1)*t,o=Math.floor(r),s=ph(yne(e,o).subarray(0,o+1));return s+(CL(e.subarray(o+1))-s)*(r-o)}}function bne(e,t,n=vne){if((i=e.length)&&!isNaN(t=+t)){if(t<=0||i<2)return+n(e[0],0,e);if(t>=1)return+n(e[i-1],i-1,e);var i,r=(i-1)*t,o=Math.floor(r),s=+n(e[o],o,e);return s+(+n(e[o+1],o+1,e)-s)*(r-o)}}function wne(e,t){return DL(e,.5,t)}function*Ene(e,t){if(null==t)for(let n of e)null!=n&&""!==n&&(n=+n)>=n&&(yield n);else{let n=-1;for(let i of e)i=t(i,++n,e),null!=i&&""!==i&&(i=+i)>=i&&(yield i)}}function SL(e,t,n){const i=Float64Array.from(Ene(e,n));return i.sort(qc),t.map(r=>bne(i,r))}function TL(e,t){return SL(e,[.25,.5,.75],t)}function xL(e,t){const n=e.length,i=function $4e(e,t){const n=function L4e(e,t){let i,n=0,r=0,o=0;if(void 0===t)for(let s of e)null!=s&&(s=+s)>=s&&(i=s-r,r+=i/++n,o+=i*(s-r));else{let s=-1;for(let a of e)null!=(a=t(a,++s,e))&&(a=+a)>=a&&(i=a-r,r+=i/++n,o+=i*(a-r))}if(n>1)return o/(n-1)}(e,t);return n&&Math.sqrt(n)}(e,t),r=TL(e,t);return 1.06*(Math.min(i,(r[2]-r[0])/1.34)||i||Math.abs(r[0])||1)*Math.pow(n,-.2)}function Cne(e){const t=e.maxbins||20,n=e.base||10,i=Math.log(n),r=e.divide||[5,2];let a,l,c,u,d,f,o=e.extent[0],s=e.extent[1];const h=e.span||s-o||Math.abs(o)||1;if(e.step)a=e.step;else if(e.steps){for(u=h/t,d=0,f=e.steps.length;dt;)a*=n;for(d=0,f=r.length;d=c&&h/u<=t&&(a=u)}u=Math.log(a);const g=Math.pow(n,-(u>=0?0:1+~~(-u/i))-1);return(e.nice||void 0===e.nice)&&(u=Math.floor(o/a+g)*a,o=of);const r=e.length,o=new Float64Array(r);let d,s=0,a=1,l=i(e[0]),c=l,u=l+t;for(;a=u){for(c=(l+c)/2;s>1);sr;)e[s--]=e[i]}i=r,r=o}return e}(o,t+t/4):o}function V4e(e){return function(){return(e=(1103515245*e+12345)%2147483647)/2147483647}}function U4e(e,t){let n,i,r;null==t&&(t=e,e=0);const o={min(s){return arguments.length?(n=s||0,r=i-n,o):n},max(s){return arguments.length?(i=s||0,r=i-n,o):i},sample:()=>n+Math.floor(r*ks()),pdf:s=>s===Math.floor(s)&&s>=n&&s=i?1:(a-n+1)/r},icdf:s=>s>=0&&s<=1?n-1+Math.floor(s*r):NaN};return o.min(e).max(t)}const Tne=Math.sqrt(2*Math.PI),z4e=Math.SQRT2;let i1=NaN;function US(e,t){e=e||0,t=t??1;let r,o,n=0,i=0;if(i1==i1)n=i1,i1=NaN;else{do{n=2*ks()-1,i=2*ks()-1,r=n*n+i*i}while(0===r||r>1);o=Math.sqrt(-2*Math.log(r)/r),n*=o,i1=i*o}return e+n*t}function AL(e,t,n){const i=(e-(t||0))/(n=n??1);return Math.exp(-.5*i*i)/(n*Tne)}function zS(e,t,n){const i=(e-(t=t||0))/(n=n??1),r=Math.abs(i);let o;if(r>37)o=0;else{const s=Math.exp(-r*r/2);let a;r<7.07106781186547?(a=.0352624965998911*r+.700383064443688,a=a*r+6.37396220353165,a=a*r+33.912866078383,a=a*r+112.079291497871,a=a*r+221.213596169931,a=a*r+220.206867912376,o=s*a,a=.0883883476483184*r+1.75566716318264,a=a*r+16.064177579207,a=a*r+86.7807322029461,a=a*r+296.564248779674,a=a*r+637.333633378831,a=a*r+793.826512519948,a=a*r+440.413735824752,o/=a):(a=r+.65,a=r+4/a,a=r+3/a,a=r+2/a,a=r+1/a,o=s/a/2.506628274631)}return i>0?1-o:o}function HS(e,t,n){return e<0||e>1?NaN:(t||0)+(n??1)*z4e*function H4e(e){let n,t=-Math.log((1-e)*(1+e));return t<6.25?(t-=3.125,n=-364441206401782e-35,n=n*t-16850591381820166e-35,n=128584807152564e-32+n*t,n=11157877678025181e-33+n*t,n=n*t-1333171662854621e-31,n=20972767875968562e-33+n*t,n=6637638134358324e-30+n*t,n=n*t-4054566272975207e-29,n=n*t-8151934197605472e-29,n=26335093153082323e-28+n*t,n=n*t-12975133253453532e-27,n=n*t-5415412054294628e-26,n=1.0512122733215323e-9+n*t,n=n*t-4.112633980346984e-9,n=n*t-2.9070369957882005e-8,n=4.2347877827932404e-7+n*t,n=n*t-13654692000834679e-22,n=n*t-13882523362786469e-21,n=.00018673420803405714+n*t,n=n*t-.000740702534166267,n=n*t-.006033670871430149,n=.24015818242558962+n*t,n=1.6536545626831027+n*t):t<16?(t=Math.sqrt(t)-3.25,n=2.2137376921775787e-9,n=9.075656193888539e-8+n*t,n=n*t-2.7517406297064545e-7,n=1.8239629214389228e-8+n*t,n=15027403968909828e-22+n*t,n=n*t-4013867526981546e-21,n=29234449089955446e-22+n*t,n=12475304481671779e-21+n*t,n=n*t-47318229009055734e-21,n=6828485145957318e-20+n*t,n=24031110387097894e-21+n*t,n=n*t-.0003550375203628475,n=.0009532893797373805+n*t,n=n*t-.0016882755560235047,n=.002491442096107851+n*t,n=n*t-.003751208507569241,n=.005370914553590064+n*t,n=1.0052589676941592+n*t,n=3.0838856104922208+n*t):Number.isFinite(t)?(t=Math.sqrt(t)-5,n=-27109920616438573e-27,n=n*t-2.555641816996525e-10,n=1.5076572693500548e-9+n*t,n=n*t-3.789465440126737e-9,n=7.61570120807834e-9+n*t,n=n*t-1.496002662714924e-8,n=2.914795345090108e-8+n*t,n=n*t-6.771199775845234e-8,n=2.2900482228026655e-7+n*t,n=n*t-9.9298272942317e-7,n=4526062597223154e-21+n*t,n=n*t-1968177810553167e-20,n=7599527703001776e-20+n*t,n=n*t-.00021503011930044477,n=n*t-.00013871931833623122,n=1.0103004648645344+n*t,n=4.849906401408584+n*t):n=1/0,n*e}(2*e-1)}function ML(e,t){let n,i;const r={mean(o){return arguments.length?(n=o||0,r):n},stdev(o){return arguments.length?(i=o??1,r):i},sample:()=>US(n,i),pdf:o=>AL(o,n,i),cdf:o=>zS(o,n,i),icdf:o=>HS(o,n,i)};return r.mean(e).stdev(t)}function NL(e,t){const n=ML();let i=0;const r={data(o){return arguments.length?(e=o,i=o?o.length:0,r.bandwidth(t)):e},bandwidth(o){return arguments.length?(!(t=o)&&e&&(t=xL(e)),r):t},sample:()=>e[~~(ks()*i)]+t*n.sample(),pdf(o){let s=0,a=0;for(;aIL(n,i),pdf:o=>kL(o,n,i),cdf:o=>OL(o,n,i),icdf:o=>RL(o,n,i)};return r.mean(e).stdev(t)}function Ane(e,t){let i,n=0;const o={weights(s){return arguments.length?(i=function r(s){const a=[];let c,l=0;for(c=0;c=t&&e<=n?1/(n-t):0}function LL(e,t,n){return null==n&&(n=t??1,t=0),en?1:(e-t)/(n-t)}function $L(e,t,n){return null==n&&(n=t??1,t=0),e>=0&&e<=1?t+e*(n-t):NaN}function Mne(e,t){let n,i;const r={min(o){return arguments.length?(n=o||0,r):n},max(o){return arguments.length?(i=o??1,r):i},sample:()=>FL(n,i),pdf:o=>PL(o,n,i),cdf:o=>LL(o,n,i),icdf:o=>$L(o,n,i)};return null==t&&(t=e??1,e=0),r.min(e).max(t)}function BL(e,t,n){let i=0,r=0;for(const o of e){const s=n(o);null==t(o)||null==s||isNaN(s)||(i+=(s-i)/++r)}return{coef:[i],predict:()=>i,rSquared:0}}function r1(e,t,n,i){const r=i-e*e,o=Math.abs(r)<1e-24?0:(n-e*t)/r;return[t-o*e,o]}function GS(e,t,n,i){e=e.filter(h=>{let p=t(h),g=n(h);return null!=p&&(p=+p)>=p&&null!=g&&(g=+g)>=g}),i&&e.sort((h,p)=>t(h)-t(p));const r=e.length,o=new Float64Array(r),s=new Float64Array(r);let u,d,f,a=0,l=0,c=0;for(f of e)o[a]=u=+t(f),s[a]=d=+n(f),++a,l+=(u-l)/a,c+=(d-c)/a;for(a=0;a=o&&null!=s&&(s=+s)>=s&&i(o,s,++r)}function zm(e,t,n,i,r){let o=0,s=0;return o1(e,t,n,(a,l)=>{const c=l-r(a),u=l-i;o+=c*c,s+=u*u}),1-o/s}function jL(e,t,n){let i=0,r=0,o=0,s=0,a=0;o1(e,t,n,(u,d)=>{++a,i+=(u-i)/a,r+=(d-r)/a,o+=(u*d-o)/a,s+=(u*u-s)/a});const l=r1(i,r,o,s),c=u=>l[0]+l[1]*u;return{coef:l,predict:c,rSquared:zm(e,t,n,r,c)}}function Nne(e,t,n){let i=0,r=0,o=0,s=0,a=0;o1(e,t,n,(u,d)=>{++a,u=Math.log(u),i+=(u-i)/a,r+=(d-r)/a,o+=(u*d-o)/a,s+=(u*u-s)/a});const l=r1(i,r,o,s),c=u=>l[0]+l[1]*Math.log(u);return{coef:l,predict:c,rSquared:zm(e,t,n,r,c)}}function Ine(e,t,n){const[i,r,o,s]=GS(e,t,n);let f,h,p,a=0,l=0,c=0,u=0,d=0;o1(e,t,n,(y,v)=>{f=i[d++],h=Math.log(v),p=f*v,a+=(v*h-a)/d,l+=(p-l)/d,c+=(p*h-c)/d,u+=(f*p-u)/d});const[g,m]=r1(l/s,a/s,c/s,u/s),_=y=>Math.exp(g+m*(y-o));return{coef:[Math.exp(g-m*o),m],predict:_,rSquared:zm(e,t,n,s,_)}}function kne(e,t,n){let i=0,r=0,o=0,s=0,a=0,l=0;o1(e,t,n,(d,f)=>{const h=Math.log(d),p=Math.log(f);++l,i+=(h-i)/l,r+=(p-r)/l,o+=(h*p-o)/l,s+=(h*h-s)/l,a+=(f-a)/l});const c=r1(i,r,o,s),u=d=>c[0]*Math.pow(d,c[1]);return c[0]=Math.exp(c[0]),{coef:c,predict:u,rSquared:zm(e,t,n,a,u)}}function VL(e,t,n){const[i,r,o,s]=GS(e,t,n),a=i.length;let h,p,g,m,l=0,c=0,u=0,d=0,f=0;for(h=0;hv*(E-=o)*E+b*E+w+s;return{coef:[w-b*o+v*o*o+s,b-2*v*o,v],predict:C,rSquared:zm(e,t,n,s,C)}}function One(e,t,n,i){if(0===i)return BL(e,t,n);if(1===i)return jL(e,t,n);if(2===i)return VL(e,t,n);const[r,o,s,a]=GS(e,t,n),l=r.length,c=[],u=[],d=i+1;let f,h,p,g,m;for(f=0;fMath.abs(e[i][s])&&(s=r);for(o=i;o=i;o--)e[o][r]-=e[o][i]*e[i][r]/e[i][i]}for(r=t-1;r>=0;--r){for(a=0,o=r+1;o{let b=a+_[0]+_[1]*(v-=s)+_[2]*v*v;for(f=3;f=0;--o)for(a=t[o],l=1,r[o]+=a,s=1;s<=o;++s)l*=(o+1-s)/s,r[o-s]+=a*Math.pow(n,s)*l;return r[0]+=i,r}const Rne=2,Fne=1e-12;function Pne(e,t,n,i){const[r,o,s,a]=GS(e,t,n,!0),l=r.length,c=Math.max(2,~~(i*l)),u=new Float64Array(l),d=new Float64Array(l),f=new Float64Array(l).fill(1);for(let h=-1;++h<=Rne;){const p=[0,c-1];for(let m=0;mr[v]-_?y:v]-_||1);for(let P=y;P<=v;++P){const T=r[P],S=o[P],x=q4e(Math.abs(_-T)*k)*f[P],I=T*x;w+=x,C+=I,E+=S*x,D+=S*I,M+=T*I}const[R,F]=r1(C/w,E/w,D/w,M/w);u[m]=R+F*_,d[m]=Math.abs(o[m]-u[m]),Y4e(r,m+1,p)}if(h===Rne)break;const g=wne(d);if(Math.abs(g)=1?Fne:(y=1-_*_)*y}return function K4e(e,t,n,i){const r=e.length,o=[];let c,s=0,a=0,l=[];for(;s=e.length))for(;t>r&&e[o]-i<=i-e[r];)n[0]=++r,n[1]=o,++o}const X4e=.5*Math.PI/180;function WS(e,t,n,i){n=n||25,i=Math.max(n,i||200);const r=g=>[g,e(g)],o=t[0],s=t[1],a=s-o,l=a/i,c=[r(o)],u=[];if(n===i){for(let g=1;g0;)u.push(r(o+g/n*a));let d=c[0],f=u[u.length-1];const h=1/a,p=function Q4e(e,t){let n=e,i=e;const r=t.length;for(let o=0;oi&&(i=s)}return 1/(i-n)}(d[1],u);for(;f;){const g=r((d[0]+f[0])/2);g[0]-d[0]>=l&&Z4e(d,g,f,h,p)>X4e?u.push(g):(d=f,c.push(f),u.pop()),f=u[u.length-1]}return c}function Z4e(e,t,n,i,r){const o=Math.atan2(r*(n[1]-e[1]),i*(n[0]-e[0])),s=Math.atan2(r*(t[1]-e[1]),i*(t[0]-e[0]));return Math.abs(o-s)}function Yo(e,t,n){e=+e,t=+t,n=(r=arguments.length)<2?(t=e,e=0,1):r<3?1:+n;for(var i=-1,r=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(r);++i{const n=e.length;let i=1,r=String(e[0](t));for(;i{},t6e={init:zL,add:zL,rem:zL,idx:0},s1={values:{init:e=>e.cell.store=!0,value:e=>e.cell.data.values(),idx:-1},count:{value:e=>e.cell.num},__count__:{value:e=>e.missing+e.valid},missing:{value:e=>e.missing},valid:{value:e=>e.valid},sum:{init:e=>e.sum=0,value:e=>e.valid?e.sum:void 0,add:(e,t)=>e.sum+=+t,rem:(e,t)=>e.sum-=t},product:{init:e=>e.product=1,value:e=>e.valid?e.product:void 0,add:(e,t)=>e.product*=t,rem:(e,t)=>e.product/=t},mean:{init:e=>e.mean=0,value:e=>e.valid?e.mean:void 0,add:(e,t)=>(e.mean_d=t-e.mean,e.mean+=e.mean_d/e.valid),rem:(e,t)=>(e.mean_d=t-e.mean,e.mean-=e.valid?e.mean_d/e.valid:e.mean)},average:{value:e=>e.valid?e.mean:void 0,req:["mean"],idx:1},variance:{init:e=>e.dev=0,value:e=>e.valid>1?e.dev/(e.valid-1):void 0,add:(e,t)=>e.dev+=e.mean_d*(t-e.mean),rem:(e,t)=>e.dev-=e.mean_d*(t-e.mean),req:["mean"],idx:1},variancep:{value:e=>e.valid>1?e.dev/e.valid:void 0,req:["variance"],idx:2},stdev:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid-1)):void 0,req:["variance"],idx:2},stdevp:{value:e=>e.valid>1?Math.sqrt(e.dev/e.valid):void 0,req:["variance"],idx:2},stderr:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid*(e.valid-1))):void 0,req:["variance"],idx:2},distinct:{value:e=>e.cell.data.distinct(e.get),req:["values"],idx:3},ci0:{value:e=>e.cell.data.ci0(e.get),req:["values"],idx:3},ci1:{value:e=>e.cell.data.ci1(e.get),req:["values"],idx:3},median:{value:e=>e.cell.data.q2(e.get),req:["values"],idx:3},q1:{value:e=>e.cell.data.q1(e.get),req:["values"],idx:3},q3:{value:e=>e.cell.data.q3(e.get),req:["values"],idx:3},min:{init:e=>e.min=void 0,value:e=>e.min=Number.isNaN(e.min)?e.cell.data.min(e.get):e.min,add:(e,t)=>{(t{t<=e.min&&(e.min=NaN)},req:["values"],idx:4},max:{init:e=>e.max=void 0,value:e=>e.max=Number.isNaN(e.max)?e.cell.data.max(e.get):e.max,add:(e,t)=>{(t>e.max||void 0===e.max)&&(e.max=t)},rem:(e,t)=>{t>=e.max&&(e.max=NaN)},req:["values"],idx:4},argmin:{init:e=>e.argmin=void 0,value:e=>e.argmin||e.cell.data.argmin(e.get),add:(e,t,n)=>{t{t<=e.min&&(e.argmin=void 0)},req:["min","values"],idx:3},argmax:{init:e=>e.argmax=void 0,value:e=>e.argmax||e.cell.data.argmax(e.get),add:(e,t,n)=>{t>e.max&&(e.argmax=n)},rem:(e,t)=>{t>=e.max&&(e.argmax=void 0)},req:["max","values"],idx:3},exponential:{init:(e,t)=>{e.exp=0,e.exp_r=t},value:e=>e.valid?e.exp*(1-e.exp_r)/(1-e.exp_r**e.valid):void 0,add:(e,t)=>e.exp=e.exp_r*e.exp+t,rem:(e,t)=>e.exp=(e.exp-t/e.exp_r**(e.valid-1))/e.exp_r},exponentialb:{value:e=>e.valid?e.exp*(1-e.exp_r):void 0,req:["exponential"],idx:1}},a1=Object.keys(s1).filter(e=>"__count__"!==e);function $ne(e,t,n){return s1[e](n,t)}function Bne(e,t){return e.idx-t.idx}function r6e(){this.valid=0,this.missing=0,this._ops.forEach(e=>null==e.aggregate_param?e.init(this):e.init(this,e.aggregate_param))}function o6e(e,t){null!=e&&""!==e?e==e&&(++this.valid,this._ops.forEach(n=>n.add(this,e,t))):++this.missing}function s6e(e,t){null!=e&&""!==e?e==e&&(--this.valid,this._ops.forEach(n=>n.rem(this,e,t))):--this.missing}function a6e(e){return this._out.forEach(t=>e[t.out]=t.value(this)),e}function jne(e,t){const n=t||hr,i=function i6e(e){const t={};e.forEach(i=>t[i.name]=i);const n=i=>{i.req&&i.req.forEach(r=>{t[r]||n(t[r]=s1[r]())})};return e.forEach(n),Object.values(t).sort(Bne)}(e),r=e.slice().sort(Bne);function o(s){this._ops=i,this._out=r,this.cell=s,this.init()}return o.prototype.init=r6e,o.prototype.add=o6e,o.prototype.rem=s6e,o.prototype.set=a6e,o.prototype.get=n,o.fields=e.map(s=>s.out),o}function HL(e){this._key=e?As(e):Fe,this.reset()}[...a1,"__count__"].forEach(e=>{s1[e]=function n6e(e,t){return(n,i)=>rt({name:e,aggregate_param:i,out:n||e},t6e,t)}(e,s1[e])});const Qi=HL.prototype;function cd(e){K.call(this,null,e),this._adds=[],this._mods=[],this._alen=0,this._mlen=0,this._drop=!0,this._cross=!1,this._dims=[],this._dnames=[],this._measures=[],this._countOnly=!1,this._counts=null,this._prev=null,this._inputs=null,this._outputs=null}function GL(e){K.call(this,null,e)}function Vne(e,t,n){const i=e;let r=t||[],o=n||[],s={},a=0;return{add:l=>o.push(l),remove:l=>s[i(l)]=++a,size:()=>r.length,data:(l,c)=>(a&&(r=r.filter(u=>!s[i(u)]),s={},a=0),c&&l&&r.sort(l),o.length&&(r=l?Lee(l,r,o.sort(l)):r.concat(o),o=[]),r)}}function WL(e){K.call(this,[],e)}function Une(e){ln.call(this,null,c6e,e)}function c6e(e){return this.value&&!e.modified()?this.value:TP(e.fields,e.orders)}function qL(e){K.call(this,null,e)}function YL(e){K.call(this,null,e)}Qi.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null},Qi.add=function(e){this._add.push(e)},Qi.rem=function(e){this._rem.push(e)},Qi.values=function(){if(this._get=null,0===this._rem.length)return this._add;const e=this._add,t=this._rem,n=this._key,i=e.length,r=t.length,o=Array(i-r),s={};let a,l,c;for(a=0;a=0;)o=e(t[i])+"",De(n,o)||(n[o]=1,++r);return r},Qi.extent=function(e){if(this._get!==e||!this._ext){const t=this.values(),n=Iee(t,e);this._ext=[t[n[0]],t[n[1]]],this._get=e}return this._ext},Qi.argmin=function(e){return this.extent(e)[0]||{}},Qi.argmax=function(e){return this.extent(e)[1]||{}},Qi.min=function(e){const t=this.extent(e)[0];return null!=t?e(t):void 0},Qi.max=function(e){const t=this.extent(e)[1];return null!=t?e(t):void 0},Qi.quartile=function(e){return(this._get!==e||!this._q)&&(this._q=TL(this.values(),e),this._get=e),this._q},Qi.q1=function(e){return this.quartile(e)[0]},Qi.q2=function(e){return this.quartile(e)[1]},Qi.q3=function(e){return this.quartile(e)[2]},Qi.ci=function(e){return(this._get!==e||!this._ci)&&(this._ci=Dne(this.values(),1e3,.05,e),this._get=e),this._ci},Qi.ci0=function(e){return this.ci(e)[0]},Qi.ci1=function(e){return this.ci(e)[1]},cd.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:a1},{name:"aggregate_params",type:"number",null:!0,array:!0},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"drop",type:"boolean",default:!0},{name:"cross",type:"boolean",default:!1},{name:"key",type:"field"}]},me(cd,K,{transform(e,t){const n=this,i=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=e.modified();return n.stamp=i.stamp,n.value&&(r||t.modified(n._inputs,!0))?(n._prev=n.value,n.value=r?n.init(e):Object.create(null),t.visit(t.SOURCE,o=>n.add(o))):(n.value=n.value||n.init(e),t.visit(t.REM,o=>n.rem(o)),t.visit(t.ADD,o=>n.add(o))),i.modifies(n._outputs),n._drop=!1!==e.drop,e.cross&&n._dims.length>1&&(n._drop=!1,n.cross()),t.clean()&&n._drop&&i.clean(!0).runAfter(()=>this.clean()),n.changes(i)},cross(){const e=this,t=e.value,n=e._dnames,i=n.map(()=>({})),r=n.length;function o(a){let l,c,u,d;for(l in a)for(u=a[l].tuple,c=0;c{const v=$n(y);return r(y),n.push(v),v}),this.cellkey=e.key?e.key:UL(this._dims),this._countOnly=!0,this._counts=[],this._measures=[];const o=e.fields||[null],s=e.ops||["count"],a=e.aggregate_params||[null],l=e.as||[],c=o.length,u={};let d,f,h,p,g,m,_;for(c!==s.length&&J("Unmatched number of fields and aggregate ops."),_=0;_jne(y,y.field)),Object.create(null)},cellkey:UL(),cell(e,t){let n=this.value[e];return n?0===n.num&&this._drop&&n.stamp{const d=i(u);u[a]=d,u[l]=null==d?null:r+o*(1+(d-r)/o)}:u=>u[a]=i(u)),t.modifies(n?s:a)},_bins(e){if(this.value&&!e.modified())return this.value;const t=e.field,n=Cne(e),i=n.step;let s,a,r=n.start,o=r+Math.ceil((n.stop-r)/i)*i;null!=(s=e.anchor)&&(a=s-(r+i*Math.floor((s-r)/i)),r+=a,o+=a);const l=function(c){let u=pr(t(c));return null==u?null:uo?1/0:(u=Math.max(r,Math.min(u,o-i)),r+i*Math.floor(1e-14+(u-r)/i))};return l.start=r,l.stop=n.stop,l.step=i,this.value=co(l,fr(t),e.name||"bin_"+$n(t))}}),WL.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]},me(WL,K,{transform(e,t){const n=t.fork(t.ALL),i=Vne(Fe,this.value,n.materialize(n.ADD).add),r=e.sort,o=t.changed()||r&&(e.modified("sort")||t.modified(r.fields));return n.visit(n.REM,i.remove),this.modified(o),this.value=n.source=i.data(fh(r),o),t.source&&t.source.root&&(this.value.root=t.source.root),n}}),me(Une,ln),qL.Definition={type:"CountPattern",metadata:{generates:!0,changes:!0},params:[{name:"field",type:"field",required:!0},{name:"case",type:"enum",values:["upper","lower","mixed"],default:"mixed"},{name:"pattern",type:"string",default:'[\\w"]+'},{name:"stopwords",type:"string",default:""},{name:"as",type:"string",array:!0,length:2,default:["text","count"]}]},me(qL,K,{transform(e,t){const n=d=>f=>{for(var p,h=function u6e(e,t,n){switch(t){case"upper":e=e.toUpperCase();break;case"lower":e=e.toLowerCase()}return e.match(n)}(a(f),e.case,o)||[],g=0,m=h.length;gr[d]=1+(r[d]||0)),u=n(d=>r[d]-=1);return i?t.visit(t.SOURCE,c):(t.visit(t.ADD,c),t.visit(t.REM,u)),this._finish(t,l)},_parameterCheck(e,t){let n=!1;return(e.modified("stopwords")||!this._stop)&&(this._stop=new RegExp("^"+(e.stopwords||"")+"$","i"),n=!0),(e.modified("pattern")||!this._match)&&(this._match=new RegExp(e.pattern||"[\\w']+","g"),n=!0),(e.modified("field")||t.modified(e.field.fields))&&(n=!0),n&&(this._counts={}),n},_finish(e,t){const n=this._counts,i=this._tuples||(this._tuples={}),r=t[0],o=t[1],s=e.fork(e.NO_SOURCE|e.NO_FIELDS);let a,l,c;for(a in n)l=i[a],c=n[a]||0,!l&&c?(i[a]=l=Ft({}),l[r]=a,l[o]=c,s.add.push(l)):0===c?(l&&s.rem.push(l),n[a]=null,i[a]=null):l[o]!==c&&(l[o]=c,s.mod.push(l));return s.modifies(t)}}),YL.Definition={type:"Cross",metadata:{generates:!0},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:!0,length:2,default:["a","b"]}]},me(YL,K,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.as||["a","b"],r=i[0],o=i[1],s=!this.value||t.changed(t.ADD_REM)||e.modified("as")||e.modified("filter");let a=this.value;return s?(a&&(n.rem=a),a=t.materialize(t.SOURCE).source,n.add=this.value=function d6e(e,t,n,i){for(var l,c,r=[],o={},s=e.length,a=0;aGne(o,t))):"function"==typeof i[r]&&i[r](e[r]);return i}function KL(e){K.call(this,null,e)}const Wne=[{key:{function:"normal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"lognormal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"uniform"},params:[{name:"min",type:"number",default:0},{name:"max",type:"number",default:1}]},{key:{function:"kde"},params:[{name:"field",type:"field",required:!0},{name:"from",type:"data"},{name:"bandwidth",type:"number",default:0}]}];function qne(e,t){return e?e.map((n,i)=>t[i]||$n(n)):null}function XL(e,t,n){const i=[],r=d=>d(l);let o,s,a,l,c,u;if(null==t)i.push(e.map(n));else for(o={},s=0,a=e.length;st(n,e),fr(t),$n(t))}function ZL(e){K.call(this,[void 0,void 0],e)}function JL(e,t){ln.call(this,e),this.parent=t,this.count=0}function qS(e){K.call(this,{},e),this._keys=xm();const t=this._targets=[];t.active=0,t.forEach=n=>{for(let i=0,r=t.active;iAs(t)):As(e.name,e.as)}function e3(e){K.call(this,xm(),e)}function t3(e){K.call(this,[],e)}function n3(e){K.call(this,[],e)}function i3(e){K.call(this,null,e)}function Qne(e){K.call(this,[],e)}KL.Definition={type:"Density",metadata:{generates:!0},params:[{name:"extent",type:"number",array:!0,length:2},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"method",type:"string",default:"pdf",values:["pdf","cdf"]},{name:"distribution",type:"param",params:Wne.concat({key:{function:"mixture"},params:[{name:"distributions",type:"param",array:!0,params:Wne},{name:"weights",type:"number",array:!0}]})},{name:"as",type:"string",array:!0,default:["value","density"]}]},me(KL,K,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const i=Gne(e.distribution,function g6e(e){return()=>e.materialize(e.SOURCE).source}(t)),r=e.steps||e.minsteps||25,o=e.steps||e.maxsteps||200;let s=e.method||"pdf";"pdf"!==s&&"cdf"!==s&&J("Invalid density method: "+s),!e.extent&&!i.data&&J("Missing density extent parameter."),s=i[s];const a=e.as||["value","density"],c=WS(s,e.extent||Al(i.data()),r,o).map(u=>{const d={};return d[a[0]]=u[0],d[a[1]]=u[1],Ft(d)});this.value&&(n.rem=this.value),this.value=n.add=n.source=c}return n}}),QL.Definition={type:"DotBin",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"step",type:"number"},{name:"smooth",type:"boolean",default:!1},{name:"as",type:"string",default:"bin"}]},me(QL,K,{transform(e,t){if(this.value&&!e.modified()&&!t.changed())return t;const n=t.materialize(t.SOURCE).source,i=XL(t.source,e.groupby,hr),r=e.smooth||!1,o=e.field,s=e.step||((e,t)=>$v(Al(e,t))/30)(n,o),a=fh((p,g)=>o(p)-o(g)),l=e.as||"bin",c=i.length;let h,u=1/0,d=-1/0,f=0;for(;fd&&(d=g),p[++h][l]=g}return this.value={start:u,stop:d,step:s},t.reflow(!0).modifies(l)}}),me(Kne,ln),ZL.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]},me(ZL,K,{transform(e,t){const n=this.value,i=e.field,r=t.changed()||t.modified(i.fields)||e.modified("field");let o=n[0],s=n[1];if((r||null==o)&&(o=1/0,s=-1/0),t.visit(r?t.SOURCE:t.ADD,a=>{const l=pr(i(a));null!=l&&(ls&&(s=l))}),!Number.isFinite(o)||!Number.isFinite(s)){let a=$n(i);a&&(a=` for field "${a}"`),t.dataflow.warn(`Infinite extent${a}: [${o}, ${s}]`),o=s=void 0}this.value=[o,s]}}),me(JL,ln,{connect(e){return this.detachSubflow=e.detachSubflow,this.targets().add(e),e.source=this},add(e){this.count+=1,this.value.add.push(e)},rem(e){this.count-=1,this.value.rem.push(e)},mod(e){this.value.mod.push(e)},init(e){this.value.init(e,e.NO_SOURCE)},evaluate(){return this.value}}),me(qS,K,{activate(e){this._targets[this._targets.active++]=e},subflow(e,t,n,i){const r=this.value;let s,a,o=De(r,e)&&r[e];return o?o.value.stampi&&i.count>0);this.initTargets(n)}},initTargets(e){const t=this._targets,n=t.length,i=e?e.length:0;let r=0;for(;rthis.subflow(l,r,t);return this._group=e.group||{},this.initTargets(),t.visit(t.REM,l=>{const c=Fe(l),u=o.get(c);void 0!==u&&(o.delete(c),a(u).rem(l))}),t.visit(t.ADD,l=>{const c=i(l);o.set(Fe(l),c),a(c).add(l)}),s||t.modified(i.fields)?t.visit(t.MOD,l=>{const c=Fe(l),u=o.get(c),d=i(l);u===d?a(d).mod(l):(o.set(c,d),a(u).rem(l),a(d).add(l))}):t.changed(t.MOD)&&t.visit(t.MOD,l=>{a(o.get(Fe(l))).mod(l)}),s&&t.visit(t.REFLOW,l=>{const c=Fe(l),u=o.get(c),d=i(l);u!==d&&(o.set(c,d),a(u).rem(l),a(d).add(l))}),t.clean()?n.runAfter(()=>{this.clean(),o.clean()}):o.empty>n.cleanThreshold&&n.runAfter(o.clean),t}}),me(Xne,ln),e3.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]},me(e3,K,{transform(e,t){const n=t.dataflow,i=this.value,r=t.fork(),o=r.add,s=r.rem,a=r.mod,l=e.expr;let c=!0;function u(d){const f=Fe(d),h=l(d,e),p=i.get(f);h&&p?(i.delete(f),o.push(d)):h||p?c&&h&&!p&&a.push(d):(i.set(f,1),s.push(d))}return t.visit(t.REM,d=>{const f=Fe(d);i.has(f)?i.delete(f):s.push(d)}),t.visit(t.ADD,d=>{l(d,e)?o.push(d):i.set(Fe(d),1)}),t.visit(t.MOD,u),e.modified()&&(c=!1,t.visit(t.REFLOW,u)),i.empty>n.cleanThreshold&&n.runAfter(i.clean),r}}),t3.Definition={type:"Flatten",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"index",type:"string"},{name:"as",type:"string",array:!0}]},me(t3,K,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.fields,r=qne(i,e.as||[]),o=e.index||null,s=r.length;return n.rem=this.value,t.visit(t.SOURCE,a=>{const l=i.map(p=>p(a)),c=l.reduce((p,g)=>Math.max(p,g.length),0);let d,f,h,u=0;for(;u{for(let d,u=0;us[i]=n(s,e))}}),me(Qne,K,{transform(e,t){const n=t.fork(t.ALL),i=e.generator;let s,a,l,r=this.value,o=e.size-r.length;if(o>0){for(s=[];--o>=0;)s.push(l=Ft(i(e))),r.push(l);n.add=n.add.length?n.materialize(n.ADD).add.concat(s):s}else a=r.slice(0,-o),n.rem=n.rem.length?n.materialize(n.REM).rem.concat(a):a,r=r.slice(-o);return n.source=this.value=r,n}});const YS={value:"value",median:wne,mean:function J4e(e,t){let n=0,i=0;if(void 0===t)for(let r of e)null!=r&&(r=+r)>=r&&(++n,i+=r);else{let r=-1;for(let o of e)null!=(o=t(o,++r,e))&&(o=+o)>=o&&(++n,i+=o)}if(n)return i/n},min:CL,max:ph},v6e=[];function r3(e){K.call(this,[],e)}function o3(e){cd.call(this,e)}function s3(e){K.call(this,null,e)}function Zne(e){ln.call(this,null,C6e,e)}function C6e(e){return this.value&&!e.modified()?this.value:AP(e.fields,e.flat)}function Jne(e){K.call(this,[],e),this._pending=null}function a3(e,t,n){n.forEach(Ft);const i=t.fork(t.NO_FIELDS&t.NO_SOURCE);return i.rem=e.value,e.value=i.source=i.add=n,e._pending=null,i.rem.length&&i.clean(!0),i}function l3(e){K.call(this,{},e)}function eie(e){ln.call(this,null,S6e,e)}function S6e(e){if(this.value&&!e.modified())return this.value;const t=e.extents,n=t.length;let o,s,i=1/0,r=-1/0;for(o=0;or&&(r=s[1]);return[i,r]}function tie(e){ln.call(this,null,T6e,e)}function T6e(e){return this.value&&!e.modified()?this.value:e.values.reduce((t,n)=>t.concat(n),[])}function nie(e){K.call(this,null,e)}function c3(e){cd.call(this,e)}function iie(e){qS.call(this,e)}function u3(e){K.call(this,null,e)}function rie(e){K.call(this,null,e)}function d3(e){K.call(this,null,e)}function oie(e){K.call(this,null,e)}function f3(e){K.call(this,[],e),this.count=0}function h3(e){K.call(this,null,e)}function sie(e){K.call(this,null,e),this.modified(!0)}function p3(e){K.call(this,null,e)}r3.Definition={type:"Impute",metadata:{changes:!0},params:[{name:"field",type:"field",required:!0},{name:"key",type:"field",required:!0},{name:"keyvals",array:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]},me(r3,K,{transform(e,t){var f,h,p,g,m,_,y,v,b,w,n=t.fork(t.ALL),i=function b6e(e){var n,t=e.method||YS.value;if(null!=YS[t])return t===YS.value?(n=void 0!==e.value?e.value:0,()=>n):YS[t];J("Unrecognized imputation method: "+t)}(e),r=function w6e(e){const t=e.field;return n=>n?t(n):NaN}(e),o=$n(e.field),s=$n(e.key),a=(e.groupby||[]).map($n),l=function E6e(e,t,n,i){var c,u,d,f,h,p,g,m,r=_=>_(m),o=[],s=i?i.slice():[],a={},l={};for(s.forEach((_,y)=>a[_]=y+1),f=0,g=e.length;fn.add(o))):(r=n.value=n.value||this.init(e),t.visit(t.REM,o=>n.rem(o)),t.visit(t.ADD,o=>n.add(o))),n.changes(),t.visit(t.SOURCE,o=>{rt(o,r[n.cellkey(o)].tuple)}),t.reflow(i).modifies(this._outputs)},changes(){const e=this._adds,t=this._mods;let n,i;for(n=0,i=this._alen;n{const p=NL(h,s)[a],g=e.counts?h.length:1;WS(p,u||Al(h),d,f).forEach(_=>{const y={};for(let v=0;v(this._pending=Ee(r.data),o=>o.touch(this)))}:n.request(e.url,e.format).then(i=>a3(this,t,Ee(i.data)))}}),l3.Definition={type:"Lookup",metadata:{modifies:!0},params:[{name:"index",type:"index",params:[{name:"from",type:"data",required:!0},{name:"key",type:"field",required:!0}]},{name:"values",type:"field",array:!0},{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0},{name:"default",default:null}]},me(l3,K,{transform(e,t){const n=e.fields,i=e.index,r=e.values,o=null==e.default?null:e.default,s=e.modified(),a=n.length;let d,f,h,l=s?t.SOURCE:t.ADD,c=t,u=e.as;return r?(f=r.length,a>1&&!u&&J('Multi-field lookup requires explicit "as" parameter.'),u&&u.length!==a*f&&J('The "as" parameter has too few output field names.'),u=u||r.map($n),d=function(p){for(var _,y,g=0,m=0;gt.modified(p.fields)),l|=h?t.MOD:0),t.visit(l,d),c.modifies(u)}}),me(eie,ln),me(tie,ln),me(nie,K,{transform(e,t){return this.modified(e.modified()),this.value=e,t.fork(t.NO_SOURCE|t.NO_FIELDS)}}),c3.Definition={type:"Pivot",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"value",type:"field",required:!0},{name:"op",type:"enum",values:a1,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]},me(c3,cd,{_transform:cd.prototype.transform,transform(e,t){return this._transform(function x6e(e,t){const n=e.field,i=e.value,r=("count"===e.op?"__count__":e.op)||"sum",o=fr(n).concat(fr(i)),s=function M6e(e,t,n){const i={},r=[];return n.visit(n.SOURCE,o=>{const s=e(o);i[s]||(i[s]=1,r.push(s))}),r.sort(gS),t?r.slice(0,t):r}(n,e.limit||0,t);return t.changed()&&e.set("__pivot__",null,null,!0),{key:e.key,groupby:e.groupby,ops:s.map(()=>r),fields:s.map(a=>function A6e(e,t,n,i){return co(r=>t(r)===e?n(r):NaN,i,e+"")}(a,n,i,o)),as:s.map(a=>a+""),modified:e.modified.bind(e)}}(e,t),t)}}),me(iie,qS,{transform(e,t){const n=e.subflow,i=e.field,r=o=>this.subflow(Fe(o),n,t,o);return(e.modified("field")||i&&t.modified(fr(i)))&&J("PreFacet does not support field modification."),this.initTargets(),i?(t.visit(t.MOD,o=>{const s=r(o);i(o).forEach(a=>s.mod(a))}),t.visit(t.ADD,o=>{const s=r(o);i(o).forEach(a=>s.add(Ft(a)))}),t.visit(t.REM,o=>{const s=r(o);i(o).forEach(a=>s.rem(a))})):(t.visit(t.MOD,o=>r(o).mod(o)),t.visit(t.ADD,o=>r(o).add(o)),t.visit(t.REM,o=>r(o).rem(o))),t.clean()&&t.runAfter(()=>this.clean()),t}}),u3.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]},me(u3,K,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.fields,r=qne(e.fields,e.as||[]),o=i?(a,l)=>function N6e(e,t,n,i){for(let r=0,o=n.length;r{const l=Fe(a);n.rem.push(s[l]),s[l]=null}),t.visit(t.ADD,a=>{const l=o(a,Ft({}));s[Fe(a)]=l,n.add.push(l)}),t.visit(t.MOD,a=>{n.mod.push(o(a,s[Fe(a)]))}),n}}),me(rie,K,{transform(e,t){return this.value=e.value,e.modified("value")?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}}),d3.Definition={type:"Quantile",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"probs",type:"number",array:!0},{name:"step",type:"number",default:.01},{name:"as",type:"string",array:!0,default:["prob","value"]}]},me(d3,K,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=e.as||["prob","value"];if(this.value&&!e.modified()&&!t.changed())return n.source=this.value,n;const o=XL(t.materialize(t.SOURCE).source,e.groupby,e.field),s=(e.groupby||[]).map($n),a=[],l=e.step||.01,c=e.probs||Yo(l/2,1-1e-14,l),u=c.length;return o.forEach(d=>{const f=SL(d,c);for(let h=0;h{const o=Fe(r);n.rem.push(i[o]),i[o]=null}),t.visit(t.ADD,r=>{const o=gL(r);i[Fe(r)]=o,n.add.push(o)}),t.visit(t.MOD,r=>{const o=i[Fe(r)];for(const s in r)o[s]=r[s],n.modifies(s);n.mod.push(o)})),n}}),f3.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]},me(f3,K,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.modified("size"),r=e.size,o=this.value.reduce((u,d)=>(u[Fe(d)]=1,u),{});let s=this.value,a=this.count,l=0;function c(u){let d,f;s.length=l&&(d=s[f],o[Fe(d)]&&n.rem.push(d),s[f]=u)),++a}if(t.rem.length&&(t.visit(t.REM,u=>{const d=Fe(u);o[d]&&(o[d]=-1,n.rem.push(u)),--a}),s=s.filter(u=>-1!==o[Fe(u)])),(t.rem.length||i)&&s.length{o[Fe(u)]||c(u)}),l=-1),i&&s.length>r){const u=s.length-r;for(let d=0;d{o[Fe(u)]&&n.mod.push(u)}),t.add.length&&t.visit(t.ADD,c),(t.add.length||l<0)&&(n.add=s.filter(u=>!o[Fe(u)])),this.count=a,this.value=n.source=s,n}}),h3.Definition={type:"Sequence",metadata:{generates:!0,changes:!0},params:[{name:"start",type:"number",required:!0},{name:"stop",type:"number",required:!0},{name:"step",type:"number",default:1},{name:"as",type:"string",default:"data"}]},me(h3,K,{transform(e,t){if(this.value&&!e.modified())return;const n=t.materialize().fork(t.MOD),i=e.as||"data";return n.rem=this.value?t.rem.concat(this.value):t.rem,this.value=Yo(e.start,e.stop,e.step||1).map(r=>{const o={};return o[i]=r,Ft(o)}),n.add=t.add.concat(this.value),n}}),me(sie,K,{transform(e,t){return this.value=t.source,t.changed()?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}});const aie=["unit0","unit1"];function lie(e){K.call(this,xm(),e)}function cie(e){K.call(this,null,e)}p3.Definition={type:"TimeUnit",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"units",type:"enum",values:zP,array:!0},{name:"step",type:"number",default:1},{name:"maxbins",type:"number",default:40},{name:"extent",type:"date",array:!0},{name:"timezone",type:"enum",default:"local",values:["local","utc"]},{name:"as",type:"string",array:!0,length:2,default:aie}]},me(p3,K,{transform(e,t){const n=e.field,i=!1!==e.interval,r="utc"===e.timezone,o=this._floor(e,t),s=(r?$m:Lm)(o.unit).offset,a=e.as||aie,l=a[0],c=a[1],u=o.step;let d=o.start||1/0,f=o.stop||-1/0,h=t.ADD;return(e.modified()||t.changed(t.REM)||t.modified(fr(n)))&&(h=(t=t.reflow(!0)).SOURCE,d=1/0,f=-1/0),t.visit(h,p=>{const g=n(p);let m,_;null==g?(p[l]=null,i&&(p[c]=null)):(p[l]=m=_=o(g),i&&(p[c]=_=s(m,u)),mf&&(f=_))}),o.start=d,o.stop=f,t.modifies(i?a:l)},_floor(e,t){const n="utc"===e.timezone,{units:i,step:r}=e.units?{units:e.units,step:e.step||1}:Cte({extent:e.extent||Al(t.materialize(t.SOURCE).source,e.field),maxbins:e.maxbins}),o=GP(i),s=this.value||{},a=(n?fte:dte)(o,r);return a.unit=yt(o),a.units=o,a.step=r,a.start=s.start,a.stop=s.stop,this.value=a}}),me(lie,K,{transform(e,t){const n=t.dataflow,i=e.field,r=this.value,o=a=>r.set(i(a),a);let s=!0;return e.modified("field")||t.modified(i.fields)?(r.clear(),t.visit(t.SOURCE,o)):t.changed()?(t.visit(t.REM,a=>r.delete(i(a))),t.visit(t.ADD,o)):s=!1,this.modified(s),r.empty>n.cleanThreshold&&n.runAfter(r.clean),t.fork()}}),me(cie,K,{transform(e,t){(!this.value||e.modified("field")||e.modified("sort")||t.changed()||e.sort&&t.modified(e.sort.fields))&&(this.value=(e.sort?t.source.slice().sort(fh(e.sort)):t.source).map(e.field))}});const l1={row_number:function(){return{next:e=>e.index+1}},rank:function(){let e;return{init:()=>e=1,next:t=>{const n=t.index,i=t.data;return n&&t.compare(i[n-1],i[n])?e=n+1:e}}},dense_rank:function(){let e;return{init:()=>e=1,next:t=>{const n=t.index,i=t.data;return n&&t.compare(i[n-1],i[n])?++e:e}}},percent_rank:function(){const e=l1.rank(),t=e.next;return{init:e.init,next:n=>(t(n)-1)/(n.data.length-1)}},cume_dist:function(){let e;return{init:()=>e=0,next:t=>{const n=t.data,i=t.compare;let r=t.index;if(e0||J("ntile num must be greater than zero.");const n=l1.cume_dist(),i=n.next;return{init:n.init,next:r=>Math.ceil(t*i(r))}},lag:function(e,t){return t=+t||1,{next:n=>{const i=n.index-t;return i>=0?e(n.data[i]):null}}},lead:function(e,t){return t=+t||1,{next:n=>{const i=n.index+t,r=n.data;return ie(t.data[t.i0])}},last_value:function(e){return{next:t=>e(t.data[t.i1-1])}},nth_value:function(e,t){return(t=+t)>0||J("nth_value nth must be greater than zero."),{next:n=>{const i=n.i0+(t-1);return it=null,next:n=>{const i=e(n.data[n.index]);return null!=i?t=i:t}}},next_value:function(e){let t,n;return{init:()=>(t=null,n=-1),next:i=>{const r=i.data;return i.index<=n?t:(n=function O6e(e,t,n){for(let i=t.length;nl[g]=1)}h(e.sort),t.forEach((p,g)=>{const m=n[g],_=i[g],y=r[g]||null,v=$n(m),b=Lne(p,v,o[g]);if(h(m),s.push(b),De(l1,p))a.push(function k6e(e,t,n,i){const r=l1[e](t,n);return{init:r.init||Ju,update:function(o,s){s[i]=r.next(o)}}}(p,m,_,b));else{if(null==m&&"count"!==p&&J("Null aggregate field specified."),"count"===p)return void u.push(b);f=!1;let w=c[v];w||(w=c[v]=[],w.field=m,d.push(w)),w.push($ne(p,y,b))}}),(u.length||d.length)&&(this.cell=function F6e(e,t,n){e=e.map(l=>jne(l,l.field));const i={num:0,agg:null,store:!1,count:t};if(!n)for(var r=e.length,o=i.agg=Array(r),s=0;s0&&!r(o[n],o[n-1])&&(e.i0=t.left(o,o[n])),ie.init()),this.cell&&this.cell.init()},die.update=function(e,t){const n=this.cell,i=this.windows,r=e.data,o=i&&i.length;let s;if(n){for(s=e.p0;sthis.group(r(a));let s=this.state;(!s||n)&&(s=this.state=new uie(e)),n||t.modified(s.inputs)?(this.value={},t.visit(t.SOURCE,a=>o(a).add(a))):(t.visit(t.REM,a=>o(a).remove(a)),t.visit(t.ADD,a=>o(a).add(a)));for(let a=0,l=this._mlen;a0)for(var l,i=e[0],r=t[0],o=e[n]-i,s=t[n]-r,a=-1;++a<=n;)this._basis.point(this._beta*e[a]+(1-this._beta)*(i+(l=a/n)*o),this._beta*t[a]+(1-this._beta)*(r+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const U6e=function e(t){function n(i){return 1===t?new XS(i):new pie(i,t)}return n.beta=function(i){return e(+i)},n}(.85);function QS(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function m3(e,t){this._context=e,this._k=(1-t)/6}m3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:QS(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:QS(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const z6e=function e(t){function n(i){return new m3(i,t)}return n.tension=function(i){return e(+i)},n}(0);function _3(e,t){this._context=e,this._k=(1-t)/6}_3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:QS(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const H6e=function e(t){function n(i){return new _3(i,t)}return n.tension=function(i){return e(+i)},n}(0);function y3(e,t){this._context=e,this._k=(1-t)/6}y3.prototype={areaStart:ud,areaEnd:ud,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:QS(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const G6e=function e(t){function n(i){return new y3(i,t)}return n.tension=function(i){return e(+i)},n}(0),gie=Math.abs,yr=Math.atan2,Kc=Math.cos,W6e=Math.max,Hm=Math.min,po=Math.sin,bn=Math.sqrt,vr=1e-12,dd=Math.PI,ZS=dd/2,c1=2*dd;function mie(e){return e>=1?ZS:e<=-1?-ZS:Math.asin(e)}function v3(e,t,n){var i=e._x1,r=e._y1,o=e._x2,s=e._y2;if(e._l01_a>vr){var a=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*a-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,r=(r*a-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>vr){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,s=(s*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(i,r,o,s,e._x2,e._y2)}function _ie(e,t){this._context=e,this._alpha=t}_ie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:v3(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Y6e=function e(t){function n(i){return t?new _ie(i,t):new m3(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function yie(e,t){this._context=e,this._alpha=t}yie.prototype={areaStart:ud,areaEnd:ud,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:v3(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const K6e=function e(t){function n(i){return t?new yie(i,t):new y3(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function vie(e,t){this._context=e,this._alpha=t}vie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:v3(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const X6e=function e(t){function n(i){return t?new vie(i,t):new _3(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function bie(e){this._context=e}function b3(e){return new bie(e)}function wie(e){this._context=e}function Eie(e){return e<0?-1:1}function Cie(e,t,n){var i=e._x1-e._x0,r=t-e._x1,o=(e._y1-e._y0)/(i||r<0&&-0),s=(n-e._y1)/(r||i<0&&-0),a=(o*r+s*i)/(i+r);return(Eie(o)+Eie(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function Die(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function w3(e,t,n){var i=e._x0,o=e._x1,s=e._y1,a=(o-i)/3;e._context.bezierCurveTo(i+a,e._y0+a*t,o-a,s-a*n,o,s)}function JS(e){this._context=e}function Sie(e){this._context=new Tie(e)}function Tie(e){this._context=e}function xie(e){this._context=e}function Aie(e){var t,i,n=e.length-1,r=new Array(n),o=new Array(n),s=new Array(n);for(r[0]=0,o[0]=2,s[0]=e[0]+2*e[1],t=1;t=0;--t)r[t]=(s[t]-r[t+1])/o[t];for(o[n-1]=(e[n]+r[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};const E3=Math.PI,C3=2*E3,gh=1e-6,rje=C3-gh;function Mie(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Mie;const n=10**t;return function(i){this._+=i[0];for(let r=1,o=i.length;rgh)if(Math.abs(d*l-c*u)>gh&&o){let h=i-s,p=r-a,g=l*l+c*c,m=h*h+p*p,_=Math.sqrt(g),y=Math.sqrt(f),v=o*Math.tan((E3-Math.acos((g+f-m)/(2*_*y)))/2),b=v/y,w=v/_;Math.abs(b-1)>gh&&this._append`L${t+b*u},${n+b*d}`,this._append`A${o},${o},0,0,${+(d*h>u*p)},${this._x1=t+w*l},${this._y1=n+w*c}`}else this._append`L${this._x1=t},${this._y1=n}`}arc(t,n,i,r,o,s){if(t=+t,n=+n,s=!!s,(i=+i)<0)throw new Error(`negative radius: ${i}`);let a=i*Math.cos(r),l=i*Math.sin(r),c=t+a,u=n+l,d=1^s,f=s?r-o:o-r;null===this._x1?this._append`M${c},${u}`:(Math.abs(this._x1-c)>gh||Math.abs(this._y1-u)>gh)&&this._append`L${c},${u}`,i&&(f<0&&(f=f%C3+C3),f>rje?this._append`A${i},${i},0,1,${d},${t-a},${n-l}A${i},${i},0,1,${d},${this._x1=c},${this._y1=u}`:f>gh&&this._append`A${i},${i},0,${+(f>=E3)},${d},${this._x1=t+i*Math.cos(o)},${this._y1=n+i*Math.sin(o)}`)}rect(t,n,i,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function nT(){return new tT}function iT(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);t=i}return e},()=>new tT(t)}function sje(e){return e.innerRadius}function aje(e){return e.outerRadius}function lje(e){return e.startAngle}function cje(e){return e.endAngle}function uje(e){return e&&e.padAngle}function rT(e,t,n,i,r,o,s){var a=e-n,l=t-i,c=(s?o:-o)/bn(a*a+l*l),u=c*l,d=-c*a,f=e+u,h=t+d,p=n+u,g=i+d,m=(f+p)/2,_=(h+g)/2,y=p-f,v=g-h,b=y*y+v*v,w=r-o,C=f*g-p*h,E=(v<0?-1:1)*bn(W6e(0,w*w*b-C*C)),D=(C*v-y*E)/b,M=(-C*y-v*E)/b,k=(C*v+y*E)/b,R=(-C*y+v*E)/b,F=D-m,P=M-_,T=k-m,S=R-_;return F*F+P*P>T*T+S*S&&(D=k,M=R),{cx:D,cy:M,x01:-u,y01:-d,x11:D*(r/w-1),y11:M*(r/w-1)}}function Nie(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Iie(e){return e[0]}function kie(e){return e[1]}function Oie(e,t){var n=$t(!0),i=null,r=b3,o=null,s=iT(a);function a(l){var c,d,h,u=(l=Nie(l)).length,f=!1;for(null==i&&(o=r(h=s())),c=0;c<=u;++c)!(c=h;--p)a.point(v[p],b[p]);a.lineEnd(),a.areaEnd()}_&&(v[f]=+e(m,f,d),b[f]=+t(m,f,d),a.point(i?+i(m,f,d):v[f],n?+n(m,f,d):b[f]))}if(y)return a=null,y+""||null}function u(){return Oie().defined(r).curve(s).context(o)}return e="function"==typeof e?e:void 0===e?Iie:$t(+e),t="function"==typeof t?t:$t(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?kie:$t(+n),c.x=function(d){return arguments.length?(e="function"==typeof d?d:$t(+d),i=null,c):e},c.x0=function(d){return arguments.length?(e="function"==typeof d?d:$t(+d),c):e},c.x1=function(d){return arguments.length?(i=null==d?null:"function"==typeof d?d:$t(+d),c):i},c.y=function(d){return arguments.length?(t="function"==typeof d?d:$t(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t="function"==typeof d?d:$t(+d),c):t},c.y1=function(d){return arguments.length?(n=null==d?null:"function"==typeof d?d:$t(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(i).y(t)},c.defined=function(d){return arguments.length?(r="function"==typeof d?d:$t(!!d),c):r},c.curve=function(d){return arguments.length?(s=d,null!=o&&(a=s(o)),c):s},c.context=function(d){return arguments.length?(null==d?o=a=null:a=s(o=d),c):o},c}nT.prototype=tT.prototype,bn(3);const D3={draw(e,t){const n=bn(t/dd);e.moveTo(n,0),e.arc(0,0,n,0,c1)}};bn(1/3),po(dd/10),po(7*dd/10);function fd(e,t){if(typeof document<"u"&&document.createElement){const n=document.createElement("canvas");if(n&&n.getContext)return n.width=e,n.height=t,n}return null}po(c1/10),Kc(c1/10),bn(3),bn(3),bn(3),bn(12);const Lie=Fm(qc),oT=Lie.right,Rje=Lie.left,u1=(Fm(vne),oT);function Gm(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function d1(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function hd(){}var Wm=1/.7,qm="\\s*([+-]?\\d+)\\s*",f1="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ol="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Fje=/^#([0-9a-f]{3,8})$/,Pje=new RegExp(`^rgb\\(${qm},${qm},${qm}\\)$`),Lje=new RegExp(`^rgb\\(${Ol},${Ol},${Ol}\\)$`),$je=new RegExp(`^rgba\\(${qm},${qm},${qm},${f1}\\)$`),Bje=new RegExp(`^rgba\\(${Ol},${Ol},${Ol},${f1}\\)$`),jje=new RegExp(`^hsl\\(${f1},${Ol},${Ol}\\)$`),Vje=new RegExp(`^hsla\\(${f1},${Ol},${Ol},${f1}\\)$`),$ie={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Bie(){return this.rgb().formatHex()}function jie(){return this.rgb().formatRgb()}function h1(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Fje.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Vie(t):3===n?new Ni(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?sT(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?sT(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Pje.exec(e))?new Ni(t[1],t[2],t[3],1):(t=Lje.exec(e))?new Ni(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=$je.exec(e))?sT(t[1],t[2],t[3],t[4]):(t=Bje.exec(e))?sT(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=jje.exec(e))?Hie(t[1],t[2]/100,t[3]/100,1):(t=Vje.exec(e))?Hie(t[1],t[2]/100,t[3]/100,t[4]):$ie.hasOwnProperty(e)?Vie($ie[e]):"transparent"===e?new Ni(NaN,NaN,NaN,0):null}function Vie(e){return new Ni(e>>16&255,e>>8&255,255&e,1)}function sT(e,t,n,i){return i<=0&&(e=t=n=NaN),new Ni(e,t,n,i)}function x3(e){return e instanceof hd||(e=h1(e)),e?new Ni((e=e.rgb()).r,e.g,e.b,e.opacity):new Ni}function pd(e,t,n,i){return 1===arguments.length?x3(e):new Ni(e,t,n,i??1)}function Ni(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function Uie(){return`#${yh(this.r)}${yh(this.g)}${yh(this.b)}`}function zie(){const e=aT(this.opacity);return`${1===e?"rgb(":"rgba("}${_h(this.r)}, ${_h(this.g)}, ${_h(this.b)}${1===e?")":`, ${e})`}`}function aT(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _h(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function yh(e){return((e=_h(e))<16?"0":"")+e.toString(16)}function Hie(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new wa(e,t,n,i)}function Gie(e){if(e instanceof wa)return new wa(e.h,e.s,e.l,e.opacity);if(e instanceof hd||(e=h1(e)),!e)return new wa;if(e instanceof wa)return e;var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),o=Math.max(t,n,i),s=NaN,a=o-r,l=(o+r)/2;return a?(s=t===o?(n-i)/a+6*(n0&&l<1?0:s,new wa(s,a,l,e.opacity)}function lT(e,t,n,i){return 1===arguments.length?Gie(e):new wa(e,t,n,i??1)}function wa(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function Wie(e){return(e=(e||0)%360)<0?e+360:e}function cT(e){return Math.max(0,Math.min(1,e||0))}function A3(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function qie(e,t,n,i,r){var o=e*e,s=o*e;return((1-3*e+3*o-s)*t+(4-6*o+3*s)*n+(1+3*e+3*o-3*s)*i+s*r)/6}function Yie(e){var t=e.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),r=e[i],o=e[i+1];return qie((n-i/t)*t,i>0?e[i-1]:2*r-o,r,o,i=240?e-240:e+120,r,i),A3(e,r,i),A3(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new wa(Wie(this.h),cT(this.s),cT(this.l),aT(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=aT(this.opacity);return`${1===e?"hsl(":"hsla("}${Wie(this.h)}, ${100*cT(this.s)}%, ${100*cT(this.l)}%${1===e?")":`, ${e})`}`}}));const uT=e=>()=>e;function Xie(e,t){return function(n){return e+n*t}}function dT(e,t){var n=t-e;return n?Xie(e,n>180||n<-180?n-360*Math.round(n/360):n):uT(isNaN(e)?t:e)}function Ii(e,t){var n=t-e;return n?Xie(e,n):uT(isNaN(e)?t:e)}const M3=function e(t){var n=function Wje(e){return 1==(e=+e)?Ii:function(t,n){return n-t?function Gje(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}(t,n,e):uT(isNaN(t)?n:t)}}(t);function i(r,o){var s=n((r=pd(r)).r,(o=pd(o)).r),a=n(r.g,o.g),l=n(r.b,o.b),c=Ii(r.opacity,o.opacity);return function(u){return r.r=s(u),r.g=a(u),r.b=l(u),r.opacity=c(u),r+""}}return i.gamma=e,i}(1);function Qie(e){return function(t){var s,a,n=t.length,i=new Array(n),r=new Array(n),o=new Array(n);for(s=0;sn&&(o=t.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:Ea(i,r)})),n=k3.lastIndex;return nt&&(n=e,e=t,t=n),function(i){return Math.max(e,Math.min(t,i))}}(e[0],e[f-1])),a=f>2?tVe:eVe,l=c=null,d}function d(f){return null==f||isNaN(f=+f)?o:(l||(l=a(e.map(i),t,n)))(i(s(f)))}return d.invert=function(f){return s(r((c||(c=a(t,e.map(i),Ea)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,O3),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=p1,u()},d.clamp=function(f){return arguments.length?(s=!!f||go,u()):s!==go},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(o=f,d):o},function(f,h){return i=f,r=h,u()}}function rre(){return fT()(go,go)}function Rl(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function md(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}function ore(e,t,n,i){var o,r=rd(e,t,n);switch((i=lh(i??",f")).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null==i.precision&&!isNaN(o=Gee(r,s))&&(i.precision=o),$P(i,s);case"":case"e":case"g":case"p":case"r":null==i.precision&&!isNaN(o=Wee(r,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=o-("e"===i.type));break;case"f":case"%":null==i.precision&&!isNaN(o=qee(r))&&(i.precision=o-2*("%"===i.type))}return bS(i)}function vh(e){var t=e.domain;return e.ticks=function(n){var i=t();return FP(i[0],i[i.length-1],n??10)},e.tickFormat=function(n,i){var r=t();return ore(r[0],r[r.length-1],n??10,i)},e.nice=function(n){null==n&&(n=10);var l,c,i=t(),r=0,o=i.length-1,s=i[r],a=i[o],u=10;for(a0;){if((c=PP(s,a,n))===l)return i[r]=s,i[o]=a,t(i);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else{if(!(c<0))break;s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c}l=c}return e},e}function lre(e,t){var s,n=0,i=(e=e.slice()).length-1,r=e[n],o=e[i];return o-e(-t,n)}function F3(e){const t=e(cre,ure),n=t.domain;let r,o,i=10;function s(){return r=function sVe(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(i),o=function oVe(e){return 10===e?rVe:e===Math.E?Math.exp:t=>Math.pow(e,t)}(i),n()[0]<0?(r=dre(r),o=dre(o),e(nVe,iVe)):e(cre,ure),t}return t.base=function(a){return arguments.length?(i=+a,s()):i},t.domain=function(a){return arguments.length?(n(a),s()):n()},t.ticks=a=>{const l=n();let c=l[0],u=l[l.length-1];const d=u0){for(;f<=h;++f)for(p=1;pu)break;_.push(g)}}else for(;f<=h;++f)for(p=i-1;p>=1;--p)if(g=f>0?p/o(-f):p*o(f),!(gu)break;_.push(g)}2*_.length{if(null==a&&(a=10),null==l&&(l=10===i?"s":","),"function"!=typeof l&&(!(i%1)&&null==(l=lh(l)).precision&&(l.trim=!0),l=bS(l)),a===1/0)return l;const c=Math.max(1,i*a/t.ticks().length);return u=>{let d=u/o(Math.round(r(u)));return d*in(lre(n(),{floor:a=>o(Math.floor(r(a))),ceil:a=>o(Math.ceil(r(a)))})),t}function hre(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function aVe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function lVe(e){return e<0?-e*e:e*e}function P3(e){var t=e(go,go),n=1;return t.exponent=function(r){return arguments.length?(n=+r,function i(){return 1===n?e(go,go):.5===n?e(aVe,lVe):e(hre(n),hre(1/n))}()):n},vh(t)}function L3(){var e=P3(fT());return e.copy=function(){return g1(e,L3()).exponent(e.exponent())},Rl.apply(e,arguments),e}function pre(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function gre(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function $3(e){var t=1,n=e(pre(t),gre(t));return n.constant=function(i){return arguments.length?e(pre(t=+i),gre(t)):t},vh(n)}function _re(e,t,n,i,r,o){const s=[[Wc,1,Uc],[Wc,5,5e3],[Wc,15,15e3],[Wc,30,3e4],[o,1,Ns],[o,5,5*Ns],[o,15,15*Ns],[o,30,30*Ns],[r,1,zc],[r,3,3*zc],[r,6,6*zc],[r,12,12*zc],[i,1,Hc],[i,2,2*Hc],[n,1,VP],[t,1,tte],[t,3,3*tte],[e,1,UP]];function l(c,u,d){const f=Math.abs(u-c)/d,h=Fm(([,,m])=>m).right(s,f);if(h===s.length)return e.every(rd(c/UP,u/UP,d));if(0===h)return Rm.every(Math.max(rd(c,u,d),1));const[p,g]=s[f/s[h-1][2]180?u+=360:u-c>180&&(c+=360),f.push({i:d.push(r(d)+"rotate(",null,i)-2,x:Ea(c,u)})):u&&d.push(r(d)+"rotate("+u+i)}(c.rotate,u.rotate,d,f),function a(c,u,d,f){c!==u?f.push({i:d.push(r(d)+"skewX(",null,i)-2,x:Ea(c,u)}):u&&d.push(r(d)+"skewX("+u+i)}(c.skewX,u.skewX,d,f),function l(c,u,d,f,h,p){if(c!==d||u!==f){var g=h.push(r(h)+"scale(",null,",",null,")");p.push({i:g-4,x:Ea(c,d)},{i:g-2,x:Ea(u,f)})}else(1!==d||1!==f)&&h.push(r(h)+"scale("+d+","+f+")")}(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,f),c=u=null,function(h){for(var m,p=-1,g=f.length;++pkVe?Math.pow(e,1/3):e/Vre+jre}function K3(e){return e>Ym?e*e*e:Vre*(e-jre)}function X3(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Q3(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function vT(e,t,n,i){return 1===arguments.length?function zre(e){if(e instanceof Fl)return new Fl(e.h,e.c,e.l,e.opacity);if(e instanceof Ca||(e=Ure(e)),0===e.a&&0===e.b)return new Fl(NaN,00?i:1:0}const Km="linear",Xc="log",_1="pow",y1="sqrt",wT="symlog",wh="time",Eh="utc",Ll="sequential",Xm="diverging",Qm="quantile",ET="quantize",CT="threshold",n$="ordinal",i$="point",r$="bin-ordinal",wi="continuous",v1="discrete",b1="discretizing",Fs="interpolating",o$="temporal";function s$(){const e=W3().unknown(void 0),t=e.domain,n=e.range;let r,o,i=[0,1],s=!1,a=0,l=0,c=.5;function u(){const d=t().length,f=i[1]g+r*_);return n(f?m.reverse():m)}return delete e.unknown,e.domain=function(d){return arguments.length?(t(d),u()):t()},e.range=function(d){return arguments.length?(i=[+d[0],+d[1]],u()):i.slice()},e.rangeRound=function(d){return i=[+d[0],+d[1]],s=!0,u()},e.bandwidth=function(){return o},e.step=function(){return r},e.round=function(d){return arguments.length?(s=!!d,u()):s},e.padding=function(d){return arguments.length?(l=Math.max(0,Math.min(1,d)),a=l,u()):a},e.paddingInner=function(d){return arguments.length?(a=Math.max(0,Math.min(1,d)),u()):a},e.paddingOuter=function(d){return arguments.length?(l=Math.max(0,Math.min(1,d)),u()):l},e.align=function(d){return arguments.length?(c=Math.max(0,Math.min(1,d)),u()):c},e.invertRange=function(d){if(null==d[0]||null==d[1])return;const f=i[1]i[1-f])?void 0:(_=Math.max(0,oT(h,g)-1),y=g===m?_:oT(h,m)-1,g-h[_]>o+1e-10&&++_,f&&(v=_,_=p-y,y=p-v),_>y?void 0:t().slice(_,y+1))},e.invert=function(d){const f=e.invertRange([d,d]);return f&&f[0]},e.copy=function(){return s$().domain(t()).range(i).round(s).paddingInner(a).paddingOuter(l).align(c)},u()}function Zre(e){const t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return Zre(t())},e}var eUe=Array.prototype.map;const nUe=Array.prototype.slice,DT=new Map,eoe=Symbol("vega_scale");function toe(e){return e[eoe]=!0,e}function Nt(e,t,n){return arguments.length>1?(DT.set(e,function rUe(e,t,n){const i=function(){const o=t();return o.invertRange||(o.invertRange=o.invert?function QVe(e){return function(t){let r,n=t[0],i=t[1];return i=i&&n[l]<=r&&(o<0&&(o=l),s=l);if(!(o<0))return i=e.invertExtent(n[o]),r=e.invertExtent(n[s]),[void 0===i[0]?i[1]:i[0],void 0===r[1]?r[0]:r[1]]}}(o):void 0),o.type=e,toe(o)};return i.metadata=va(Ee(n)),i}(e,t,n)),this):noe(e)?DT.get(e):void 0}function noe(e){return DT.has(e)}function Ch(e,t){const n=DT.get(e);return n&&n.metadata[t]}function a$(e){return Ch(e,wi)}function Zm(e){return Ch(e,v1)}function l$(e){return Ch(e,b1)}function ioe(e){return Ch(e,Xc)}function roe(e){return Ch(e,Fs)}function ooe(e){return Ch(e,Qm)}Nt("identity",function are(e){var t;function n(i){return null==i||isNaN(i=+i)?t:i}return n.invert=n,n.domain=n.range=function(i){return arguments.length?(e=Array.from(i,O3),n):e.slice()},n.unknown=function(i){return arguments.length?(t=i,n):t},n.copy=function(){return are(e).unknown(t)},e=arguments.length?Array.from(e,O3):[0,1],vh(n)}),Nt(Km,function sre(){var e=rre();return e.copy=function(){return g1(e,sre())},Rl.apply(e,arguments),vh(e)},wi),Nt(Xc,function fre(){const e=F3(fT()).domain([1,10]);return e.copy=()=>g1(e,fre()).base(e.base()),Rl.apply(e,arguments),e},[wi,Xc]),Nt(_1,L3,wi),Nt(y1,function cVe(){return L3.apply(null,arguments).exponent(.5)},wi),Nt(wT,function mre(){var e=$3(fT());return e.copy=function(){return g1(e,mre()).constant(e.constant())},Rl.apply(e,arguments)},wi),Nt(wh,function mVe(){return Rl.apply(B3(fVe,hVe,Ml,jv,Nm,Gc,CS,SS,Wc,eL).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},[wi,o$]),Nt(Eh,function _Ve(){return Rl.apply(B3(uVe,dVe,Nl,Vv,km,od,DS,TS,Wc,tL).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},[wi,o$]),Nt(Ll,j3,[wi,Fs]),Nt(`${Ll}-${Km}`,j3,[wi,Fs]),Nt(`${Ll}-${Xc}`,function yre(){var e=F3(hT()).domain([1,10]);return e.copy=function(){return _d(e,yre()).base(e.base())},md.apply(e,arguments)},[wi,Fs,Xc]),Nt(`${Ll}-${_1}`,V3,[wi,Fs]),Nt(`${Ll}-${y1}`,function yVe(){return V3.apply(null,arguments).exponent(.5)},[wi,Fs]),Nt(`${Ll}-${wT}`,function vre(){var e=$3(hT());return e.copy=function(){return _d(e,vre()).constant(e.constant())},md.apply(e,arguments)},[wi,Fs]),Nt(`${Xm}-${Km}`,function bre(){var e=vh(pT()(go));return e.copy=function(){return _d(e,bre())},md.apply(e,arguments)},[wi,Fs]),Nt(`${Xm}-${Xc}`,function wre(){var e=F3(pT()).domain([.1,1,10]);return e.copy=function(){return _d(e,wre()).base(e.base())},md.apply(e,arguments)},[wi,Fs,Xc]),Nt(`${Xm}-${_1}`,z3,[wi,Fs]),Nt(`${Xm}-${y1}`,function vVe(){return z3.apply(null,arguments).exponent(.5)},[wi,Fs]),Nt(`${Xm}-${wT}`,function Ere(){var e=$3(pT());return e.copy=function(){return _d(e,Ere()).constant(e.constant())},md.apply(e,arguments)},[wi,Fs]),Nt(Qm,function Cre(){var i,e=[],t=[],n=[];function r(){var s=0,a=Math.max(1,t.length);for(n=new Array(a-1);++s0?n[a-1]:e[0],a=n?[i[n-1],t]:[i[c-1],i[c]]},s.unknown=function(l){return arguments.length&&(o=l),s},s.thresholds=function(){return i.slice()},s.copy=function(){return Dre().domain([e,t]).range(r).unknown(o)},Rl.apply(vh(s),arguments)},b1),Nt(CT,function Sre(){var n,e=[.5],t=[0,1],i=1;function r(o){return null!=o&&o<=o?t[u1(e,o,0,i)]:n}return r.domain=function(o){return arguments.length?(e=Array.from(o),i=Math.min(e.length,t.length-1),r):e.slice()},r.range=function(o){return arguments.length?(t=Array.from(o),i=Math.min(e.length,t.length-1),r):t.slice()},r.invertExtent=function(o){var s=t.indexOf(o);return[e[s-1],e[s]]},r.unknown=function(o){return arguments.length?(n=o,r):n},r.copy=function(){return Sre().domain(e).range(t).unknown(n)},Rl.apply(r,arguments)},b1),Nt(r$,function Jre(){let e=[],t=[];function n(i){return null==i||i!=i?void 0:t[(u1(e,i)-1)%t.length]}return n.domain=function(i){return arguments.length?(e=function tUe(e){return eUe.call(e,pr)}(i),n):e.slice()},n.range=function(i){return arguments.length?(t=nUe.call(i),n):t.slice()},n.tickFormat=function(i,r){return ore(e[0],yt(e),i??10,r)},n.copy=function(){return Jre().domain(n.domain()).range(n.range())},n},[v1,b1]),Nt(n$,W3,v1),Nt("band",s$,v1),Nt(i$,function JVe(){return Zre(s$().paddingInner(1))},v1);const sUe=["clamp","base","constant","exponent"];function soe(e,t){const n=t[0],i=yt(t)-n;return function(r){return e(n+r*i)}}function ST(e,t,n){return U3(c$(t||"rgb",n),e)}function aoe(e,t){const n=new Array(t),i=t+1;for(let r=0;re[a]?s[a](e[a]()):0),s):gr(.5)}function c$(e,t){const n=t2[function aUe(e){return"interpolate"+e.toLowerCase().split("-").map(t=>t[0].toUpperCase()+t.slice(1)).join("")}(e)];return null!=t&&n&&n.gamma?n.gamma(t):n}function coe(e){if(te(e))return e;const t=e.length/6|0,n=new Array(t);for(let i=0;i1?(doe[e]=t,this):doe[e]}uoe({accent:jVe,category10:VVe,category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",dark2:UVe,observable10:zVe,paired:HVe,pastel1:GVe,pastel2:WVe,set1:qVe,set2:YVe,set3:KVe,tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"},coe),uoe({blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},e=>ST(coe(e)));const TT="symbol",uUe="discrete",fUe=e=>te(e)?e.map(t=>String(t)):String(e),hUe=(e,t)=>e[1]-t[1],pUe=(e,t)=>t[1]-e[1];function d$(e,t,n){let i;return At(t)&&(e.bins&&(t=Math.max(t,e.bins.length)),null!=n&&(t=Math.min(t,Math.floor($v(e.domain())/n||1)+1))),we(t)&&(i=t.step,t=t.interval),Ce(t)&&(t=e.type===wh?Lm(t):e.type==Eh?$m(t):J("Only time and utc scales accept interval strings."),i&&(t=t.every(i))),t}function foe(e,t,n){let i=e.range(),r=i[0],o=yt(i),s=hUe;if(r>o&&(i=o,o=r,r=i,s=pUe),r=Math.floor(r),o=Math.ceil(o),t=t.map(a=>[a,e(a)]).filter(a=>r<=a[1]&&a[1]<=o).sort(s).map(a=>a[0]),n>0&&t.length>1){const a=[t[0],yt(t)];for(;t.length>n&&t.length>=3;)t=t.filter((l,c)=>!(c%2));t.length<3&&(t=a)}return t}function f$(e,t){return e.bins?foe(e,e.bins,t):e.ticks?e.ticks(t):e.domain()}function hoe(e,t,n,i,r,o){const s=t.type;let a=fUe;if(s===wh||r===wh)a=e.timeFormat(i);else if(s===Eh||r===Eh)a=e.utcFormat(i);else if(ioe(s)){const l=e.formatFloat(i);if(o||t.bins)a=l;else{const c=poe(t,n,!1);a=u=>c(u)?l(u):""}}else if(t.tickFormat){const l=t.domain();a=e.formatSpan(l[0],l[l.length-1],n,i)}else i&&(a=e.format(i));return a}function poe(e,t,n){const i=f$(e,t),r=e.base(),o=Math.log(r),s=Math.max(1,r*t/i.length),a=l=>{let c=l/Math.pow(r,Math.round(Math.log(l)/o));return c*rh$[e.type]||e.bins;function _oe(e,t,n,i,r,o,s){const a=goe[t.type]&&o!==wh&&o!==Eh?function gUe(e,t,n){const i=t[goe[t.type]](),r=i.length;let s,o=r>1?i[1]-i[0]:i[0];for(s=1;s(t,n,i)=>{const r=yoe(i[n+1],yoe(i.max,1/0)),o=voe(t,e),s=voe(r,e);return o&&s?o+" \u2013 "+s:s?"< "+s:"\u2265 "+o},yoe=(e,t)=>e??t,bUe=e=>(t,n)=>n?e(t):null,wUe=e=>t=>e(t),voe=(e,t)=>Number.isFinite(e)?t(e):null;function boe(e,t,n){n=n||{};const i=Math.max(3,n.maxlen||7),r=function CUe(e,t,n,i){const r=i||t.type;return Ce(n)&&function oUe(e){return Ch(e,o$)}(r)&&(n=n.replace(/%a/g,"%A").replace(/%b/g,"%B")),n||r!==wh?n||r!==Eh?_oe(e,t,5,null,n,i,!0):e.utcFormat("%A, %d %B %Y, %X UTC"):e.timeFormat("%A, %d %B %Y, %X")}(e,t,n.format,n.formatType);if(l$(t.type)){const o=moe(t).slice(1).map(r),s=o.length;return`${s} boundar${1===s?"y":"ies"}: ${o.join(", ")}`}if(Zm(t.type)){const o=t.domain(),s=o.length;return`${s} value${1===s?"":"s"}: ${s>i?o.slice(0,i-2).map(r).join(", ")+", ending with "+o.slice(-1).map(r):o.map(r).join(", ")}`}{const o=t.domain();return`values from ${r(o[0])} to ${r(yt(o))}`}}let woe=0;function p$(e){return e&&e.gradient}function Eoe(e,t,n){const i=e.gradient;let r=e.id,o="radial"===i?"p_":"";return r||(r=e.id="gradient_"+woe++,"radial"===i?(e.x1=$l(e.x1,.5),e.y1=$l(e.y1,.5),e.r1=$l(e.r1,0),e.x2=$l(e.x2,.5),e.y2=$l(e.y2,.5),e.r2=$l(e.r2,.5),o="p_"):(e.x1=$l(e.x1,0),e.y1=$l(e.y1,0),e.x2=$l(e.x2,1),e.y2=$l(e.y2,0))),t[r]=e,"url("+(n||"")+"#"+o+r+")"}function $l(e,t){return e??t}function Coe(e,t){var i,n=[];return i={gradient:"linear",x1:e?e[0]:0,y1:e?e[1]:0,x2:t?t[0]:1,y2:t?t[1]:0,stops:n,stop:function(r,o){return n.push({offset:r,color:o}),i}}}const Doe={basis:{curve:function B6e(e){return new XS(e)}},"basis-closed":{curve:function j6e(e){return new fie(e)}},"basis-open":{curve:function V6e(e){return new hie(e)}},bundle:{curve:U6e,tension:"beta",value:.85},cardinal:{curve:z6e,tension:"tension",value:0},"cardinal-open":{curve:H6e,tension:"tension",value:0},"cardinal-closed":{curve:G6e,tension:"tension",value:0},"catmull-rom":{curve:Y6e,tension:"alpha",value:.5},"catmull-rom-closed":{curve:K6e,tension:"alpha",value:.5},"catmull-rom-open":{curve:X6e,tension:"alpha",value:.5},linear:{curve:b3},"linear-closed":{curve:function Q6e(e){return new wie(e)}},monotone:{horizontal:function J6e(e){return new Sie(e)},vertical:function Z6e(e){return new JS(e)}},natural:{curve:function eje(e){return new xie(e)}},step:{curve:function tje(e){return new eT(e,.5)}},"step-after":{curve:function ije(e){return new eT(e,1)}},"step-before":{curve:function nje(e){return new eT(e,0)}}};function g$(e,t,n){var i=De(Doe,e)&&Doe[e],r=null;return i&&(r=i.curve||i[t||"vertical"],i.tension&&null!=n&&(r=r[i.tension](n))),r}const SUe={m:2,l:2,h:1,v:1,z:0,c:6,s:4,q:4,t:2,a:7},TUe=/[mlhvzcsqta]([^mlhvzcsqta]+|$)/gi,xUe=/^[+-]?(([0-9]*\.[0-9]+)|([0-9]+\.)|([0-9]+))([eE][+-]?[0-9]+)?/,AUe=/^((\s+,?\s*)|(,\s*))/,MUe=/^[01]/;function Jm(e){const t=[];return(e.match(TUe)||[]).forEach(i=>{let r=i[0];const o=r.toLowerCase(),s=SUe[o],a=function NUe(e,t,n){const i=[];for(let r=0;t&&r1&&(g=Math.sqrt(g),n*=g,i*=g);const m=f/n,_=d/n,y=-d/i,v=f/i,b=m*a+_*l,w=y*a+v*l,C=m*e+_*t,E=y*e+v*t;let M=1/((C-b)*(C-b)+(E-w)*(E-w))-.25;M<0&&(M=0);let k=Math.sqrt(M);o==r&&(k=-k);const R=.5*(b+C)-k*(E-w),F=.5*(w+E)+k*(C-b),P=Math.atan2(w-F,b-R);let S=Math.atan2(E-F,C-R)-P;S<0&&1===o?S+=Bl:S>0&&0===o&&(S-=Bl);const x=Math.ceil(Math.abs(S/(Dh+.001))),I=[];for(let A=0;A+e}function AT(e,t,n){return Math.max(t,Math.min(e,n))}function Noe(){var e=PUe,t=LUe,n=$Ue,i=BUe,r=Qc(0),o=r,s=r,a=r,l=null;function c(u,d,f){var h,p=d??+e.call(this,u),g=f??+t.call(this,u),m=+n.call(this,u),_=+i.call(this,u),y=Math.min(m,_)/2,v=AT(+r.call(this,u),0,y),b=AT(+o.call(this,u),0,y),w=AT(+s.call(this,u),0,y),C=AT(+a.call(this,u),0,y);if(l||(l=h=nT()),v<=0&&b<=0&&w<=0&&C<=0)l.rect(p,g,m,_);else{var E=p+m,D=g+_;l.moveTo(p+v,g),l.lineTo(E-b,g),l.bezierCurveTo(E-vd*b,g,E,g+vd*b,E,g+b),l.lineTo(E,D-C),l.bezierCurveTo(E,D-vd*C,E-vd*C,D,E-C,D),l.lineTo(p+w,D),l.bezierCurveTo(p+vd*w,D,p,D-vd*w,p,D-w),l.lineTo(p,g+v),l.bezierCurveTo(p,g+vd*v,p+vd*v,g,p+v,g),l.closePath()}if(h)return l=null,h+""||null}return c.x=function(u){return arguments.length?(e=Qc(u),c):e},c.y=function(u){return arguments.length?(t=Qc(u),c):t},c.width=function(u){return arguments.length?(n=Qc(u),c):n},c.height=function(u){return arguments.length?(i=Qc(u),c):i},c.cornerRadius=function(u,d,f,h){return arguments.length?(r=Qc(u),o=null!=d?Qc(d):r,a=null!=f?Qc(f):r,s=null!=h?Qc(h):o,c):r},c.context=function(u){return arguments.length?(l=u??null,c):l},c}function Ioe(){var e,t,n,i,o,s,a,l,r=null;function c(d,f,h){const p=h/2;if(o){var g=a-f,m=d-s;if(g||m){var _=Math.hypot(g,m),y=(g/=_)*l,v=(m/=_)*l,b=Math.atan2(m,g);r.moveTo(s-y,a-v),r.lineTo(d-g*p,f-m*p),r.arc(d,f,p,b-Math.PI,b),r.lineTo(s+y,a+v),r.arc(s,a,l,b,b+Math.PI)}else r.arc(d,f,p,0,Bl);r.closePath()}else o=1;s=d,a=f,l=p}function u(d){var f,p,m,h=d.length,g=!1;for(null==r&&(r=m=nT()),f=0;f<=h;++f)!(fe.x||0,D1=e=>e.y||0,MT=e=>!1!==e.defined,i9e=function fje(){var e=sje,t=aje,n=$t(0),i=null,r=lje,o=cje,s=uje,a=null,l=iT(c);function c(){var u,d,f=+e.apply(this,arguments),h=+t.apply(this,arguments),p=r.apply(this,arguments)-ZS,g=o.apply(this,arguments)-ZS,m=gie(g-p),_=g>p;if(a||(a=u=l()),hvr)if(m>c1-vr)a.moveTo(h*Kc(p),h*po(p)),a.arc(0,0,h,p,g,!_),f>vr&&(a.moveTo(f*Kc(g),f*po(g)),a.arc(0,0,f,g,p,_));else{var P,T,y=p,v=g,b=p,w=g,C=m,E=m,D=s.apply(this,arguments)/2,M=D>vr&&(i?+i.apply(this,arguments):bn(f*f+h*h)),k=Hm(gie(h-f)/2,+n.apply(this,arguments)),R=k,F=k;if(M>vr){var S=mie(M/f*po(D)),x=mie(M/h*po(D));(C-=2*S)>vr?(b+=S*=_?1:-1,w-=S):(C=0,b=w=(p+g)/2),(E-=2*x)>vr?(y+=x*=_?1:-1,v-=x):(E=0,y=v=(p+g)/2)}var I=h*Kc(y),A=h*po(y),N=f*Kc(w),O=f*po(w);if(k>vr){var H,$=h*Kc(v),B=h*po(v),V=f*Kc(b),j=f*po(b);if(m1?0:e<-1?dd:Math.acos(e)}((oe*ue+Y*W)/(bn(oe*oe+Y*Y)*bn(ue*ue+W*W)))/2),ie=bn(H[0]*H[0]+H[1]*H[1]);R=Hm(k,(f-ie)/(ne-1)),F=Hm(k,(h-ie)/(ne+1))}else R=F=0}E>vr?F>vr?(P=rT(V,j,I,A,h,F,_),T=rT($,B,N,O,h,F,_),a.moveTo(P.cx+P.x01,P.cy+P.y01),Fvr&&C>vr?R>vr?(P=rT(N,O,$,B,f,-R,_),T=rT(I,A,V,j,f,-R,_),a.lineTo(P.cx+P.x01,P.cy+P.y01),Re.startAngle||0).endAngle(e=>e.endAngle||0).padAngle(e=>e.padAngle||0).innerRadius(e=>e.innerRadius||0).outerRadius(e=>e.outerRadius||0).cornerRadius(e=>e.cornerRadius||0),r9e=Rie().x(C1).y1(D1).y0(e=>(e.y||0)+(e.height||0)).defined(MT),o9e=Rie().y(D1).x1(C1).x0(e=>(e.x||0)+(e.width||0)).defined(MT),s9e=Oie().x(C1).y(D1).defined(MT),a9e=Noe().x(C1).y(D1).width(e=>e.width||0).height(e=>e.height||0).cornerRadius(e=>E1(e.cornerRadiusTopLeft,e.cornerRadius)||0,e=>E1(e.cornerRadiusTopRight,e.cornerRadius)||0,e=>E1(e.cornerRadiusBottomRight,e.cornerRadius)||0,e=>E1(e.cornerRadiusBottomLeft,e.cornerRadius)||0),l9e=function kje(e,t){let n=null,i=iT(r);function r(){let o;if(n||(n=o=i()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return e="function"==typeof e?e:$t(e||D3),t="function"==typeof t?t:$t(void 0===t?64:+t),r.type=function(o){return arguments.length?(e="function"==typeof o?o:$t(o),r):e},r.size=function(o){return arguments.length?(t="function"==typeof o?o:$t(+o),r):t},r.context=function(o){return arguments.length?(n=o??null,r):n},r}().type(e=>Moe(e.shape||"circle")).size(e=>E1(e.size,64)),c9e=Ioe().x(C1).y(D1).defined(MT).size(e=>e.size||1);function v$(e){return e.cornerRadius||e.cornerRadiusTopLeft||e.cornerRadiusTopRight||e.cornerRadiusBottomRight||e.cornerRadiusBottomLeft}function t_(e,t,n,i){return a9e.context(e)(t,n,i)}var koe=1;function Ooe(){koe=1}function b$(e,t,n){var i=t.clip,r=e._defs,o=t.clip_id||(t.clip_id="clip"+koe++),s=r.clipping[o]||(r.clipping[o]={id:o});return it(i)?s.path=i(null):v$(n)?s.path=t_(null,n,0,0):(s.width=n.width||0,s.height=n.height||0),"url(#"+o+")"}function li(e){this.clear(),e&&this.union(e)}function NT(e){this.mark=e,this.bounds=this.bounds||new li}function IT(e){NT.call(this,e),this.items=this.items||[]}li.prototype={clone(){return new li(this)},clear(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},equals(e){return this.x1===e.x1&&this.y1===e.y1&&this.x2===e.x2&&this.y2===e.y2},set(e,t,n,i){return nthis.x2&&(this.x2=e),t>this.y2&&(this.y2=t),this},expand(e){return this.x1-=e,this.y1-=e,this.x2+=e,this.y2+=e,this},round(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this},scale(e){return this.x1*=e,this.y1*=e,this.x2*=e,this.y2*=e,this},translate(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this},rotate(e,t,n){const i=this.rotatedPoints(e,t,n);return this.clear().add(i[0],i[1]).add(i[2],i[3]).add(i[4],i[5]).add(i[6],i[7])},rotatedPoints(e,t,n){var{x1:i,y1:r,x2:o,y2:s}=this,a=Math.cos(e),l=Math.sin(e),c=t-t*a+n*l,u=n-t*l-n*a;return[a*i-l*r+c,l*i+a*r+u,a*i-l*s+c,l*i+a*s+u,a*o-l*r+c,l*o+a*r+u,a*o-l*s+c,l*o+a*s+u]},union(e){return e.x1this.x2&&(this.x2=e.x2),e.y2>this.y2&&(this.y2=e.y2),this},intersect(e){return e.x1>this.x1&&(this.x1=e.x1),e.y1>this.y1&&(this.y1=e.y1),e.x2=e.x2&&this.y1<=e.y1&&this.y2>=e.y2},alignsWith(e){return e&&(this.x1==e.x1||this.x2==e.x2||this.y1==e.y1||this.y2==e.y2)},intersects(e){return e&&!(this.x2e.x2||this.y2e.y2)},contains(e,t){return!(ethis.x2||tthis.y2)},width(){return this.x2-this.x1},height(){return this.y2-this.y1}},me(IT,NT);class Roe{constructor(t){this._pending=0,this._loader=t||IS()}pending(){return this._pending}sanitizeURL(t){const n=this;return Foe(n),n._loader.sanitize(t,{context:"href"}).then(i=>(S1(n),i)).catch(()=>(S1(n),null))}loadImage(t){const n=this,i=typeof Image<"u"?Image:null;return Foe(n),n._loader.sanitize(t,{context:"image"}).then(r=>{const o=r.href;if(!o||!i)throw{url:o};const s=new i,a=De(r,"crossOrigin")?r.crossOrigin:"anonymous";return null!=a&&(s.crossOrigin=a),s.onload=()=>S1(n),s.onerror=()=>S1(n),s.src=o,s}).catch(r=>(S1(n),{complete:!1,width:0,height:0,src:r&&r.url||""}))}ready(){const t=this;return new Promise(n=>{!function i(r){t.pending()?setTimeout(()=>{i(!0)},10):n(r)}(!1)})}}function Foe(e){e._pending+=1}function S1(e){e._pending-=1}function Zc(e,t,n){if(t.stroke&&0!==t.opacity&&0!==t.strokeOpacity){const i=null!=t.strokeWidth?+t.strokeWidth:1;e.expand(i+(n?function m9e(e,t){return e.strokeJoin&&"miter"!==e.strokeJoin?0:t}(t,i):0))}return e}const _9e=Bl-1e-8;let kT,OT,RT,Sh,w$,FT,E$,C$;const bd=(e,t)=>kT.add(e,t),PT=(e,t)=>bd(OT=e,RT=t),Poe=e=>bd(e,kT.y1),Loe=e=>bd(kT.x1,e),Th=(e,t)=>w$*e+E$*t,xh=(e,t)=>FT*e+C$*t,D$=(e,t)=>bd(Th(e,t),xh(e,t)),S$=(e,t)=>PT(Th(e,t),xh(e,t));function T1(e,t){return kT=e,t?(Sh=t*yd,w$=C$=Math.cos(Sh),FT=Math.sin(Sh),E$=-FT):(w$=C$=1,Sh=FT=E$=0),y9e}const y9e={beginPath(){},closePath(){},moveTo:S$,lineTo:S$,rect(e,t,n,i){Sh?(D$(e+n,t),D$(e+n,t+i),D$(e,t+i),S$(e,t)):(bd(e+n,t+i),PT(e,t))},quadraticCurveTo(e,t,n,i){const r=Th(e,t),o=xh(e,t),s=Th(n,i),a=xh(n,i);$oe(OT,r,s,Poe),$oe(RT,o,a,Loe),PT(s,a)},bezierCurveTo(e,t,n,i,r,o){const s=Th(e,t),a=xh(e,t),l=Th(n,i),c=xh(n,i),u=Th(r,o),d=xh(r,o);Boe(OT,s,l,u,Poe),Boe(RT,a,c,d,Loe),PT(u,d)},arc(e,t,n,i,r,o){if(i+=Sh,r+=Sh,OT=n*Math.cos(r)+e,RT=n*Math.sin(r)+t,Math.abs(r-i)>_9e)bd(e-n,t-n),bd(e+n,t+n);else{const s=c=>bd(n*Math.cos(c)+e,n*Math.sin(c)+t);let a,l;if(s(i),s(r),r!==i)if((i%=Bl)<0&&(i+=Bl),(r%=Bl)<0&&(r+=Bl),rr;++l,a-=Dh)s(a);else for(a=i-i%Dh+Dh,l=0;l<4&&a1e-14?(u=s*s+a*o,u>=0&&(u=Math.sqrt(u),l=(-s+u)/o,c=(-s-u)/o)):l=.5*a/s,0f)return!1;g>d&&(d=g)}else if(h>0){if(g0&&(e.globalAlpha=n,e.fillStyle=Hoe(e,t,t.fill),!0)}var b9e=[];function r_(e,t,n){var i=null!=(i=t.strokeWidth)?i:1;return!(i<=0)&&(n*=null==t.strokeOpacity?1:t.strokeOpacity)>0&&(e.globalAlpha=n,e.strokeStyle=Hoe(e,t,t.stroke),e.lineWidth=i,e.lineCap=t.strokeCap||"butt",e.lineJoin=t.strokeJoin||"miter",e.miterLimit=t.strokeMiterLimit||10,e.setLineDash&&(e.setLineDash(t.strokeDash||b9e),e.lineDashOffset=t.strokeDashOffset||0),!0)}function w9e(e,t){return e.zindex-t.zindex||e.index-t.index}function M$(e){if(!e.zdirty)return e.zitems;var i,r,o,t=e.items,n=[];for(r=0,o=t.length;r=0;)if(i=t(n[r]))return i;if(n===o)for(r=(n=e.items).length;--r>=0;)if(!n[r].zindex&&(i=t(n[r])))return i;return null}function N$(e){return function(t,n,i){Sa(n,r=>{(!i||i.intersects(r.bounds))&&Goe(e,t,r,r)})}}function E9e(e){return function(t,n,i){n.items.length&&(!i||i.intersects(n.bounds))&&Goe(e,t,n.items[0],n.items)}}function Goe(e,t,n,i){var r=null==n.opacity?1:n.opacity;0!==r&&(e(t,i)||(i_(t,n),n.fill&<(t,n,r)&&t.fill(),n.stroke&&r_(t,n,r)&&t.stroke()))}function BT(e){return e=e||Ms,function(t,n,i,r,o,s){return i*=t.pixelRatio,r*=t.pixelRatio,$T(n,a=>{const l=a.bounds;if((!l||l.contains(o,s))&&l&&e(t,a,i,r,o,s))return a})}}function x1(e,t){return function(n,i,r,o){var u,s=Array.isArray(i)?i[0]:i,a=t??s.fill,l=s.stroke&&n.isPointInStroke;return l&&(u=s.strokeCap,n.lineWidth=s.strokeWidth??1,n.lineCap=u??"butt"),!e(n,i)&&(a&&n.isPointInPath(r,o)||l&&n.isPointInStroke(r,o))}}function I$(e){return BT(x1(e))}function Ah(e,t){return"translate("+e+","+t+")"}function k$(e){return"rotate("+e+")"}function Woe(e){return Ah(e.x||0,e.y||0)}function O$(e,t,n){function o(s,a){var l=a.x||0,c=a.y||0,u=a.angle||0;s.translate(l,c),u&&s.rotate(u*=yd),s.beginPath(),t(s,a),u&&s.rotate(-u),s.translate(-l,-c)}return{type:e,tag:"path",nested:!1,attr:function i(s,a){s("transform",function D9e(e){return Ah(e.x||0,e.y||0)+(e.angle?" "+k$(e.angle):"")}(a)),s("d",t(null,a))},bound:function r(s,a){return t(T1(s,a.angle),a),Zc(s,a).translate(a.x||0,a.y||0)},draw:N$(o),pick:I$(o),isect:n||x$(o)}}var T9e=O$("arc",function u9e(e,t){return i9e.context(e)(t)});function R$(e,t,n){function o(l,c){l.beginPath(),t(l,c)}const s=x1(o);return{type:e,tag:"path",nested:!0,attr:function i(l,c){var u=c.mark.items;u.length&&l("d",t(null,u))},bound:function r(l,c){var u=c.items;return 0===u.length?l:(t(T1(l),u),Zc(l,u[0]))},draw:E9e(o),pick:function a(l,c,u,d,f,h){var p=c.items,g=c.bounds;return!p||!p.length||g&&!g.contains(f,h)?null:s(l,p,u*=l.pixelRatio,d*=l.pixelRatio)?p[0]:null},isect:A$,tip:n}}var N9e=R$("area",function d9e(e,t){const n=t[0];return("horizontal"===n.orient?o9e:r9e).curve(g$(n.interpolate||"linear",n.orient,n.tension)).context(e)(t)},function x9e(e,t){for(var s,a,n="horizontal"===e[0].orient?t[1]:t[0],i="horizontal"===e[0].orient?"y":"x",r=e.length,o=1/0;--r>=0;)!1!==e[r].defined&&(a=Math.abs(e[r][i]-n)).5&&t<1.5?.5-Math.abs(t-1):0}function Koe(e,t){const n=Yoe(t);e("d",t_(null,t,n,n))}function A1(e,t,n,i){const r=Yoe(t);e.beginPath(),t_(e,t,(n||0)+r,(i||0)+r)}const L9e=x1(A1),$9e=x1(A1,!1),B9e=x1(A1,!0);var z9e={type:"group",tag:"g",nested:!1,attr:function k9e(e,t){e("transform",Woe(t))},bound:function P9e(e,t){if(!t.clip&&t.items){const n=t.items,i=n.length;for(let r=0;r{const o=r.x||0,s=r.y||0,a=r.strokeForeground,l=null==r.opacity?1:r.opacity;(r.stroke||r.fill)&&l&&(A1(e,r,o,s),i_(e,r),r.fill&<(e,r,l)&&e.fill(),r.stroke&&!a&&r_(e,r,l)&&e.stroke()),e.save(),e.translate(o,s),r.clip&&qoe(e,r),n&&n.translate(-o,-s),Sa(r,c=>{("group"===c.marktype||null==i||i.includes(c.marktype))&&this.draw(e,c,n,i)}),n&&n.translate(o,s),e.restore(),a&&r.stroke&&l&&(A1(e,r,o,s),i_(e,r),r_(e,r,l)&&e.stroke())})},pick:function V9e(e,t,n,i,r,o){if(t.bounds&&!t.bounds.contains(r,o)||!t.items)return null;const s=n*e.pixelRatio,a=i*e.pixelRatio;return $T(t,l=>{let c,u,d;const f=l.bounds;if(f&&!f.contains(r,o))return;u=l.x||0,d=l.y||0;const g=l.clip;if(g&&(ru+(l.width||0)||od+(l.height||0)))return;if(e.save(),e.translate(u,d),u=r-u,d=o-d,g&&v$(l)&&!B9e(e,l,s,a))return e.restore(),null;const m=l.strokeForeground,_=!1!==t.interactive;return _&&m&&l.stroke&&$9e(e,l,s,a)?(e.restore(),l):(c=$T(l,y=>function U9e(e,t,n){return(!1!==e.interactive||"group"===e.marktype)&&e.bounds&&e.bounds.contains(t,n)}(y,u,d)?this.pick(y,n,i,u,d):null),!c&&_&&(l.fill||!m&&l.stroke)&&L9e(e,l,s,a)&&(c=l),e.restore(),c||null)})},isect:Voe,content:function F9e(e,t,n){e("clip-path",t.clip?b$(n,t,t):null)},background:function O9e(e,t){e("class","background"),e("aria-hidden",!0),Koe(e,t)},foreground:function R9e(e,t){e("class","foreground"),e("aria-hidden",!0),t.strokeForeground?Koe(e,t):e("d","")}},M1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"};function F$(e,t){var n=e.image;return(!n||e.url&&e.url!==n.url)&&(n={complete:!1,width:0,height:0},t.loadImage(e.url).then(i=>{e.image=i,e.image.url=e.url})),n}function P$(e,t){return null!=e.width?e.width:t&&t.width?!1!==e.aspect&&e.height?e.height*t.width/t.height:t.width:0}function L$(e,t){return null!=e.height?e.height:t&&t.height?!1!==e.aspect&&e.width?e.width*t.height/t.width:t.height:0}function jT(e,t){return"center"===e?t/2:"right"===e?t:0}function VT(e,t){return"middle"===e?t/2:"bottom"===e?t:0}var q9e={type:"image",tag:"image",nested:!1,attr:function H9e(e,t,n){const i=F$(t,n),r=P$(t,i),o=L$(t,i),s=(t.x||0)-jT(t.align,r),a=(t.y||0)-VT(t.baseline,o);e("href",!i.src&&i.toDataURL?i.toDataURL():i.src||"",M1["xmlns:xlink"],"xlink:href"),e("transform",Ah(s,a)),e("width",r),e("height",o),e("preserveAspectRatio",!1===t.aspect?"none":"xMidYMid")},bound:function G9e(e,t){const n=t.image,i=P$(t,n),r=L$(t,n),o=(t.x||0)-jT(t.align,i),s=(t.y||0)-VT(t.baseline,r);return e.set(o,s,o+i,s+r)},draw:function W9e(e,t,n){Sa(t,i=>{if(n&&!n.intersects(i.bounds))return;const r=F$(i,this);let o=P$(i,r),s=L$(i,r);if(0===o||0===s)return;let c,u,d,f,a=(i.x||0)-jT(i.align,o),l=(i.y||0)-VT(i.baseline,s);!1!==i.aspect&&(u=r.width/r.height,d=i.width/i.height,u==u&&d==d&&u!==d&&(d=0;)if(!1!==e[i].defined&&(r=e[i].x-t[0])*r+(o=e[i].y-t[1])*o{if(!n||n.intersects(i.bounds)){var r=null==i.opacity?1:i.opacity;r&&Qoe(e,i,r)&&(i_(e,i),e.stroke())}})},pick:BT(function r7e(e,t,n,i){return!!e.isPointInStroke&&Qoe(e,t,1)&&e.isPointInStroke(n,i)}),isect:Uoe},s7e=O$("shape",function h9e(e,t){return(t.mark.shape||t.shape).context(e)(t)}),a7e=O$("symbol",function p9e(e,t){return l9e.context(e)(t)},A$);const Zoe=Pee();var Ko={height:jl,measureWidth:$$,estimateWidth:zT,width:zT,canvas:Joe};function Joe(e){Ko.width=e&&wd?$$:zT}function zT(e,t){return ese(Cd(e,t),jl(e))}function ese(e,t){return~~(.8*e.length*t)}function $$(e,t){return jl(e)<=0||!(t=Cd(e,t))?0:tse(t,HT(e))}function tse(e,t){const n=`(${t}) ${e}`;let i=Zoe.get(n);return void 0===i&&(wd.font=t,i=wd.measureText(e).width,Zoe.set(n,i)),i}function jl(e){return null!=e.fontSize?+e.fontSize||0:11}function Ed(e){return null!=e.lineHeight?e.lineHeight:jl(e)+2}function N1(e){return function l7e(e){return te(e)?e.length>1?e:e[0]:e}(e.lineBreak&&e.text&&!te(e.text)?e.text.split(e.lineBreak):e.text)}function B$(e){const t=N1(e);return(te(t)?t.length-1:0)*Ed(e)}function Cd(e,t){const n=null==t?"":(t+"").trim();return e.limit>0&&n.length?function u7e(e,t){var n=+e.limit,i=function c7e(e){if(Ko.width===$$){const t=HT(e);return n=>tse(n,t)}if(Ko.width===zT){const t=jl(e);return n=>ese(n,t)}return t=>Ko.width(e,t)}(e);if(i(t)>>1))>n?s=l+1:a=l;return r+t.slice(s)}for(;s>>1)))Math.max(f,Ko.width(t,h)),0)):d=Ko.width(t,u),"center"===r?l-=d/2:"right"===r&&(l-=d),e.set(l+=s,c+=a,l+d,c+i),t.angle&&!n)e.rotate(t.angle*yd,s,a);else if(2===n)return e.rotatedPoints(t.angle*yd,s,a);return e}var Xo={arc:T9e,area:N9e,group:z9e,image:q9e,line:Y9e,path:Q9e,rect:e7e,rule:o7e,shape:s7e,symbol:a7e,text:{type:"text",tag:"text",nested:!1,attr:function f7e(e,t){var l,n=t.dx||0,i=(t.dy||0)+j$(t),r=GT(t),o=r.x1,s=r.y1,a=t.angle||0;e("text-anchor",d7e[t.align]||"start"),a?(l=Ah(o,s)+" "+k$(a),(n||i)&&(l+=" "+Ah(n,i))):l=Ah(o+n,s+i),e("transform",l)},bound:V$,draw:function h7e(e,t,n){Sa(t,i=>{var o,s,a,l,c,u,d,r=null==i.opacity?1:i.opacity;if(!(n&&!n.intersects(i.bounds)||0===r||i.fontSize<=0||null==i.text||0===i.text.length)){if(e.font=HT(i),e.textAlign=i.align||"left",s=(o=GT(i)).x1,a=o.y1,i.angle&&(e.save(),e.translate(s,a),e.rotate(i.angle*yd),s=a=0),s+=i.dx||0,a+=(i.dy||0)+j$(i),u=N1(i),i_(e,i),te(u))for(c=Ed(i),l=0;l=0;)if(!1!==e[n].defined&&(i=e[n].x-t[0])*i+(r=e[n].y-t[1])*r<(i=e[n].size||1)*i)return e[n];return null})};function U$(e,t,n){var i=Xo[e.mark.marktype];return i.nested&&(e=e.mark),(t||i.bound)(e.bounds||(e.bounds=new li),e,n)}var nse={mark:null};function ise(e,t,n){var a,l,c,u,i=Xo[e.marktype],r=i.bound,o=e.items,s=o&&o.length;if(i.nested)return s?c=o[0]:(nse.mark=e,c=nse),u=U$(c,r,n),t&&t.union(u)||u;if(t=t||e.bounds&&e.bounds.clear()||new li,s)for(a=0,l=o.length;at;)e.removeChild(n[--i]);return e}function cse(e){return"mark-"+e.marktype+(e.role?" role-"+e.role:"")+(e.name?" "+e.name:"")}function WT(e,t){const n=t.getBoundingClientRect();return[e.clientX-n.left-(t.clientLeft||0),e.clientY-n.top-(t.clientTop||0)]}class H${constructor(t,n){this._active=null,this._handlers={},this._loader=t||IS(),this._tooltip=n||b7e}initialize(t,n,i){return this._el=t,this._obj=i||null,this.origin(n)}element(){return this._el}canvas(){return this._el&&this._el.firstChild}origin(t){return arguments.length?(this._origin=t||[0,0],this):this._origin.slice()}scene(t){return arguments.length?(this._scene=t,this):this._scene}on(){}off(){}_handlerIndex(t,n,i){for(let r=t?t.length:0;--r>=0;)if(t[r].type===n&&(!i||t[r].handler===i))return r;return-1}handlers(t){const n=this._handlers,i=[];if(t)i.push(...n[this.eventName(t)]);else for(const r in n)i.push(...n[r]);return i}eventName(t){const n=t.indexOf(".");return n<0?t:t.slice(0,n)}handleHref(t,n,i){this._loader.sanitize(i,{context:"href"}).then(r=>{const o=new MouseEvent(t.type,t),s=Dd(null,"a");for(const a in r)s.setAttribute(a,r[a]);s.dispatchEvent(o)}).catch(()=>{})}handleTooltip(t,n,i){n&&null!=n.tooltip&&(n=function v7e(e,t,n,i){var o,s,r=e&&e.mark;if(r&&(o=Xo[r.marktype]).tip){for((s=WT(t,n))[0]-=i[0],s[1]-=i[1];e=e.mark.group;)s[0]-=e.x||0,s[1]-=e.y||0;e=o.tip(r.items,s)}return e}(n,t,this.canvas(),this._origin),this._tooltip.call(this._obj,this,t,n,i&&n&&n.tooltip||null))}getItemBoundingClientRect(t){const n=this.canvas();if(!n)return;const i=n.getBoundingClientRect(),r=this._origin,o=t.bounds,s=o.width(),a=o.height();let l=o.x1+r[0]+i.left,c=o.y1+r[1]+i.top;for(;t.mark&&(t=t.mark.group);)l+=t.x||0,c+=t.y||0;return{x:l,y:c,width:s,height:a,left:l,top:c,right:l+s,bottom:c+a}}}function b7e(e,t,n,i){e.element().setAttribute("title",i||"")}class O1{constructor(t){this._el=null,this._bgcolor=null,this._loader=new Roe(t)}initialize(t,n,i,r,o){return this._el=t,this.resize(n,i,r,o)}element(){return this._el}canvas(){return this._el&&this._el.firstChild}background(t){return 0===arguments.length?this._bgcolor:(this._bgcolor=t,this)}resize(t,n,i,r){return this._width=t,this._height=n,this._origin=i||[0,0],this._scale=r||1,this}dirty(){}render(t,n){const i=this;return i._call=function(){i._render(t,n)},i._call(),i._call=null,i}_render(){}renderAsync(t,n){const i=this.render(t,n);return this._ready?this._ready.then(()=>i):Promise.resolve(i)}_load(t,n){var i=this,r=i._loader[t](n);if(!i._ready){const o=i._call;i._ready=i._loader.ready().then(s=>{s&&o(),i._ready=null})}return r}sanitizeURL(t){return this._load("sanitizeURL",t)}loadImage(t){return this._load("loadImage",t)}}const qT="dragleave",G$="pointerdown",YT="pointermove",KT="pointerout",fse="pointerover",W$="mousedown",XT="mouseout",QT="click",gse="mousewheel",ZT="touchstart",JT="touchmove",ex="touchend",A7e=["keydown","keypress","keyup","dragenter",qT,"dragover",G$,"pointerup",YT,KT,fse,W$,"mouseup","mousemove",XT,"mouseover",QT,"dblclick","wheel",gse,ZT,JT,ex],q$=YT,R1=XT,Y$=QT;class F1 extends H${constructor(t,n){super(t,n),this._down=null,this._touch=null,this._first=!0,this._events={},this.events=A7e,this.pointermove=_se([YT,"mousemove"],[fse,"mouseover"],[KT,XT]),this.dragover=_se(["dragover"],["dragenter"],[qT]),this.pointerout=yse([KT,XT]),this.dragleave=yse([qT])}initialize(t,n,i){return this._canvas=t&&z$(t,"canvas"),[QT,W$,G$,YT,KT,qT].forEach(r=>mse(this,r)),super.initialize(t,n,i)}canvas(){return this._canvas}context(){return this._canvas.getContext("2d")}DOMMouseScroll(t){this.fire(gse,t)}pointerdown(t){this._down=this._active,this.fire(G$,t)}mousedown(t){this._down=this._active,this.fire(W$,t)}click(t){this._down===this._active&&(this.fire(QT,t),this._down=null)}touchstart(t){this._touch=this.pickEvent(t.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire(ZT,t,!0)}touchmove(t){this.fire(JT,t,!0)}touchend(t){this.fire(ex,t,!0),this._touch=null}fire(t,n,i){const r=i?this._touch:this._active,o=this._handlers[t];if(n.vegaType=t,t===Y$&&r&&r.href?this.handleHref(n,r,r.href):(t===q$||t===R1)&&this.handleTooltip(n,r,t!==R1),o)for(let s=0,a=o.length;s=0&&r.splice(o,1),this}pickEvent(t){const n=WT(t,this._canvas),i=this._origin;return this.pick(this._scene,n[0],n[1],n[0]-i[0],n[1]-i[1])}pick(t,n,i,r,o){const s=this.context();return Xo[t.marktype].pick.call(this,s,t,n,i,r,o)}}const M7e=e=>e===ZT||e===JT||e===ex?[ZT,JT,ex]:[e];function mse(e,t){M7e(t).forEach(n=>function N7e(e,t){const n=e.canvas();n&&!e._events[t]&&(e._events[t]=1,n.addEventListener(t,e[t]?i=>e[t](i):i=>e.fire(t,i)))}(e,n))}function P1(e,t,n){t.forEach(i=>e.fire(i,n))}function _se(e,t,n){return function(i){const r=this._active,o=this.pickEvent(i);o===r||((!r||!r.exit)&&P1(this,n,i),this._active=o,P1(this,t,i)),P1(this,e,i)}}function yse(e){return function(t){P1(this,e,t),this._active=null}}class tx extends O1{constructor(t){super(t),this._options={},this._redraw=!1,this._dirty=new li,this._tempb=new li}initialize(t,n,i,r,o,s){return this._options=s||{},this._canvas=this._options.externalContext?null:fd(1,1),t&&this._canvas&&(Ls(t,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),super.initialize(t,n,i,r,o)}resize(t,n,i,r){if(super.resize(t,n,i,r),this._canvas)!function k7e(e,t,n,i,r,o){const s=typeof HTMLElement<"u"&&e instanceof HTMLElement&&null!=e.parentNode,a=e.getContext("2d"),l=s?function I7e(){return typeof window<"u"&&window.devicePixelRatio||1}():r;e.width=t*l,e.height=n*l;for(const c in o)a[c]=o[c];return s&&1!==l&&(e.style.width=t+"px",e.style.height=n+"px"),a.pixelRatio=l,a.setTransform(l,0,0,l,l*i[0],l*i[1]),e}(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{const o=this._options.externalContext;o||J("CanvasRenderer is missing a valid canvas or context"),o.scale(this._scale,this._scale),o.translate(this._origin[0],this._origin[1])}return this._redraw=!0,this}canvas(){return this._canvas}context(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)}dirty(t){const n=this._tempb.clear().union(t.bounds);let i=t.mark.group;for(;i;)n.translate(i.x||0,i.y||0),i=i.mark.group;this._dirty.union(n)}_render(t,n){const i=this.context(),r=this._origin,o=this._width,s=this._height,a=this._dirty,l=O7e(r,o,s);i.save();const c=this._redraw||a.empty()?(this._redraw=!1,l.expand(1)):function R7e(e,t,n){return t.expand(1).round(),e.pixelRatio%1&&t.scale(e.pixelRatio).round().scale(1/e.pixelRatio),t.translate(-n[0]%1,-n[1]%1),e.beginPath(),e.rect(t.x1,t.y1,t.width(),t.height()),e.clip(),t}(i,l.intersect(a),r);return this.clear(-r[0],-r[1],o,s),this.draw(i,t,c,n),i.restore(),a.clear(),this}draw(t,n,i,r){if("group"!==n.marktype&&null!=r&&!r.includes(n.marktype))return;const o=Xo[n.marktype];n.clip&&function I9e(e,t){var n=t.clip;e.save(),it(n)?(e.beginPath(),n(e),e.clip()):qoe(e,t.group)}(t,n),o.draw.call(this,t,n,i,r),n.clip&&t.restore()}clear(t,n,i,r){const o=this._options,s=this.context();"pdf"!==o.type&&!o.externalContext&&s.clearRect(t,n,i,r),null!=this._bgcolor&&(s.fillStyle=this._bgcolor,s.fillRect(t,n,i,r))}}const O7e=(e,t,n)=>(new li).set(0,0,t,n).translate(-e[0],-e[1]);class vse extends H${constructor(t,n){super(t,n);const i=this;i._hrefHandler=K$(i,(r,o)=>{o&&o.href&&i.handleHref(r,o,o.href)}),i._tooltipHandler=K$(i,(r,o)=>{i.handleTooltip(r,o,r.type!==R1)})}initialize(t,n,i){let r=this._svg;return r&&(r.removeEventListener(Y$,this._hrefHandler),r.removeEventListener(q$,this._tooltipHandler),r.removeEventListener(R1,this._tooltipHandler)),this._svg=r=t&&z$(t,"svg"),r&&(r.addEventListener(Y$,this._hrefHandler),r.addEventListener(q$,this._tooltipHandler),r.addEventListener(R1,this._tooltipHandler)),super.initialize(t,n,i)}canvas(){return this._svg}on(t,n){const i=this.eventName(t),r=this._handlers;if(this._handlerIndex(r[i],t,n)<0){const s={type:t,handler:n,listener:K$(this,n)};(r[i]||(r[i]=[])).push(s),this._svg&&this._svg.addEventListener(i,s.listener)}return this}off(t,n){const i=this.eventName(t),r=this._handlers[i],o=this._handlerIndex(r,t,n);return o>=0&&(this._svg&&this._svg.removeEventListener(i,r[o].listener),r.splice(o,1)),this}}const K$=(e,t)=>n=>{let i=n.target.__data__;i=Array.isArray(i)?i[0]:i,n.vegaType=n.type,t.call(e._obj,n,i)},bse="aria-hidden",X$="aria-label",Q$="role",Z$="aria-roledescription",wse="graphics-object",J$="graphics-symbol",Ese=(e,t,n)=>({[Q$]:e,[Z$]:t,[X$]:n||void 0}),F7e=va(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),Cse={axis:{desc:"axis",caption:function $7e(e){const t=e.datum,n=e.orient,i=t.title?Ase(e):null,r=e.context,o=r.scales[t.scale].value,s=r.dataflow.locale(),a=o.type;return("left"===n||"right"===n?"Y":"X")+"-axis"+(i?` titled '${i}'`:"")+` for a ${Zm(a)?"discrete":a} scale with ${boe(s,o,e)}`}},legend:{desc:"legend",caption:function B7e(e){const t=e.datum,n=t.title?Ase(e):null,i=`${t.type||""} legend`.trim(),r=t.scales,o=Object.keys(r),s=e.context,a=s.scales[r[o[0]]].value,l=s.dataflow.locale();return function V7e(e){return e.length?e[0].toUpperCase()+e.slice(1):e}(i)+(n?` titled '${n}'`:"")+` for ${function j7e(e){return e=e.map(t=>t+("fill"===t||"stroke"===t?" color":"")),e.length<2?e[0]:e.slice(0,-1).join(", ")+" and "+yt(e)}(o)} with ${boe(l,a,e)}`}},"title-text":{desc:"title",caption:e=>`Title text '${xse(e)}'`},"title-subtitle":{desc:"subtitle",caption:e=>`Subtitle text '${xse(e)}'`}},Dse={ariaRole:Q$,ariaRoleDescription:Z$,description:X$};function Sse(e,t){const n=!1===t.aria;if(e(bse,n||void 0),n||null==t.description)for(const i in Dse)e(Dse[i],void 0);else{const i=t.mark.marktype;e(X$,t.description),e(Q$,t.ariaRole||("group"===i?wse:J$)),e(Z$,t.ariaRoleDescription||`${i} mark`)}}function Tse(e){return!1===e.aria?{[bse]:!0}:F7e[e.role]?null:Cse[e.role]?function L7e(e,t){try{const n=e.items[0];return Ese(t.role||J$,t.desc,n.description||(t.caption||(()=>""))(n))}catch{return null}}(e,Cse[e.role]):function P7e(e){const t=e.marktype,n="group"===t||"text"===t||e.items.some(i=>null!=i.description&&!1!==i.aria);return Ese(n?wse:J$,`${t} mark container`,e.description)}(e)}function xse(e){return Ee(e.text).join(" ")}function Ase(e){try{return Ee(yt(e.items).items[0].text).join(" ")}catch{return null}}const Mse=e=>(e+"").replace(/&/g,"&").replace(//g,">"),U7e=e=>Mse(e).replace(/"/g,""").replace(/\t/g," ").replace(/\n/g," ").replace(/\r/g," ");function eB(){let e="",t="",n="";const i=[],r=()=>t=n="",s=(l,c)=>(null!=c&&(t+=` ${l}="${U7e(c)}"`),a),a={open(l){(l=>{t&&(e+=`${t}>${n}`,r()),i.push(l)})(l),t="<"+l;for(var c=arguments.length,u=new Array(c>1?c-1:0),d=1;d${n}`:"/>"):``,r(),a},attr:s,text:l=>(n+=Mse(l),a),toString:()=>e};return a}const Nse=e=>Ise(eB(),e)+"";function Ise(e,t){if(e.open(t.tagName),t.hasAttributes()){const n=t.attributes,i=n.length;for(let r=0;r{u.dirty=n})),!r.zdirty){if(i.exit){s.nested&&r.items.length?(c=r.items[0],c._svg&&this._update(s,c._svg,c)):i._svg&&(c=i._svg.parentNode,c&&c.removeChild(i._svg)),i._svg=null;continue}i=s.nested?r.items[0]:i,i._update!==n&&(i._svg&&i._svg.ownerSVGElement?this._update(s,i._svg,i):(this._dirtyAll=!1,Rse(i,n)),i._update=n)}return!this._dirtyAll}mark(t,n,i,r){if(!this.isDirty(n))return n._svg;const o=this._svg,s=n.marktype,a=Xo[s],l=!1===n.interactive?"none":null,c="g"===a.tag,u=Fse(n,t,i,"g",o);if("group"!==s&&null!=r&&!r.includes(s))return Ls(u,0),n._svg;u.setAttribute("class",cse(n));const d=Tse(n);for(const g in d)Br(u,g,d[g]);c||Br(u,"pointer-events",l),Br(u,"clip-path",n.clip?b$(this,n,n.group):null);let f=null,h=0;const p=g=>{const m=this.isDirty(g),_=Fse(g,u,f,a.tag,o);m&&(this._update(a,_,g),c&&function G7e(e,t,n,i){t=t.lastChild.previousSibling;let r,o=0;Sa(n,s=>{r=e.mark(t,s,r,i),++o}),Ls(t,1+o)}(this,_,g,r)),f=_,++h};return a.nested?n.items.length&&p(n.items[0]):Sa(n,p),Ls(u,h),u}_update(t,n,i){Jc=n,br=n.__values__,Sse($1,i),t.attr($1,i,this);const r=q7e[t.type];r&&r.call(this,t,n,i),Jc&&this.style(Jc,i)}style(t,n){if(null!=n){for(const i in nx){let r="font"===i?I1(n):n[i];if(r===br[i])continue;const o=nx[i];null==r?t.removeAttribute(o):(p$(r)&&(r=Eoe(r,this._defs.gradient,Pse())),t.setAttribute(o,r+"")),br[i]=r}for(const i in ix)rx(t,ix[i],n[i])}}defs(){const t=this._svg,n=this._defs;let i=n.el,r=0;for(const o in n.gradient)i||(n.el=i=Ei(t,1,"defs",Ci)),r=z7e(i,n.gradient[o],r);for(const o in n.clipping)i||(n.el=i=Ei(t,1,"defs",Ci)),r=H7e(i,n.clipping[o],r);i&&(0===r?(t.removeChild(i),n.el=null):Ls(i,r))}_clearDefs(){const t=this._defs;t.gradient={},t.clipping={}}}function Rse(e,t){for(;e&&e.dirty!==t;e=e.mark.group){if(e.dirty=t,!e.mark||e.mark.dirty===t)return;e.mark.dirty=t}}function z7e(e,t,n){let i,r,o;if("radial"===t.gradient){let s=Ei(e,n++,"pattern",Ci);Sd(s,{id:"p_"+t.id,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),s=Ei(s,0,"rect",Ci),Sd(s,{width:1,height:1,fill:`url(${Pse()}#${t.id})`}),Sd(e=Ei(e,n++,"radialGradient",Ci),{id:t.id,fx:t.x1,fy:t.y1,fr:t.r1,cx:t.x2,cy:t.y2,r:t.r2})}else Sd(e=Ei(e,n++,"linearGradient",Ci),{id:t.id,x1:t.x1,x2:t.x2,y1:t.y1,y2:t.y2});for(i=0,r=t.stops.length;i1&&e.previousSibling!=t}(o,n))&&t.insertBefore(o,n?n.nextSibling:t.firstChild),o}let Jc=null,br=null;const q7e={group(e,t,n){const i=Jc=t.childNodes[2];br=i.__values__,e.foreground($1,n,this),br=t.__values__,Jc=t.childNodes[1],e.content($1,n,this);const r=Jc=t.childNodes[0];e.background($1,n,this);const o=!1===n.mark.interactive?"none":null;if(o!==br.events&&(Br(i,"pointer-events",o),Br(r,"pointer-events",o),br.events=o),n.strokeForeground&&n.stroke){const s=n.fill;Br(i,"display",null),this.style(r,n),Br(r,"stroke",null),s&&(n.fill=null),br=i.__values__,this.style(i,n),s&&(n.fill=s),Jc=null}else Br(i,"display","none")},image(e,t,n){!1===n.smooth?(rx(t,"image-rendering","optimizeSpeed"),rx(t,"image-rendering","pixelated")):rx(t,"image-rendering",null)},text(e,t,n){const i=N1(n);let r,o,s,a;te(i)?(o=i.map(l=>Cd(n,l)),r=o.join("\n"),r!==br.text&&(Ls(t,0),s=t.ownerDocument,a=Ed(n),o.forEach((l,c)=>{const u=Dd(s,"tspan",Ci);u.__data__=n,u.textContent=l,c&&(u.setAttribute("x",0),u.setAttribute("dy",a)),t.appendChild(u)}),br.text=r)):(o=Cd(n,i),o!==br.text&&(t.textContent=o,br.text=o)),Br(t,"font-family",I1(n)),Br(t,"font-size",jl(n)+"px"),Br(t,"font-style",n.fontStyle),Br(t,"font-variant",n.fontVariant),Br(t,"font-weight",n.fontWeight)}};function $1(e,t,n){t!==br[e]&&(n?function Y7e(e,t,n,i){null!=n?e.setAttributeNS(i,t,n):e.removeAttributeNS(i,t)}(Jc,e,t,n):Br(Jc,e,t),br[e]=t)}function rx(e,t,n){n!==br[t]&&(null==n?e.style.removeProperty(t):e.style.setProperty(t,n+""),br[t]=n)}function Sd(e,t){for(const n in t)Br(e,n,t[n])}function Br(e,t,n){null!=n?e.setAttribute(t,n):e.removeAttribute(t)}function Pse(){let e;return typeof window>"u"?"":(e=window.location).hash?e.href.slice(0,-e.hash.length):e.href}class Lse extends O1{constructor(t){super(t),this._text=null,this._defs={gradient:{},clipping:{}}}svg(){return this._text}_render(t){const n=eB();n.open("svg",rt({},M1,{class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}));const i=this._bgcolor;return i&&"transparent"!==i&&"none"!==i&&n.open("rect",{width:this._width,height:this._height,fill:i}).close(),n.open("g",kse,{transform:"translate("+this._origin+")"}),this.mark(n,t),n.close(),this.defs(n),this._text=n.close()+"",this}mark(t,n){const i=Xo[n.marktype],r=i.tag,o=[Sse,i.attr];t.open("g",{class:cse(n),"clip-path":n.clip?b$(this,n,n.group):null},Tse(n),{"pointer-events":"g"!==r&&!1===n.interactive?"none":null});const s=a=>{const l=this.href(a);if(l&&t.open("a",l),t.open(r,this.attr(n,a,o,"g"!==r?r:null)),"text"===r){const c=N1(a);if(te(c)){const u={x:0,dy:Ed(a)};for(let d=0;dthis.mark(t,f)),t.close(),c&&d?(u&&(a.fill=null),a.stroke=d,t.open("path",this.attr(n,a,i.foreground,"bgrect")).close(),u&&(a.fill=u)):t.open("path",this.attr(n,a,i.foreground,"bgfore")).close()}t.close(),l&&t.close()};return i.nested?n.items&&n.items.length&&s(n.items[0]):Sa(n,s),t.close()}href(t){const n=t.href;let i;if(n){if(i=this._hrefs&&this._hrefs[n])return i;this.sanitizeURL(n).then(r=>{r["xlink:href"]=r.href,r.href=null,(this._hrefs||(this._hrefs={}))[n]=r})}return null}attr(t,n,i,r){const o={},s=(a,l,c,u)=>{o[u||a]=l};return Array.isArray(i)?i.forEach(a=>a(s,n,this)):i(s,n,this),r&&function K7e(e,t,n,i,r){let o;if(null==t||("bgrect"===i&&!1===n.interactive&&(e["pointer-events"]="none"),"bgfore"===i&&(!1===n.interactive&&(e["pointer-events"]="none"),e.display="none",null!==t.fill)))return e;"image"===i&&!1===t.smooth&&(o=["image-rendering: optimizeSpeed;","image-rendering: pixelated;"]),"text"===i&&(e["font-family"]=I1(t),e["font-size"]=jl(t)+"px",e["font-style"]=t.fontStyle,e["font-variant"]=t.fontVariant,e["font-weight"]=t.fontWeight);for(const s in nx){let a=t[s];const l=nx[s];"transparent"===a&&("fill"===l||"stroke"===l)||null!=a&&(p$(a)&&(a=Eoe(a,r.gradient,"")),e[l]=a)}for(const s in ix){const a=t[s];null!=a&&(o=o||[],o.push(`${ix[s]}: ${a};`))}o&&(e.style=o.join(" "))}(o,n,t,r,this._defs),o}defs(t){const n=this._defs.gradient,i=this._defs.clipping;if(Object.keys(n).length+Object.keys(i).length!==0){t.open("defs");for(const o in n){const s=n[o],a=s.stops;"radial"===s.gradient?(t.open("pattern",{id:"p_"+o,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),t.open("rect",{width:"1",height:"1",fill:"url(#"+o+")"}).close(),t.close(),t.open("radialGradient",{id:o,fx:s.x1,fy:s.y1,fr:s.r1,cx:s.x2,cy:s.y2,r:s.r2})):t.open("linearGradient",{id:o,x1:s.x1,x2:s.x2,y1:s.y1,y2:s.y2});for(let l=0;l!Ta.svgMarkTypes.includes(o));this._svgRenderer.render(t,Ta.svgMarkTypes),this._canvasRenderer.render(t,r)}resize(t,n,i,r){return super.resize(t,n,i,r),this._svgRenderer.resize(t,n,i,r),this._canvasRenderer.resize(t,n,i,r),this}background(t){return Ta.svgOnTop?this._canvasRenderer.background(t):this._svgRenderer.background(t),this}}class $se extends F1{constructor(t,n){super(t,n)}initialize(t,n,i){const r=Ei(Ei(t,0,"div"),Ta.svgOnTop?0:1,"div");return super.initialize(r,n,i)}}const Td={Canvas:"canvas",PNG:"png",SVG:"svg",Hybrid:"hybrid",None:"none"},Mh={};function ox(e,t){return e=String(e||"").toLowerCase(),arguments.length>1?(Mh[e]=t,this):Mh[e]}function Hse(e,t,n){const i=[],r=(new li).union(t),o=e.marktype;return o?Gse(e,r,n,i):"group"===o?Wse(e,r,n,i):J("Intersect scene must be mark node or group item.")}function Gse(e,t,n,i){if(function Q7e(e,t,n){return e.bounds&&t.intersects(e.bounds)&&("group"===e.marktype||!1!==e.interactive&&(!n||n(e)))}(e,t,n)){const r=e.items,o=e.marktype,s=r.length;let a=0;if("group"===o)for(;a=0;o--)if(n[o]!=i[o])return!1;for(o=n.length-1;o>=0;o--)if(!rB(e[r=n[o]],t[r],r))return!1;return typeof e==typeof t}(e,t):e==t)}function Kse(e,t){return rB(Jm(e),Jm(t))}function eze(){Ooe(),function DUe(){woe=0}()}const o_="top",xa="left",Aa="right",xd="bottom",oB="start",sB="middle",jr="end",oze="x",sze="y",sx="group",aB="axis",lB="title",cB="legend",Xse="row-header",Qse="row-footer",Jse="column-header",eae="column-footer",tae="column-title",uB="none",ax="all",dB="each",fB="flush",Ad="column",Md="row";function oae(e){K.call(this,null,e)}function lx(e,t,n){return t(e.bounds.clear(),e,n)}me(oae,K,{transform(e,t){const n=t.dataflow,i=e.mark,r=i.marktype,o=Xo[r],s=o.bound;let l,a=i.bounds;if(o.nested)i.items.length&&n.dirty(i.items[0]),a=lx(i,s),i.items.forEach(c=>{c.bounds.clear().union(a)});else if(r===sx||e.modified())switch(t.visit(t.MOD,c=>n.dirty(c)),a.clear(),i.items.forEach(c=>a.union(lx(c,s))),i.role){case aB:case cB:case lB:t.reflow()}else l=t.changed(t.REM),t.visit(t.ADD,c=>{a.union(lx(c,s))}),t.visit(t.MOD,c=>{l=l||a.alignsWith(c.bounds),n.dirty(c),a.union(lx(c,s))}),l&&(a.clear(),i.items.forEach(c=>a.union(c.bounds)));return Yse(i),t.modifies("bounds")}});const sae=":vega_identifier:";function hB(e){K.call(this,0,e)}function aae(e){K.call(this,null,e)}function lae(e){K.call(this,null,e)}hB.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]},me(hB,K,{transform(e,t){const n=function fze(e){return e._signals[sae]||(e._signals[sae]=e.add(0))}(t.dataflow),i=e.as;let r=n.value;return t.visit(t.ADD,o=>o[i]=o[i]||++r),n.set(this.value=r),t}}),me(aae,K,{transform(e,t){let n=this.value;n||(n=t.dataflow.scenegraph().mark(e.markdef,function hze(e){const t=e.groups,n=e.parent;return t&&1===t.size?t.get(Object.keys(t.object)[0]):t&&n?t.lookup(n):null}(e),e.index),n.group.context=e.context,e.context.group||(e.context.group=n.group),n.source=this.source,n.clip=e.clip,n.interactive=e.interactive,this.value=n);const i=n.marktype===sx?IT:NT;return t.visit(t.ADD,r=>i.call(r,n)),(e.modified("clip")||e.modified("interactive"))&&(n.clip=e.clip,n.interactive=!!e.interactive,n.zdirty=!0,t.reflow()),n.items=t.source,t}});const cae={parity:e=>e.filter((t,n)=>n%2?t.opacity=0:1),greedy:(e,t)=>{let n;return e.filter((i,r)=>r&&uae(n.bounds,i.bounds,t)?i.opacity=0:(n=i,1))}},uae=(e,t,n)=>n>Math.max(t.x1-e.x2,e.x1-t.x2,t.y1-e.y2,e.y1-t.y2),dae=(e,t)=>{for(var o,n=1,i=e.length,r=e[0].bounds;n{const t=e.bounds;return t.width()>1&&t.height()>1},fae=e=>(e.forEach(t=>t.opacity=1),e),hae=(e,t)=>e.reflow(t.modified()).modifies("opacity");function pae(e){K.call(this,null,e)}me(lae,K,{transform(e,t){const n=cae[e.method]||cae.parity,i=e.separation||0;let o,s,r=t.materialize(t.SOURCE).source;if(!r||!r.length)return;if(!e.method)return e.modified("method")&&(fae(r),t=hae(t,e)),t;if(r=r.filter(pze),!r.length)return;if(e.sort&&(r=r.slice().sort(e.sort)),o=fae(r),t=hae(t,e),o.length>=3&&dae(o,i)){do{o=n(o,i)}while(o.length>=3&&dae(o,i));o.length<3&&!yt(r).opacity&&(o.length>1&&(yt(o).opacity=0),yt(r).opacity=1)}e.boundScale&&e.boundTolerance>=0&&(s=((e,t,n)=>{var i=e.range(),r=new li;return t===o_||t===xd?r.set(i[0],-1/0,i[1],1/0):r.set(-1/0,i[0],1/0,i[1]),r.expand(n||1),o=>r.encloses(o.bounds)})(e.boundScale,e.boundOrient,+e.boundTolerance),r.forEach(l=>{s(l)||(l.opacity=0)}));const a=o[0].mark.bounds.clear();return r.forEach(l=>{l.opacity&&a.union(l.bounds)}),t}}),me(pae,K,{transform(e,t){const n=t.dataflow;if(t.visit(t.ALL,i=>n.dirty(i)),t.fields&&t.fields.zindex){const i=t.source&&t.source[0];i&&(i.mark.zdirty=!0)}}});const wr=new li;function s_(e,t,n){return e[t]===n?0:(e[t]=n,1)}function mze(e){var t=e.items[0].orient;return t===xa||t===Aa}function yze(e,t,n,i){var b,w,r=t.items[0],o=r.datum,s=null!=r.translate?r.translate:.5,a=r.orient,l=function _ze(e){let t=+e.grid;return[e.ticks?t++:-1,e.labels?t++:-1,t+ +e.domain]}(o),c=r.range,u=r.offset,d=r.position,f=r.minExtent,h=r.maxExtent,p=o.title&&r.items[l[2]].items[0],g=r.titlePadding,m=r.bounds,_=p&&B$(p),y=0,v=0;switch(wr.clear().union(m),m.clear(),(b=l[0])>-1&&m.union(r.items[b].bounds),(b=l[1])>-1&&m.union(r.items[b].bounds),a){case o_:y=d||0,v=-u,w=Math.max(f,Math.min(h,-m.y1)),m.add(0,-w).add(c,0),p&&cx(e,p,w,g,_,0,-1,m);break;case xa:y=-u,v=d||0,w=Math.max(f,Math.min(h,-m.x1)),m.add(-w,0).add(0,c),p&&cx(e,p,w,g,_,1,-1,m);break;case Aa:y=n+u,v=d||0,w=Math.max(f,Math.min(h,m.x2)),m.add(0,0).add(w,c),p&&cx(e,p,w,g,_,1,1,m);break;case xd:y=d||0,v=i+u,w=Math.max(f,Math.min(h,m.y2)),m.add(0,0).add(c,w),p&&cx(e,p,w,g,0,0,1,m);break;default:y=r.x,v=r.y}return Zc(m.translate(y,v),r),s_(r,"x",y+s)|s_(r,"y",v+s)&&(r.bounds=wr,e.dirty(r),r.bounds=m,e.dirty(r)),r.mark.bounds.clear().union(m)}function cx(e,t,n,i,r,o,s,a){const l=t.bounds;if(t.auto){const c=s*(n+r+i);let u=0,d=0;e.dirty(t),o?u=(t.x||0)-(t.x=c):d=(t.y||0)-(t.y=c),t.mark.bounds.clear().union(l.translate(-u,-d)),e.dirty(t)}a.union(l)}const gae=(e,t)=>Math.floor(Math.min(e,t)),mae=(e,t)=>Math.ceil(Math.max(e,t));function bze(e){return(new li).set(0,0,e.width||0,e.height||0)}function wze(e){const t=e.bounds.clone();return t.empty()?t.set(0,0,0,0):t.translate(-(e.x||0),-(e.y||0))}function xn(e,t,n){return(we(e)?e[t]:e)??(void 0!==n?n:0)}function _ae(e){return e<0?Math.ceil(-e):0}function yae(e,t,n){var C,E,D,M,k,R,F,P,T,S,x,i=!n.nodirty,r=n.bounds===fB?bze:wze,o=wr.set(0,0,0,0),s=xn(n.align,Ad),a=xn(n.align,Md),l=xn(n.padding,Ad),c=xn(n.padding,Md),u=n.columns||t.length,d=u<=0?1:Math.ceil(t.length/u),f=t.length,h=Array(f),p=Array(u),g=0,m=Array(f),_=Array(d),y=0,v=Array(f),b=Array(f),w=Array(f);for(E=0;E1)for(E=0;E0&&(v[E]+=T/2);if(a&&xn(n.center,Md)&&1!==u)for(E=0;E0&&(b[E]+=S/2);for(E=0;Er&&(e.warn("Grid headers exceed limit: "+r),t=t.slice(0,r)),g+=o,y=0,b=t.length;y=0&&null==(E=n[v]);v-=f);a?(D=null==h?E.x:Math.round(E.bounds.x1+h*E.bounds.width()),M=g):(D=g,M=null==h?E.y:Math.round(E.bounds.y1+h*E.bounds.height())),w.union(C.bounds.translate(D-(C.x||0),M-(C.y||0))),C.x=D,C.y=M,e.dirty(C),m=s(m,w[c])}return m}function vae(e,t,n,i,r,o){if(t){e.dirty(t);var s=n,a=n;i?s=Math.round(r.x1+o*r.width()):a=Math.round(r.y1+o*r.height()),t.bounds.translate(s-(t.x||0),a-(t.y||0)),t.mark.bounds.clear().union(t.bounds),t.x=s,t.y=a,e.dirty(t)}}function xze(e,t,n,i,r,o,s){const a=function Sze(e,t){const n=e[t]||{};return(i,r)=>null!=n[i]?n[i]:null!=e[i]?e[i]:r}(n,t),l=function Tze(e,t){let n=-1/0;return e.forEach(i=>{null!=i.offset&&(n=Math.max(n,i.offset))}),n>-1/0?n:t}(e,a("offset",0)),c=a("anchor",oB),u=c===jr?1:c===sB?.5:0,d={align:dB,bounds:a("bounds",fB),columns:"vertical"===a("direction")?1:e.length,padding:a("margin",8),center:a("center"),nodirty:!0};switch(t){case xa:d.anchor={x:Math.floor(i.x1)-l,column:jr,y:u*(s||i.height()+2*i.y1),row:c};break;case Aa:d.anchor={x:Math.ceil(i.x2)+l,y:u*(s||i.height()+2*i.y1),row:c};break;case o_:d.anchor={y:Math.floor(r.y1)-l,row:jr,x:u*(o||r.width()+2*r.x1),column:c};break;case xd:d.anchor={y:Math.ceil(r.y2)+l,x:u*(o||r.width()+2*r.x1),column:c};break;case"top-left":d.anchor={x:l,y:l};break;case"top-right":d.anchor={x:o-l,y:l,column:jr};break;case"bottom-left":d.anchor={x:l,y:s-l,row:jr};break;case"bottom-right":d.anchor={x:o-l,y:s-l,column:jr,row:jr}}return d}function Aze(e,t){var l,c,n=t.items[0],i=n.datum,r=n.orient,o=n.bounds,s=n.x,a=n.y;return n._bounds?n._bounds.clear().union(o):n._bounds=o.clone(),o.clear(),function Nze(e,t,n){var i=t.padding,r=i-n.x,o=i-n.y;if(t.datum.title){var s=t.items[1].items[0],a=s.anchor,l=t.titlePadding||0,c=i-s.x,u=i-s.y;switch(s.orient){case xa:r+=Math.ceil(s.bounds.width())+l;break;case Aa:case xd:break;default:o+=s.bounds.height()+l}switch((r||o)&&B1(e,n,r,o),s.orient){case xa:u+=a_(t,n,s,a,1,1);break;case Aa:c+=a_(t,n,s,jr,0,0)+l,u+=a_(t,n,s,a,1,1);break;case xd:c+=a_(t,n,s,a,0,0),u+=a_(t,n,s,jr,-1,0,1)+l;break;default:c+=a_(t,n,s,a,0,0)}(c||u)&&B1(e,s,c,u),(c=Math.round(s.bounds.x1-i))<0&&(B1(e,n,-c,0),B1(e,s,-c,0))}else(r||o)&&B1(e,n,r,o)}(e,n,n.items[0].items[0]),o=function Mze(e,t){return e.items.forEach(n=>t.union(n.bounds)),t.x1=e.padding,t.y1=e.padding,t}(n,o),l=2*n.padding,c=2*n.padding,o.empty()||(l=Math.ceil(o.width()+l),c=Math.ceil(o.height()+c)),"symbol"===i.type&&function Ize(e){const t=e.reduce((n,i)=>(n[i.column]=Math.max(i.bounds.x2-i.x,n[i.column]||0),n),{});e.forEach(n=>{n.width=t[n.column],n.height=n.bounds.y2-n.y})}(n.items[0].items[0].items[0].items),r!==uB&&(n.x=s=0,n.y=a=0),n.width=l,n.height=c,Zc(o.set(s,a,s+l,a+c),n),n.mark.bounds.clear().union(o),n}function a_(e,t,n,i,r,o,s){const l=n.datum.vgrad,u=("symbol"===e.datum.type||!o&&l||s?t:t.items[0]).bounds[r?"y2":"x2"]-e.padding,d=l&&o?u:0,f=l&&o?0:u,h=r<=0?0:B$(n);return Math.round(i===oB?d:i===jr?f-h:.5*(u-h))}function B1(e,t,n,i){t.x+=n,t.y+=i,t.bounds.translate(n,i),t.mark.bounds.translate(n,i),e.dirty(t)}function bae(e){K.call(this,null,e)}function wae(e,t){let n=0;if(void 0===t)for(let i of e)(i=+i)&&(n+=i);else{let i=-1;for(let r of e)(r=+t(r,++i,e))&&(n+=r)}return n}function Eae(e){K.call(this,null,e)}function Cae(e){K.call(this,null,e)}function Pze(){return Ft({})}function Dae(e){K.call(this,null,e)}function Sae(e){K.call(this,[],e)}me(bae,K,{transform(e,t){const n=t.dataflow;return e.mark.items.forEach(i=>{e.layout&&function Eze(e,t,n){var u,d,f,h,p,g,m,i=function vze(e){var r,o,t=e.items,n=t.length,i=0;const s={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};for(;i{(f=_.orient||Aa)!==uB&&(m[f]||(m[f]=[])).push(_)});for(const _ in m){const y=m[_];yae(e,y,xze(y,_,n.legends,a,l,r,o))}c.forEach(_=>{const y=_.bounds;if(y.equals(_._bounds)||(_.bounds=_._bounds,e.dirty(_),_.bounds=y,e.dirty(_)),!n.autosize||"fit"!==n.autosize.type&&"fit-x"!==n.autosize.type&&"fit-y"!==n.autosize.type)s.union(y);else switch(_.orient){case xa:case Aa:s.add(y.x1,0).add(y.x2,0);break;case o_:case xd:s.add(0,y.y1).add(0,y.y2)}})}s.union(a).union(l),u&&s.union(function kze(e,t,n,i,r){var v,o=t.items[0],a=o.orient,l=o.anchor,c=o.offset,u=o.padding,d=o.items[0].items[0],f=o.items[1]&&o.items[1].items[0],h=a===xa||a===Aa?i:n,p=0,g=0,m=0,_=0,y=0;if(o.frame!==sx?a===xa?(p=r.y2,h=r.y1):a===Aa?(p=r.y1,h=r.y2):(p=r.x1,h=r.x2):a===xa&&(p=i,h=0),v=l===oB?p:l===jr?h:(p+h)/2,f&&f.text){switch(a){case o_:case xd:y=d.bounds.height()+u;break;case xa:_=d.bounds.width()+u;break;case Aa:_=-d.bounds.width()-u}wr.clear().union(f.bounds),wr.translate(_-(f.x||0),y-(f.y||0)),s_(f,"x",_)|s_(f,"y",y)&&(e.dirty(f),f.bounds.clear().union(wr),f.mark.bounds.clear().union(wr),e.dirty(f)),wr.clear().union(f.bounds)}else wr.clear();switch(wr.union(d.bounds),a){case o_:g=v,m=r.y1-wr.height()-c;break;case xa:g=r.x1-wr.width()-c,m=v;break;case Aa:g=r.x2+wr.width()+c,m=v;break;case xd:g=v,m=r.y2+c;break;default:g=o.x,m=o.y}return s_(o,"x",g)|s_(o,"y",m)&&(wr.translate(g,m),e.dirty(o),o.bounds.clear().union(wr),t.bounds.clear().union(wr),e.dirty(o)),o.bounds}(e,u,r,o,s)),t.clip&&s.set(0,0,t.width||0,t.height||0),function Fze(e,t,n,i){const r=i.autosize||{},o=r.type;if(e._autosize<1||!o)return;let s=e._width,a=e._height,l=Math.max(0,t.width||0),c=Math.max(0,Math.ceil(-n.x1)),u=Math.max(0,t.height||0),d=Math.max(0,Math.ceil(-n.y1));const f=Math.max(0,Math.ceil(n.x2-l)),h=Math.max(0,Math.ceil(n.y2-u));if("padding"===r.contains){const p=e.padding();s-=p.left+p.right,a-=p.top+p.bottom}o===uB?(c=0,d=0,l=s,u=a):"fit"===o?(l=Math.max(0,s-c-f),u=Math.max(0,a-d-h)):"fit-x"===o?(l=Math.max(0,s-c-f),a=u+d+h):"fit-y"===o?(s=l+c+f,u=Math.max(0,a-d-h)):"pad"===o&&(s=l+c+f,a=u+d+h),e._resizeView(s,a,l,u,[c,d],r.resize)}(e,t,s,n)}(n,i,e)}),function Oze(e){return e&&"legend-entry"!==e.mark.role}(e.mark.group)?t.reflow():t}}),me(Eae,K,{transform(e,t){if(this.value&&!e.modified())return t.StopPropagation;var n=t.dataflow.locale(),i=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=this.value,o=e.scale,a=d$(o,null==e.count?e.values?e.values.length:10:e.count,e.minstep),l=e.format||hoe(n,o,a,e.formatSpecifier,e.formatType,!!e.values),c=e.values?foe(o,e.values,a):f$(o,a);return r&&(i.rem=r),r=c.map((u,d)=>Ft({index:d/(c.length-1||1),value:u,label:l(u)})),e.extra&&r.length&&r.push(Ft({index:-1,extra:{value:r[0].value},label:""})),i.source=r,i.add=r,this.value=r,i}}),me(Cae,K,{transform(e,t){var n=t.dataflow,i=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=e.item||Pze,o=e.key||Fe,s=this.value;return te(i.encode)&&(i.encode=null),s&&(e.modified("key")||t.modified(o))&&J("DataJoin does not support modified key function or fields."),s||(t=t.addAll(),this.value=s=function Lze(e){const t=xm().test(n=>n.exit);return t.lookup=n=>t.get(e(n)),t}(o)),t.visit(t.ADD,a=>{const l=o(a);let c=s.get(l);c?c.exit?(s.empty--,i.add.push(c)):i.mod.push(c):(c=r(a),s.set(l,c),i.add.push(c)),c.datum=a,c.exit=!1}),t.visit(t.MOD,a=>{const l=o(a),c=s.get(l);c&&(c.datum=a,i.mod.push(c))}),t.visit(t.REM,a=>{const l=o(a),c=s.get(l);a===c.datum&&!c.exit&&(i.rem.push(c),c.exit=!0,++s.empty)}),t.changed(t.ADD_MOD)&&i.modifies("datum"),(t.clean()||e.clean&&s.empty>n.cleanThreshold)&&n.runAfter(s.clean),i}}),me(Dae,K,{transform(e,t){var n=t.fork(t.ADD_REM),i=e.mod||!1,r=e.encoders,o=t.encode;if(te(o)){if(!n.changed()&&!o.every(d=>r[d]))return t.StopPropagation;o=o[0],n.encode=null}var s="enter"===o,a=r.update||ed,l=r.enter||ed,c=r.exit||ed,u=(o&&!s?r[o]:a)||ed;if(t.changed(t.ADD)&&(t.visit(t.ADD,d=>{l(d,e),a(d,e)}),n.modifies(l.output),n.modifies(a.output),u!==ed&&u!==a&&(t.visit(t.ADD,d=>{u(d,e)}),n.modifies(u.output))),t.changed(t.REM)&&c!==ed&&(t.visit(t.REM,d=>{c(d,e)}),n.modifies(c.output)),s||u!==ed){const d=t.MOD|(e.modified()?t.REFLOW:0);s?(t.visit(d,f=>{const h=l(f,e)||i;(u(f,e)||h)&&n.mod.push(f)}),n.mod.length&&n.modifies(l.output)):t.visit(d,f=>{(u(f,e)||i)&&n.mod.push(f)}),n.mod.length&&n.modifies(u.output)}return n.changed()?n:t.StopPropagation}}),me(Sae,K,{transform(e,t){if(null!=this.value&&!e.modified())return t.StopPropagation;var f,h,p,g,m,n=t.dataflow.locale(),i=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=this.value,o=e.type||TT,s=e.scale,a=+e.limit,l=d$(s,null==e.count?5:e.count,e.minstep),u=e.format||_oe(n,s,l,o,e.formatSpecifier,e.formatType,!!e.values||o===TT),d=e.values||moe(s,l);return r&&(i.rem=r),o===TT?(a&&d.length>a?(t.dataflow.warn("Symbol legend count exceeds limit, filtering items."),r=d.slice(0,a-1),m=!0):r=d,it(p=e.size)?(!e.values&&0===s(r[0])&&(r=r.slice(1)),g=r.reduce((_,y)=>Math.max(_,p(y,e)),0)):p=gr(g=p||8),r=r.map((_,y)=>Ft({index:y,label:u(_,y,r),value:_,offset:g,size:p(_,e)})),m&&r.push(Ft({index:r.length,label:`\u2026${d.length-r.length} entries`,value:m=d[r.length],offset:g,size:p(m,e)}))):"gradient"===o?(f=s.domain(),h=loe(s,f[0],yt(f)),d.length<3&&!e.values&&f[0]!==yt(f)&&(d=[f[0],yt(f)]),r=d.map((_,y)=>Ft({index:y,label:u(_,y,d),value:_,perc:h(_)}))):(p=d.length-1,h=function EUe(e){const t=e.domain(),n=t.length-1;let i=+t[0],r=+yt(t),o=r-i;if(e.type===CT){const s=n?o/n:.1;i-=s,r+=s,o=r-i}return s=>(s-i)/o}(s),r=d.map((_,y)=>Ft({index:y,label:u(_,y,d),value:_,perc:y?h(_):0,perc2:y===p?1:h(d[y+1])}))),i.source=r,i.add=r,this.value=r,i}});const $ze=e=>e.source.x,Bze=e=>e.source.y,jze=e=>e.target.x,Vze=e=>e.target.y;function pB(e){K.call(this,{},e)}pB.Definition={type:"LinkPath",metadata:{modifies:!0},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]},me(pB,K,{transform(e,t){var n=e.sourceX||$ze,i=e.sourceY||Bze,r=e.targetX||jze,o=e.targetY||Vze,s=e.as||"path",l=e.shape||"line",c=Mae.get(l+"-"+(e.orient||"vertical"))||Mae.get(l);return c||J("LinkPath unsupported type: "+e.shape+(e.orient?"-"+e.orient:"")),t.visit(t.SOURCE,u=>{u[s]=c(n(u),i(u),r(u),o(u))}),t.reflow(e.modified()).modifies(s)}});const Tae=(e,t,n,i)=>"M"+e+","+t+"L"+n+","+i,xae=(e,t,n,i)=>{var r=n-e,o=i-t,s=Math.hypot(r,o)/2;return"M"+e+","+t+"A"+s+","+s+" "+180*Math.atan2(o,r)/Math.PI+" 0 1 "+n+","+i},Aae=(e,t,n,i)=>{const r=n-e,o=i-t,s=.2*(r+o),a=.2*(o-r);return"M"+e+","+t+"C"+(e+s)+","+(t+a)+" "+(n+a)+","+(i-s)+" "+n+","+i},Mae=xm({line:Tae,"line-radial":(e,t,n,i)=>Tae(t*Math.cos(e),t*Math.sin(e),i*Math.cos(n),i*Math.sin(n)),arc:xae,"arc-radial":(e,t,n,i)=>xae(t*Math.cos(e),t*Math.sin(e),i*Math.cos(n),i*Math.sin(n)),curve:Aae,"curve-radial":(e,t,n,i)=>Aae(t*Math.cos(e),t*Math.sin(e),i*Math.cos(n),i*Math.sin(n)),"orthogonal-horizontal":(e,t,n,i)=>"M"+e+","+t+"V"+i+"H"+n,"orthogonal-vertical":(e,t,n,i)=>"M"+e+","+t+"H"+n+"V"+i,"orthogonal-radial":(e,t,n,i)=>{const r=Math.cos(e),o=Math.sin(e),s=Math.cos(n),a=Math.sin(n);return"M"+t*r+","+t*o+"A"+t+","+t+" 0 0,"+((Math.abs(n-e)>Math.PI?n<=e:n>e)?1:0)+" "+t*s+","+t*a+"L"+i*s+","+i*a},"diagonal-horizontal":(e,t,n,i)=>{const r=(e+n)/2;return"M"+e+","+t+"C"+r+","+t+" "+r+","+i+" "+n+","+i},"diagonal-vertical":(e,t,n,i)=>{const r=(t+i)/2;return"M"+e+","+t+"C"+e+","+r+" "+n+","+r+" "+n+","+i},"diagonal-radial":(e,t,n,i)=>{const r=Math.cos(e),o=Math.sin(e),s=Math.cos(n),a=Math.sin(n),l=(t+i)/2;return"M"+t*r+","+t*o+"C"+l*r+","+l*o+" "+l*s+","+l*a+" "+i*s+","+i*a}});function gB(e){K.call(this,null,e)}gB.Definition={type:"Pie",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:!1},{name:"as",type:"string",array:!0,length:2,default:["startAngle","endAngle"]}]},me(gB,K,{transform(e,t){var p,g,m,n=e.as||["startAngle","endAngle"],i=n[0],r=n[1],s=e.startAngle||0,a=null!=e.endAngle?e.endAngle:2*Math.PI,l=t.source,c=l.map(e.field||Dm),u=c.length,d=s,f=(a-s)/wae(c),h=Yo(u);for(e.sort&&h.sort((_,y)=>c[_]-c[y]),p=0;pr+(o<0?-1:o>0?1:0),0))!==t.length&&n.warn("Log scale domain includes zero: "+ge(t)),t}function Oae(e,t,n){return it(e)&&(t||n)?soe(e,mB(t||[0,1],n)):e}function mB(e,t){return t?e.slice().reverse():e}function Rae(e){K.call(this,null,e)}me(Iae,K,{transform(e,t){var n=t.dataflow,i=this.value,r=function qze(e){var i,t=e.type,n="";return t===Ll?Ll+"-"+Km:(function Yze(e){const t=e.type;return a$(t)&&t!==wh&&t!==Eh&&(e.scheme||e.range&&e.range.length&&e.range.every(Ce))}(e)&&(n=2===(i=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(null!=e.domainMid):0)?Ll+"-":3===i?Xm+"-":""),(n+t||Km).toLowerCase())}(e);for(r in(!i||r!==i.type)&&(this.value=i=Nt(r)()),e)if(!Wze[r]){if("padding"===r&&Nae(i.type))continue;it(i[r])?i[r](e[r]):n.warn("Unsupported scale property: "+r)}return function Jze(e,t,n){var i=e.type,r=t.round||!1,o=t.range;if(null!=t.rangeStep)o=function eHe(e,t,n){return"band"!==e&&e!==i$&&J("Only band and point scales support rangeStep."),[0,t.rangeStep*t$(n,e===i$?1:(null!=t.paddingInner?t.paddingInner:t.padding)||0,(null!=t.paddingOuter?t.paddingOuter:t.padding)||0)]}(i,t,n);else if(t.scheme&&(o=function tHe(e,t,n){var o,i=t.schemeExtent;return te(t.scheme)?o=ST(t.scheme,t.interpolate,t.interpolateGamma):(o=u$(t.scheme.toLowerCase()))||J(`Unrecognized scheme name: ${t.scheme}`),n=e===CT?n+1:e===r$?n-1:e===Qm||e===ET?+t.schemeCount||5:n,roe(e)?Oae(o,i,t.reverse):it(o)?aoe(Oae(o,i),n):e===n$?o:o.slice(0,n)}(i,t,n),it(o))){if(e.interpolator)return e.interpolator(o);J(`Scale type ${i} does not support interpolating color schemes.`)}if(o&&roe(i))return e.interpolator(ST(mB(o,t.reverse),t.interpolate,t.interpolateGamma));o&&t.interpolate&&e.interpolate?e.interpolate(c$(t.interpolate,t.interpolateGamma)):it(e.round)?e.round(r):it(e.rangeRound)&&e.interpolate(r?p1:gd),o&&e.range(mB(o,t.reverse))}(i,e,function Zze(e,t,n){let i=t.bins;if(i&&!te(i)){const r=e.domain(),o=r[0],s=yt(r),a=i.step;let l=null==i.start?o:i.start,c=null==i.stop?s:i.stop;a||J("Scale bins parameter missing step property."),ls&&(c=a*Math.floor(s/a)),i=Yo(l,c+a/2,a)}return i?e.bins=i:e.bins&&delete e.bins,e.type===r$&&(i?!t.domain&&!t.domainRaw&&(e.domain(i),n=i.length):e.bins=e.domain()),n}(i,e,function Kze(e,t,n){const i=function Xze(e,t,n){return t?(e.domain(kae(e.type,t,n)),t.length):-1}(e,t.domainRaw,n);if(i>-1)return i;var a,l,r=t.domain,o=e.type,s=t.zero||void 0===t.zero&&function Gze(e){const t=e.type;return!e.bins&&(t===Km||t===_1||t===y1)}(e);if(!r)return 0;if((s||null!=t.domainMin||null!=t.domainMax||null!=t.domainMid)&&(a=(r=r.slice()).length-1||1,s&&(r[0]>0&&(r[0]=0),r[a]<0&&(r[a]=0)),null!=t.domainMin&&(r[0]=t.domainMin),null!=t.domainMax&&(r[a]=t.domainMax),null!=t.domainMid)){const c=(l=t.domainMid)>r[a]?a+1:lg(u);if(null==t)r.push(e.slice());else for(s={},a=0,l=e.length;ap&&(p=h),n&&f.sort(n)}return r.max=p,r}(t.source,e.groupby,o,s),c=0,u=l.length,d=l.max;ce;function dx(e,t){e&&jae.hasOwnProperty(e.type)&&jae[e.type](e,t)}var Bae={Feature:function(e,t){dx(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,r=n.length;++i0){for(s=t[--n];n>0&&(i=s,r=t[--n],s=i+r,o=r-(s-i),!o););n>0&&(o<0&&t[n-1]<0||o>0&&t[n-1]>0)&&(r=2*o,i=s+r,r==i-s&&(s=i))}return s}}var $e=1e-6,fx=1e-12,ht=Math.PI,Bn=ht/2,hx=ht/4,Vr=2*ht,Yn=180/ht,dt=ht/180,vt=Math.abs,l_=Math.atan,$s=Math.atan2,je=Math.cos,px=Math.ceil,Uae=Math.exp,vB=(Math,Math.hypot),gx=Math.log,bB=Math.pow,Re=Math.sin,Bs=Math.sign||function(e){return e>0?1:e<0?-1:0},Ur=Math.sqrt,wB=Math.tan;function zae(e){return e>1?0:e<-1?ht:Math.acos(e)}function mo(e){return e>1?Bn:e<-1?-Bn:Math.asin(e)}function Ji(){}var Hae,Gae,DB,SB,EB=new Zi,CB=new Zi,Nd={point:Ji,lineStart:Ji,lineEnd:Ji,polygonStart:function(){Nd.lineStart=sHe,Nd.lineEnd=lHe},polygonEnd:function(){Nd.lineStart=Nd.lineEnd=Nd.point=Ji,EB.add(vt(CB)),CB=new Zi},result:function(){var e=EB/2;return EB=new Zi,e}};function sHe(){Nd.point=aHe}function aHe(e,t){Nd.point=Wae,Hae=DB=e,Gae=SB=t}function Wae(e,t){CB.add(SB*e-DB*t),DB=e,SB=t}function lHe(){Wae(Hae,Gae)}const qae=Nd;var c_=1/0,mx=c_,V1=-c_,_x=V1;const yx={point:function uHe(e,t){eV1&&(V1=e),t_x&&(_x=t)},lineStart:Ji,lineEnd:Ji,polygonStart:Ji,polygonEnd:Ji,result:function(){var e=[[c_,mx],[V1,_x]];return V1=_x=-(mx=c_=1/0),e}};var Yae,Kae,Vl,Ul,TB=0,xB=0,U1=0,vx=0,bx=0,u_=0,AB=0,MB=0,z1=0,Ma={point:Nh,lineStart:Xae,lineEnd:Qae,polygonStart:function(){Ma.lineStart=hHe,Ma.lineEnd=pHe},polygonEnd:function(){Ma.point=Nh,Ma.lineStart=Xae,Ma.lineEnd=Qae},result:function(){var e=z1?[AB/z1,MB/z1]:u_?[vx/u_,bx/u_]:U1?[TB/U1,xB/U1]:[NaN,NaN];return TB=xB=U1=vx=bx=u_=AB=MB=z1=0,e}};function Nh(e,t){TB+=e,xB+=t,++U1}function Xae(){Ma.point=dHe}function dHe(e,t){Ma.point=fHe,Nh(Vl=e,Ul=t)}function fHe(e,t){var n=e-Vl,i=t-Ul,r=Ur(n*n+i*i);vx+=r*(Vl+e)/2,bx+=r*(Ul+t)/2,u_+=r,Nh(Vl=e,Ul=t)}function Qae(){Ma.point=Nh}function hHe(){Ma.point=gHe}function pHe(){Zae(Yae,Kae)}function gHe(e,t){Ma.point=Zae,Nh(Yae=Vl=e,Kae=Ul=t)}function Zae(e,t){var n=e-Vl,i=t-Ul,r=Ur(n*n+i*i);vx+=r*(Vl+e)/2,bx+=r*(Ul+t)/2,u_+=r,AB+=(r=Ul*e-Vl*t)*(Vl+e),MB+=r*(Ul+t),z1+=3*r,Nh(Vl=e,Ul=t)}const Jae=Ma;function ele(e){this._context=e}ele.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Vr)}},result:Ji};var IB,tle,nle,H1,G1,NB=new Zi,wx={point:Ji,lineStart:function(){wx.point=mHe},lineEnd:function(){IB&&ile(tle,nle),wx.point=Ji},polygonStart:function(){IB=!0},polygonEnd:function(){IB=null},result:function(){var e=+NB;return NB=new Zi,e}};function mHe(e,t){wx.point=ile,tle=H1=e,nle=G1=t}function ile(e,t){NB.add(Ur((H1-=e)*H1+(G1-=t)*G1)),H1=e,G1=t}const rle=wx;let ole,Ex,sle,ale;class lle{constructor(t){this._append=null==t?cle:function _He(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return cle;if(t!==ole){const n=10**t;ole=t,Ex=function(r){let o=1;this._+=r[0];for(const s=r.length;o=0))throw new RangeError(`invalid digits: ${a}`);n=l}return null===t&&(o=new lle(n)),s},s.projection(e).digits(n).context(t)}function dle(){var t,e=[];return{point:function(n,i,r){t.push([n,i,r])},lineStart:function(){e.push(t=[])},lineEnd:Ji,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Cx(e,t){return vt(e[0]-t[0])<$e&&vt(e[1]-t[1])<$e}function Dx(e,t,n,i){this.x=e,this.z=t,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function fle(e,t,n,i,r){var a,l,o=[],s=[];if(e.forEach(function(p){if(!((g=p.length-1)<=0)){var g,y,m=p[0],_=p[g];if(Cx(m,_)){if(!m[2]&&!_[2]){for(r.lineStart(),a=0;a=0;--a)r.point((d=u[a])[0],d[1]);else i(f.x,f.p.x,-1,r);f=f.p}u=(f=f.o).z,h=!h}while(!f.v);r.lineEnd()}}}function hle(e){if(t=e.length){for(var t,r,n=0,i=e[0];++n=0?1:-1,k=M*D,R=k>ht,F=m*C;if(l.add($s(F*M*Re(k),_*E+F*je(k))),s+=R?D+M*Vr:D,R^p>=n^b>=n){var P=d_(Ih(h),Ih(v));Ax(P);var T=d_(o,P);Ax(T);var S=(R^D>=0?-1:1)*mo(T[2]);(i>S||i===S&&(P[0]||P[1]))&&(a+=R^D>=0?1:-1)}}return(s<-$e||s<$e&&l<-fx)^1&a}(c,i);u.length?(l||(r.polygonStart(),l=!0),fle(u,wHe,b,n,r)):b&&(l||(r.polygonStart(),l=!0),r.lineStart(),n(null,null,1,r),r.lineEnd()),l&&(r.polygonEnd(),l=!1),u=c=null},sphere:function(){r.polygonStart(),r.lineStart(),n(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function h(b,w){e(b,w)&&r.point(b,w)}function p(b,w){o.point(b,w)}function g(){f.point=p,o.lineStart()}function m(){f.point=h,o.lineEnd()}function _(b,w){d.push([b,w]),a.point(b,w)}function y(){a.lineStart(),d=[]}function v(){_(d[0][0],d[0][1]),a.lineEnd();var C,D,M,k,b=a.clean(),w=s.result(),E=w.length;if(d.pop(),c.push(d),d=null,E){if(1&b){if((D=(M=w[0]).length-1)>0){for(l||(r.polygonStart(),l=!0),r.lineStart(),C=0;C1&&2&b&&w.push(w.pop().concat(w.shift())),u.push(w.filter(bHe))}}return f}}function bHe(e){return e.length>1}function wHe(e,t){return((e=e.x)[0]<0?e[1]-Bn-$e:Bn-e[1])-((t=t.x)[0]<0?t[1]-Bn-$e:Bn-t[1])}const mle=gle(function(){return!0},function EHe(e){var r,t=NaN,n=NaN,i=NaN;return{lineStart:function(){e.lineStart(),r=1},point:function(o,s){var a=o>0?ht:-ht,l=vt(o-t);vt(l-ht)<$e?(e.point(t,n=(n+s)/2>0?Bn:-Bn),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(a,n),e.point(o,n),r=0):i!==a&&l>=ht&&(vt(t-i)<$e&&(t-=i*$e),vt(o-a)<$e&&(o-=a*$e),n=function CHe(e,t,n,i){var r,o,s=Re(e-n);return vt(s)>$e?l_((Re(t)*(o=je(i))*Re(n)-Re(i)*(r=je(t))*Re(e))/(r*o*s)):(t+i)/2}(t,n,o,s),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(a,n),r=0),e.point(t=o,n=s),i=a},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-r}}},function DHe(e,t,n,i){var r;if(null==e)i.point(-ht,r=n*Bn),i.point(0,r),i.point(ht,r),i.point(ht,0),i.point(ht,-r),i.point(0,-r),i.point(-ht,-r),i.point(-ht,0),i.point(-ht,r);else if(vt(e[0]-t[0])>$e){var o=e[0]0)do{f.point(0===h||3===h?e:n,h>1?i:t)}while((h=(h+d+4)%4)!==p);else f.point(u[0],u[1])}function s(c,u){return vt(c[0]-e)<$e?u>0?0:3:vt(c[0]-n)<$e?u>0?2:1:vt(c[1]-t)<$e?u>0?1:0:u>0?3:2}function a(c,u){return l(c.x,u.x)}function l(c,u){var d=s(c,1),f=s(u,1);return d!==f?d-f:0===d?u[1]-c[1]:1===d?c[0]-u[0]:2===d?c[1]-u[1]:u[0]-c[0]}return function(c){var f,h,p,g,m,_,y,v,b,w,C,u=c,d=dle(),E={point:D,lineStart:function F(){E.point=T,h&&h.push(p=[]),w=!0,b=!1,y=v=NaN},lineEnd:function P(){f&&(T(g,m),_&&b&&d.rejoin(),f.push(d.result())),E.point=D,b&&u.lineEnd()},polygonStart:function k(){u=d,f=[],h=[],C=!0},polygonEnd:function R(){var S=function M(){for(var S=0,x=0,I=h.length;xi&&(j-B)*(i-V)>(H-V)*(e-B)&&++S:H<=i&&(j-B)*(i-V)<(H-V)*(e-B)&&--S;return S}(),x=C&&S,I=(f=ple(f)).length;(x||I)&&(c.polygonStart(),x&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),I&&fle(f,a,S,o,c),c.polygonEnd()),u=c,f=h=p=null}};function D(S,x){r(S,x)&&u.point(S,x)}function T(S,x){var I=r(S,x);if(h&&p.push([S,x]),w)g=S,m=x,_=I,w=!1,I&&(u.lineStart(),u.point(S,x));else if(I&&b)u.point(S,x);else{var A=[y=Math.max(Mx,Math.min(W1,y)),v=Math.max(Mx,Math.min(W1,v))],N=[S=Math.max(Mx,Math.min(W1,S)),x=Math.max(Mx,Math.min(W1,x))];!function THe(e,t,n,i,r,o){var p,s=e[0],a=e[1],u=0,d=1,f=t[0]-s,h=t[1]-a;if(p=n-s,f||!(p>0)){if(p/=f,f<0){if(p0){if(p>d)return;p>u&&(u=p)}if(p=r-s,f||!(p<0)){if(p/=f,f<0){if(p>d)return;p>u&&(u=p)}else if(f>0){if(p0)){if(p/=h,h<0){if(p0){if(p>d)return;p>u&&(u=p)}if(p=o-a,h||!(p<0)){if(p/=h,h<0){if(p>d)return;p>u&&(u=p)}else if(h>0){if(p0&&(e[0]=s+u*f,e[1]=a+u*h),d<1&&(t[0]=s+d*f,t[1]=a+d*h),!0}}}}}(A,N,e,t,n,i)?I&&(u.lineStart(),u.point(S,x),C=!1):(b||(u.lineStart(),u.point(A[0],A[1])),u.point(N[0],N[1]),I||u.lineEnd(),C=!1)}y=S,v=x,b=I}return E}}function RB(e,t){function n(i,r){return i=e(i,r),t(i[0],i[1])}return e.invert&&t.invert&&(n.invert=function(i,r){return(i=t.invert(i,r))&&e.invert(i[0],i[1])}),n}function FB(e,t){return vt(e)>ht&&(e-=Math.round(e/Vr)*Vr),[e,t]}function ble(e,t,n){return(e%=Vr)?t||n?RB(Ele(e),Cle(t,n)):Ele(e):t||n?Cle(t,n):FB}function wle(e){return function(t,n){return vt(t+=e)>ht&&(t-=Math.round(t/Vr)*Vr),[t,n]}}function Ele(e){var t=wle(e);return t.invert=wle(-e),t}function Cle(e,t){var n=je(e),i=Re(e),r=je(t),o=Re(t);function s(a,l){var c=je(l),u=je(a)*c,d=Re(a)*c,f=Re(l),h=f*n+u*i;return[$s(d*r-h*o,u*n-f*i),mo(h*r+d*o)]}return s.invert=function(a,l){var c=je(l),u=je(a)*c,d=Re(a)*c,f=Re(l),h=f*r-d*o;return[$s(d*r+f*o,u*n+h*i),mo(h*n-u*i)]},s}function q1(e){return function(t){var n=new PB;for(var i in e)n[i]=e[i];return n.stream=t,n}}function PB(){}function LB(e,t,n){var i=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=i&&e.clipExtent(null),eu(n,e.stream(yx)),t(yx.result()),null!=i&&e.clipExtent(i),e}function Nx(e,t,n){return LB(e,function(i){var r=t[1][0]-t[0][0],o=t[1][1]-t[0][1],s=Math.min(r/(i[1][0]-i[0][0]),o/(i[1][1]-i[0][1])),a=+t[0][0]+(r-s*(i[1][0]+i[0][0]))/2,l=+t[0][1]+(o-s*(i[1][1]+i[0][1]))/2;e.scale(150*s).translate([a,l])},n)}function $B(e,t,n){return Nx(e,[[0,0],t],n)}function BB(e,t,n){return LB(e,function(i){var r=+t,o=r/(i[1][0]-i[0][0]),s=(r-o*(i[1][0]+i[0][0]))/2,a=-o*i[0][1];e.scale(150*o).translate([s,a])},n)}function jB(e,t,n){return LB(e,function(i){var r=+t,o=r/(i[1][1]-i[0][1]),s=-o*i[0][0],a=(r-o*(i[1][1]+i[0][1]))/2;e.scale(150*o).translate([s,a])},n)}FB.invert=FB,PB.prototype={constructor:PB,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Dle=16,AHe=je(30*dt);function Sle(e,t){return+t?function NHe(e,t){function n(i,r,o,s,a,l,c,u,d,f,h,p,g,m){var _=c-i,y=u-r,v=_*_+y*y;if(v>4*t&&g--){var b=s+f,w=a+h,C=l+p,E=Ur(b*b+w*w+C*C),D=mo(C/=E),M=vt(vt(C)-1)<$e||vt(o-d)<$e?(o+d)/2:$s(w,b),k=e(M,D),R=k[0],F=k[1],P=R-i,T=F-r,S=y*P-_*T;(S*S/v>t||vt((_*P+y*T)/v-.5)>.3||s*f+a*h+l*p0,r=vt(t)>$e;function s(u,d){return je(u)*je(d)>t}function l(u,d,f){var g=[1,0,0],m=d_(Ih(u),Ih(d)),_=Tx(m,m),y=m[0],v=_-y*y;if(!v)return!f&&u;var b=t*_/v,w=-t*y/v,C=d_(g,m),E=xx(g,b);kB(E,xx(m,w));var M=C,k=Tx(E,M),R=Tx(M,M),F=k*k-R*(Tx(E,E)-1);if(!(F<0)){var P=Ur(F),T=xx(M,(-k-P)/R);if(kB(T,E),T=Sx(T),!f)return T;var N,S=u[0],x=d[0],I=u[1],A=d[1];x0^T[1]<(vt(T[0]-S)<$e?I:A):I<=T[1]&&T[1]<=A:O>ht^(S<=T[0]&&T[0]<=x)){var V=xx(M,(-k+P)/R);return kB(V,E),[T,Sx(V)]}}}function c(u,d){var f=i?e:ht-e,h=0;return u<-f?h|=1:u>f&&(h|=2),d<-f?h|=4:d>f&&(h|=8),h}return gle(s,function a(u){var d,f,h,p,g;return{lineStart:function(){p=h=!1,g=1},point:function(m,_){var v,y=[m,_],b=s(m,_),w=i?b?0:c(m,_):b?c(m+(m<0?ht:-ht),_):0;if(!d&&(p=h=b)&&u.lineStart(),b!==h&&(!(v=l(d,y))||Cx(d,v)||Cx(y,v))&&(y[2]=1),b!==h)g=0,b?(u.lineStart(),v=l(y,d),u.point(v[0],v[1])):(v=l(d,y),u.point(v[0],v[1],2),u.lineEnd()),d=v;else if(r&&d&&i^b){var C;!(w&f)&&(C=l(y,d,!0))&&(g=0,i?(u.lineStart(),u.point(C[0][0],C[0][1]),u.point(C[1][0],C[1][1]),u.lineEnd()):(u.point(C[1][0],C[1][1]),u.lineEnd(),u.lineStart(),u.point(C[0][0],C[0][1],3)))}b&&(!d||!Cx(d,y))&&u.point(y[0],y[1]),d=y,h=b,f=w},lineEnd:function(){h&&u.lineEnd(),d=null},clean:function(){return g|(p&&h)<<1}}},function o(u,d,f,h){!function _le(e,t,n,i,r,o){if(n){var s=je(t),a=Re(t),l=i*n;null==r?(r=t+i*Vr,o=t-l/2):(r=yle(s,r),o=yle(s,o),(i>0?ro)&&(r+=i*Vr));for(var c,u=r;i>0?u>o:u2?S[2]%360*dt:0,P()):[a*Yn,l*Yn,c*Yn]},R.angle=function(S){return arguments.length?(d=S%360*dt,P()):d*Yn},R.reflectX=function(S){return arguments.length?(f=S?-1:1,P()):f<0},R.reflectY=function(S){return arguments.length?(h=S?-1:1,P()):h<0},R.precision=function(S){return arguments.length?(C=Sle(E,w=S*S),T()):Ur(w)},R.fitExtent=function(S,x){return Nx(R,S,x)},R.fitSize=function(S,x){return $B(R,S,x)},R.fitWidth=function(S,x){return BB(R,S,x)},R.fitHeight=function(S,x){return jB(R,S,x)},function(){return t=e.apply(this,arguments),R.invert=t.invert&&F,P()}}function VB(e){var t=0,n=ht/3,i=xle(e),r=i(t,n);return r.parallels=function(o){return arguments.length?i(t=o[0]*dt,n=o[1]*dt):[t*Yn,n*Yn]},r}function FHe(e,t){var n=Re(e),i=(n+Re(t))/2;if(vt(i)<$e)return function RHe(e){var t=je(e);function n(i,r){return[i*t,Re(r)/t]}return n.invert=function(i,r){return[i/t,mo(r*t)]},n}(e);var r=1+n*(2*i-n),o=Ur(r)/i;function s(a,l){var c=Ur(r-2*i*Re(l))/i;return[c*Re(a*=i),o-c*je(a)]}return s.invert=function(a,l){var c=o-l,u=$s(a,vt(c))*Bs(c);return c*i<0&&(u-=ht*Bs(a)*Bs(c)),[u/i,mo((r-(a*a+c*c)*i*i)/(2*i))]},s}function Ix(){return VB(FHe).scale(155.424).center([0,33.6442])}function Ale(){return Ix().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Mle(e){return function(t,n){var i=je(t),r=je(n),o=e(i*r);return o===1/0?[2,0]:[o*r*Re(t),o*Re(n)]}}function Y1(e){return function(t,n){var i=Ur(t*t+n*n),r=e(i),o=Re(r),s=je(r);return[$s(t*o,i*s),mo(i&&n*o/i)]}}var Nle=Mle(function(e){return Ur(2/(1+e))});Nle.invert=Y1(function(e){return 2*mo(e/2)});var Ile=Mle(function(e){return(e=zae(e))&&e/Re(e)});function kx(e,t){return[e,gx(wB((Bn+t)/2))]}function kle(e){var a,l,c,t=zl(e),n=t.center,i=t.scale,r=t.translate,o=t.clipExtent,s=null;function u(){var d=ht*i(),f=t(function xHe(e){function t(n){return(n=e(n[0]*dt,n[1]*dt))[0]*=Yn,n[1]*=Yn,n}return e=ble(e[0]*dt,e[1]*dt,e.length>2?e[2]*dt:0),t.invert=function(n){return(n=e.invert(n[0]*dt,n[1]*dt))[0]*=Yn,n[1]*=Yn,n},t}(t.rotate()).invert([0,0]));return o(null==s?[[f[0]-d,f[1]-d],[f[0]+d,f[1]+d]]:e===kx?[[Math.max(f[0]-d,s),a],[Math.min(f[0]+d,l),c]]:[[s,Math.max(f[1]-d,a)],[l,Math.min(f[1]+d,c)]])}return t.scale=function(d){return arguments.length?(i(d),u()):i()},t.translate=function(d){return arguments.length?(r(d),u()):r()},t.center=function(d){return arguments.length?(n(d),u()):n()},t.clipExtent=function(d){return arguments.length?(null==d?s=a=l=c=null:(s=+d[0][0],a=+d[0][1],l=+d[1][0],c=+d[1][1]),u()):null==s?null:[[s,a],[l,c]]},u()}function Ox(e){return wB((Bn+e)/2)}function VHe(e,t){var n=je(e),i=e===t?Re(e):gx(n/je(t))/gx(Ox(t)/Ox(e)),r=n*bB(Ox(e),i)/i;if(!i)return kx;function o(s,a){r>0?a<-Bn+$e&&(a=-Bn+$e):a>Bn-$e&&(a=Bn-$e);var l=r/bB(Ox(a),i);return[l*Re(i*s),r-l*je(i*s)]}return o.invert=function(s,a){var l=r-a,c=Bs(i)*Ur(s*s+l*l),u=$s(s,vt(l))*Bs(l);return l*i<0&&(u-=ht*Bs(s)*Bs(l)),[u/i,2*l_(bB(r/c,1/i))-Bn]},o}function Rx(e,t){return[e,t]}function HHe(e,t){var n=je(e),i=e===t?Re(e):(n-je(t))/(t-e),r=n/i+e;if(vt(i)<$e)return Rx;function o(s,a){var l=r-a,c=i*s;return[l*Re(c),r-l*je(c)]}return o.invert=function(s,a){var l=r-a,c=$s(s,vt(l))*Bs(l);return l*i<0&&(c-=ht*Bs(s)*Bs(l)),[c/i,r-Bs(i)*Ur(s*s+l*l)]},o}Ile.invert=Y1(function(e){return e}),kx.invert=function(e,t){return[e,2*l_(Uae(t))-Bn]},Rx.invert=Rx;var K1=1.340264,X1=-.081106,Q1=893e-6,Z1=.003796,Fx=Ur(3)/2;function Ole(e,t){var n=mo(Fx*Re(t)),i=n*n,r=i*i*i;return[e*je(n)/(Fx*(K1+3*X1*i+r*(7*Q1+9*Z1*i))),n*(K1+X1*i+r*(Q1+Z1*i))]}function Rle(e,t){var n=je(t),i=je(e)*n;return[n*Re(e)/i,Re(t)/i]}function Fle(e,t){var n=t*t,i=n*n;return[e*(.8707-.131979*n+i*(i*(.003971*n-.001529*i)-.013791)),t*(1.007226+n*(.015085+i*(.028874*n-.044475-.005916*i)))]}function Ple(e,t){return[je(t)*Re(e),Re(t)]}function Lle(e,t){var n=je(t),i=1+je(e)*n;return[n*Re(e)/i,Re(t)/i]}function $le(e,t){return[gx(wB((Bn+t)/2)),-e]}Ole.invert=function(e,t){for(var s,n=t,i=n*n,r=i*i*i,o=0;o<12&&(r=(i=(n-=s=(n*(K1+X1*i+r*(Q1+Z1*i))-t)/(K1+3*X1*i+r*(7*Q1+9*Z1*i)))*n)*i*i,!(vt(s)$e&&--i>0);return[e/(.8707+(o=n*n)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),n]},Ple.invert=Y1(mo),Lle.invert=Y1(function(e){return 2*l_(e)}),$le.invert=function(e,t){return[-t,2*l_(Uae(e))-Bn]};var eGe=Math.abs,UB=(Math,Math,Math,Math.cos),Px=(Math,Math,Math,Math,Math,Math,Math,Math,Math.sin),tGe=(Math,1e-6),Id=Math.PI,zB=Id/2,jle=(Math,Lx(2));function Vle(e){return e>1?zB:e<-1?-zB:Math.asin(e)}function Lx(e){return e>0?Math.sqrt(e):0}function nGe(e,t){var r,n=e*Px(t),i=30;do{t-=r=(t+Px(t)-n)/(1+UB(t))}while(eGe(r)>tGe&&--i>0);return t/2}Lx(Id);var rGe=function iGe(e,t,n){function i(r,o){return[e*r*UB(o=nGe(n,o)),t*Px(o)]}return i.invert=function(r,o){return o=Vle(o/t),[r/(e*UB(o)),Vle((2*o+Px(2*o))/n)]},i}(jle/zB,jle,Id);const sGe=ule(),HB=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function GB(e,t){if(!e||"string"!=typeof e)throw new Error("Projection type must be a name string.");return e=e.toLowerCase(),arguments.length>1?($x[e]=function aGe(e,t){return function n(){const i=t();return i.type=e,i.path=ule().projection(i),i.copy=i.copy||function(){const r=n();return HB.forEach(o=>{i[o]&&r[o](i[o]())}),r.path.pointRadius(i.path.pointRadius()),r},toe(i)}}(e,t),this):$x[e]||null}function Ule(e){return e&&e.path||sGe}const $x={albers:Ale,albersusa:function LHe(){var e,t,i,o,a,l,n=Ale(),r=Ix().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=Ix().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(f,h){l=[f,h]}};function u(f){var h=f[0],p=f[1];return l=null,i.point(h,p),l||(o.point(h,p),l)||(a.point(h,p),l)}function d(){return e=t=null,u}return u.invert=function(f){var h=n.scale(),p=n.translate(),g=(f[0]-p[0])/h,m=(f[1]-p[1])/h;return(m>=.12&&m<.234&&g>=-.425&&g<-.214?r:m>=.166&&m<.234&&g>=-.214&&g<-.115?s:n).invert(f)},u.stream=function(f){return e&&t===f?e:e=function PHe(e){var t=e.length;return{point:function(n,i){for(var r=-1;++r2?i[2]+90:90]):[(i=n())[0],i[1],i[2]-90]},n([0,0,90]).scale(159.155)}};for(const e in $x)GB(e,$x[e]);function zle(e,t,n){var i=Yo(e,t-$e,n).concat(t);return function(r){return i.map(function(o){return[r,o]})}}function Hle(e,t,n){var i=Yo(e,t-$e,n).concat(t);return function(r){return i.map(function(o){return[o,r]})}}function lGe(){}const tu=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function Wle(){var e=1,t=1,n=a;function i(l,c){return c.map(u=>r(l,u))}function r(l,c){var u=[],d=[];return function o(l,c,u){var h,p,m,_,y,d=[],f=[];for(h=p=-1,tu[(m=l[0]>=c)<<1].forEach(v);++h=c)<<1].forEach(v);for(tu[0|m].forEach(v);++p=c)<<1|(_=l[p*e]>=c)<<2].forEach(v);++h=c)<<1|(_=l[p*e+h+1]>=c)<<2|y<<3].forEach(v);tu[m|_<<3].forEach(v)}for(h=-1,tu[(_=l[p*e]>=c)<<2].forEach(v);++h=c)<<2|y<<3].forEach(v);function v(b){var M,k,w=[b[0][0]+h,b[0][1]+p],C=[b[1][0]+h,b[1][1]+p],E=s(w),D=s(C);(M=f[E])?(k=d[D])?(delete f[M.end],delete d[k.start],M===k?(M.ring.push(C),u(M.ring)):d[M.start]=f[k.end]={start:M.start,end:k.end,ring:M.ring.concat(k.ring)}):(delete f[M.end],M.ring.push(C),f[M.end=D]=M):(M=d[D])?(k=f[E])?(delete d[M.start],delete f[k.end],M===k?(M.ring.push(C),u(M.ring)):d[k.start]=f[M.end]={start:k.start,end:M.end,ring:k.ring.concat(M.ring)}):(delete d[M.start],M.ring.unshift(w),d[M.start=E]=M):d[E]=f[D]={start:E,end:D,ring:[w,C]}}tu[_<<3].forEach(v)}(l,c,f=>{n(f,l,c),function cGe(e){for(var t=0,n=e.length,i=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];++t0?u.push([f]):d.push(f)}),d.forEach(f=>{for(var g,h=0,p=u.length;h{var m,f=d[0],h=d[1],p=0|f,g=0|h,_=c[g*e+p];f>0&&f0&&h=0&&u>=0||J("invalid size"),e=c,t=u,i},i.smooth=function(l){return arguments.length?(n=l?a:lGe,i):n===a},i}function uGe(e,t){for(var r,n=-1,i=t.length;++ni!=h>i&&n<(f-c)*(i-u)/(h-u)+c&&(r=-r)}return r}function fGe(e,t,n){var i;return function hGe(e,t,n){return(t[0]-e[0])*(n[1]-e[1])==(n[0]-e[0])*(t[1]-e[1])}(e,t,n)&&function pGe(e,t,n){return e<=t&&t<=n||n<=t&&t<=e}(e[i=+(e[0]===t[0])],n[i],t[i])}function qle(e,t,n){return function(i){var r=Al(i),o=n?Math.min(r[0],0):r[0],s=r[1],a=s-o,l=t?rd(o,s,e):a/(e+1);return Yo(o+l,s,l)}}function WB(e){K.call(this,null,e)}function Yle(e,t,n,i,r){const o=e.x1||0,s=e.y1||0,a=t*n<0;function l(d){d.forEach(c)}function c(d){a&&d.reverse(),d.forEach(u)}function u(d){d[0]=(d[0]-o)*t+i,d[1]=(d[1]-s)*n+r}return function(d){return d.coordinates.forEach(l),d}}function Kle(e,t,n){const i=e>=0?e:xL(t,n);return Math.round((Math.sqrt(4*i*i+1)-1)/2)}function qB(e){return it(e)?e:gr(+e)}function Xle(){var e=l=>l[0],t=l=>l[1],n=Dm,i=[-1,-1],r=960,o=500,s=2;function a(l,c){const u=Kle(i[0],l,e)>>s,d=Kle(i[1],l,t)>>s,f=u?u+2:0,h=d?d+2:0,p=2*f+(r>>s),g=2*h+(o>>s),m=new Float32Array(p*g),_=new Float32Array(p*g);let y=m;l.forEach(b=>{const w=f+(+e(b)>>s),C=h+(+t(b)>>s);w>=0&&w=0&&C0&&d>0?(f_(p,g,m,_,u),h_(p,g,_,m,d),f_(p,g,m,_,u),h_(p,g,_,m,d),f_(p,g,m,_,u),h_(p,g,_,m,d)):u>0?(f_(p,g,m,_,u),f_(p,g,_,m,u),f_(p,g,m,_,u),y=_):d>0&&(h_(p,g,m,_,d),h_(p,g,_,m,d),h_(p,g,m,_,d),y=_);const v=c?Math.pow(2,-2*s):1/wae(y);for(let b=0,w=p*g;b>s),y2:h+(o>>s)}}return a.x=function(l){return arguments.length?(e=qB(l),a):e},a.y=function(l){return arguments.length?(t=qB(l),a):t},a.weight=function(l){return arguments.length?(n=qB(l),a):n},a.size=function(l){if(!arguments.length)return[r,o];var c=+l[0],u=+l[1];return c>=0&&u>=0||J("invalid size"),r=c,o=u,a},a.cellSize=function(l){return arguments.length?((l=+l)>=1||J("invalid cell size"),s=Math.floor(Math.log(l)/Math.LN2),a):1<=r&&(a>=o&&(l-=n[a-o+s*e]),i[a-r+s*e]=l/Math.min(a+1,e-1+o-a,o))}function h_(e,t,n,i,r){const o=1+(r<<1);for(let s=0;s=r&&(a>=o&&(l-=n[s+(a-o)*e]),i[s+(a-r)*e]=l/Math.min(a+1,t-1+o-a,o))}function YB(e){K.call(this,null,e)}WB.Definition={type:"Isocontour",metadata:{generates:!0},params:[{name:"field",type:"field"},{name:"thresholds",type:"number",array:!0},{name:"levels",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"zero",type:"boolean",default:!0},{name:"smooth",type:"boolean",default:!0},{name:"scale",type:"number",expr:!0},{name:"translate",type:"number",array:!0,expr:!0},{name:"as",type:"string",null:!0,default:"contour"}]},me(WB,K,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=t.materialize(t.SOURCE).source,r=e.field||hr,o=Wle().smooth(!1!==e.smooth),s=e.thresholds||function gGe(e,t,n){const i=qle(n.levels||10,n.nice,!1!==n.zero);return"shared"!==n.resolve?i:i(e.map(r=>ph(t(r).values)))}(i,r,e),a=null===e.as?null:e.as||"contour",l=[];return i.forEach(c=>{const u=r(c),d=o.size([u.width,u.height])(u.values,te(s)?s:s(u.values));(function mGe(e,t,n,i){let r=i.scale||t.scale,o=i.translate||t.translate;if(it(r)&&(r=r(n,i)),it(o)&&(o=o(n,i)),(1===r||null==r)&&!o)return;const s=(At(r)?r:r[0])||1,a=(At(r)?r:r[1])||1;e.forEach(Yle(t,s,a,o&&o[0]||0,o&&o[1]||0))})(d,u,c,e),d.forEach(f=>{l.push(FS(c,Ft(null!=a?{[a]:f}:f)))})}),this.value&&(n.rem=this.value),this.value=n.source=n.add=l,n}}),YB.Definition={type:"KDE2D",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"weight",type:"field"},{name:"groupby",type:"field",array:!0},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number",array:!0,length:2},{name:"counts",type:"boolean",default:!1},{name:"as",type:"string",default:"grid"}]};const _Ge=["x","y","weight","size","cellSize","bandwidth"];function Qle(e,t){return _Ge.forEach(n=>null!=t[n]?e[n](t[n]):0),e}function KB(e){K.call(this,null,e)}me(YB,K,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var l,n=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=function yGe(e,t){var r,o,s,a,l,c,n=[],i=u=>u(a);if(null==t)n.push(e);else for(r={},o=0,s=e.length;oFt(function c(u,d){for(let f=0;f$e}).map(f)).concat(Yo(px(o/c)*c,r,c).filter(function(v){return vt(v%d)>$e}).map(h))}return _.lines=function(){return y().map(function(v){return{type:"LineString",coordinates:v}})},_.outline=function(){return{type:"Polygon",coordinates:[p(i).concat(g(s).slice(1),p(n).reverse().slice(1),g(a).reverse().slice(1))]}},_.extent=function(v){return arguments.length?_.extentMajor(v).extentMinor(v):_.extentMinor()},_.extentMajor=function(v){return arguments.length?(a=+v[0][1],s=+v[1][1],(i=+v[0][0])>(n=+v[1][0])&&(v=i,i=n,n=v),a>s&&(v=a,a=s,s=v),_.precision(m)):[[i,a],[n,s]]},_.extentMinor=function(v){return arguments.length?(o=+v[0][1],r=+v[1][1],(t=+v[0][0])>(e=+v[1][0])&&(v=t,t=e,e=v),o>r&&(v=o,o=r,r=v),_.precision(m)):[[t,o],[e,r]]},_.step=function(v){return arguments.length?_.stepMajor(v).stepMinor(v):_.stepMinor()},_.stepMajor=function(v){return arguments.length?(u=+v[0],d=+v[1],_):[u,d]},_.stepMinor=function(v){return arguments.length?(l=+v[0],c=+v[1],_):[l,c]},_.precision=function(v){return arguments.length?(m=+v,f=zle(o,r,90),h=Hle(t,e,m),p=zle(a,s,90),g=Hle(i,n,m),_):m},_.extentMajor([[-180,-90+$e],[180,90-$e]]).extentMinor([[-180,-80-$e],[180,80+$e]])}()}function i5(e){K.call(this,null,e)}function Zle(e){if(!it(e))return!1;const t=va(fr(e));return t.$x||t.$y||t.$value||t.$max}function Jle(e){K.call(this,null,e),this.modified(!0)}function ece(e,t,n){it(e[t])&&e[t](n)}function tce(e,t,n,i){if(isNaN(t)||isNaN(n))return e;var r,d,f,h,p,g,m,_,y,o=e._root,s={data:i},a=e._x0,l=e._y0,c=e._x1,u=e._y1;if(!o)return e._root=s,e;for(;o.length;)if((g=t>=(d=(a+c)/2))?a=d:c=d,(m=n>=(f=(l+u)/2))?l=f:u=f,r=o,!(o=o[_=m<<1|g]))return r[_]=s,e;if(h=+e._x.call(null,o.data),p=+e._y.call(null,o.data),t===h&&n===p)return s.next=o,r?r[_]=s:e._root=s,e;do{r=r?r[_]=new Array(4):e._root=new Array(4),(g=t>=(d=(a+c)/2))?a=d:c=d,(m=n>=(f=(l+u)/2))?l=f:u=f}while((_=m<<1|g)==(y=(p>=f)<<1|h>=d));return r[y]=o,r[_]=s,e}function zr(e,t,n,i,r){this.node=e,this.x0=t,this.y0=n,this.x1=i,this.y1=r}function UGe(e){return e[0]}function HGe(e){return e[1]}function r5(e,t,n){var i=new o5(t??UGe,n??HGe,NaN,NaN,NaN,NaN);return null==e?i:i.addAll(e)}function o5(e,t,n,i,r,o){this._x=e,this._y=t,this._x0=n,this._y0=i,this._x1=r,this._y1=o,this._root=void 0}function nce(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}ZB.Definition={type:"GeoJSON",metadata:{},params:[{name:"fields",type:"field",array:!0,length:2},{name:"geojson",type:"field"}]},me(ZB,K,{transform(e,t){var c,n=this._features,i=this._points,r=e.fields,o=r&&r[0],s=r&&r[1],a=e.geojson||!r&&hr,l=t.ADD;c=e.modified()||t.changed(t.REM)||t.modified(fr(a))||o&&t.modified(fr(o))||s&&t.modified(fr(s)),(!this.value||c)&&(l=t.SOURCE,this._features=n=[],this._points=i=[]),a&&t.visit(l,u=>n.push(a(u))),o&&s&&(t.visit(l,u=>{var d=o(u),f=s(u);null!=d&&null!=f&&(d=+d)===d&&(f=+f)===f&&i.push([d,f])}),n=n.concat({type:XB,geometry:{type:"MultiPoint",coordinates:i}})),this.value={type:QB,features:n}}}),JB.Definition={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"path"}]},me(JB,K,{transform(e,t){var n=t.fork(t.ALL),i=this.value,r=e.field||hr,o=e.as||"path",s=n.SOURCE;!i||e.modified()?(this.value=i=Ule(e.projection),n.materialize().reflow()):s=r===hr||t.modified(r.fields)?n.ADD_MOD:n.ADD;const a=function bGe(e,t){const n=e.pointRadius();return e.context(null),null!=t&&e.pointRadius(t),n}(i,e.pointRadius);return n.visit(s,l=>l[o]=i(r(l))),i.pointRadius(a),n.modifies(o)}}),e5.Definition={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]},me(e5,K,{transform(e,t){var l,n=e.projection,i=e.fields[0],r=e.fields[1],o=e.as||["x","y"],s=o[0],a=o[1];function c(u){const d=n([i(u),r(u)]);d?(u[s]=d[0],u[a]=d[1]):(u[s]=void 0,u[a]=void 0)}return e.modified()?t=t.materialize().reflow(!0).visit(t.SOURCE,c):(l=t.modified(i.fields)||t.modified(r.fields),t.visit(l?t.ADD_MOD:t.ADD,c)),t.modifies(o)}}),t5.Definition={type:"GeoShape",metadata:{modifies:!0,nomod:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"shape"}]},me(t5,K,{transform(e,t){var n=t.fork(t.ALL),i=this.value,r=e.as||"shape",o=n.ADD;return(!i||e.modified())&&(this.value=i=function wGe(e,t,n){const i=null==n?r=>e(t(r)):r=>{var o=e.pointRadius(),s=e.pointRadius(n)(t(r));return e.pointRadius(o),s};return i.context=r=>(e.context(r),i),i}(Ule(e.projection),e.field||As("datum"),e.pointRadius),n.materialize().reflow(),o=n.SOURCE),n.visit(o,s=>s[r]=i),n.modifies(r)}}),n5.Definition={type:"Graticule",metadata:{changes:!0,generates:!0},params:[{name:"extent",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMajor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMinor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"step",type:"number",array:!0,length:2},{name:"stepMajor",type:"number",array:!0,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:!0,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]},me(n5,K,{transform(e,t){var r,n=this.value,i=this.generator;if(!n.length||e.modified())for(const o in e)it(i[o])&&i[o](e[o]);return r=i(),n.length?t.mod.push(one(n[0],r)):t.add.push(Ft(r)),n[0]=r,t}}),i5.Definition={type:"heatmap",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"color",type:"string",expr:!0},{name:"opacity",type:"number",expr:!0},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"as",type:"string",default:"image"}]},me(i5,K,{transform(e,t){if(!t.changed()&&!e.modified())return t.StopPropagation;var n=t.materialize(t.SOURCE).source,i="shared"===e.resolve,r=e.field||hr,o=function CGe(e,t){let n;return it(e)?(n=i=>e(i,t),n.dep=Zle(e)):e?n=gr(e):(n=i=>i.$value/i.$max||0,n.dep=!0),n}(e.opacity,e),s=function EGe(e,t){let n;return it(e)?(n=i=>pd(e(i,t)),n.dep=Zle(e)):n=gr(pd(e||"#888")),n}(e.color,e),a=e.as||"image",l={$x:0,$y:0,$value:0,$max:i?ph(n.map(c=>ph(r(c).values))):0};return n.forEach(c=>{const u=r(c),d=rt({},c,l);i||(d.$max=ph(u.values||[])),c[a]=function DGe(e,t,n,i){const r=e.width,s=e.x1||0,a=e.y1||0,l=e.x2||r,c=e.y2||e.height,u=e.values,d=u?m=>u[m]:Ju,f=fd(l-s,c-a),h=f.getContext("2d"),p=h.getImageData(0,0,l-s,c-a),g=p.data;for(let m=a,_=0;m{null!=e[i]&&ece(n,i,e[i])})):HB.forEach(i=>{e.modified(i)&&ece(n,i,e[i])}),null!=e.pointRadius&&n.path.pointRadius(e.pointRadius),e.fit&&function SGe(e,t){const n=function xGe(e){return 1===(e=Ee(e)).length?e[0]:{type:QB,features:e.reduce((t,n)=>t.concat(function AGe(e){return e.type===QB?e.features:Ee(e).filter(t=>null!=t).map(t=>t.type===XB?t:{type:XB,geometry:t})}(n)),[])}}(t.fit);t.extent?e.fitExtent(t.extent,n):t.size&&e.fitSize(t.size,n)}(n,e),t.fork(t.NO_SOURCE|t.NO_FIELDS)}});var Hr=r5.prototype=o5.prototype;function Gr(e){return function(){return e}}function kd(e){return 1e-6*(e()-.5)}function WGe(e){return e.x+e.vx}function qGe(e){return e.y+e.vy}Hr.copy=function(){var n,i,e=new o5(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root;if(!t)return e;if(!t.length)return e._root=nce(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var r=0;r<4;++r)(i=t.source[r])&&(i.length?n.push({source:i,target:t.target[r]=new Array(4)}):t.target[r]=nce(i));return e},Hr.add=function NGe(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return tce(this.cover(t,n),t,n,e)},Hr.addAll=function IGe(e){var t,n,r,o,i=e.length,s=new Array(i),a=new Array(i),l=1/0,c=1/0,u=-1/0,d=-1/0;for(n=0;nu&&(u=r),od&&(d=o));if(l>u||c>d)return this;for(this.cover(l,c).cover(u,d),n=0;ne||e>=r||i>t||t>=o;)switch(c=(tu||(a=p.y0)>d||(l=p.x1)=_)<<1|e>=m)&&(p=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=p)}else{var y=e-+this._x.call(null,h.data),v=t-+this._y.call(null,h.data),b=y*y+v*v;if(b=(f=(s+l)/2))?s=f:l=f,(g=d>=(h=(a+c)/2))?a=h:c=h,t=n,!(n=n[m=g<<1|p]))return this;if(!n.length)break;(t[m+1&3]||t[m+2&3]||t[m+3&3])&&(i=t,_=m)}for(;n.data!==e;)if(r=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,r?(o?r.next=o:delete r.next,this):t?(o?t[m]=o:delete t[m],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(i?i[_]=n:this._root=n),this):(this._root=o,this)},Hr.removeAll=function LGe(e){for(var t=0,n=e.length;t{}};function ice(){for(var i,e=0,t=arguments.length,n={};e=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}(e+"",n),o=-1,s=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o0)for(var r,o,n=new Array(r),i=0;i=0&&e._call.call(void 0,t),e=e._next;--p_}()}finally{p_=0,function nWe(){for(var e,n,t=jx,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:jx=n);nb=e,a5(i)}(),kh=0}}function tWe(){var e=ib.now(),t=e-Vx;t>oce&&(Ux-=t,Vx=e)}function a5(e){p_||(eb&&(eb=clearTimeout(eb)),e-kh>24?(e<1/0&&(eb=setTimeout(lce,e-ib.now()-Ux)),tb&&(tb=clearInterval(tb))):(tb||(Vx=ib.now(),tb=setInterval(tWe,oce)),p_=1,sce(lce)))}zx.prototype=ace.prototype={constructor:zx,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?s5():+n)+(null==t?0:+t),!this._next&&nb!==this&&(nb?nb._next=this:jx=this,nb=this),this._call=e,this._time=n,a5()},stop:function(){this._call&&(this._call=null,this._time=1/0,a5())}};function sWe(e){return e.x}function aWe(e){return e.y}var cWe=Math.PI*(3-Math.sqrt(5));function fWe(e){return e.index}function uce(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}const dce={center:function MGe(e,t){var n,i=1;function r(){var o,a,s=n.length,l=0,c=0;for(o=0;oh+k||Cp+k||Ef.index){var R=h-D.x-D.vx,F=p-D.y-D.vy,P=R*R+F*F;Pc.r&&(c.r=c[u].r)}function l(){if(t){var c,d,u=t.length;for(n=new Array(u),c=0;c=a)){(h.data!==t||h.next)&&(0===_&&(b+=(_=kd(n))*_),0===y&&(b+=(y=kd(n))*y),b[t(w,C,s),w]));for(m=0,a=new Array(_);mt(i,n):t)}function EWe(e){var t=0,n=e.children,i=n&&n.length;if(i)for(;--i>=0;)t+=n[i].value;else t=1;e.value=t}function u5(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=BWe)):void 0===t&&(t=$We);for(var i,o,s,a,l,n=new g_(e),r=[n];i=r.pop();)if((s=t(i.data))&&(l=(s=Array.from(s)).length))for(i.children=s,a=l-1;a>=0;--a)r.push(o=s[a]=new g_(s[a])),o.parent=i,o.depth=i.depth+1;return n.eachBefore(pce)}function $We(e){return e.children}function BWe(e){return Array.isArray(e)?e[1]:null}function jWe(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function pce(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function g_(e){this.data=e,this.depth=this.height=0,this.parent=null}function Hx(e){return null==e?null:gce(e)}function gce(e){if("function"!=typeof e)throw new Error;return e}function Oh(){return 0}function m_(e){return function(){return e}}c5.Definition={type:"Force",metadata:{modifies:!0},params:[{name:"static",type:"boolean",default:!1},{name:"restart",type:"boolean",default:!1},{name:"iterations",type:"number",default:300},{name:"alpha",type:"number",default:1},{name:"alphaMin",type:"number",default:.001},{name:"alphaTarget",type:"number",default:0},{name:"velocityDecay",type:"number",default:.4},{name:"forces",type:"param",array:!0,params:[{key:{force:"center"},params:[{name:"x",type:"number",default:0},{name:"y",type:"number",default:0}]},{key:{force:"collide"},params:[{name:"radius",type:"number",expr:!0},{name:"strength",type:"number",default:.7},{name:"iterations",type:"number",default:1}]},{key:{force:"nbody"},params:[{name:"strength",type:"number",default:-30,expr:!0},{name:"theta",type:"number",default:.9},{name:"distanceMin",type:"number",default:1},{name:"distanceMax",type:"number"}]},{key:{force:"link"},params:[{name:"links",type:"data"},{name:"id",type:"field"},{name:"distance",type:"number",default:30,expr:!0},{name:"strength",type:"number",expr:!0},{name:"iterations",type:"number",default:1}]},{key:{force:"x"},params:[{name:"strength",type:"number",default:.1},{name:"x",type:"field"}]},{key:{force:"y"},params:[{name:"strength",type:"number",default:.1},{name:"y",type:"field"}]}]},{name:"as",type:"string",array:!0,modify:!1,default:fce}]},me(c5,K,{transform(e,t){var n=this.value,i=t.changed(t.ADD_REM),r=e.modified(l5),o=e.iterations||300;if(n?(i&&(t.modifies("index"),n.nodes(t.source)),(r||t.changed(t.MOD))&&hce(n,e,0,t)):(this.value=n=function yWe(e,t){const n=function uWe(e){var t,n=1,i=.001,r=1-Math.pow(i,1/300),o=0,s=.6,a=new Map,l=ace(d),c=ZGe("tick","end"),u=function oWe(){let e=1;return()=>(e=(1664525*e+1013904223)%4294967296)/4294967296}();function d(){f(),c.call("tick",t),n1?(null==m?a.delete(g):a.set(g,p(m)),t):a.get(g)},find:function(g,m,_){var b,w,C,E,D,y=0,v=e.length;for(null==_?_=1/0:_*=_,y=0;y1?(c.on(g,m),t):c.on(g)}}}(e),i=n.stop,r=n.restart;let o=!1;return n.stopped=()=>o,n.restart=()=>(o=!1,r()),n.stop=()=>(o=!0,i()),hce(n,t,!0).on("end",()=>o=!0)}(t.source,e),n.on("tick",function _We(e,t){return()=>e.touch(t).run()}(t.dataflow,this)),e.static||(i=!0,n.tick()),t.modifies("index")),r||i||e.modified(mWe)||t.changed()&&e.restart)if(n.alpha(Math.max(n.alpha(),e.alpha||1)).alphaDecay(1-Math.pow(n.alphaMin(),1/o)),e.static)for(n.stop();--o>=0;)n.tick();else if(n.stopped()&&n.restart(),!i)return t.StopPropagation;return this.finish(e,t)},finish(e,t){const n=t.dataflow;for(let u,a=this._argops,l=0,c=a.length;l=0;--o)i.push(r[o]);return this},find:function xWe(e,t){let n=-1;for(const i of this)if(e.call(t,i,++n,this))return i},sum:function AWe(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,i=t.children,r=i&&i.length;--r>=0;)n+=i[r].value;t.value=n})},sort:function MWe(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function NWe(e){for(var t=this,n=function IWe(e,t){if(e===t)return e;var n=e.ancestors(),i=t.ancestors(),r=null;for(e=n.pop(),t=i.pop();e===t;)r=e,e=n.pop(),t=i.pop();return r}(t,e),i=[t];t!==n;)i.push(t=t.parent);for(var r=i.length;e!==n;)i.splice(r,0,e),e=e.parent;return i},ancestors:function kWe(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function OWe(){return Array.from(this)},leaves:function RWe(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function FWe(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function LWe(){return u5(this).eachBefore(jWe)},[Symbol.iterator]:function*PWe(){var t,i,r,o,e=this,n=[e];do{for(t=n.reverse(),n=[];e=t.pop();)if(yield e,i=e.children)for(r=0,o=i.length;r0&&n*n>i*i+r*r}function d5(e,t){for(var n=0;n1e-6?(R+Math.sqrt(R*R-4*k*F))/(2*k):F/R);return{x:i+C+E*P,y:r+D+M*P,r:P}}function bce(e,t,n){var r,o,a,l,i=e.x-t.x,s=e.y-t.y,c=i*i+s*s;c?(o=t.r+n.r,l=e.r+n.r,(o*=o)>(l*=l)?(r=(c+l-o)/(2*c),a=Math.sqrt(Math.max(0,l/c-r*r)),n.x=e.x-r*i-a*s,n.y=e.y-r*s+a*i):(r=(c+o-l)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x+r*i-a*s,n.y=t.y+r*s+a*i)):(n.x=t.x+n.r,n.y=t.y)}function wce(e,t){var n=e.r+t.r-1e-6,i=t.x-e.x,r=t.y-e.y;return n>0&&n*n>i*i+r*r}function Ece(e){var t=e._,n=e.next._,i=t.r+n.r,r=(t.x*n.r+n.x*t.r)/i,o=(t.y*n.r+n.y*t.r)/i;return r*r+o*o}function Wx(e){this._=e,this.next=null,this.previous=null}function Cce(e,t){if(!(o=(e=function HWe(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}(e)).length))return 0;var n,i,r,o,s,a,l,c,u,d,f;if((n=e[0]).x=0,n.y=0,!(o>1))return n.r;if(n.x=-(i=e[1]).r,i.x=n.r,i.y=0,!(o>2))return n.r+i.r;bce(i,n,r=e[2]),n=new Wx(n),i=new Wx(i),r=new Wx(r),n.next=r.previous=i,i.next=n.previous=r,r.next=i.previous=n;e:for(l=3;lfunction tqe(e){let t=(e=`${e}`).length;return p5(e,t-1)&&!p5(e,t-2)&&(e=e.slice(0,-1)),"/"===e[0]?e:`/${e}`}(n(b,w,r))),y=_.map(Mce),v=new Set(_).add("");for(const b of y)v.has(b)||(v.add(b),_.push(b),y.push(Mce(b)),o.push(h5));s=(b,w)=>_[w],a=(b,w)=>y[w]}for(u=0,l=o.length;u=0&&(h=o[_]).data===h5;--_)h.data=null}if(d.parent=ZWe,d.eachBefore(function(_){_.depth=_.parent.depth+1,--l}).eachBefore(pce),d.parent=null,l>0)throw new Error("cycle");return d}return i.id=function(r){return arguments.length?(e=Hx(r),i):e},i.parentId=function(r){return arguments.length?(t=Hx(r),i):t},i.path=function(r){return arguments.length?(n=Hx(r),i):n},i}function Mce(e){let t=e.length;if(t<2)return"";for(;--t>1&&!p5(e,t););return e.slice(0,t)}function p5(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function nqe(e,t){return e.parent===t.parent?1:2}function g5(e){var t=e.children;return t?t[0]:e.t}function m5(e){var t=e.children;return t?t[t.length-1]:e.t}function iqe(e,t,n){var i=n/(t.i-e.i);t.c-=i,t.s+=n,e.c+=i,t.z+=n,t.m+=n}function oqe(e,t,n){return e.a.parent===t.parent?e.a:n}function qx(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function lqe(e,t){return e.parent===t.parent?1:2}function uqe(e,t){return e+t.x}function fqe(e,t){return Math.max(e,t.y)}function Yx(e,t,n,i,r){for(var s,o=e.children,a=-1,l=o.length,c=e.value&&(r-n)/e.value;++ay&&(y=c),C=m*m*w,(v=Math.max(y/C,C/_))>b){m-=c;break}b=v}s.push(l={value:m,dice:h1?i:1)},n}(Nce),yqe=function e(t){function n(i,r,o,s,a){if((l=i._squarify)&&l.ratio===t)for(var l,c,u,d,h,f=-1,p=l.length,g=i.value;++f1?i:1)},n}(Nce);function _5(e,t,n){const i={};return e.each(r=>{const o=r.data;n(o)&&(i[t(o)]=r)}),e.lookup=i,e}function y5(e){K.call(this,null,e)}y5.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]};const bqe=e=>e.values;function wqe(){const e=[],t={entries:r=>i(n(r,0),0),key:r=>(e.push(r),t)};function n(r,o){if(o>=e.length)return r;const s=r.length,a=e[o++],l={},c={};let d,f,h,u=-1;for(;++ue.length)return r;const s=[];for(const a in r)s.push({key:a,values:i(r[a],o)});return s}return t}function nu(e){K.call(this,null,e)}me(y5,K,{transform(e,t){t.source||J("Nest transform requires an upstream data source.");var n=e.generate,i=e.modified(),r=t.clone(),o=this.value;return(!o||i||t.changed())&&(o&&o.each(s=>{s.children&&RS(s.data)&&r.rem.push(s.data)}),this.value=o=u5({values:Ee(e.keys).reduce((s,a)=>(s.key(a),s),wqe()).entries(r.source)},bqe),n&&o.each(s=>{s.children&&(s=Ft(s.data),r.add.push(s),r.source.push(s))}),_5(o,Fe,Fe)),r.source.root=o,r}});const Eqe=(e,t)=>e.parent===t.parent?1:2;me(nu,K,{transform(e,t){(!t.source||!t.source.root)&&J(this.constructor.name+" transform requires a backing tree data source.");const n=this.layout(e.method),i=this.fields,r=t.source.root,o=e.as||i;e.field?r.sum(e.field):r.count(),e.sort&&r.sort(fh(e.sort,s=>s.data)),function Cqe(e,t,n){for(let i,r=0,o=t.length;rfunction Dqe(e,t,n){const i=e.data,r=t.length-1;for(let o=0;o(e=(1664525*e+1013904223)%4294967296)/4294967296}();return o.x=t/2,o.y=n/2,e?o.eachBefore(Dce(e)).eachAfter(f5(i,.5,s)).eachBefore(Sce(1)):o.eachBefore(Dce(KWe)).eachAfter(f5(Oh,1,s)).eachAfter(f5(i,o.r/Math.min(t,n),s)).eachBefore(Sce(Math.min(t,n)/(2*o.r))),o}return r.radius=function(o){return arguments.length?(e=Hx(o),r):e},r.size=function(o){return arguments.length?(t=+o[0],n=+o[1],r):[t,n]},r.padding=function(o){return arguments.length?(i="function"==typeof o?o:m_(+o),r):i},r},params:["radius","size","padding"],fields:v5});const w5=["x0","y0","x1","y1","depth","children"];function E5(e){nu.call(this,e)}function C5(e){K.call(this,null,e)}E5.Definition={type:"Partition",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"padding",type:"number",default:0},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:w5.length,default:w5}]},me(E5,nu,{layout:function QWe(){var e=1,t=1,n=0,i=!1;function r(s){var a=s.height+1;return s.x0=s.y0=n,s.x1=e,s.y1=t/a,s.eachBefore(function o(s,a){return function(l){l.children&&sb(l,l.x0,s*(l.depth+1)/a,l.x1,s*(l.depth+2)/a);var c=l.x0,u=l.y0,d=l.x1-n,f=l.y1-n;d=0;--s)i.push(r=n.children[s]=new qx(o[s],s)),r.parent=n;return(t.parent=new qx(null,0)).children=[t],t}(c);if(u.eachAfter(o),u.parent.m=-u.z,u.eachBefore(s),i)c.eachBefore(l);else{var d=c,f=c,h=c;c.eachBefore(function(y){y.xf.x&&(f=y),y.depth>h.depth&&(h=y)});var p=d===f?1:e(d,f)/2,g=p-d.x,m=t/(f.x+p+g),_=n/(h.depth||1);c.eachBefore(function(y){y.x=(y.x+g)*m,y.y=y.depth*_})}return c}function o(c){var u=c.children,d=c.parent.children,f=c.i?d[c.i-1]:null;if(u){!function rqe(e){for(var o,t=0,n=0,i=e.children,r=i.length;--r>=0;)(o=i[r]).z+=t,o.m+=t,t+=o.s+(n+=o.c)}(c);var h=(u[0].z+u[u.length-1].z)/2;f?(c.z=f.z+e(c._,f._),c.m=c.z-h):c.z=h}else f&&(c.z=f.z+e(c._,f._));c.parent.A=function a(c,u,d){if(u){for(var b,f=c,h=c,p=u,g=f.parent.children[0],m=f.m,_=h.m,y=p.m,v=g.m;p=m5(p),f=g5(f),p&&f;)g=g5(g),(h=m5(h)).a=c,(b=p.z+y-f.z-m+e(p._,f._))>0&&(iqe(oqe(p,c,d),c,b),m+=b,_+=b),y+=p.m,m+=f.m,v+=g.m,_+=h.m;p&&!m5(h)&&(h.t=p,h.m+=y-_),f&&!g5(g)&&(g.t=f,g.m+=m-v,d=c)}return d}(c,f,c.parent.A||d[0])}function s(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function l(c){c.x*=t,c.y=c.depth*n}return r.separation=function(c){return arguments.length?(e=c,r):e},r.size=function(c){return arguments.length?(i=!1,t=+c[0],n=+c[1],r):i?null:[t,n]},r.nodeSize=function(c){return arguments.length?(i=!0,t=+c[0],n=+c[1],r):i?[t,n]:null},r},cluster:function gqe(){var e=lqe,t=1,n=1,i=!1;function r(o){var s,a=0;o.eachAfter(function(f){var h=f.children;h?(f.x=function cqe(e){return e.reduce(uqe,0)/e.length}(h),f.y=function dqe(e){return 1+e.reduce(fqe,0)}(h)):(f.x=s?a+=e(f,s):0,f.y=0,s=f)});var l=function hqe(e){for(var t;t=e.children;)e=t[0];return e}(o),c=function pqe(e){for(var t;t=e.children;)e=t[t.length-1];return e}(o),u=l.x-e(l,c)/2,d=c.x+e(c,l)/2;return o.eachAfter(i?function(f){f.x=(f.x-o.x)*t,f.y=(o.y-f.y)*n}:function(f){f.x=(f.x-u)/(d-u)*t,f.y=(1-(o.y?f.y/o.y:1))*n})}return r.separation=function(o){return arguments.length?(e=o,r):e},r.size=function(o){return arguments.length?(i=!1,t=+o[0],n=+o[1],r):i?null:[t,n]},r.nodeSize=function(o){return arguments.length?(i=!0,t=+o[0],n=+o[1],r):i?[t,n]:null},r}},D5=["x","y","depth","children"];function S5(e){nu.call(this,e)}function T5(e){K.call(this,[],e)}S5.Definition={type:"Tree",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"tidy",values:["tidy","cluster"]},{name:"size",type:"number",array:!0,length:2},{name:"nodeSize",type:"number",array:!0,length:2},{name:"separation",type:"boolean",default:!0},{name:"as",type:"string",array:!0,length:D5.length,default:D5}]},me(S5,nu,{layout(e){const t=e||"tidy";if(De(Oce,t))return Oce[t]();J("Unrecognized Tree layout method: "+t)},params:["size","nodeSize"],fields:D5}),T5.Definition={type:"TreeLinks",metadata:{tree:!0,generates:!0,changes:!0},params:[]},me(T5,K,{transform(e,t){const n=this.value,i=t.source&&t.source.root,r=t.fork(t.NO_SOURCE),o={};return i||J("TreeLinks transform requires a tree data source."),t.changed(t.ADD_REM)?(r.rem=n,t.visit(t.SOURCE,s=>o[Fe(s)]=1),i.each(s=>{const a=s.data,l=s.parent&&s.parent.data;l&&o[Fe(a)]&&o[Fe(l)]&&r.add.push(Ft({source:l,target:a}))}),this.value=r.add):t.changed(t.MOD)&&(t.visit(t.MOD,s=>o[Fe(s)]=1),n.forEach(s=>{(o[Fe(s.source)]||o[Fe(s.target)])&&r.mod.push(s)})),r}});const Rce={binary:function mqe(e,t,n,i,r){var s,l,o=e.children,a=o.length,c=new Array(a+1);for(c[0]=l=s=0;s=f-1){var y=o[d];return y.x0=p,y.y0=g,y.x1=m,void(y.y1=_)}for(var v=c[d],b=h/2+v,w=d+1,C=f-1;w>>1;c[E]_-g){var k=h?(p*M+m*D)/h:m;u(d,w,D,p,g,k,_),u(w,f,M,k,g,m,_)}else{var R=h?(g*M+_*D)/h:_;u(d,w,D,p,g,m,R),u(w,f,M,p,R,m,_)}}(0,a,e.value,t,n,i,r)},dice:sb,slice:Yx,slicedice:function _qe(e,t,n,i,r){(1&e.depth?Yx:sb)(e,t,n,i,r)},squarify:kce,resquarify:yqe},x5=["x0","y0","x1","y1","depth","children"];function A5(e){nu.call(this,e)}A5.Definition={type:"Treemap",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"squarify",values:["squarify","resquarify","binary","dice","slice","slicedice"]},{name:"padding",type:"number",default:0},{name:"paddingInner",type:"number",default:0},{name:"paddingOuter",type:"number",default:0},{name:"paddingTop",type:"number",default:0},{name:"paddingRight",type:"number",default:0},{name:"paddingBottom",type:"number",default:0},{name:"paddingLeft",type:"number",default:0},{name:"ratio",type:"number",default:1.618033988749895},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:x5.length,default:x5}]},me(A5,nu,{layout(){const e=function vqe(){var e=kce,t=!1,n=1,i=1,r=[0],o=Oh,s=Oh,a=Oh,l=Oh,c=Oh;function u(f){return f.x0=f.y0=0,f.x1=n,f.y1=i,f.eachBefore(d),r=[0],t&&f.eachBefore(Tce),f}function d(f){var h=r[f.depth],p=f.x0+h,g=f.y0+h,m=f.x1-h,_=f.y1-h;m{const n=e.tile();n.ratio&&e.tile(n.ratio(t))},e.method=t=>{De(Rce,t)?e.tile(Rce[t]):J("Unrecognized Treemap layout method: "+t)},e},params:["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],fields:x5});const M5=4278190080;function N5(e,t,n){return new Uint32Array(e.getImageData(0,0,t,n).data.buffer)}function Kx(e,t,n){if(!t.length)return;const i=t[0].mark.marktype;"group"===i?t.forEach(r=>{r.items.forEach(o=>Kx(e,o.items,n))}):Xo[i].draw(e,{items:n?t.map(xqe):t})}function xqe(e){const t=FS(e,{});return t.stroke&&0!==t.strokeOpacity||t.fill&&0!==t.fillOpacity?{...t,strokeOpacity:1,stroke:"#000",fillOpacity:0}:t}const iu=5,Wr=31,ab=32,Od=new Uint32Array(ab+1),Na=new Uint32Array(ab+1);Na[0]=0,Od[0]=~Na[0];for(let e=1;e<=ab;++e)Na[e]=Na[e-1]<<1|1,Od[e]=~Na[e];function Xx(e,t,n,i,r,o){let s=n/2;return e-s<0||e+s>r||t-(s=i/2)<0||t+s>o}function Rd(e,t,n,i,r,o,s,a){const l=r*o/(2*i),c=e(t-l),u=e(t+l),d=e(n-(o/=2)),f=e(n+o);return s.outOfBounds(c,d,u,f)||s.getRange(c,d,u,f)||a&&a.getRange(c,d,u,f)}const kqe=[-1,-1,1,1],Oqe=[-1,1,-1,1],Fqe=["right","center","left"],Pqe=["bottom","middle","top"];function Fce(e,t,n,i,r,o,s,a,l,c,u,d){return!(r.outOfBounds(e,n,t,i)||(d&&o||r).getRange(e,n,t,i))}const $qe={"top-left":0,top:1,"top-right":2,left:4,middle:5,right:6,"bottom-left":8,bottom:9,"bottom-right":10},Bqe={naive:function Nqe(e,t,n,i){const r=e.width,o=e.height;return function(s){const a=s.datum.datum.items[i].items,l=a.length,c=s.datum.fontSize,u=Ko.width(s.datum,s.datum.text);let f,h,p,g,m,_,y,d=0;for(let v=0;v=d&&(d=y,s.x=m,s.y=_);return m=u/2,_=c/2,f=s.x-m,h=s.x+m,p=s.y-_,g=s.y+_,s.align="center",f<0&&h<=r?s.align="left":0<=f&&r=1;)y=(m+_)/2,Rd(e,p,g,h,f,y,s,a)?_=y:m=y;if(m>d)return[p,g,m,!0]}}return function(c){const u=c.datum.datum.items[i].items,d=u.length,f=c.datum.fontSize,h=Ko.width(c.datum,c.datum.text);let y,v,b,w,C,E,D,M,k,R,F,P,T,S,x,I,A,p=n?f:0,g=!1,m=!1,_=0;for(let N=0;Nv&&(A=y,y=v,v=A),b>w&&(A=b,b=w,w=A),k=e(y),F=e(v),R=~~((k+F)/2),P=e(b),S=e(w),T=~~((P+S)/2),D=R;D>=k;--D)for(M=T;M>=P;--M)I=l(D,M,p,h,f),I&&([c.x,c.y,p,g]=I);for(D=R;D<=F;++D)for(M=T;M<=S;++M)I=l(D,M,p,h,f),I&&([c.x,c.y,p,g]=I);!g&&!n&&(x=Math.abs(v-y+w-b),C=(y+v)/2,E=(b+w)/2,x>=_&&!Xx(C,E,h,f,r,o)&&!Rd(e,C,E,f,h,f,s,null)&&(_=x,c.x=C,c.y=E,m=!0))}return!(!g&&!m||(C=h/2,E=f/2,s.setRange(e(c.x-C),e(c.y-E),e(c.x+C),e(c.y+E)),c.align="center",c.baseline="middle",0))}},floodfill:function Rqe(e,t,n,i){const r=e.width,o=e.height,s=t[0],a=t[1],l=e.bitmap();return function(c){const u=c.datum.datum.items[i].items,d=u.length,f=c.datum.fontSize,h=Ko.width(c.datum,c.datum.text),p=[];let v,b,w,C,E,D,M,k,R,F,P,T,g=n?f:0,m=!1,_=!1,y=0;for(let S=0;S=1;)P=(R+F)/2,Rd(e,E,D,f,h,P,s,a)?F=P:R=P;R>g&&(c.x=E,c.y=D,g=R,m=!0)}}!m&&!n&&(T=Math.abs(b-v+C-w),E=(v+b)/2,D=(w+C)/2,T>=y&&!Xx(E,D,h,f,r,o)&&!Rd(e,E,D,f,h,f,s,null)&&(y=T,c.x=E,c.y=D,_=!0))}return!(!m&&!_||(E=h/2,D=f/2,s.setRange(e(c.x-E),e(c.y-D),e(c.x+E),e(c.y+D)),c.align="center",c.baseline="middle",0))}}};function jqe(e,t,n,i,r,o,s,a,l,c,u){if(!e.length)return e;const d=Math.max(i.length,r.length),f=function Vqe(e,t){const n=new Float64Array(t),i=e.length;for(let r=0;r[o.x,o.x,o.x,o.y,o.y,o.y];return e?"line"===e||"area"===e?o=>r(o.datum):"line"===t?o=>{const s=o.datum.items[i].items;return r(s.length?s["start"===n?0:s.length-1]:{x:NaN,y:NaN})}:o=>{const s=o.datum.bounds;return[s.x1,(s.x1+s.x2)/2,s.x2,s.y1,(s.y1+s.y2)/2,s.y2]}:r}(p,g,a,l),y=null===c||c===1/0,v=m&&"naive"===u;let b=-1,w=-1;const C=e.map(k=>{const R=y?Ko.width(k,k.text):void 0;return b=Math.max(b,R),w=Math.max(w,k.fontSize),{datum:k,opacity:0,x:void 0,y:void 0,align:void 0,baseline:void 0,boundary:_(k),textWidth:R}});c=null===c||c===1/0?Math.max(b,w)+Math.max(...i):c;const E=function Mqe(e,t,n){const i=Math.max(1,Math.sqrt(e*t/1e6)),r=~~((e+2*n+i)/i),o=~~((t+2*n+i)/i),s=a=>~~((a+n)/i);return s.invert=a=>a*i-n,s.bitmap=()=>function Aqe(e,t){const n=new Uint32Array(~~((e*t+ab)/ab));function i(o,s){n[o]|=s}function r(o,s){n[o]&=s}return{array:n,get:(o,s)=>{const a=s*e+o;return n[a>>>iu]&1<<(a&Wr)},set:(o,s)=>{const a=s*e+o;i(a>>>iu,1<<(a&Wr))},clear:(o,s)=>{const a=s*e+o;r(a>>>iu,~(1<<(a&Wr)))},getRange:(o,s,a,l)=>{let u,d,f,h,c=l;for(;c>=s;--c)if(u=c*e+o,d=c*e+a,f=u>>>iu,h=d>>>iu,f===h){if(n[f]&Od[u&Wr]&Na[1+(d&Wr)])return!0}else{if(n[f]&Od[u&Wr]||n[h]&Na[1+(d&Wr)])return!0;for(let p=f+1;p{let c,u,d,f,h;for(;s<=l;++s)if(c=s*e+o,u=s*e+a,d=c>>>iu,f=u>>>iu,d===f)i(d,Od[c&Wr]&Na[1+(u&Wr)]);else for(i(d,Od[c&Wr]),i(f,Na[1+(u&Wr)]),h=d+1;h{let c,u,d,f,h;for(;s<=l;++s)if(c=s*e+o,u=s*e+a,d=c>>>iu,f=u>>>iu,d===f)r(d,Na[c&Wr]|Od[1+(u&Wr)]);else for(r(d,Na[c&Wr]),r(f,Od[1+(u&Wr)]),h=d+1;ho<0||s<0||l>=t||a>=e}}(r,o),s.ratio=i,s.padding=n,s.width=e,s.height=t,s}(t[0],t[1],c);let D;if(!v){n&&C.sort((F,P)=>n(F.datum,P.datum));let k=!1;for(let F=0;FF.datum);D=o.length||R?function Tqe(e,t,n,i,r){const o=e.width,s=e.height,a=i||r,l=fd(o,s).getContext("2d"),c=fd(o,s).getContext("2d"),u=a&&fd(o,s).getContext("2d");n.forEach(D=>Kx(l,D,!1)),Kx(c,t,!1),a&&Kx(u,t,!0);const d=N5(l,o,s),f=N5(c,o,s),h=a&&N5(u,o,s),p=e.bitmap(),g=a&&e.bitmap();let m,_,y,v,b,w,C,E;for(_=0;_n.set(e(i.boundary[0]),e(i.boundary[3]))),[n,void 0]}(E,s&&C)}const M=m?Bqe[u](E,D,s,l):function Lqe(e,t,n,i){const r=e.width,o=e.height,s=t[0],a=t[1],l=i.length;return function(c){const u=c.boundary,d=c.datum.fontSize;if(u[2]<0||u[5]<0||u[0]>r||u[3]>o)return!1;let h,p,g,m,_,y,v,b,w,C,E,D,M,k,R,f=c.textWidth??0;for(let F=0;F>>2&3)-1,g=0===h&&0===p||i[F]<0,m=h&&p?Math.SQRT1_2:1,_=i[F]<0?-1:1,y=u[1+h]+i[F]*h*m,E=u[4+p]+_*d*p/2+i[F]*p*m,b=E-d/2,w=E+d/2,D=e(y),k=e(b),R=e(w),!f){if(!Fce(D,D,k,R,s,a,0,0,0,0,0,g))continue;f=Ko.width(c.datum,c.datum.text)}if(C=y+_*f*h/2,y=C-f/2,v=C+f/2,D=e(y),M=e(v),Fce(D,M,k,R,s,a,0,0,0,0,0,g))return c.x=h?h*_<0?v:y:C,c.y=p?p*_<0?w:b:E,c.align=Fqe[h*_+1],c.baseline=Pqe[p*_+1],s.setRange(D,k,M,R),!0}return!1}}(E,D,h,f);return C.forEach(k=>k.opacity=+M(k)),C}const L5=["x","y","opacity","align","baseline"],Pce=["top-left","left","bottom-left","top","bottom","top-right","right","bottom-right"];function $5(e){K.call(this,null,e)}function Lce(e,t){var r,o,s,a,l,c,n=[],i=function(u){return u(a)};if(null==t)n.push(e);else for(r={},o=0,s=e.length;o{const s=o.datum;s[r[0]]=o.x,s[r[1]]=o.y,s[r[2]]=o.opacity,s[r[3]]=o.align,s[r[4]]=o.baseline}),t.reflow(i).modifies(r)}}),B5.Definition={type:"Loess",metadata:{generates:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"bandwidth",type:"number",default:.3},{name:"as",type:"string",array:!0}]},me(B5,K,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const r=Lce(t.materialize(t.SOURCE).source,e.groupby),o=(e.groupby||[]).map($n),s=o.length,a=e.as||[$n(e.x),$n(e.y)],l=[];r.forEach(c=>{Pne(c,e.x,e.y,e.bandwidth||.3).forEach(u=>{const d={};for(let f=0;f"poly"===e?t:"quad"===e?2:1)(s,a),c=e.as||[$n(e.x),$n(e.y)],u=j5[s],d=[];let f=e.extent;De(j5,s)||J("Invalid regression method: "+s),null!=f&&"log"===s&&f[0]<=0&&(t.dataflow.warn("Ignoring extent with values <= 0 for log regression."),f=null),r.forEach(h=>{if(h.length<=l)return void t.dataflow.warn("Skipping regression with more parameters than data points.");const g=u(h,e.x,e.y,a);if(e.params)return void d.push(Ft({keys:h.dims,coef:g.coef,rSquared:g.rSquared}));const m=f||Al(h,e.x),_=y=>{const v={};for(let b=0;b_([y,g.predict(y)])):WS(g.predict,m,25,200).forEach(_)}),this.value&&(n.rem=this.value),this.value=n.add=n.source=d}return n}});const Bt=11102230246251565e-32,Di=134217729,Wqe=(3+8*Bt)*Bt;function lb(e,t,n,i,r){let o,s,a,l,c=t[0],u=i[0],d=0,f=0;u>c==u>-c?(o=c,c=t[++d]):(o=u,u=i[++f]);let h=0;if(dc==u>-c?(s=c+o,a=o-(s-c),c=t[++d]):(s=u+o,a=o-(s-u),u=i[++f]),o=s,0!==a&&(r[h++]=a);dc==u>-c?(s=o+c,l=s-o,a=o-(s-l)+(c-l),c=t[++d]):(s=o+u,l=s-o,a=o-(s-l)+(u-l),u=i[++f]),o=s,0!==a&&(r[h++]=a);for(;d=Yqe*c?l:-function Qqe(e,t,n,i,r,o,s){let a,l,c,u,d,f,h,p,g,m,_,y,v,b,w,C,E,D;const M=e-r,k=n-r,R=t-o,F=i-o;b=M*F,f=Di*M,h=f-(f-M),p=M-h,f=Di*F,g=f-(f-F),m=F-g,w=p*m-(b-h*g-p*g-h*m),C=R*k,f=Di*R,h=f-(f-R),p=R-h,f=Di*k,g=f-(f-k),m=k-g,E=p*m-(C-h*g-p*g-h*m),_=w-E,d=w-_,__[0]=w-(_+d)+(d-E),y=b+_,d=y-b,v=b-(y-d)+(_-d),_=v-C,d=v-_,__[1]=v-(_+d)+(d-C),D=y+_,d=D-y,__[2]=y-(D-d)+(_-d),__[3]=D;let P=function qqe(e,t){let n=t[0];for(let i=1;i=T||-P>=T||(d=e-M,a=e-(M+d)+(d-r),d=n-k,c=n-(k+d)+(d-r),d=t-R,l=t-(R+d)+(d-o),d=i-F,u=i-(F+d)+(d-o),0===a&&0===l&&0===c&&0===u)||(T=11093356479670487e-47*s+Wqe*Math.abs(P),P+=M*u+F*a-(R*c+k*l),P>=T||-P>=T))return P;b=a*F,f=Di*a,h=f-(f-a),p=a-h,f=Di*F,g=f-(f-F),m=F-g,w=p*m-(b-h*g-p*g-h*m),C=l*k,f=Di*l,h=f-(f-l),p=l-h,f=Di*k,g=f-(f-k),m=k-g,E=p*m-(C-h*g-p*g-h*m),_=w-E,d=w-_,qr[0]=w-(_+d)+(d-E),y=b+_,d=y-b,v=b-(y-d)+(_-d),_=v-C,d=v-_,qr[1]=v-(_+d)+(d-C),D=y+_,d=D-y,qr[2]=y-(D-d)+(_-d),qr[3]=D;const S=lb(4,__,4,qr,$ce);b=M*u,f=Di*M,h=f-(f-M),p=M-h,f=Di*u,g=f-(f-u),m=u-g,w=p*m-(b-h*g-p*g-h*m),C=R*c,f=Di*R,h=f-(f-R),p=R-h,f=Di*c,g=f-(f-c),m=c-g,E=p*m-(C-h*g-p*g-h*m),_=w-E,d=w-_,qr[0]=w-(_+d)+(d-E),y=b+_,d=y-b,v=b-(y-d)+(_-d),_=v-C,d=v-_,qr[1]=v-(_+d)+(d-C),D=y+_,d=D-y,qr[2]=y-(D-d)+(_-d),qr[3]=D;const x=lb(S,$ce,4,qr,Bce);b=a*u,f=Di*a,h=f-(f-a),p=a-h,f=Di*u,g=f-(f-u),m=u-g,w=p*m-(b-h*g-p*g-h*m),C=l*c,f=Di*l,h=f-(f-l),p=l-h,f=Di*c,g=f-(f-c),m=c-g,E=p*m-(C-h*g-p*g-h*m),_=w-E,d=w-_,qr[0]=w-(_+d)+(d-E),y=b+_,d=y-b,v=b-(y-d)+(_-d),_=v-C,d=v-_,qr[1]=v-(_+d)+(d-C),D=y+_,d=D-y,qr[2]=y-(D-d)+(_-d),qr[3]=D;const I=lb(x,Bce,4,qr,jce);return jce[I-1]}(e,t,n,i,r,o,c)}ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(8),ae(8),ae(8),ae(4),ae(8),ae(8),ae(8),ae(12),ae(192),ae(192),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(8),ae(8),ae(8),ae(8),ae(8),ae(8),ae(8),ae(8),ae(8),ae(4),ae(4),ae(4),ae(8),ae(16),ae(16),ae(16),ae(32),ae(32),ae(48),ae(64),ae(1152),ae(1152),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(24),ae(24),ae(24),ae(24),ae(24),ae(24),ae(24),ae(24),ae(24),ae(24),ae(1152),ae(1152),ae(1152),ae(1152),ae(1152),ae(2304),ae(2304),ae(3456),ae(5760),ae(8),ae(8),ae(8),ae(16),ae(24),ae(48),ae(48),ae(96),ae(192),ae(384),ae(384),ae(384),ae(768),ae(96),ae(96),ae(96),ae(1152);const aue=Math.pow(2,-52),aA=new Uint32Array(512);class lA{static from(t,n=_Ye,i=yYe){const r=t.length,o=new Float64Array(2*r);for(let s=0;s>1;if(n>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const i=Math.max(2*n-5,0);this._triangles=new Uint32Array(3*i),this._halfedges=new Int32Array(3*i),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:t,_hullPrev:n,_hullNext:i,_hullTri:r,_hullHash:o}=this,s=t.length>>1;let a=1/0,l=1/0,c=-1/0,u=-1/0;for(let M=0;Mc&&(c=k),R>u&&(u=R),this._ids[M]=M}const d=(a+c)/2,f=(l+u)/2;let h,p,g;for(let M=0,k=1/0;M0&&(p=M,k=R)}let y=t[2*p],v=t[2*p+1],b=1/0;for(let M=0;MF&&(M[k++]=P,F=T)}return this.hull=M.subarray(0,k),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(Qx(m,_,y,v,w,C)<0){const M=p,k=y,R=v;p=g,y=w,v=C,g=M,w=k,C=R}const E=function mYe(e,t,n,i,r,o){const s=n-e,a=i-t,l=r-e,c=o-t,u=s*s+a*a,d=l*l+c*c,f=.5/(s*c-a*l);return{x:e+(c*u-a*d)*f,y:t+(s*d-l*u)*f}}(m,_,y,v,w,C);this._cx=E.x,this._cy=E.y;for(let M=0;M0&&Math.abs(P-k)<=aue&&Math.abs(T-R)<=aue||(k=P,R=T,F===h||F===p||F===g))continue;let S=0;for(let O=0,$=this._hashKey(P,T);O=0;)if(x=I,x===S){x=-1;break}if(-1===x)continue;let A=this._addTriangle(x,F,i[x],-1,-1,r[x]);r[F]=this._legalize(A+2),r[x]=A,D++;let N=i[x];for(;I=i[N],Qx(P,T,t[2*N],t[2*N+1],t[2*I],t[2*I+1])<0;)A=this._addTriangle(N,F,I,r[F],-1,r[N]),r[F]=this._legalize(A+2),i[N]=N,D--,N=I;if(x===S)for(;I=n[x],Qx(P,T,t[2*I],t[2*I+1],t[2*x],t[2*x+1])<0;)A=this._addTriangle(I,F,x,-1,r[x],r[I]),this._legalize(A+2),r[I]=A,i[x]=x,D--,x=I;this._hullStart=n[F]=x,i[x]=n[N]=F,i[F]=N,o[this._hashKey(P,T)]=F,o[this._hashKey(t[2*x],t[2*x+1])]=x}this.hull=new Uint32Array(D);for(let M=0,k=this._hullStart;M0?3-n:1+n)/4}(t-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:n,_halfedges:i,coords:r}=this;let o=0,s=0;for(;;){const a=i[t],l=t-t%3;if(s=l+(t+2)%3,-1===a){if(0===o)break;t=aA[--o];continue}const c=a-a%3,d=c+(a+2)%3,f=n[s],h=n[t],p=n[l+(t+1)%3],g=n[d];if(pYe(r[2*f],r[2*f+1],r[2*h],r[2*h+1],r[2*p],r[2*p+1],r[2*g],r[2*g+1])){n[t]=g,n[a]=f;const _=i[d];if(-1===_){let v=this._hullStart;do{if(this._hullTri[v]===d){this._hullTri[v]=t;break}v=this._hullPrev[v]}while(v!==this._hullStart)}this._link(t,_),this._link(a,i[s]),this._link(s,d),o=n&&t[e[a]]>s;)e[a+1]=e[a--];e[a+1]=o}else{let o=n+1,s=i;fb(e,n+i>>1,o),t[e[n]]>t[e[i]]&&fb(e,n,i),t[e[o]]>t[e[i]]&&fb(e,o,i),t[e[n]]>t[e[o]]&&fb(e,n,o);const a=e[o],l=t[a];for(;;){do{o++}while(t[e[o]]l);if(s=s-n?(S_(e,t,o,i),S_(e,t,n,s-1)):(S_(e,t,n,s-1),S_(e,t,o,i))}}function fb(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function _Ye(e){return e[0]}function yYe(e){return e[1]}class Uh{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,n){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,n){this._+=`L${this._x1=+t},${this._y1=+n}`}arc(t,n,i){const r=(t=+t)+(i=+i),o=n=+n;if(i<0)throw new Error("negative radius");null===this._x1?this._+=`M${r},${o}`:(Math.abs(this._x1-r)>1e-6||Math.abs(this._y1-o)>1e-6)&&(this._+="L"+r+","+o),i&&(this._+=`A${i},${i},0,1,1,${t-i},${n}A${i},${i},0,1,1,${this._x1=r},${this._y1=o}`)}rect(t,n,i,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${+i}v${+r}h${-i}Z`}value(){return this._||null}}class p8{constructor(){this._=[]}moveTo(t,n){this._.push([t,n])}closePath(){this._.push(this._[0].slice())}lineTo(t,n){this._.push([t,n])}value(){return this._.length?this._:null}}class vYe{constructor(t,[n,i,r,o]=[0,0,960,500]){if(!((r=+r)>=(n=+n)&&(o=+o)>=(i=+i)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=r,this.xmin=n,this.ymax=o,this.ymin=i,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:n,triangles:i},vectors:r}=this;let o,s;const a=this.circumcenters=this._circumcenters.subarray(0,i.length/3*2);for(let y,v,g=0,m=0,_=i.length;g<_;g+=3,m+=2){const b=2*i[g],w=2*i[g+1],C=2*i[g+2],E=t[b],D=t[b+1],R=t[C],F=t[C+1],P=t[w]-E,T=t[w+1]-D,S=R-E,x=F-D,I=2*(P*x-T*S);if(Math.abs(I)<1e-9){if(void 0===o){o=s=0;for(const N of n)o+=t[2*N],s+=t[2*N+1];o/=n.length,s/=n.length}const A=1e9*Math.sign((o-E)*x-(s-D)*S);y=(E+R)/2-A*x,v=(D+F)/2+A*S}else{const A=1/I,N=P*P+T*T,O=S*S+x*x;y=E+(x*N-T*O)*A,v=D+(P*O-S*N)*A}a[m]=y,a[m+1]=v}let c,d,h,l=n[n.length-1],u=4*l,f=t[2*l],p=t[2*l+1];r.fill(0);for(let g=0;g1;)o-=2;for(let s=2;s0){if(n>=this.ymax)return null;(s=(this.ymax-n)/r)0){if(t>=this.xmax)return null;(s=(this.xmax-t)/i)this.xmax?2:0)|(nthis.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let n=0;n2&&function CYe(e){const{triangles:t,coords:n}=e;for(let i=0;i1e-10)return!1}return!0}(t)){this.collinear=Int32Array.from({length:n.length/2},(f,h)=>h).sort((f,h)=>n[2*f]-n[2*h]||n[2*f+1]-n[2*h+1]);const l=this.collinear[0],c=this.collinear[this.collinear.length-1],u=[n[2*l],n[2*l+1],n[2*c],n[2*c+1]],d=1e-8*Math.hypot(u[3]-u[1],u[2]-u[0]);for(let f=0,h=n.length/2;f0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],s[r[0]]=1,2===r.length&&(s[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(t){return new vYe(this,t)}*neighbors(t){const{inedges:n,hull:i,_hullIndex:r,halfedges:o,triangles:s,collinear:a}=this;if(a){const d=a.indexOf(t);return d>0&&(yield a[d-1]),void(d=0&&o!==i&&o!==r;)i=o;return o}_step(t,n,i){const{inedges:r,hull:o,_hullIndex:s,halfedges:a,triangles:l,points:c}=this;if(-1===r[t]||!c.length)return(t+1)%(c.length>>1);let u=t,d=T_(n-c[2*t],2)+T_(i-c[2*t+1],2);const f=r[t];let h=f;do{let p=l[h];const g=T_(n-c[2*p],2)+T_(i-c[2*p+1],2);if(g>5<<5,f=~~Math.max(Math.abs(y+v),Math.abs(y-v))}else u=u+31>>5<<5;if(f>l&&(l=f),s+u>=hb<<5&&(s=0,a+=l,l=0),a+f>=cA)break;r.translate((s+(u>>1))/o,(a+(f>>1))/o),t.rotate&&r.rotate(t.rotate*_8),r.fillText(t.text,0,0),t.padding&&(r.lineWidth=2*t.padding,r.strokeText(t.text,0,0)),r.restore(),t.width=u,t.height=f,t.xoff=s,t.yoff=a,t.x1=u>>1,t.y1=f>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,s+=u}for(var w=r.getImageData(0,0,(hb<<5)/o,cA/o).data,C=[];--i>=0;)if((t=n[i]).hasText){for(d=(u=t.width)>>5,f=t.y1-t.y0,h=0;h>5)]|=k,E|=k}E?D=p:(t.y0++,f--,p--,a++)}t.y1=t.y0+D,t.sprite=C.slice(0,(t.y1-t.y0)*d)}}}function kYe(e,t,n){for(var u,i=e.sprite,r=e.width>>5,o=e.x-(r<<4),s=127&o,a=32-s,l=e.y1-e.y0,c=(e.y+e.y0)*(n>>=5)+(o>>5),d=0;d>>s:0))&t[c+f])return!0;c+=n}return!1}function OYe(e,t){var n=e[0],i=e[1];t.x+t.x0i.x&&(i.x=t.x+t.x1),t.y+t.y1>i.y&&(i.y=t.y+t.y1)}function RYe(e,t){return e.x+e.x1>t[0].x&&e.x+e.x0t[0].y&&e.y+e.y0=v));)if(g.x=_+D,g.y=y+M,!(g.x+g.x0<0||g.y+g.y0<0||g.x+g.x1>e[0]||g.y+g.y1>e[1])&&(!m||!kYe(g,p,e[0]))&&(!m||RYe(g,m))){for(var A,k=g.sprite,R=g.width>>5,F=e[0]>>5,P=g.x-(R<<4),T=127&P,S=32-T,x=g.y1-g.y0,I=(g.y+g.y0)*F+(P>>5),N=0;N>>T:0);I+=F}return g.sprite=null,!0}return!1}return d.layout=function(){for(var p=function f(p){p.width=p.height=1;var g=Math.sqrt(p.getContext("2d").getImageData(0,0,1,1).data.length>>2);p.width=(hb<<5)/g,p.height=cA/g;var m=p.getContext("2d");return m.fillStyle=m.strokeStyle="red",m.textAlign="center",{context:m,ratio:g}}(fd()),g=function PYe(e){for(var t=[],n=-1;++n>5)*e[1]),m=null,_=c.length,y=-1,v=[],b=c.map(C=>({text:t(C),font:n(C),style:r(C),weight:o(C),rotate:s(C),size:~~(i(C)+1e-14),padding:a(C),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:C})).sort((C,E)=>E.size-C.size);++y<_;){var w=b[y];w.x=e[0]*(u()+.5)>>1,w.y=e[1]*(u()+.5)>>1,IYe(p,w,b,y),w.hasText&&h(g,w,m)&&(v.push(w),m?OYe(m,w):m=[{x:w.x+w.x0,y:w.y+w.y0},{x:w.x+w.x1,y:w.y+w.y1}],w.x-=e[0]>>1,w.y-=e[1]>>1)}return v},d.words=function(p){return arguments.length?(c=p,d):c},d.size=function(p){return arguments.length?(e=[+p[0],+p[1]],d):e},d.font=function(p){return arguments.length?(n=zh(p),d):n},d.fontStyle=function(p){return arguments.length?(r=zh(p),d):r},d.fontWeight=function(p){return arguments.length?(o=zh(p),d):o},d.rotate=function(p){return arguments.length?(s=zh(p),d):s},d.text=function(p){return arguments.length?(t=zh(p),d):t},d.spiral=function(p){return arguments.length?(l=LYe[p]||p,d):l},d.fontSize=function(p){return arguments.length?(i=zh(p),d):i},d.padding=function(p){return arguments.length?(a=zh(p),d):a},d.random=function(p){return arguments.length?(u=p,d):u},d}(),e)}y8.Definition={type:"Wordcloud",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2},{name:"font",type:"string",expr:!0,default:"sans-serif"},{name:"fontStyle",type:"string",expr:!0,default:"normal"},{name:"fontWeight",type:"string",expr:!0,default:"normal"},{name:"fontSize",type:"number",expr:!0,default:14},{name:"fontSizeRange",type:"number",array:"nullable",default:[10,50]},{name:"rotate",type:"number",expr:!0,default:0},{name:"text",type:"field"},{name:"spiral",type:"string",values:["archimedean","rectangular"]},{name:"padding",type:"number",expr:!0},{name:"as",type:"string",array:!0,length:7,default:uue}]},me(y8,K,{transform(e,t){e.size&&(!e.size[0]||!e.size[1])&&J("Wordcloud size dimensions must be non-zero.");const i=e.modified();if(!(i||t.changed(t.ADD_REM)||$Ye.some(function n(p){const g=e[p];return it(g)&&t.modified(g.fields)})))return;const r=t.materialize(t.SOURCE).source,o=this.value,s=e.as||uue;let l,a=e.fontSize||14;if(it(a)?l=e.fontSizeRange:a=gr(a),l){const p=a,g=Nt("sqrt")().domain(Al(r,p)).range(l);a=m=>g(p(m))}r.forEach(p=>{p[s[0]]=NaN,p[s[1]]=NaN,p[s[3]]=0});const c=o.words(r).text(e.text).size(e.size||[500,500]).padding(e.padding||1).spiral(e.spiral||"archimedean").rotate(e.rotate||0).font(e.font||"sans-serif").fontStyle(e.fontStyle||"normal").fontWeight(e.fontWeight||"normal").fontSize(a).random(ks).layout(),u=o.size(),d=u[0]>>1,f=u[1]>>1,h=c.length;for(let g,m,p=0;pnew Uint8Array(e),VYe=e=>new Uint16Array(e),pb=e=>new Uint32Array(e);function uA(e,t,n){const i=(t<257?jYe:t<65537?VYe:pb)(e);return n&&i.set(n),i}function due(e,t,n){const i=1<{const r=e[n],o=e[i];return ro?1:0}),function BYe(e,t){return Array.from(t,n=>e[n])}(e,t)}(h,f),u)p=t,g=e,t=Array(u+d),e=pb(u+d),function GYe(e,t,n,i,r,o,s,a,l){let d,c=0,u=0;for(d=0;c0)for(m=0;me,size:()=>n}}function v8(e){K.call(this,function UYe(){let e=8,t=[],n=pb(0),i=uA(0,e),r=uA(0,e);return{data:()=>t,seen:()=>n=function zYe(e,t,n){return e.length>=t?e:((n=n||new e.constructor(t)).set(e),n)}(n,t.length),add(o){for(let c,s=0,a=t.length,l=o.length;st.length,curr:()=>i,prev:()=>r,reset:o=>r[o]=i[o],all:()=>e<257?255:e<65537?65535:4294967295,set(o,s){i[o]|=s},clear(o,s){i[o]&=~s},resize(o,s){(o>i.length||s>e)&&(e=Math.max(s,e),i=uA(o,e,i),r=uA(o,e))}}}(),e),this._indices=null,this._dims=null}function b8(e){K.call(this,null,e)}v8.Definition={type:"CrossFilter",metadata:{},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"query",type:"array",array:!0,required:!0,content:{type:"number",array:!0,length:2}}]},me(v8,K,{transform(e,t){return this._dims?e.modified("fields")||e.fields.some(i=>t.modified(i.fields))?this.reinit(e,t):this.eval(e,t):this.init(e,t)},init(e,t){const n=e.fields,i=e.query,r=this._indices={},o=this._dims=[],s=i.length;let l,c,a=0;for(;a{const o=r.remove(t,n);for(const s in i)i[s].reindex(o)})},update(e,t,n){const i=this._dims,r=e.query,o=t.stamp,s=i.length;let l,c,a=0;for(n.filters=0,c=0;ch)for(m=h,_=Math.min(d,p);m<_;++m)y=l[m],o[y]!==n&&(a[y]=s[y],o[y]=n,i.push(y)),s[y]^=g;if(f>p)for(m=Math.max(d,p),_=f;m<_;++m)y=l[m],o[y]!==n&&(a[y]=s[y],o[y]=n,i.push(y)),s[y]^=g;else if(fd)for(p=d,g=Math.min(c,f);pf)for(p=Math.max(c,f),g=u;pa[u]&n?null:s[u];return o.filter(o.MOD,c),r&r-1?(o.filter(o.ADD,u=>{const d=a[u]&n;return!d&&d^l[u]&n?s[u]:null}),o.filter(o.REM,u=>!(a[u]&n)||l[u]&n?null:s[u])):(o.filter(o.ADD,c),o.filter(o.REM,u=>(a[u]&n)===r?s[u]:null)),o.filter(o.SOURCE,u=>c(u._index))}});const Hh="Literal",hue="CallExpression";function Oa(e){this.type=e}Oa.prototype.visit=function(e){let t,n,i;if(e(this))return 1;for(t=function nKe(e){switch(e.type){case"ArrayExpression":return e.elements;case"BinaryExpression":case"LogicalExpression":return[e.left,e.right];case hue:return[e.callee].concat(e.arguments);case"ConditionalExpression":return[e.test,e.consequent,e.alternate];case"MemberExpression":return[e.object,e.property];case"ObjectExpression":return e.properties;case"Property":return[e.key,e.value];case"UnaryExpression":return[e.argument];default:return[]}}(this),n=0,i=t.length;n",Yl[Gh]="Identifier",Yl[jd]="Keyword",Yl[fA]="Null",Yl[Wh]="Numeric",Yl[vo]="Punctuator",Yl[mb]="String",Yl[9]="RegularExpression";var rKe="ArrayExpression",oKe="BinaryExpression",sKe="CallExpression",aKe="ConditionalExpression",pue="Identifier",lKe="Literal",cKe="LogicalExpression",uKe="MemberExpression",dKe="ObjectExpression",fKe="Property",hKe="UnaryExpression",ki="Unexpected token %0",pKe="Unexpected number",gKe="Unexpected string",mKe="Unexpected identifier",_Ke="Unexpected reserved word",yKe="Unexpected end of input",w8="Invalid regular expression",E8="Invalid regular expression: missing /",gue="Octal literals are not allowed in strict mode.",vKe="Duplicate data property in object literal not allowed in strict mode",er="ILLEGAL",_b="Disabled.",bKe=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),wKe=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function hA(e,t){if(!e)throw new Error("ASSERT: "+t)}function ru(e){return e>=48&&e<=57}function C8(e){return"0123456789abcdefABCDEF".includes(e)}function yb(e){return"01234567".includes(e)}function EKe(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e)}function vb(e){return 10===e||13===e||8232===e||8233===e}function bb(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&bKe.test(String.fromCharCode(e))}function pA(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&wKe.test(String.fromCharCode(e))}const CKe={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function mue(){for(;Z1114111||"}"!==e)&&It({},ki,er),t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function _ue(){var e,t;for(e=Me.charCodeAt(Z++),t=String.fromCharCode(e),92===e&&(117!==Me.charCodeAt(Z)&&It({},ki,er),++Z,(!(e=D8("u"))||"\\"===e||!bb(e.charCodeAt(0)))&&It({},ki,er),t=e);Z>>="===(s=Me.substr(Z,4))?{type:vo,value:s,start:e,end:Z+=4}:">>>"===(o=s.substr(0,3))||"<<="===o||">>="===o?{type:vo,value:o,start:e,end:Z+=3}:i===(r=o.substr(0,2))[1]&&"+-<>&|".includes(i)||"=>"===r?{type:vo,value:r,start:e,end:Z+=2}:("//"===r&&It({},ki,er),"<>=!+-*%&|^/".includes(i)?(++Z,{type:vo,value:i,start:e,end:Z}):void It({},ki,er))}function yue(){var e,t,n;if(hA(ru((n=Me[Z]).charCodeAt(0))||"."===n,"Numeric literal must start with a decimal digit or a decimal point"),t=Z,e="","."!==n){if(e=Me[Z++],n=Me[Z],"0"===e){if("x"===n||"X"===n)return++Z,function xKe(e){let t="";for(;Z=Er)return{type:gb,start:Z,end:Z};const e=Me.charCodeAt(Z);return bb(e)?function TKe(){var e,t;return e=Z,t=92===Me.charCodeAt(Z)?_ue():function SKe(){var e,t;for(e=Z++;Z(hA(s=0&&It({},w8,n),{value:n,literal:t}}(),i=function NKe(e,t){let n=e;t.includes("u")&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,(i,r)=>{if(parseInt(r,16)<=1114111)return"x";It({},w8)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{It({},w8)}try{return new RegExp(e,t)}catch{return null}}(t.value,n.value),{literal:t.literal+n.literal,value:i,regex:{pattern:t.value,flags:n.value},start:e,end:Z}}()),bue()):gA(bo())}return n}function WKe(){const e=[];if(Cr("("),!wn(")"))for(;Z":case"<=":case">=":case"instanceof":case"in":t=7;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11}return t}function qh(){var e,t;return e=function QKe(){var e,t,n,i,r,o,s,a,l,c;if(e=Yt,l=mA(),0===(r=Tue(i=Yt)))return l;for(i.prec=r,bo(),t=[e,Yt],o=[l,i,s=mA()];(r=Tue(Yt))>0;){for(;o.length>2&&r<=o[o.length-2].prec;)s=o.pop(),a=o.pop().value,l=o.pop(),t.pop(),n=wue(a,l,s),o.push(n);(i=bo()).prec=r,o.push(i),t.push(Yt),n=mA(),o.push(n)}for(n=o[c=o.length-1],t.pop();c>1;)t.pop(),n=wue(o[c-1].value,o[c-2],n),c-=2;return n}(),wn("?")&&(bo(),t=qh(),Cr(":"),e=function LKe(e,t,n){const i=new Oa(aKe);return i.test=e,i.consequent=t,i.alternate=n,i}(e,t,qh())),e}function A8(){const e=qh();if(wn(","))throw new Error(_b);return e}function M8(e){Z=0,Er=(Me=e).length,Yt=null,bue();const t=A8();if(Yt.type!==gb)throw new Error("Unexpect token after expression.");return t}var xue={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function Aue(e){function n(s,a,l){return c=>function t(s,a,l,c){let u=e(a[0]);return l&&(u=l+"("+u+")",0===l.lastIndexOf("new ",0)&&(u="("+u+")")),u+"."+s+(c<0?"":0===c?"()":"("+a.slice(1).map(e).join(",")+")")}(s,c,a,l)}const i="new Date",r="String",o="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",hypot:"Math.hypot",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(s){s.length<3&&J("Missing arguments to clamp function."),s.length>3&&J("Too many arguments to clamp function.");const a=s.map(e);return"Math.max("+a[1]+", Math.min("+a[2]+","+a[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:i,date:n("getDate",i,0),day:n("getDay",i,0),year:n("getFullYear",i,0),month:n("getMonth",i,0),hours:n("getHours",i,0),minutes:n("getMinutes",i,0),seconds:n("getSeconds",i,0),milliseconds:n("getMilliseconds",i,0),time:n("getTime",i,0),timezoneoffset:n("getTimezoneOffset",i,0),utcdate:n("getUTCDate",i,0),utcday:n("getUTCDay",i,0),utcyear:n("getUTCFullYear",i,0),utcmonth:n("getUTCMonth",i,0),utchours:n("getUTCHours",i,0),utcminutes:n("getUTCMinutes",i,0),utcseconds:n("getUTCSeconds",i,0),utcmilliseconds:n("getUTCMilliseconds",i,0),length:n("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:n("toUpperCase",r,0),lower:n("toLowerCase",r,0),substring:n("substring",r),split:n("split",r),trim:n("trim",r,0),regexp:o,test:n("test",o),if:function(s){s.length<3&&J("Missing arguments to if function."),s.length>3&&J("Too many arguments to if function.");const a=s.map(e);return"("+a[0]+"?"+a[1]+":"+a[2]+")"}}}function Mue(e){const t=(e=e||{}).allowed?va(e.allowed):{},n=e.forbidden?va(e.forbidden):{},i=e.constants||xue,r=(e.functions||Aue)(d),o=e.globalvar,s=e.fieldvar,a=it(o)?o:p=>`${o}["${p}"]`;let l={},c={},u=0;function d(p){if(Ce(p))return p;const g=f[p.type];return null==g&&J("Unsupported type: "+p.type),g(p)}const f={Literal:p=>p.raw,Identifier:p=>{const g=p.name;return u>0?g:De(n,g)?J("Illegal identifier: "+g):De(i,g)?i[g]:De(t,g)?g:(l[g]=1,a(g))},MemberExpression:p=>{const g=!p.computed,m=d(p.object);g&&(u+=1);const _=d(p.property);return m===s&&(c[function ZKe(e){const t=e&&e.length-1;return t&&('"'===e[0]&&'"'===e[t]||"'"===e[0]&&"'"===e[t])?e.slice(1,-1):e}(_)]=1),g&&(u-=1),m+(g?"."+_:"["+_+"]")},CallExpression:p=>{"Identifier"!==p.callee.type&&J("Illegal callee type: "+p.callee.type);const g=p.callee.name,m=p.arguments,_=De(r,g)&&r[g];return _||J("Unrecognized function: "+g),it(_)?_(m):_+"("+m.map(d).join(",")+")"},ArrayExpression:p=>"["+p.elements.map(d).join(",")+"]",BinaryExpression:p=>"("+d(p.left)+" "+p.operator+" "+d(p.right)+")",UnaryExpression:p=>"("+p.operator+d(p.argument)+")",ConditionalExpression:p=>"("+d(p.test)+"?"+d(p.consequent)+":"+d(p.alternate)+")",LogicalExpression:p=>"("+d(p.left)+p.operator+d(p.right)+")",ObjectExpression:p=>"{"+p.properties.map(d).join(",")+"}",Property:p=>{u+=1;const g=d(p.key);return u-=1,g+":"+d(p.value)}};function h(p){const g={code:d(p),globals:Object.keys(l),fields:Object.keys(c)};return l={},c={},g}return h.functions=r,h.constants=i,h}var Nue,Iue,N8,I8,k8,_A=new Zi,yA=new Zi,Kl={point:Ji,lineStart:Ji,lineEnd:Ji,polygonStart:function(){_A=new Zi,Kl.lineStart=JKe,Kl.lineEnd=eXe},polygonEnd:function(){var e=+_A;yA.add(e<0?Vr+e:e),this.lineStart=this.lineEnd=this.point=Ji},sphere:function(){yA.add(Vr)}};function JKe(){Kl.point=tXe}function eXe(){kue(Nue,Iue)}function tXe(e,t){Kl.point=kue,Nue=e,Iue=t,N8=e*=dt,I8=je(t=(t*=dt)/2+hx),k8=Re(t)}function kue(e,t){var n=(e*=dt)-N8,i=n>=0?1:-1,r=i*n,o=je(t=(t*=dt)/2+hx),s=Re(t),a=k8*s,l=I8*o+a*je(r),c=a*i*Re(r);_A.add($s(c,l)),N8=e,I8=o,k8=s}var kn,wo,jn,is,Yh,Oue,Rue,x_,Eb,Vd,ou,su={point:O8,lineStart:Pue,lineEnd:Lue,polygonStart:function(){su.point=$ue,su.lineStart=iXe,su.lineEnd=rXe,Eb=new Zi,Kl.polygonStart()},polygonEnd:function(){Kl.polygonEnd(),su.point=O8,su.lineStart=Pue,su.lineEnd=Lue,_A<0?(kn=-(jn=180),wo=-(is=90)):Eb>$e?is=90:Eb<-$e&&(wo=-90),ou[0]=kn,ou[1]=jn},sphere:function(){kn=-(jn=180),wo=-(is=90)}};function O8(e,t){Vd.push(ou=[kn=e,jn=e]),tis&&(is=t)}function Fue(e,t){var n=Ih([e*dt,t*dt]);if(x_){var i=d_(x_,n),o=d_([i[1],-i[0],0],i);Ax(o),o=Sx(o);var c,s=e-Yh,a=s>0?1:-1,l=o[0]*Yn*a,u=vt(s)>180;u^(a*Yhis&&(is=c):u^(a*Yh<(l=(l+360)%360-180)&&lis&&(is=t)),u?ers(kn,jn)&&(jn=e):rs(e,jn)>rs(kn,jn)&&(kn=e):jn>=kn?(ejn&&(jn=e)):e>Yh?rs(kn,e)>rs(kn,jn)&&(jn=e):rs(e,jn)>rs(kn,jn)&&(kn=e)}else Vd.push(ou=[kn=e,jn=e]);tis&&(is=t),x_=n,Yh=e}function Pue(){su.point=Fue}function Lue(){ou[0]=kn,ou[1]=jn,su.point=O8,x_=null}function $ue(e,t){if(x_){var n=e-Yh;Eb.add(vt(n)>180?n+(n>0?360:-360):n)}else Oue=e,Rue=t;Kl.point(e,t),Fue(e,t)}function iXe(){Kl.lineStart()}function rXe(){$ue(Oue,Rue),Kl.lineEnd(),vt(Eb)>$e&&(kn=-(jn=180)),ou[0]=kn,ou[1]=jn,x_=null}function rs(e,t){return(t-=e)<0?t+360:t}function oXe(e,t){return e[0]-t[0]}function Bue(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tt.indexOf(n)>=0):t},R_union:function(e,t){var n=pr(t[0]),i=pr(t[1]);return n>i&&(n=t[1],i=t[0]),e.length?(e[0]>n&&(e[0]=n),e[1]i&&(n=t[1],i=t[0]),e.length?ii&&(e[1]=i),e):[n,i]}};function j8(e,t,n,i){t[0].type!==Hh&&J("First argument to selection functions must be a string literal.");const r=t[0].value,s="unit",a="@"+s,l=":"+r;(t.length>=2&&yt(t).value)===$8&&!De(i,a)&&(i[a]=n.getData(r).indataRef(n,s)),De(i,l)||(i[l]=n.getData(r).tuplesRef())}function Que(e){const t=this.context.data[e];return t?t.values.value:[]}const Tb=e=>function(t,n){const i=this.context.dataflow.locale();return null===t?"null":i[e](n)(t)},FXe=Tb("format"),Zue=Tb("timeFormat"),PXe=Tb("utcFormat"),LXe=Tb("timeParse"),$Xe=Tb("utcParse"),xA=new Date(2e3,0,1);function AA(e,t,n){return Number.isInteger(e)&&Number.isInteger(t)?(xA.setYear(2e3),xA.setMonth(e),xA.setDate(t),Zue.call(this,xA,n)):""}const V8="%",Jue="$";function U8(e,t,n,i){t[0].type!==Hh&&J("First argument to data functions must be a string literal.");const r=t[0].value,o=":"+r;if(!De(o,i))try{i[o]=n.getData(r).tuplesRef()}catch{}}function Jr(e,t,n,i){if(t[0].type===Hh)ede(n,i,t[0].value);else for(e in n.scales)ede(n,i,e)}function ede(e,t,n){const i=V8+n;if(!De(t,i))try{t[i]=e.scaleRef(n)}catch{}}function Ql(e,t){if(it(e))return e;if(Ce(e)){const n=t.scales[e];return n&&function iUe(e){return e&&!0===e[eoe]}(n.value)?n.value:void 0}}function z8(e,t){return function(n,i,r){if(n){const o=Ql(n,(r||this).context);return o&&o.path[e](i)}return t(i)}}const qXe=z8("area",function nXe(e){return yA=new Zi,eu(e,Kl),2*yA}),YXe=z8("bounds",function sXe(e){var t,n,i,r,o,s,a;if(is=jn=-(kn=wo=1/0),Vd=[],eu(e,su),n=Vd.length){for(Vd.sort(oXe),t=1,o=[i=Vd[0]];trs(i[0],i[1])&&(i[1]=r[1]),rs(r[0],i[1])>rs(i[0],i[1])&&(i[0]=r[0])):o.push(i=r);for(s=-1/0,t=0,i=o[n=o.length-1];t<=n;i=r,++t)(a=rs(i[1],(r=o[t])[0]))>s&&(s=a,kn=r[0],jn=i[1])}return Vd=ou=null,kn===1/0||wo===1/0?[[NaN,NaN],[NaN,NaN]]:[[kn,wo],[jn,is]]}),KXe=z8("centroid",function fXe(e){Cb=vA=bA=wA=EA=CA=DA=SA=0,R8=new Zi,F8=new Zi,P8=new Zi,eu(e,Ra);var t=+R8,n=+F8,i=+P8,r=vB(t,n,i);return rnde(e,t)}const rde={};function q8(e){return te(e)||ArrayBuffer.isView(e)?e:null}function Y8(e){return q8(e)||(Ce(e)?e:null)}const ode=e=>e.data;function sde(e,t){const n=Que.call(t,e);return n.root&&n.root.lookup||{}}const ade=()=>typeof window<"u"&&window||null;function lde(e,t,n){if(!e)return[];const[i,r]=e,o=(new li).set(i[0],i[1],r[0],r[1]);return Hse(n||this.context.dataflow.scenegraph().root,o,function MQe(e){let t=null;if(e){const n=Ee(e.marktype),i=Ee(e.markname);t=r=>(!n.length||n.some(o=>r.marktype===o))&&(!i.length||i.some(o=>r.name===o))}return t}(t))}const xb={random:()=>ks(),cumulativeNormal:zS,cumulativeLogNormal:OL,cumulativeUniform:LL,densityNormal:AL,densityLogNormal:kL,densityUniform:PL,quantileNormal:HS,quantileLogNormal:RL,quantileUniform:$L,sampleNormal:US,sampleLogNormal:IL,sampleUniform:FL,isArray:te,isBoolean:td,isDate:nd,isDefined:e=>void 0!==e,isNumber:At,isObject:we,isRegExp:Ree,isString:Ce,isTuple:RS,isValid:e=>null!=e&&e==e,toBoolean:MP,toDate:e=>NP(e),toNumber:pr,toString:IP,indexof:function cQe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i1?t-1:0),i=1;i1?t-1:0),i=1;i1?t-1:0),i=1;iAl(e),inScope:function QXe(e){const t=this.context.group;let n=!1;if(t)for(;e;){if(e===t){n=!0;break}e=e.mark.group}return n},intersect:lde,clampRange:Nee,pinchDistance:function oQe(e){const t=e.touches;return Math.hypot(t[0].clientX-t[1].clientX,t[0].clientY-t[1].clientY)},pinchAngle:function sQe(e){const t=e.touches;return Math.atan2(t[0].clientY-t[1].clientY,t[0].clientX-t[1].clientX)},screen:function TQe(){const e=ade();return e?e.screen:{}},containerSize:function AQe(){const e=this.context.dataflow,t=e.container&&e.container();return t?[t.clientWidth,t.clientHeight]:[void 0,void 0]},windowSize:function xQe(){const e=ade();return e?[e.innerWidth,e.innerHeight]:[void 0,void 0]},bandspace:function pQe(e,t,n){return t$(e||0,t||0,n||0)},setdata:function OXe(e,t){const n=this.context.dataflow;return n.pulse(this.context.data[e].input,n.changeset().remove(Ms).insert(t)),1},pathShape:function CQe(e){let t=null;return function(n){return n?w1(n,t=t||Jm(e)):e}},panLinear:Dee,panLog:See,panPow:Tee,panSymlog:xee,zoomLinear:CP,zoomLog:DP,zoomPow:pS,zoomSymlog:SP,encode:function RXe(e,t,n){if(e){const i=this.context.dataflow;i.pulse(e.mark.source,i.changeset().encode(e,t))}return void 0!==n?n:e},modify:function rQe(e,t,n,i,r,o){const s=this.context.dataflow,a=this.context.data[e],l=a.input,c=s.stamp();let d,f,u=a.changes;if(!1===s._trigger||!(l.value.length||t||i))return 0;if((!u||u.stamp{a.modified=!0,s.pulse(l,u).run()},!0,1)),n&&(d=!0===n?Ms:te(n)||RS(n)?n:ide(n),u.remove(d)),t&&u.insert(t),i&&(d=ide(i),l.value.some(d)?u.remove(d):u.insert(i)),r)for(f in o)u.modify(r,f,o[f]);return 1},lassoAppend:function NQe(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5;const r=(e=Ee(e))[e.length-1];return void 0===r||Math.hypot(r[0]-t,r[1]-n)>i?[...e,[t,n]]:e},lassoPath:function IQe(e){return Ee(e).reduce((t,n,i)=>{let[r,o]=n;return t+(0==i?`M ${r},${o} `:i===e.length-1?" Z":`L ${r},${o} `)},"")},intersectLasso:function kQe(e,t,n){const{x:i,y:r,mark:o}=n,s=(new li).set(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,Number.MIN_SAFE_INTEGER,Number.MIN_SAFE_INTEGER);for(const[l,c]of t)ls.x2&&(s.x2=l),cs.y2&&(s.y2=c);return s.translate(i,r),lde([[s.x1,s.y1],[s.x2,s.y2]],e,o).filter(l=>function OQe(e,t,n){let i=0;for(let r=0,o=n.length-1;rt!=a>t&&e<(s-l)*(t-c)/(a-c)+l&&i++}return 1&i}(l.x,l.y,t))}},RQe=["view","item","group","xy","x","y"],cde="this.",K8={},ude={forbidden:["_"],allowed:["datum","event","item"],fieldvar:"datum",globalvar:e=>`_[${ge(Jue+e)}]`,functions:function PQe(e){const t=Aue(e);RQe.forEach(n=>t[n]="event.vega."+n);for(const n in xb)t[n]=cde+n;return rt(t,function WXe(e,t,n){t.__bandwidth=r=>r&&r.bandwidth?r.bandwidth():0,n._bandwidth=Jr,n._range=Jr,n._scale=Jr;const i=r=>"_["+(r.type===Hh?ge(V8+r.value):ge(V8)+"+"+e(r))+"]";return{_bandwidth:r=>`this.__bandwidth(${i(r[0])})`,_range:r=>`${i(r[0])}.range()`,_scale:r=>`${i(r[0])}(${e(r[1])})`}}(e,xb,K8)),t},constants:xue,visitors:K8},X8=Mue(ude);function Kn(e,t,n){return 1===arguments.length?xb[e]:(xb[e]=t,n&&(K8[e]=n),X8&&(X8.functions[e]=cde+e),this)}function Zl(e,t){const n={};let i;try{i=M8(e=Ce(e)?e:ge(e)+"")}catch{J("Expression parse error: "+e)}i.visit(o=>{if(o.type!==hue)return;const s=o.callee.name,a=ude.visitors[s];a&&a(s,o.arguments,t,n)});const r=X8(i);return r.globals.forEach(o=>{const s=Jue+o;!De(n,s)&&t.getSignal(o)&&(n[s]=t.signalRef(o))}),{$expr:rt({code:r.code},t.options.ast?{ast:i}:null),$fields:r.fields,$params:n}}Kn("bandwidth",function gQe(e,t){const n=Ql(e,(t||this).context);return n&&n.bandwidth?n.bandwidth():0},Jr),Kn("copy",function mQe(e,t){const n=Ql(e,(t||this).context);return n?n.copy():void 0},Jr),Kn("domain",function _Qe(e,t){const n=Ql(e,(t||this).context);return n?n.domain():[]},Jr),Kn("range",function vQe(e,t){const n=Ql(e,(t||this).context);return n&&n.range?n.range():[]},Jr),Kn("invert",function yQe(e,t,n){const i=Ql(e,(n||this).context);return i?te(t)?(i.invertRange||i.invert)(t):(i.invert||i.invertExtent)(t):void 0},Jr),Kn("scale",function bQe(e,t,n){const i=Ql(e,(n||this).context);return i?i(t):void 0},Jr),Kn("gradient",function wQe(e,t,n,i,r){e=Ql(e,(r||this).context);const o=Coe(t,n);let s=e.domain(),a=s[0],l=yt(s),c=hr;return l-a?c=loe(e,a,l):e=(e.interpolator?Nt("sequential")().interpolator(e.interpolator()):Nt("linear")().interpolate(e.interpolate()).range(e.range())).domain([a=0,l=1]),e.ticks&&(s=e.ticks(+i||15),a!==s[0]&&s.unshift(a),l!==yt(s)&&s.push(l)),s.forEach(u=>o.stop(c(u),e(u))),o},Jr),Kn("geoArea",qXe,Jr),Kn("geoBounds",YXe,Jr),Kn("geoCentroid",KXe,Jr),Kn("geoShape",function EQe(e,t,n){const i=Ql(e,(n||this).context);return function(r){return i?i.path.context(r)(t):""}},Jr),Kn("geoScale",function XXe(e,t){const n=Ql(e,(t||this).context);return n&&n.scale()},Jr),Kn("indata",function kXe(e,t,n){const i=this.context.data[e]["index:"+t],r=i?i.value.get(n):void 0;return r&&r.count},function GXe(e,t,n,i){t[0].type!==Hh&&J("First argument to indata must be a string literal."),t[1].type!==Hh&&J("Second argument to indata must be a string literal.");const r=t[0].value,o=t[1].value,s="@"+o;De(s,i)||(i[s]=n.getData(r).indataRef(n,o))}),Kn("data",Que,U8),Kn("treePath",function DQe(e,t,n){const i=sde(e,this),r=i[t],o=i[n];return r&&o?r.path(o).map(ode):void 0},U8),Kn("treeAncestors",function SQe(e,t){const n=sde(e,this)[t];return n?n.ancestors().map(ode):void 0},U8),Kn("vlSelectionTest",function DXe(e,t,n){for(var c,u,d,f,h,i=this.context.data[e],r=i?i.values.value:[],o=i?i[TA]&&i[TA].value:void 0,s=n===$8,a=r.length,l=0;l(E[u[M].field]=D,E),{}))}else h=Xl,p=Sb(c),(m=(g=s[h]||(s[h]={}))[f]||(g[f]=[])).push(p),n&&(m=a[f]||(a[f]=[])).push({[Xl]:p});return t=t||"union",s[Xl]?s[Xl]=B8[`${Xl}_${t}`](...Object.values(s[Xl])):Object.keys(s).forEach(E=>{s[E]=Object.keys(s[E]).map(D=>s[E][D]).reduce((D,M)=>void 0===D?M:B8[`${l[E]}_${t}`](D,M))}),o=Object.keys(a),n&&o.length&&(s[i?"vlPoint":"vlMulti"]="union"===t?{[Yue]:o.reduce((D,M)=>(D.push(...a[M]),D),[])}:{[yXe]:o.map(D=>({[Yue]:a[D]}))}),s},j8),Kn("vlSelectionTuples",function AXe(e,t){return e.map(n=>rt(t.fields?{values:t.fields.map(i=>Wue(i)(n.datum))}:{[Xl]:Sb(n.datum)},t))});const $Qe=va(["rule"]),dde=va(["group","image","rect"]);function Q8(e){return(e+"").toLowerCase()}function Ab(e,t,n){n.endsWith(";")||(n="return("+n+");");const i=Function(...t.concat(n));return e&&e.functions?i.bind(e.functions):i}var zQe={operator:(e,t)=>Ab(e,["_"],t.code),parameter:(e,t)=>Ab(e,["datum","_"],t.code),event:(e,t)=>Ab(e,["event"],t.code),handler:(e,t)=>Ab(e,["_","event"],`var datum=event.item&&event.item.datum;return ${t.code};`),encode:(e,t)=>{const{marktype:n,channels:i}=t;let r="var o=item,datum=o.datum,m=0,$;";for(const o in i){const s="o["+ge(o)+"]";r+=`$=${i[o].code};if(${s}!==$)${s}=$,m=1;`}return r+=function BQe(e,t){let n="";return $Qe[t]||(e.x2&&(e.x?(dde[t]&&(n+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),n+="o.width=o.x2-o.x;"):n+="o.x=o.x2-(o.width||0);"),e.xc&&(n+="o.x=o.xc-(o.width||0)/2;"),e.y2&&(e.y?(dde[t]&&(n+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),n+="o.height=o.y2-o.y;"):n+="o.y=o.y2-(o.height||0);"),e.yc&&(n+="o.y=o.yc-(o.height||0)/2;")),n}(i,n),r+="return m;",Ab(e,["item","_"],r)},codegen:{get(e){const t=`[${e.map(ge).join("][")}]`,n=Function("_",`return _${t};`);return n.path=t,n},comparator(e,t){let n;const r=Function("a","b","var u, v; return "+e.map((o,s)=>{const a=t[s];let l,c;return o.path?(l=`a${o.path}`,c=`b${o.path}`):((n=n||{})["f"+s]=o,l=`this.f${s}(a)`,c=`this.f${s}(b)`),function UQe(e,t,n,i){return`((u = ${e}) < (v = ${t}) || u == null) && v != null ? ${n}\n : (u > v || v == null) && u != null ? ${i}\n : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ${n}\n : v !== v && u === u ? ${i} : `}(l,c,-a,a)}).join("")+"0;");return n?r.bind(n):r}}};function fde(e,t,n){if(!e||!we(e))return e;for(let o,i=0,r=hde.length;ir&&r.$tupleid?Fe:r);return t.fn[n]||(t.fn[n]=TP(i,e.$order,t.expr.codegen))}},{key:"$context",parse:function JQe(e,t){return t}},{key:"$subflow",parse:function eZe(e,t){const n=e.$subflow;return function(i,r,o){const s=t.fork().parse(n),a=s.get(n.operators[0].id),l=s.signals.parent;return l&&l.set(o),a.detachSubflow=()=>t.detach(s),a}}},{key:"$tupleid",parse:function tZe(){return Fe}}];const rZe={skip:!0};function pde(e,t,n,i){return new gde(e,t,n,i)}function gde(e,t,n,i){this.dataflow=e,this.transforms=t,this.events=e.events.bind(e),this.expr=i||zQe,this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},n&&(this.functions=Object.create(n),this.functions.context=this)}function mde(e){this.dataflow=e.dataflow,this.transforms=e.transforms,this.events=e.events,this.expr=e.expr,this.signals=Object.create(e.signals),this.scales=Object.create(e.scales),this.nodes=Object.create(e.nodes),this.data=Object.create(e.data),this.fn=Object.create(e.fn),e.functions&&(this.functions=Object.create(e.functions),this.functions.context=this)}function _de(e,t){e&&(null==t?e.removeAttribute("aria-label"):e.setAttribute("aria-label",t))}gde.prototype=mde.prototype={fork(){const e=new mde(this);return(this.subcontext||(this.subcontext=[])).push(e),e},detach(e){this.subcontext=this.subcontext.filter(n=>n!==e);const t=Object.keys(e.nodes);for(const n of t)e.nodes[n]._targets=null;for(const n of t)e.nodes[n].detach();e.nodes=null},get(e){return this.nodes[e]},set(e,t){return this.nodes[e]=t},add(e,t){const n=this,i=n.dataflow,r=e.value;if(n.set(e.id,t),function VQe(e){return"collect"===Q8(e)}(e.type)&&r&&(r.$ingest?i.ingest(t,r.$ingest,r.$format):r.$request?i.preload(t,r.$request,r.$format):i.pulse(t,i.changeset().insert(r))),e.root&&(n.root=t),e.parent){let o=n.get(e.parent.$ref);o?(i.connect(o,[t]),t.targets().add(o)):(n.unresolved=n.unresolved||[]).push(()=>{o=n.get(e.parent.$ref),i.connect(o,[t]),t.targets().add(o)})}if(e.signal&&(n.signals[e.signal]=t),e.scale&&(n.scales[e.scale]=t),e.data)for(const o in e.data){const s=n.data[o]||(n.data[o]={});e.data[o].forEach(a=>s[a]=t)}},resolve(){return(this.unresolved||[]).forEach(e=>e()),delete this.unresolved,this},operator(e,t){this.add(e,this.dataflow.add(e.value,t))},transform(e,t){this.add(e,this.dataflow.add(this.transforms[Q8(t)]))},stream(e,t){this.set(e.id,t)},update(e,t,n,i,r){this.dataflow.on(t,n,i,r,e.options)},operatorExpression(e){return this.expr.operator(this,e)},parameterExpression(e){return this.expr.parameter(this,e)},eventExpression(e){return this.expr.event(this,e)},handlerExpression(e){return this.expr.handler(this,e)},encodeExpression(e){return this.expr.encode(this,e)},parse:function LQe(e){const t=this,n=e.operators||[];return e.background&&(t.background=e.background),e.eventConfig&&(t.eventConfig=e.eventConfig),e.locale&&(t.locale=e.locale),n.forEach(i=>t.parseOperator(i)),n.forEach(i=>t.parseOperatorParameters(i)),(e.streams||[]).forEach(i=>t.parseStream(i)),(e.updates||[]).forEach(i=>t.parseUpdate(i)),t.resolve()},parseOperator:function HQe(e){const t=this;!function jQe(e){return"operator"===Q8(e)}(e.type)&&e.type?t.transform(e,e.type):t.operator(e,e.update?t.operatorExpression(e.update):null)},parseOperatorParameters:function GQe(e){const t=this;if(e.params){const n=t.get(e.id);n||J("Invalid operator id: "+e.id),t.dataflow.connect(n,n.parameters(t.parseParameters(e.params),e.react,e.initonly))}},parseParameters:function WQe(e,t){t=t||{};const n=this;for(const i in e){const r=e[i];t[i]=te(r)?r.map(o=>fde(o,n,t)):fde(r,n,t)}return t},parseStream:function nZe(e){var r,t=this,n=null!=e.filter?t.eventExpression(e.filter):void 0,i=null!=e.stream?t.get(e.stream):void 0;e.source?i=t.events(e.source,e.type,n):e.merge&&(i=(r=e.merge.map(o=>t.get(o)))[0].merge.apply(r[0],r.slice(1))),e.between&&(r=e.between.map(o=>t.get(o)),i=i.between(r[0],r[1])),e.filter&&(i=i.filter(n)),null!=e.throttle&&(i=i.throttle(+e.throttle)),null!=e.debounce&&(i=i.debounce(+e.debounce)),null==i&&J("Invalid stream definition: "+JSON.stringify(e)),e.consume&&i.consume(!0),t.stream(e,i)},parseUpdate:function iZe(e){var r,t=this,n=we(n=e.source)?n.$ref:n,i=t.get(n),o=e.update,s=void 0;i||J("Source not defined: "+e.source),r=e.target&&e.target.$expr?t.eventExpression(e.target.$expr):t.get(e.target),o&&o.$expr&&(o.$params&&(s=t.parseParameters(o.$params)),o=t.handlerExpression(o.$expr)),t.update(e,i,r,o,s)},getState:function oZe(e){var t=this,n={};if(e.signals){var i=n.signals={};Object.keys(t.signals).forEach(o=>{const s=t.signals[o];e.signals(o,s)&&(i[o]=s.value)})}if(e.data){var r=n.data={};Object.keys(t.data).forEach(o=>{const s=t.data[o];e.data(o,s)&&(r[o]=s.input.value)})}return t.subcontext&&!1!==e.recurse&&(n.subcontext=t.subcontext.map(o=>o.getState(e))),n},setState:function sZe(e){var t=this,n=t.dataflow,i=e.data,r=e.signals;Object.keys(r||{}).forEach(o=>{n.update(t.signals[o],r[o],rZe)}),Object.keys(i||{}).forEach(o=>{n.pulse(t.data[o].input,n.changeset().remove(Ms).insert(i[o]))}),(e.subcontext||[]).forEach((o,s)=>{const a=t.subcontext[s];a&&a.setState(o)})}};const Z8="default";function J8(e,t){const n=e.globalCursor()?typeof document<"u"&&document.body:e.container();if(n)return null==t?n.style.removeProperty("cursor"):n.style.cursor=t}function MA(e,t){var n=e._runtime.data;return De(n,t)||J("Unrecognized data set: "+t),n[t]}function NA(e,t){sne(t)||J("Second argument to changes must be a changeset.");const n=MA(this,e);return n.modified=!0,this.pulse(n.input,t)}function yde(e){var t=e.padding();return Math.max(0,e._viewWidth+t.left+t.right)}function vde(e){var t=e.padding();return Math.max(0,e._viewHeight+t.top+t.bottom)}function IA(e){var t=e.padding(),n=e._origin;return[t.left+n[0],t.top+n[1]]}const vZe={trap:!1};function wde(e,t,n,i){e._eventListeners.push({type:n,sources:Ee(t),handler:i})}function kA(e,t,n){const i=e._eventConfig&&e._eventConfig[t];return!(!1===i||we(i)&&!i[n])||(e.warn(`Blocked ${t} ${n} event listener.`),!1)}function Ede(e){return e.item}function Cde(e){return e.item.mark.source}function Dde(e){return function(t,n){return n.vega.view().changeset().encode(n.item,e)}}function os(e,t,n){const i=document.createElement(e);for(const r in t)i.setAttribute(r,t[r]);return null!=n&&(i.textContent=n),i}const SZe="vega-bind",TZe="vega-bind-name",xZe="vega-bind-radio";function AZe(e,t,n){if(!t)return;const i=n.param;let r=n.state;return r||(r=n.state={elements:null,active:!1,set:null,update:s=>{s!=e.signal(i.signal)&&e.runAsync(null,()=>{r.source=!0,e.signal(i.signal,s)})}},i.debounce&&(r.update=xP(i.debounce,r.update))),(null==i.input&&i.element?MZe:IZe)(r,t,i,e),r.active||(e.on(e._signals[i.signal],null,()=>{r.source?r.source=!1:r.set(e.signal(i.signal))}),r.active=!0),r}function MZe(e,t,n,i){const r=n.event||"input",o=()=>e.update(t.value);i.signal(n.signal,t.value),t.addEventListener(r,o),wde(i,t,r,o),e.set=s=>{t.value=s,t.dispatchEvent(function NZe(e){return typeof Event<"u"?new Event(e):{type:e}}(r))}}function IZe(e,t,n,i){const r=i.signal(n.signal),o=os("div",{class:SZe}),s="radio"===n.input?o:o.appendChild(os("label"));s.appendChild(os("span",{class:TZe},n.name||n.signal)),t.appendChild(o);let a=kZe;switch(n.input){case"checkbox":a=OZe;break;case"select":a=RZe;break;case"radio":a=FZe;break;case"range":a=PZe}a(e,s,n,r)}function kZe(e,t,n,i){const r=os("input");for(const o in n)"signal"!==o&&"element"!==o&&r.setAttribute("input"===o?"type":o,n[o]);r.setAttribute("name",n.signal),r.value=i,t.appendChild(r),r.addEventListener("input",()=>e.update(r.value)),e.elements=[r],e.set=o=>r.value=o}function OZe(e,t,n,i){const r={type:"checkbox",name:n.signal};i&&(r.checked=!0);const o=os("input",r);t.appendChild(o),o.addEventListener("change",()=>e.update(o.checked)),e.elements=[o],e.set=s=>o.checked=!!s||null}function RZe(e,t,n,i){const r=os("select",{name:n.signal}),o=n.labels||[];n.options.forEach((s,a)=>{const l={value:s};OA(s,i)&&(l.selected=!0),r.appendChild(os("option",l,(o[a]||s)+""))}),t.appendChild(r),r.addEventListener("change",()=>{e.update(n.options[r.selectedIndex])}),e.elements=[r],e.set=s=>{for(let a=0,l=n.options.length;a{const l={type:"radio",name:n.signal,value:s};OA(s,i)&&(l.checked=!0);const c=os("input",l);c.addEventListener("change",()=>e.update(s));const u=os("label",{},(o[a]||s)+"");return u.prepend(c),r.appendChild(u),c}),e.set=s=>{const a=e.elements,l=a.length;for(let c=0;c{l.textContent=a.value,e.update(+a.value)};a.addEventListener("input",c),a.addEventListener("change",c),e.elements=[a],e.set=u=>{a.value=u,l.textContent=u}}function OA(e,t){return e===t||e+""==t+""}function Sde(e,t,n,i,r,o){return(t=t||new i(e.loader())).initialize(n,yde(e),vde(e),IA(e),r,o).background(e.background())}function e4(e,t){return t?function(){try{t.apply(this,arguments)}catch(n){e.error(n)}}:null}function t4(e,t,n){if("string"==typeof t){if(!(typeof document<"u"))return e.error("DOM document instance not found."),null;if(!(t=document.querySelector(t)))return e.error("Signal bind element not found: "+t),null}if(t&&n)try{t.textContent=""}catch(i){t=null,e.error(i)}return t}const Mb=e=>+e||0;function Tde(e){return we(e)?{top:Mb(e.top),bottom:Mb(e.bottom),left:Mb(e.left),right:Mb(e.right)}:(e=>({top:e,bottom:e,left:e,right:e}))(Mb(e))}function n4(e,t,n,i){return i4.apply(this,arguments)}function i4(){return(i4=qn(function*(e,t,n,i){const r=ox(t),o=r&&r.headless;return o||J("Unrecognized renderer type: "+t),yield e.runAsync(),Sde(e,null,null,o,n,i).renderAsync(e._scenegraph.root)})).apply(this,arguments)}function r4(){return(r4=qn(function*(e,t){e!==Td.Canvas&&e!==Td.SVG&&e!==Td.PNG&&J("Unrecognized image type: "+e);const n=yield n4(this,e,t);return e===Td.SVG?function VZe(e,t){const n=new Blob([e],{type:t});return window.URL.createObjectURL(n)}(n.svg(),"image/svg+xml"):n.canvas().toDataURL("image/png")})).apply(this,arguments)}function o4(){return(o4=qn(function*(e,t){return(yield n4(this,Td.Canvas,e,t)).canvas()})).apply(this,arguments)}function s4(){return(s4=qn(function*(e){return(yield n4(this,Td.SVG,e)).svg()})).apply(this,arguments)}var xde="width",Ade="height",a4="padding",Mde={skip:!0};function Nde(e,t){var n=e.autosize(),i=e.padding();return t-(n&&n.contains===a4?i.left+i.right:0)}function Ide(e,t){var n=e.autosize(),i=e.padding();return t-(n&&n.contains===a4?i.top+i.bottom:0)}function KZe(e,t){return t.modified&&te(t.input.value)&&!e.startsWith("_:vega:_")}function XZe(e,t){return!("parent"===e||t instanceof Um.proxy)}function JZe(e,t,n,i){const r=e.element();r&&r.setAttribute("title",function eJe(e){return null==e?"":te(e)?kde(e):we(e)&&!nd(e)?function tJe(e){return Object.keys(e).map(t=>{const n=e[t];return t+": "+(te(n)?kde(n):Ode(n))}).join("\n")}(e):e+""}(i))}function kde(e){return"["+e.map(Ode).join(", ")+"]"}function Ode(e){return te(e)?"[\u2026]":we(e)&&!nd(e)?"{\u2026}":e}function Rde(e,t){const n=this;if(t=t||{},Vm.call(n),t.loader&&n.loader(t.loader),t.logger&&n.logger(t.logger),null!=t.logLevel&&n.logLevel(t.logLevel),t.locale||e.locale){const o=rt({},e.locale,t.locale);n.locale(Yte(o.number,o.time))}n._el=null,n._elBind=null,n._renderType=t.renderer||Td.Canvas,n._scenegraph=new ase;const i=n._scenegraph.root;n._renderer=null,n._tooltip=t.tooltip||JZe,n._redraw=!0,n._handler=(new F1).scene(i),n._globalCursor=!1,n._preventDefault=!1,n._timers=[],n._eventListeners=[],n._resizeListeners=[],n._eventConfig=function bZe(e){const t=rt({defaults:{}},e),n=(i,r)=>{r.forEach(o=>{te(i[o])&&(i[o]=va(i[o]))})};return n(t.defaults,["prevent","allow"]),n(t,["view","window","selector"]),t}(e.eventConfig),n.globalCursor(n._eventConfig.globalCursor);const r=function HZe(e,t,n){return pde(e,Um,xb,n).parse(t)}(n,e,t.expr);n._runtime=r,n._signals=r.signals,n._bind=(e.bindings||[]).map(o=>({state:null,param:rt({},o)})),r.root&&r.root.set(i),i.source=r.data.root.input,n.pulse(r.data.root.input,n.changeset().insert(i.items)),n._width=n.width(),n._height=n.height(),n._viewWidth=Nde(n,n._width),n._viewHeight=Ide(n,n._height),n._origin=[0,0],n._resize=0,n._autosize=1,function WZe(e){var t=e._signals,n=t[xde],i=t[Ade],r=t[a4];function o(){e._autosize=e._resize=1}e._resizeWidth=e.add(null,a=>{e._width=a.size,e._viewWidth=Nde(e,a.size),o()},{size:n}),e._resizeHeight=e.add(null,a=>{e._height=a.size,e._viewHeight=Ide(e,a.size),o()},{size:i});const s=e.add(null,o,{pad:r});e._resizeWidth.rank=n.rank+1,e._resizeHeight.rank=i.rank+1,s.rank=r.rank+1}(n),function cZe(e){e.add(null,t=>(e._background=t.bg,e._resize=1,t.bg),{bg:e._signals.background})}(n),function uZe(e){const t=e._signals.cursor||(e._signals.cursor=e.add({user:Z8,item:null}));e.on(e.events("view","pointermove"),t,(n,i)=>{const r=t.value,o=r?Ce(r)?r:r.user:Z8,s=i.item&&i.item.cursor||null;return r&&o===r.user&&s==r.item?r:{user:o,item:s}}),e.add(null,function(n){let i=n.cursor,r=this.value;return Ce(i)||(r=i.item,i=i.user),J8(e,i&&i!==Z8?i:r||i),r},{cursor:t})}(n),n.description(e.description),t.hover&&n.hover(),t.container&&n.initialize(t.container,t.bind),t.watchPixelRatio&&n._watchPixelRatio()}function RA(e,t){return De(e._signals,t)?e._signals[t]:J("Unrecognized signal name: "+ge(t))}function Fde(e,t){const n=(e._targets||[]).filter(i=>i._update&&i._update.handler===t);return n.length?n[0]:null}function Pde(e,t,n,i){let r=Fde(n,i);return r||(r=e4(e,()=>i(t,n.value)),r.handler=i,e.on(n,null,r)),e}function Lde(e,t,n){const i=Fde(t,n);return i&&t._targets.remove(i),e}me(Rde,Vm,{evaluate(e,t,n){var i=this;return qn(function*(){if(yield Vm.prototype.evaluate.call(i,e,t),i._redraw||i._resize)try{i._renderer&&(i._resize&&(i._resize=0,function pZe(e){var t=IA(e),n=yde(e),i=vde(e);e._renderer.background(e.background()),e._renderer.resize(n,i,t),e._handler.origin(t),e._resizeListeners.forEach(r=>{try{r(n,i)}catch(o){e.error(o)}})}(i)),yield i._renderer.renderAsync(i._scenegraph.root)),i._redraw=!1}catch(r){i.error(r)}return n&&OS(i,n),i})()},dirty(e){this._redraw=!0,this._renderer&&this._renderer.dirty(e)},description(e){if(arguments.length){const t=null!=e?e+"":null;return t!==this._desc&&_de(this._el,this._desc=t),this}return this._desc},container(){return this._el},scenegraph(){return this._scenegraph},origin(){return this._origin.slice()},signal(e,t,n){const i=RA(this,e);return 1===arguments.length?i.value:this.update(i,t,n)},width(e){return arguments.length?this.signal("width",e):this.signal("width")},height(e){return arguments.length?this.signal("height",e):this.signal("height")},padding(e){return arguments.length?this.signal("padding",Tde(e)):Tde(this.signal("padding"))},autosize(e){return arguments.length?this.signal("autosize",e):this.signal("autosize")},background(e){return arguments.length?this.signal("background",e):this.signal("background")},renderer(e){return arguments.length?(ox(e)||J("Unrecognized renderer type: "+e),e!==this._renderType&&(this._renderType=e,this._resetRenderer()),this):this._renderType},tooltip(e){return arguments.length?(e!==this._tooltip&&(this._tooltip=e,this._resetRenderer()),this):this._tooltip},loader(e){return arguments.length?(e!==this._loader&&(Vm.prototype.loader.call(this,e),this._resetRenderer()),this):this._loader},resize(){return this._autosize=1,this.touch(RA(this,"autosize"))},_resetRenderer(){this._renderer&&(this._renderer=null,this.initialize(this._el,this._elBind))},_resizeView:function qZe(e,t,n,i,r,o){this.runAfter(s=>{let a=0;s._autosize=0,s.width()!==n&&(a=1,s.signal(xde,n,Mde),s._resizeWidth.skip(!0)),s.height()!==i&&(a=1,s.signal(Ade,i,Mde),s._resizeHeight.skip(!0)),s._viewWidth!==e&&(s._resize=1,s._viewWidth=e),s._viewHeight!==t&&(s._resize=1,s._viewHeight=t),(s._origin[0]!==r[0]||s._origin[1]!==r[1])&&(s._resize=1,s._origin=r),a&&s.run("enter"),o&&s.runAfter(l=>l.resize())},!1,1)},addEventListener(e,t,n){let i=t;return n&&!1===n.trap||(i=e4(this,t),i.raw=t),this._handler.on(e,i),this},removeEventListener(e,t){for(var r,o,n=this._handler.handlers(e),i=n.length;--i>=0;)if(r=n[i].handler,e===(o=n[i].type)&&(t===r||t===r.raw)){this._handler.off(o,r);break}return this},addResizeListener(e){const t=this._resizeListeners;return t.includes(e)||t.push(e),this},removeResizeListener(e){var t=this._resizeListeners,n=t.indexOf(e);return n>=0&&t.splice(n,1),this},addSignalListener(e,t){return Pde(this,e,RA(this,e),t)},removeSignalListener(e,t){return Lde(this,RA(this,e),t)},addDataListener(e,t){return Pde(this,e,MA(this,e).values,t)},removeDataListener(e,t){return Lde(this,MA(this,e).values,t)},globalCursor(e){if(arguments.length){if(this._globalCursor!==!!e){const t=J8(this,null);this._globalCursor=!!e,t&&J8(this,t)}return this}return this._globalCursor},preventDefault(e){return arguments.length?(this._preventDefault=e,this):this._preventDefault},timer:function ZZe(e,t){this._timers.push(function aZe(e,t,n){var i=new zx,r=t;return null==t?(i.restart(e,t,n),i):(i._restart=i.restart,i.restart=function(o,s,a){s=+s,a=null==a?s5():+a,i._restart(function l(c){c+=r,i._restart(l,r+=s,a),o(c)},s,a)},i.restart(e,t,n),i)}(function n(i){e({timestamp:Date.now(),elapsed:i})},t))},events:function EZe(e,t,n){var s,i=this,r=new $S(n),o=function(c,u){i.runAsync(null,()=>{"view"===e&&function wZe(e,t){var n=e._eventConfig.defaults,i=n.prevent,r=n.allow;return!1!==i&&!0!==r&&(!0===i||!1===r||(i?i[t]:r?!r[t]:e.preventDefault()))}(i,t)&&c.preventDefault(),r.receive(function gZe(e,t,n){var o,a,i=e._renderer,r=i&&i.canvas();return r&&(a=IA(e),(o=WT(t.changedTouches?t.changedTouches[0]:t,r))[0]-=a[0],o[1]-=a[1]),t.dataflow=e,t.item=n,t.vega=function mZe(e,t,n){const i=t?"group"===t.mark.marktype?t:t.mark.group:null;function r(s){var l,a=i;if(s)for(l=t;l;l=l.mark.group)if(l.mark.name===s){a=l;break}return a&&a.mark&&a.mark.interactive?a:{}}function o(s){if(!s)return n;Ce(s)&&(s=r(s));const a=n.slice();for(;s;)a[0]-=s.x||0,a[1]-=s.y||0,s=s.mark&&s.mark.group;return a}return{view:gr(e),item:gr(t||{}),group:r,xy:o,x:s=>o(s)[0],y:s=>o(s)[1]}}(e,n,o),t}(i,c,u))})};if("timer"===e)kA(i,"timer",t)&&i.timer(o,t);else if("view"===e)kA(i,"view",t)&&i.addEventListener(t,o,vZe);else if("window"===e?kA(i,"window",t)&&typeof window<"u"&&(s=[window]):typeof document<"u"&&kA(i,"selector",t)&&(s=Array.from(document.querySelectorAll(e))),s){for(var a=0,l=s.length;a=0;)t[r].stop();for(r=i.length;--r>=0;)for(o=(s=i[r]).sources.length;--o>=0;)s.sources[o].removeEventListener(s.type,s.handler);for(e&&e.call(this,this._handler,null,null,null),r=n.length;--r>=0;)this._handler.off(n[r].type,n[r].handler);return this},hover:function CZe(e,t){return t=[t||"update",(e=[e||"hover"])[0]],this.on(this.events("view","pointerover",Ede),Cde,Dde(e)),this.on(this.events("view","pointerout",Ede),Cde,Dde(t)),this},data:function dZe(e,t){return arguments.length<2?MA(this,e).values.value:NA.call(this,e,hh().remove(Ms).insert(t))},change:NA,insert:function fZe(e,t){return NA.call(this,e,hh().insert(t))},remove:function hZe(e,t){return NA.call(this,e,hh().remove(t))},scale:function GZe(e){var t=this._runtime.scales;return De(t,e)||J("Unrecognized scale or projection: "+e),t[e].value},initialize:function $Ze(e,t){const n=this,i=n._renderType,r=n._eventConfig.bind,o=ox(i);e=n._el=e?t4(n,e,!0):null,function lZe(e){const t=e.container();t&&(t.setAttribute("role","graphics-document"),t.setAttribute("aria-roleDescription","visualization"),_de(t,e.description()))}(n),o||n.error("Unrecognized renderer type: "+i);const s=o.handler||F1,a=e?o.renderer:o.headless;return n._renderer=a?Sde(n,n._renderer,e,a):null,n._handler=function LZe(e,t,n,i){const r=new i(e.loader(),e4(e,e.tooltip())).scene(e.scenegraph().root).initialize(n,IA(e),e);return t&&t.handlers().forEach(o=>{r.on(o.type,o.handler)}),r}(n,n._handler,e,s),n._redraw=!0,e&&"none"!==r&&(t=t?n._elBind=t4(n,t,!0):e.appendChild(os("form",{class:"vega-bindings"})),n._bind.forEach(l=>{l.param.element&&"container"!==r&&(l.element=t4(n,l.param.element,!!l.param.input))}),n._bind.forEach(l=>{AZe(n,l.element||t,l)})),n},toImageURL:function jZe(e,t){return r4.apply(this,arguments)},toCanvas:function UZe(e,t){return o4.apply(this,arguments)},toSVG:function zZe(e){return s4.apply(this,arguments)},getState:function YZe(e){return this._runtime.getState(e||{data:KZe,signals:XZe,recurse:!0})},setState:function QZe(e){return this.runAsync(null,t=>{t._trigger=!1,t._runtime.setState(e)},t=>{t._trigger=!0}),this},_watchPixelRatio:function nJe(){if("canvas"===this.renderer()&&this._renderer._canvas){let e=null;const t=()=>{e?.();const n=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);n.addEventListener("change",t),e=()=>{n.removeEventListener("change",t)},this._renderer._canvas.getContext("2d").pixelRatio=window.devicePixelRatio||1,this._redraw=!0,this._resize=1,this.resize().runAsync()};t()}}});const iJe="view",FA="[",PA="]",$de="{",Bde="}",rJe=":",jde=",",oJe="@",sJe=">",aJe=/[[\]{}]/,lJe={"*":1,arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1};let Vde,Ude;function Ud(e,t,n){return Vde=t||iJe,Ude=n||lJe,zde(e.trim()).map(l4)}function Nb(e,t,n,i,r){const o=e.length;let a,s=0;for(;t=0?--s:i&&i.indexOf(a)>=0&&++s}return t}function zde(e){const t=[],n=e.length;let i=0,r=0;for(;r' after between selector: "+e;i=i.map(l4);const r=l4(e.slice(1).trim());return r.between?{between:i,stream:r}:(r.between=i,r)}(e):function dJe(e){const t={source:Vde},n=[];let l,c,i=[0,0],r=0,o=0,s=e.length,a=0;if(e[s-1]===Bde){if(a=e.lastIndexOf($de),!(a>=0))throw"Unmatched right brace: "+e;try{i=function fJe(e){const t=e.split(jde);if(!e.length||t.length>2)throw e;return t.map(n=>{const i=+n;if(i!=i)throw e;return i})}(e.substring(a+1,s-1))}catch{throw"Invalid throttle specification: "+e}s=(e=e.slice(0,a).trim()).length,a=0}if(!s)throw e;if(e[0]===oJe&&(r=++a),l=Nb(e,a,rJe),l1?(t.type=n[1],r?t.markname=n[0].slice(1):function cJe(e){return Ude[e]}(n[0])?t.marktype=n[0]:t.source=n[0]):t.type=n[0],"!"===t.type.slice(-1)&&(t.consume=!0,t.type=t.type.slice(0,-1)),null!=c&&(t.filter=c),i[0]&&(t.throttle=i[0]),i[1]&&(t.debounce=i[1]),t}(e)}function hJe(e){return we(e)?e:{type:e||"pad"}}const Ib=e=>+e||0,pJe=e=>({top:e,bottom:e,left:e,right:e});function gJe(e){return we(e)?e.signal?e:{top:Ib(e.top),bottom:Ib(e.bottom),left:Ib(e.left),right:Ib(e.right)}:pJe(Ib(e))}const Oi=e=>we(e)&&!te(e)?rt({},e):{value:e};function Hde(e,t,n,i){return null!=n?(we(n)&&!te(n)||te(n)&&n.length&&we(n[0])?e.update[t]=n:e[i||"enter"][t]={value:n},1):0}function tr(e,t,n){for(const i in t)Hde(e,i,t[i]);for(const i in n)Hde(e,i,n[i],"update")}function A_(e,t,n){for(const i in t)n&&De(n,i)||(e[i]=rt(e[i]||{},t[i]));return e}function M_(e,t){return t&&(t.enter&&t.enter[e]||t.update&&t.update[e])}const c4="mark",u4="frame",d4="scope",mJe="axis",_Je="axis-domain",yJe="axis-grid",vJe="axis-label",bJe="axis-tick",wJe="axis-title",EJe="legend",CJe="legend-band",DJe="legend-entry",SJe="legend-gradient",Gde="legend-label",TJe="legend-symbol",xJe="legend-title",AJe="title",MJe="title-text",NJe="title-subtitle";function f4(e,t,n){e[t]=n&&n.signal?{signal:n.signal}:{value:n}}const Wde=e=>Ce(e)?ge(e):e.signal?`(${e.signal})`:qde(e);function LA(e){if(null!=e.gradient)return function OJe(e){const t=[e.start,e.stop,e.count].map(n=>null==n?null:ge(n));for(;t.length&&null==yt(t);)t.pop();return t.unshift(Wde(e.gradient)),`gradient(${t.join(",")})`}(e);let t=e.signal?`(${e.signal})`:e.color?function kJe(e){return e.c?$A("hcl",e.h,e.c,e.l):e.h||e.s?$A("hsl",e.h,e.s,e.l):e.l||e.a?$A("lab",e.l,e.a,e.b):e.r||e.g||e.b?$A("rgb",e.r,e.g,e.b):null}(e.color):null!=e.field?qde(e.field):void 0!==e.value?ge(e.value):void 0;return null!=e.scale&&(t=function RJe(e,t){const n=Wde(e.scale);return null!=e.range?t=`lerp(_range(${n}), ${+e.range})`:(void 0!==t&&(t=`_scale(${n}, ${t})`),e.band&&(t=(t?t+"+":"")+`_bandwidth(${n})`+(1==+e.band?"":"*"+BA(e.band)),e.extra&&(t=`(datum.extra ? _scale(${n}, datum.extra.value) : ${t})`)),null==t&&(t="0")),t}(e,t)),void 0===t&&(t=null),null!=e.exponent&&(t=`pow(${t},${BA(e.exponent)})`),null!=e.mult&&(t+=`*${BA(e.mult)}`),null!=e.offset&&(t+=`+${BA(e.offset)}`),e.round&&(t=`round(${t})`),t}const $A=(e,t,n,i)=>`(${e}(${[t,n,i].map(LA).join(",")})+'')`;function BA(e){return we(e)?"("+LA(e)+")":e}function qde(e){return Yde(we(e)?e:{datum:e})}function Yde(e){let t,n,i;if(e.signal)t="datum",i=e.signal;else if(e.group||e.parent){for(n=Math.max(1,e.level||1),t="item";n-- >0;)t+=".mark.group";e.parent?(i=e.parent,t+=".datum"):i=e.group}else e.datum?(t="datum",i=e.datum):J("Invalid field reference: "+ge(e));return e.signal||(i=Ce(i)?xl(i).map(ge).join("]["):Yde(i)),t+"["+i+"]"}function Kde(e,t,n,i,r,o){const s={};(o=o||{}).encoders={$encode:s},e=function IJe(e,t,n,i,r){const o={},s={};let a,l,c,u;for(l in l="lineBreak","text"===t&&null!=r[l]&&!M_(l,e)&&f4(o,l,r[l]),("legend"==n||String(n).startsWith("axis"))&&(n=null),u=n===u4?r.group:n===c4?rt({},r.mark,r[t]):null,u)c=M_(l,e)||("fill"===l||"stroke"===l)&&(M_("fill",e)||M_("stroke",e)),c||f4(o,l,u[l]);for(l in Ee(i).forEach(d=>{const f=r.style&&r.style[d];for(const h in f)M_(h,e)||f4(o,h,f[h])}),e=rt({},e),o)u=o[l],u.signal?(a=a||{})[l]=u:s[l]=u;return e.enter=rt(s,e.enter),a&&(e.update=rt(a,e.update)),e}(e,t,n,i,r.config);for(const a in e)s[a]=PJe(e[a],t,o,r);return o}function PJe(e,t,n,i){const r={},o={};for(const s in e)null!=e[s]&&(r[s]=$Je(LJe(e[s]),i,n,o));return{$expr:{marktype:t,channels:r},$fields:Object.keys(o),$output:Object.keys(e)}}function LJe(e){return te(e)?function FJe(e){let t="";return e.forEach(n=>{const i=LA(n);t+=n.test?`(${n.test})?${i}:`:i}),":"===yt(t)&&(t+="null"),t}(e):LA(e)}function $Je(e,t,n,i){const r=Zl(e,t);return r.$fields.forEach(o=>i[o]=1),rt(n,r.$params),r.$expr}const BJe="outer",jJe=["value","update","init","react","bind"];function Xde(e,t){J(e+' for "outer" push: '+ge(t))}function Qde(e,t){const n=e.name;if(e.push===BJe)t.signals[n]||Xde("No prior signal definition",n),jJe.forEach(i=>{void 0!==e[i]&&Xde("Invalid property ",i)});else{const i=t.addSignal(n,e.value);!1===e.react&&(i.react=!1),e.bind&&t.addBinding(n,e.bind)}}function h4(e,t,n,i){this.id=-1,this.type=e,this.value=t,this.params=n,i&&(this.parent=i)}function jA(e,t,n,i){return new h4(e,t,n,i)}function VA(e,t){return jA("operator",e,t)}function Pe(e){const t={$ref:e.id};return e.id<0&&(e.refs=e.refs||[]).push(t),t}function kb(e,t){return t?{$field:e,$name:t}:{$field:e}}const p4=kb("key");function Zde(e,t){return{$compare:e,$order:t}}function UA(e,t){return(e&&e.signal?"$"+e.signal:e||"")+(e&&t?"_":"")+(t&&t.signal?"$"+t.signal:t||"")}const g4="scope",m4="view";function Si(e){return e&&e.signal}function zA(e){if(Si(e))return!0;if(we(e))for(const t in e)if(zA(e[t]))return!0;return!1}function Fa(e,t){return e??t}function Kh(e){return e&&e.signal||e}const Jde="timer";function Ob(e,t){return(e.merge?qJe:e.stream?YJe:e.type?KJe:J("Invalid stream specification: "+ge(e)))(e,t)}function qJe(e,t){const i=_4({merge:e.merge.map(r=>Ob(r,t))},e,t);return t.addStream(i).id}function YJe(e,t){const i=_4({stream:Ob(e.stream,t)},e,t);return t.addStream(i).id}function KJe(e,t){let n;e.type===Jde?(n=t.event(Jde,e.throttle),e={between:e.between,filter:e.filter}):n=t.event(function WJe(e){return e===g4?m4:e||m4}(e.source),e.type);const i=_4({stream:n},e,t);return 1===Object.keys(i).length?n:t.addStream(i).id}function _4(e,t,n){let i=t.between;return i&&(2!==i.length&&J('Stream "between" parameter must have 2 entries: '+ge(t)),e.between=[Ob(i[0],n),Ob(i[1],n)]),i=t.filter?[].concat(t.filter):[],(t.marktype||t.markname||t.markrole)&&i.push(function XJe(e,t,n){const i="event.item";return i+(e&&"*"!==e?"&&"+i+".mark.marktype==='"+e+"'":"")+(n?"&&"+i+".mark.role==='"+n+"'":"")+(t?"&&"+i+".mark.name==='"+t+"'":"")}(t.marktype,t.markname,t.markrole)),t.source===g4&&i.push("inScope(event.item)"),i.length&&(e.filter=Zl("("+i.join(")&&(")+")",n).$expr),null!=(i=t.throttle)&&(e.throttle=+i),null!=(i=t.debounce)&&(e.debounce=+i),t.consume&&(e.consume=!0),e}const QJe={code:"_.$value",ast:{type:"Identifier",value:"value"}};function eet(e){return{signal:"["+e.map(t=>t.scale?'scale("'+t.scale+'")':t.signal)+"]"}}const Qt=e=>(t,n,i)=>jA(e,n,t||void 0,i),efe=Qt("aggregate"),net=Qt("axisticks"),tfe=Qt("bound"),Pa=Qt("collect"),nfe=Qt("compare"),iet=Qt("datajoin"),ife=Qt("encode"),ret=Qt("expression"),oet=Qt("facet"),set=Qt("field"),aet=Qt("key"),cet=Qt("legendentries"),uet=Qt("load"),det=Qt("mark"),fet=Qt("multiextent"),het=Qt("multivalues"),pet=Qt("overlap"),get=Qt("params"),rfe=Qt("prefacet"),met=Qt("projection"),_et=Qt("proxy"),yet=Qt("relay"),ofe=Qt("render"),vet=Qt("scale"),Xh=Qt("sieve"),bet=Qt("sortitems"),sfe=Qt("viewlayout"),wet=Qt("values");let Eet=0;const afe={min:"min",max:"max",count:"sum"};function Det(e,t){const n=t.getScale(e.name).params;let i;for(i in n.domain=lfe(e.domain,e,t),null!=e.range&&(n.range=ufe(e,t,n)),null!=e.interpolate&&function Fet(e,t){t.interpolate=js(e.type||e),null!=e.gamma&&(t.interpolateGamma=js(e.gamma))}(e.interpolate,n),null!=e.nice&&(n.nice=function Ret(e,t){return e.signal?t.signalRef(e.signal):we(e)?{interval:js(e.interval),step:js(e.step)}:js(e)}(e.nice,t)),null!=e.bins&&(n.bins=function Oet(e,t){return e.signal||te(e)?HA(e,t):t.objectProperty(e)}(e.bins,t)),e)De(n,i)||"name"===i||(n[i]=js(e[i],t))}function js(e,t){return we(e)?e.signal?t.signalRef(e.signal):J("Unsupported object: "+ge(e)):e}function HA(e,t){return e.signal?t.signalRef(e.signal):e.map(n=>js(n,t))}function GA(e){J("Can not find data set: "+ge(e))}function lfe(e,t,n){if(e)return e.signal?n.signalRef(e.signal):(te(e)?Tet:e.fields?Aet:xet)(e,t,n);(null!=t.domainMin||null!=t.domainMax)&&J("No scale domain defined for domainMin/domainMax to override.")}function Tet(e,t,n){return e.map(i=>js(i,n))}function xet(e,t,n){const i=n.getData(e.data);return i||GA(e.data),Zm(t.type)?i.valuesRef(n,e.field,cfe(e.sort,!1)):ooe(t.type)?i.domainRef(n,e.field):i.extentRef(n,e.field)}function Aet(e,t,n){const i=e.data,r=e.fields.reduce((o,s)=>(s=Ce(s)?{data:i,field:s}:te(s)||s.signal?function Met(e,t){const n="_:vega:_"+Eet++,i=Pa({});if(te(e))i.value={$ingest:e};else if(e.signal){const r="setdata("+ge(n)+","+e.signal+")";i.params.input=t.signalRef(r)}return t.addDataPipeline(n,[i,Xh({})]),{data:n,field:"data"}}(s,n):s,o.push(s),o),[]);return(Zm(t.type)?Net:ooe(t.type)?Iet:ket)(e,n,r)}function Net(e,t,n){const i=cfe(e.sort,!0);let r,o;const s=n.map(c=>{const u=t.getData(c.data);return u||GA(c.data),u.countsRef(t,c.field,i)}),a={groupby:p4,pulse:s};i&&(r=i.op||"count",o=i.field?UA(r,i.field):"count",a.ops=[afe[r]],a.fields=[t.fieldRef(o)],a.as=[o]),r=t.add(efe(a));const l=t.add(Pa({pulse:Pe(r)}));return o=t.add(wet({field:p4,sort:t.sortRef(i),pulse:Pe(l)})),Pe(o)}function cfe(e,t){return e&&(e.field||e.op?e.field||"count"===e.op?t&&e.field&&e.op&&!afe[e.op]&&J("Multiple domain scales can not be sorted using "+e.op):J("No field provided for sort aggregate op: "+e.op):we(e)?e.field="key":e={field:"key"}),e}function Iet(e,t,n){const i=n.map(r=>{const o=t.getData(r.data);return o||GA(r.data),o.domainRef(t,r.field)});return Pe(t.add(het({values:i})))}function ket(e,t,n){const i=n.map(r=>{const o=t.getData(r.data);return o||GA(r.data),o.extentRef(t,r.field)});return Pe(t.add(fet({extents:i})))}function ufe(e,t,n){const i=t.config.range;let r=e.range;if(r.signal)return t.signalRef(r.signal);if(Ce(r)){if(i&&De(i,r))return ufe(e=rt({},e,{range:i[r]}),t,n);"width"===r?r=[0,{signal:"width"}]:"height"===r?r=Zm(e.type)?[0,{signal:"height"}]:[{signal:"height"},0]:J("Unrecognized scale range value: "+ge(r))}else{if(r.scheme)return n.scheme=te(r.scheme)?HA(r.scheme,t):js(r.scheme,t),r.extent&&(n.schemeExtent=HA(r.extent,t)),void(r.count&&(n.schemeCount=js(r.count,t)));if(r.step)return void(n.rangeStep=js(r.step,t));if(Zm(e.type)&&!te(r))return lfe(r,e,t);te(r)||J("Unsupported range type: "+ge(r))}return r.map(o=>(te(o)?HA:js)(o,t))}function y4(e,t,n){return te(e)?e.map(i=>y4(i,t,n)):we(e)?e.signal?n.signalRef(e.signal):"fit"===t?e:J("Unsupported parameter object: "+ge(e)):e}const La="top",N_="left",I_="right",zd="bottom",Let="vertical",$et="start",jet="end",v4="index",b4="label",Vet="offset",k_="perc",Uet="perc2",Vs="value",Rb="guide-label",w4="guide-title",zet="group-title",Het="group-subtitle",ffe="symbol",WA="gradient",E4="discrete",C4="size",D4=[C4,"shape","fill","stroke","strokeWidth","strokeDash","opacity"],Fb={name:1,style:1,interactive:1},wt={value:0},Us={value:1},qA="group",hfe="rect",S4="rule",Get="symbol",Qh="text";function Pb(e){return e.type=qA,e.interactive=e.interactive||!1,e}function Eo(e,t){const n=(i,r)=>Fa(e[i],Fa(t[i],r));return n.isVertical=i=>Let===Fa(e.direction,t.direction||(i?t.symbolDirection:t.gradientDirection)),n.gradientLength=()=>Fa(e.gradientLength,t.gradientLength||t.gradientWidth),n.gradientThickness=()=>Fa(e.gradientThickness,t.gradientThickness||t.gradientHeight),n.entryColumns=()=>Fa(e.columns,Fa(t.columns,+n.isVertical(!0))),n}function pfe(e,t){const n=t&&(t.update&&t.update[e]||t.enter&&t.enter[e]);return n&&n.signal?n:n?n.value:null}function YA(e,t,n){return`item.anchor === '${$et}' ? ${e} : item.anchor === '${jet}' ? ${t} : ${n}`}const T4=YA(ge(N_),ge(I_),ge("center"));function gfe(e,t){return t?e?we(e)?Object.assign({},e,{offset:gfe(e.offset,t)}):{value:e,offset:t}:t:e}function ss(e,t){return t?(e.name=t.name,e.style=t.style||e.style,e.interactive=!!t.interactive,e.encode=A_(e.encode,t,Fb)):e.interactive=!1,e}function Yet(e,t,n,i){const r=Eo(e,n),o=r.isVertical(),s=r.gradientThickness(),a=r.gradientLength();let l,c,u,d,f;o?(c=[0,1],u=[0,0],d=s,f=a):(c=[0,0],u=[1,0],d=a,f=s);const h={enter:l={opacity:wt,x:wt,y:wt,width:Oi(d),height:Oi(f)},update:rt({},l,{opacity:Us,fill:{gradient:t,start:c,stop:u}}),exit:{opacity:wt}};return tr(h,{stroke:r("gradientStrokeColor"),strokeWidth:r("gradientStrokeWidth")},{opacity:r("gradientOpacity")}),ss({type:hfe,role:SJe,encode:h},i)}function Ket(e,t,n,i,r){const o=Eo(e,n),s=o.isVertical(),a=o.gradientThickness(),l=o.gradientLength();let c,u,d,f,h="";s?(c="y",d="y2",u="x",f="width",h="1-"):(c="x",d="x2",u="y",f="height");const p={opacity:wt,fill:{scale:t,field:Vs}};p[c]={signal:h+"datum."+k_,mult:l},p[u]=wt,p[d]={signal:h+"datum."+Uet,mult:l},p[f]=Oi(a);const g={enter:p,update:rt({},p,{opacity:Us}),exit:{opacity:wt}};return tr(g,{stroke:o("gradientStrokeColor"),strokeWidth:o("gradientStrokeWidth")},{opacity:o("gradientOpacity")}),ss({type:hfe,role:CJe,key:Vs,from:r,encode:g},i)}const Xet=`datum.${k_}<=0?"${N_}":datum.${k_}>=1?"${I_}":"center"`,Qet=`datum.${k_}<=0?"${zd}":datum.${k_}>=1?"${La}":"middle"`;function mfe(e,t,n,i){const r=Eo(e,t),o=r.isVertical(),s=Oi(r.gradientThickness()),a=r.gradientLength();let c,u,d,f,l=r("labelOverlap"),h="";const p={enter:c={opacity:wt},update:u={opacity:Us,text:{field:b4}},exit:{opacity:wt}};return tr(p,{fill:r("labelColor"),fillOpacity:r("labelOpacity"),font:r("labelFont"),fontSize:r("labelFontSize"),fontStyle:r("labelFontStyle"),fontWeight:r("labelFontWeight"),limit:Fa(e.labelLimit,t.gradientLabelLimit)}),o?(c.align={value:"left"},c.baseline=u.baseline={signal:Qet},d="y",f="x",h="1-"):(c.align=u.align={signal:Xet},c.baseline={value:"top"},d="x",f="y"),c[d]=u[d]={signal:h+"datum."+k_,mult:a},c[f]=u[f]=s,s.offset=Fa(e.labelOffset,t.gradientLabelOffset)||0,l=l?{separation:r("labelSeparation"),method:l,order:"datum."+v4}:void 0,ss({type:Qh,role:Gde,style:Rb,key:Vs,from:i,encode:p,overlap:l},n)}function Zet(e,t,n,i,r){const o=Eo(e,t),s=n.entries,a=!(!s||!s.interactive),l=s?s.name:void 0,c=o("clipHeight"),u=o("symbolOffset"),d={data:"value"},f=`(${r}) ? datum.${Vet} : datum.${C4}`,h=c?Oi(c):{field:C4},p=`datum.${v4}`,g=`max(1, ${r})`;let m,_,y,v,b;h.mult=.5,m={enter:_={opacity:wt,x:{signal:f,mult:.5,offset:u},y:h},update:y={opacity:Us,x:_.x,y:_.y},exit:{opacity:wt}};let w=null,C=null;e.fill||(w=t.symbolBaseFillColor,C=t.symbolBaseStrokeColor),tr(m,{fill:o("symbolFillColor",w),shape:o("symbolType"),size:o("symbolSize"),stroke:o("symbolStrokeColor",C),strokeDash:o("symbolDash"),strokeDashOffset:o("symbolDashOffset"),strokeWidth:o("symbolStrokeWidth")},{opacity:o("symbolOpacity")}),D4.forEach(k=>{e[k]&&(y[k]=_[k]={scale:e[k],field:Vs})});const E=ss({type:Get,role:TJe,key:Vs,from:d,clip:!!c||void 0,encode:m},n.symbols),D=Oi(u);D.offset=o("labelOffset"),m={enter:_={opacity:wt,x:{signal:f,offset:D},y:h},update:y={opacity:Us,text:{field:b4},x:_.x,y:_.y},exit:{opacity:wt}},tr(m,{align:o("labelAlign"),baseline:o("labelBaseline"),fill:o("labelColor"),fillOpacity:o("labelOpacity"),font:o("labelFont"),fontSize:o("labelFontSize"),fontStyle:o("labelFontStyle"),fontWeight:o("labelFontWeight"),limit:o("labelLimit")});const M=ss({type:Qh,role:Gde,style:Rb,key:Vs,from:d,encode:m},n.labels);return m={enter:{noBound:{value:!c},width:wt,height:c?Oi(c):wt,opacity:wt},exit:{opacity:wt},update:y={opacity:Us,row:{signal:null},column:{signal:null}}},o.isVertical(!0)?(v=`ceil(item.mark.items.length / ${g})`,y.row.signal=`${p}%${v}`,y.column.signal=`floor(${p} / ${v})`,b={field:["row",p]}):(y.row.signal=`floor(${p} / ${g})`,y.column.signal=`${p} % ${g}`,b={field:p}),y.column.signal=`(${r})?${y.column.signal}:${p}`,Pb({role:d4,from:i={facet:{data:i,name:"value",groupby:v4}},encode:A_(m,s,Fb),marks:[E,M],name:l,interactive:a,sort:b})}const x4='item.orient === "left"',A4='item.orient === "right"',KA=`(${x4} || ${A4})`,ett=`datum.vgrad && ${KA}`,ttt=YA('"top"','"bottom"','"middle"'),itt=`datum.vgrad && ${A4} ? (${YA('"right"','"left"','"center"')}) : (${KA} && !(datum.vgrad && ${x4})) ? "left" : ${T4}`,rtt=`item._anchor || (${KA} ? "middle" : "start")`,ott=`${ett} ? (${x4} ? -90 : 90) : 0`,stt=`${KA} ? (datum.vgrad ? (${A4} ? "bottom" : "top") : ${ttt}) : "top"`;function ltt(e,t){let n;return we(e)&&(e.signal?n=e.signal:e.path?n="pathShape("+_fe(e.path)+")":e.sphere&&(n="geoShape("+_fe(e.sphere)+', {type: "Sphere"})')),n?t.signalRef(n):!!e}function _fe(e){return we(e)&&e.signal?e.signal:ge(e)}function yfe(e){const t=e.role||"";return t.startsWith("axis")||t.startsWith("legend")||t.startsWith("title")?t:e.type===qA?d4:t||c4}function ctt(e){return{marktype:e.type,name:e.name||void 0,role:e.role||yfe(e),zindex:+e.zindex||void 0,aria:e.aria,description:e.description}}function utt(e,t){return e&&e.signal?t.signalRef(e.signal):!1!==e}function M4(e,t){const n=gne(e.type);n||J("Unrecognized transform type: "+ge(e.type));const i=jA(n.type.toLowerCase(),null,vfe(n,e,t));return e.signal&&t.addSignal(e.signal,t.proxy(i)),i.metadata=n.metadata||{},i}function vfe(e,t,n){const i={},r=e.params.length;for(let o=0;owfe(e,r,n))):wfe(e,i,n)}(e,t,n):"projection"===i?n.projectionRef(t[e.name]):e.array&&!Si(r)?r.map(o=>bfe(e,o,n)):bfe(e,r,n):void(e.required&&J("Missing required "+ge(t.type)+" parameter: "+ge(e.name)))}function bfe(e,t,n){const i=e.type;if(Si(t))return Efe(i)?J("Expression references can not be signals."):N4(i)?n.fieldRef(t):Cfe(i)?n.compareRef(t):n.signalRef(t.signal);{const r=e.expr||N4(i);return r&&ptt(t)?n.exprRef(t.expr,t.as):r&>t(t)?kb(t.field,t.as):Efe(i)?Zl(t,n):mtt(i)?Pe(n.getData(t).values):N4(i)?kb(t):Cfe(i)?n.compareRef(t):t}}function wfe(e,t,n){const i=e.params.length;let r;for(let s=0;se&&e.expr,gtt=e=>e&&e.field,mtt=e=>"data"===e,Efe=e=>"expr"===e,N4=e=>"field"===e,Cfe=e=>"compare"===e;function XA(e,t){return e.$ref?e:e.data&&e.data.$ref?e.data:Pe(t.getData(e.data).output)}function Zh(e,t,n,i,r){this.scope=e,this.input=t,this.output=n,this.values=i,this.aggregate=r,this.index={}}function Dfe(e){return Ce(e)?e:null}function Sfe(e,t,n){const i=UA(n.op,n.field);let r;if(t.ops){for(let o=0,s=t.as.length;od??"null").join(",")+"),0)",t);l.update=u.$expr,l.params=u.$params}function QA(e,t){const n=yfe(e),i=e.type===qA,r=e.from&&e.from.facet,o=e.overlap;let a,l,c,u,d,f,h,s=e.layout||n===d4||n===u4;const p=n===c4||s||r,g=function _tt(e,t,n){let i,r,o,s,a;return e?(i=e.facet)&&(t||J("Only group marks can be faceted."),null!=i.field?s=a=XA(i,n):(e.data?a=Pe(n.getData(e.data).aggregate):(o=M4(rt({type:"aggregate",groupby:Ee(i.groupby)},i.aggregate),n),o.params.key=n.keyRef(i.groupby),o.params.pulse=XA(i,n),s=a=Pe(n.add(o))),r=n.keyRef(i.groupby,!0))):s=Pe(n.add(Pa(null,[{}]))),s||(s=XA(e,n)),{key:r,pulse:s,parent:a}}(e.from,i,t);l=t.add(iet({key:g.key||(e.key?kb(e.key):void 0),pulse:g.pulse,clean:!i}));const m=Pe(l);l=c=t.add(Pa({pulse:m})),l=t.add(det({markdef:ctt(e),interactive:utt(e.interactive,t),clip:ltt(e.clip,t),context:{$context:!0},groups:t.lookup(),parent:t.signals.parent?t.signalRef("parent"):null,index:t.markpath(),pulse:Pe(l)}));const _=Pe(l);l=u=t.add(ife(Kde(e.encode,e.type,n,e.style,t,{mod:!1,pulse:_}))),l.params.parent=t.encode(),e.transform&&e.transform.forEach(C=>{const E=M4(C,t),D=E.metadata;(D.generates||D.changes)&&J("Mark transforms should not generate new data."),D.nomod||(u.params.mod=!0),E.params.pulse=Pe(l),t.add(l=E)}),e.sort&&(l=t.add(bet({sort:t.compareRef(e.sort),pulse:Pe(l)})));const y=Pe(l);(r||s)&&(s=t.add(sfe({layout:t.objectProperty(e.layout),legends:t.legends,mark:_,pulse:y})),f=Pe(s));const v=t.add(tfe({mark:_,pulse:f||y}));h=Pe(v),i&&(p&&(a=t.operators,a.pop(),s&&a.pop()),t.pushState(y,f||h,m),r?function ytt(e,t,n){const i=e.from.facet,r=i.name,o=XA(i,t);let s;i.name||J("Facet must have a name: "+ge(i)),i.data||J("Facet must reference a data set: "+ge(i)),i.field?s=t.add(rfe({field:t.fieldRef(i.field),pulse:o})):i.groupby?s=t.add(oet({key:t.keyRef(i.groupby),group:Pe(t.proxy(n.parent)),pulse:o})):J("Facet must specify groupby or field: "+ge(i));const a=t.fork(),l=a.add(Pa()),c=a.add(Xh({pulse:Pe(l)}));a.addData(r,new Zh(a,l,l,c)),a.addSignal("parent",null),s.params.subflow={$subflow:a.parse(e).toRuntime()}}(e,t,g):p?function vtt(e,t,n){const i=t.add(rfe({pulse:n.pulse})),r=t.fork();r.add(Xh()),r.addSignal("parent",null),i.params.subflow={$subflow:r.parse(e).toRuntime()}}(e,t,g):t.parse(e),t.popState(),p&&(s&&a.push(s),a.push(v))),o&&(h=function btt(e,t,n){const i=e.method,r=e.bound,o=e.separation,s={separation:Si(o)?n.signalRef(o.signal):o,method:Si(i)?n.signalRef(i.signal):i,pulse:t};if(e.order&&(s.sort=n.compareRef({field:e.order})),r){const a=r.tolerance;s.boundTolerance=Si(a)?n.signalRef(a.signal):+a,s.boundScale=n.scaleRef(r.scale),s.boundOrient=r.orient}return Pe(n.add(pet(s)))}(o,h,t));const b=t.add(ofe({pulse:h})),w=t.add(Xh({pulse:Pe(b)},void 0,t.parent()));null!=e.name&&(d=e.name,t.addData(d,new Zh(t,c,b,w)),e.on&&e.on.forEach(C=>{(C.insert||C.remove||C.toggle)&&J("Marks only support modify triggers."),Tfe(C,t,d)}))}function Dtt(e,t,n){const i={enter:{},update:{}};return tr(i,{orient:e("orient"),offset:e("offset"),padding:e("padding"),titlePadding:e("titlePadding"),cornerRadius:e("cornerRadius"),fill:e("fillColor"),stroke:e("strokeColor"),strokeWidth:n.strokeWidth,strokeDash:n.strokeDash,x:e("legendX"),y:e("legendY"),format:t.format,formatType:t.formatType}),i}function xfe(e,t,n){return t[e]?`scale("${t[e]}",datum)`:pfe(e,n[0].encode)}Zh.fromEntries=function(e,t){const n=t.length,i=t[n-1],r=t[n-2];let o=t[0],s=null,a=1;for(o&&"load"===o.type&&(o=t[1]),e.add(t[0]);ae===zd||e===La,ZA=(e,t,n)=>Si(e)?$tt(e.signal,t,n):e===N_||e===La?t:n,Ri=(e,t,n)=>Si(e)?Ptt(e.signal,t,n):Mfe(e)?t:n,$a=(e,t,n)=>Si(e)?Ltt(e.signal,t,n):Mfe(e)?n:t,Nfe=(e,t,n)=>Si(e)?Btt(e.signal,t,n):e===La?{value:t}:{value:n},Ftt=(e,t,n)=>Si(e)?jtt(e.signal,t,n):e===I_?{value:t}:{value:n},Ptt=(e,t,n)=>Ife(`${e} === '${La}' || ${e} === '${zd}'`,t,n),Ltt=(e,t,n)=>Ife(`${e} !== '${La}' && ${e} !== '${zd}'`,t,n),$tt=(e,t,n)=>I4(`${e} === '${N_}' || ${e} === '${La}'`,t,n),Btt=(e,t,n)=>I4(`${e} === '${La}'`,t,n),jtt=(e,t,n)=>I4(`${e} === '${I_}'`,t,n),Ife=(e,t,n)=>(t=null!=t?Oi(t):t,n=null!=n?Oi(n):n,kfe(t)&&kfe(n)?{signal:`${e} ? (${t=t?t.signal||ge(t.value):null}) : (${n=n?n.signal||ge(n.value):null})`}:[rt({test:e},t)].concat(n||[])),kfe=e=>null==e||1===Object.keys(e).length,I4=(e,t,n)=>({signal:`${e} ? (${O_(t)}) : (${O_(n)})`}),Vtt=(e,t,n,i,r)=>({signal:(null!=i?`${e} === '${N_}' ? (${O_(i)}) : `:"")+(null!=n?`${e} === '${zd}' ? (${O_(n)}) : `:"")+(null!=r?`${e} === '${I_}' ? (${O_(r)}) : `:"")+(null!=t?`${e} === '${La}' ? (${O_(t)}) : `:"")+"(null)"}),O_=e=>Si(e)?e.signal:null==e?null:ge(e),Utt=(e,t)=>0===t?0:Si(e)?{signal:`(${e.signal}) * ${t}`}:{value:e*t},R_=(e,t)=>{const n=e.signal;return n&&n.endsWith("(null)")?{signal:n.slice(0,-6)+t.signal}:e};function F_(e,t,n,i){let r;if(t&&De(t,e))return t[e];if(De(n,e))return n[e];if(e.startsWith("title")){switch(e){case"titleColor":r="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":r=e[5].toLowerCase()+e.slice(6)}return i[w4][r]}if(e.startsWith("label")){switch(e){case"labelColor":r="fill";break;case"labelFont":case"labelFontSize":r=e[5].toLowerCase()+e.slice(6)}return i[Rb][r]}return null}function Ofe(e){const t={};for(const n of e)if(n)for(const i in n)t[i]=1;return Object.keys(t)}function Rfe(e,t){return{scale:e.scale,range:t}}function k4(e,t,n,i,r){return{signal:'flush(range("'+e+'"), scale("'+e+'", datum.value), '+t+","+n+","+i+","+r+")"}}function Qtt(e,t){const n=function ztt(e,t){var a,l,c,n=t.config,i=n.style,r=n.axis,o="band"===t.scaleType(e.scale)&&n.axisBand,s=e.orient;if(Si(s)){const d=Ofe([n.axisX,n.axisY]),f=Ofe([n.axisTop,n.axisBottom,n.axisLeft,n.axisRight]);for(c of(a={},d))a[c]=Ri(s,F_(c,n.axisX,r,i),F_(c,n.axisY,r,i));for(c of(l={},f))l[c]=Vtt(s.signal,F_(c,n.axisTop,r,i),F_(c,n.axisBottom,r,i),F_(c,n.axisLeft,r,i),F_(c,n.axisRight,r,i))}else a=s===La||s===zd?n.axisX:n.axisY,l=n["axis"+s[0].toUpperCase()+s.slice(1)];return a||l||o?rt({},r,a,l,o):r}(e,t),i=e.encode||{},r=i.axis||{},o=r.name||void 0,s=r.interactive,a=r.style,l=Eo(e,n),c=function qet(e){const t=e("tickBand");let i,r,n=e("tickOffset");return t?t.signal?(i={signal:`(${t.signal}) === 'extent' ? 1 : 0.5`},r={signal:`(${t.signal}) === 'extent'`},we(n)||(n={signal:`(${t.signal}) === 'extent' ? 0 : ${n}`})):"extent"===t?(i=1,r=!0,n=0):(i=.5,r=!1):(i=e("bandPosition"),r=e("tickExtra")),{extra:r,band:i,offset:n}}(l),u={scale:e.scale,ticks:!!l("ticks"),labels:!!l("labels"),grid:!!l("grid"),domain:!!l("domain"),title:null!=e.title},d=Pe(t.add(Pa({},[u]))),f=Pe(t.add(net({scale:t.scaleRef(e.scale),extra:t.property(c.extra),count:t.objectProperty(e.tickCount),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)}))),h=[];let p;return u.grid&&h.push(function Gtt(e,t,n,i,r){const o=Eo(e,t),s=e.orient,a=e.gridScale,l=ZA(s,1,-1),c=function Wtt(e,t){if(1!==t)if(we(e)){let n=e=rt({},e);for(;null!=n.mult;){if(!we(n.mult))return n.mult=Si(t)?{signal:`(${n.mult}) * (${t.signal})`}:n.mult*t,e;n=n.mult=rt({},n.mult)}n.mult=t}else e=Si(t)?{signal:`(${t.signal}) * (${e||0})`}:t*(e||0);return e}(e.offset,l);let u,d,f;const h={enter:u={opacity:wt},update:f={opacity:Us},exit:d={opacity:wt}};tr(h,{stroke:o("gridColor"),strokeCap:o("gridCap"),strokeDash:o("gridDash"),strokeDashOffset:o("gridDashOffset"),strokeOpacity:o("gridOpacity"),strokeWidth:o("gridWidth")});const p={scale:e.scale,field:Vs,band:r.band,extra:r.extra,offset:r.offset,round:o("tickRound")},g=Ri(s,{signal:"height"},{signal:"width"}),m=a?{scale:a,range:0,mult:l,offset:c}:{value:0,offset:c},_=a?{scale:a,range:1,mult:l,offset:c}:rt(g,{mult:l,offset:c});return u.x=f.x=Ri(s,p,m),u.y=f.y=$a(s,p,m),u.x2=f.x2=$a(s,_),u.y2=f.y2=Ri(s,_),d.x=Ri(s,p),d.y=$a(s,p),ss({type:S4,role:yJe,key:Vs,from:i,encode:h},n)}(e,n,i.grid,f,c)),u.ticks&&(p=l("tickSize"),h.push(function qtt(e,t,n,i,r,o){const s=Eo(e,t),a=e.orient,l=ZA(a,-1,1);let c,u,d;const f={enter:c={opacity:wt},update:d={opacity:Us},exit:u={opacity:wt}};tr(f,{stroke:s("tickColor"),strokeCap:s("tickCap"),strokeDash:s("tickDash"),strokeDashOffset:s("tickDashOffset"),strokeOpacity:s("tickOpacity"),strokeWidth:s("tickWidth")});const h=Oi(r);h.mult=l;const p={scale:e.scale,field:Vs,band:o.band,extra:o.extra,offset:o.offset,round:s("tickRound")};return d.y=c.y=Ri(a,wt,p),d.y2=c.y2=Ri(a,h),u.x=Ri(a,p),d.x=c.x=$a(a,wt,p),d.x2=c.x2=$a(a,h),u.y=$a(a,p),ss({type:S4,role:bJe,key:Vs,from:i,encode:f},n)}(e,n,i.ticks,f,p,c))),u.labels&&(p=u.ticks?p:0,h.push(function Ytt(e,t,n,i,r,o){const s=Eo(e,t),a=e.orient,l=e.scale,c=ZA(a,-1,1),u=Kh(s("labelFlush")),d=Kh(s("labelFlushOffset")),f=s("labelAlign"),h=s("labelBaseline");let g,p=0===u||!!u;const m=Oi(r);m.mult=c,m.offset=Oi(s("labelPadding")||0),m.offset.mult=c;const _={scale:l,field:Vs,band:.5,offset:gfe(o.offset,s("labelOffset"))},y=Ri(a,p?k4(l,u,'"left"','"right"','"center"'):{value:"center"},Ftt(a,"left","right")),v=Ri(a,Nfe(a,"bottom","top"),p?k4(l,u,'"top"','"bottom"','"middle"'):{value:"middle"}),b=k4(l,u,`-(${d})`,d,0);p=p&&d;const w={opacity:wt,x:Ri(a,_,m),y:$a(a,_,m)},C={enter:w,update:g={opacity:Us,text:{field:b4},x:w.x,y:w.y,align:y,baseline:v},exit:{opacity:wt,x:w.x,y:w.y}};tr(C,{dx:!f&&p?Ri(a,b):null,dy:!h&&p?$a(a,b):null}),tr(C,{angle:s("labelAngle"),fill:s("labelColor"),fillOpacity:s("labelOpacity"),font:s("labelFont"),fontSize:s("labelFontSize"),fontWeight:s("labelFontWeight"),fontStyle:s("labelFontStyle"),limit:s("labelLimit"),lineHeight:s("labelLineHeight")},{align:f,baseline:h});const E=s("labelBound");let D=s("labelOverlap");return D=D||E?{separation:s("labelSeparation"),method:D,order:"datum.index",bound:E?{scale:l,orient:a,tolerance:E}:null}:void 0,g.align!==y&&(g.align=R_(g.align,y)),g.baseline!==v&&(g.baseline=R_(g.baseline,v)),ss({type:Qh,role:vJe,style:Rb,key:Vs,from:i,encode:C,overlap:D},n)}(e,n,i.labels,f,p,c))),u.domain&&h.push(function Htt(e,t,n,i){const r=Eo(e,t),o=e.orient;let s,a;const l={enter:s={opacity:wt},update:a={opacity:Us},exit:{opacity:wt}};tr(l,{stroke:r("domainColor"),strokeCap:r("domainCap"),strokeDash:r("domainDash"),strokeDashOffset:r("domainDashOffset"),strokeWidth:r("domainWidth"),strokeOpacity:r("domainOpacity")});const c=Rfe(e,0),u=Rfe(e,1);return s.x=a.x=Ri(o,c,wt),s.x2=a.x2=Ri(o,u),s.y=a.y=$a(o,c,wt),s.y2=a.y2=$a(o,u),ss({type:S4,role:_Je,from:i,encode:l},n)}(e,n,i.domain,d)),u.title&&h.push(function Ktt(e,t,n,i){const r=Eo(e,t),o=e.orient,s=ZA(o,-1,1);let a,l;const c={enter:a={opacity:wt,anchor:Oi(r("titleAnchor",null)),align:{signal:T4}},update:l=rt({},a,{opacity:Us,text:Oi(e.title)}),exit:{opacity:wt}},u={signal:`lerp(range("${e.scale}"), ${YA(0,1,.5)})`};return l.x=Ri(o,u),l.y=$a(o,u),a.angle=Ri(o,wt,Utt(s,90)),a.baseline=Ri(o,Nfe(o,zd,La),{value:zd}),l.angle=a.angle,l.baseline=a.baseline,tr(c,{fill:r("titleColor"),fillOpacity:r("titleOpacity"),font:r("titleFont"),fontSize:r("titleFontSize"),fontStyle:r("titleFontStyle"),fontWeight:r("titleFontWeight"),limit:r("titleLimit"),lineHeight:r("titleLineHeight")},{align:r("titleAlign"),angle:r("titleAngle"),baseline:r("titleBaseline")}),function Xtt(e,t,n,i){const r=(a,l)=>null!=a?(n.update[l]=R_(Oi(a),n.update[l]),!1):!M_(l,i),o=r(e("titleX"),"x"),s=r(e("titleY"),"y");n.enter.auto=s===o?Oi(s):Ri(t,Oi(s),Oi(o))}(r,o,c,n),c.update.align=R_(c.update.align,a.align),c.update.angle=R_(c.update.angle,a.angle),c.update.baseline=R_(c.update.baseline,a.baseline),ss({type:Qh,role:wJe,style:w4,from:i,encode:c},n)}(e,n,i.title,d)),QA(Pb({role:mJe,from:d,encode:A_(Ztt(l,e),r,Fb),marks:h,aria:l("aria"),description:l("description"),zindex:l("zindex"),name:o,interactive:s,style:a}),t)}function Ztt(e,t){const n={enter:{},update:{}};return tr(n,{orient:e("orient"),offset:e("offset")||0,position:Fa(t.position,0),titlePadding:e("titlePadding"),minExtent:e("minExtent"),maxExtent:e("maxExtent"),range:{signal:`abs(span(range("${t.scale}")))`},translate:e("translate"),format:t.format,formatType:t.formatType}),n}function Ffe(e,t,n){const i=Ee(e.signals),r=Ee(e.scales);return n||i.forEach(o=>Qde(o,t)),Ee(e.projections).forEach(o=>function Pet(e,t){const n=t.config.projection||{},i={};for(const r in e)"name"!==r&&(i[r]=y4(e[r],r,t));for(const r in n)null==i[r]&&(i[r]=y4(n[r],r,t));t.addProjection(e.name,i)}(o,t)),r.forEach(o=>function Cet(e,t){const n=e.type||"linear";noe(n)||J("Unrecognized scale type: "+ge(n)),t.addScale(e.name,{type:n,domain:void 0})}(o,t)),Ee(e.data).forEach(o=>function Ott(e,t){const n=[];e.transform&&e.transform.forEach(i=>{n.push(M4(i,t))}),e.on&&e.on.forEach(i=>{Tfe(i,t,e.name)}),t.addDataPipeline(e.name,function Rtt(e,t,n){const i=[];let a,l,c,u,d,r=null,o=!1,s=!1;for(e.values?Si(e.values)||zA(e.format)?(i.push(Afe(t,e)),i.push(r=Jh())):i.push(r=Jh({$ingest:e.values,$format:e.format})):e.url?zA(e.url)||zA(e.format)?(i.push(Afe(t,e)),i.push(r=Jh())):i.push(r=Jh({$request:e.url,$format:e.format})):e.source&&(r=a=Ee(e.source).map(f=>Pe(t.getData(f).output)),i.push(null)),l=0,c=n.length;lDet(o,t)),(n||i).forEach(o=>function tet(e,t){const n=t.getSignal(e.name);let i=e.update;e.init&&(i?J("Signals can not include both init and update expressions."):(i=e.init,n.initonly=!0)),i&&(i=Zl(i,t),n.update=i.$expr,n.params=i.$params),e.on&&e.on.forEach(r=>function ZJe(e,t,n){const i=e.encode,r={target:n};let o=e.events,s=e.update,a=[];o||J("Signal update missing events specification."),Ce(o)&&(o=Ud(o,t.isSubscope()?g4:m4)),o=Ee(o).filter(l=>l.signal||l.scale?(a.push(l),0):1),a.length>1&&(a=[eet(a)]),o.length&&a.push(o.length>1?{merge:o}:o[0]),null!=i&&(s&&J("Signal encode and update are mutually exclusive."),s="encode(item(),"+ge(i)+")"),r.update=Ce(s)?Zl(s,t):null!=s.expr?Zl(s.expr,t):null!=s.value?s.value:null!=s.signal?{$expr:QJe,$params:{$value:t.signalRef(s.signal)}}:J("Invalid signal update specification."),e.force&&(r.options={force:!0}),a.forEach(l=>t.addUpdate(rt(function JJe(e,t){return{source:e.signal?t.signalRef(e.signal):e.scale?t.scaleRef(e.scale):Ob(e,t)}}(l,t),r)))}(r,t,n.id))}(o,t)),Ee(e.axes).forEach(o=>Qtt(o,t)),Ee(e.marks).forEach(o=>QA(o,t)),Ee(e.legends).forEach(o=>function wtt(e,t){const n=t.config.legend,i=e.encode||{},r=Eo(e,n),o=i.legend||{},s=o.name||void 0,a=o.interactive,l=o.style,c={};let d,f,h,u=0;D4.forEach(v=>e[v]?(c[v]=e[v],u=u||e[v]):0),u||J("Missing valid scale for legend.");const p=function Ett(e,t){let n=e.type||ffe;return!e.type&&1===function Ctt(e){return D4.reduce((t,n)=>t+(e[n]?1:0),0)}(e)&&(e.fill||e.stroke)&&(n=a$(t)?WA:l$(t)?E4:ffe),n!==WA?n:l$(t)?E4:WA}(e,t.scaleType(u)),g={title:null!=e.title,scales:c,type:p,vgrad:"symbol"!==p&&r.isVertical()},m=Pe(t.add(Pa(null,[g]))),y=Pe(t.add(cet(f={type:p,scale:t.scaleRef(u),count:t.objectProperty(r("tickCount")),limit:t.property(r("symbolLimit")),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)})));return p===WA?(h=[Yet(e,u,n,i.gradient),mfe(e,n,i.labels,y)],f.count=f.count||t.signalRef(`max(2,2*floor((${Kh(r.gradientLength())})/100))`)):p===E4?h=[Ket(e,u,n,i.gradient,y),mfe(e,n,i.labels,y)]:(d=function Jet(e,t){const n=Eo(e,t);return{align:n("gridAlign"),columns:n.entryColumns(),center:{row:!0,column:!1},padding:{row:n("rowPadding"),column:n("columnPadding")}}}(e,n),h=[Zet(e,n,i,y,Kh(d.columns))],f.size=function Stt(e,t,n){const i=Kh(xfe("size",e,n)),r=Kh(xfe("strokeWidth",e,n)),o=Kh(function Ttt(e,t,n){return pfe("fontSize",e)||function Wet(e,t,n){const i=t.config.style[n];return i&&i[e]}("fontSize",t,n)}(n[1].encode,t,Rb));return Zl(`max(ceil(sqrt(${i})+${r}),${o})`,t)}(e,t,h[0].marks)),h=[Pb({role:DJe,from:m,encode:{enter:{x:{value:0},y:{value:0}}},marks:h,layout:d,interactive:a})],g.title&&h.push(function att(e,t,n,i){const r=Eo(e,t),o={enter:{opacity:wt},update:{opacity:Us,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:wt}};return tr(o,{orient:r("titleOrient"),_anchor:r("titleAnchor"),anchor:{signal:rtt},angle:{signal:ott},align:{signal:itt},baseline:{signal:stt},text:e.title,fill:r("titleColor"),fillOpacity:r("titleOpacity"),font:r("titleFont"),fontSize:r("titleFontSize"),fontStyle:r("titleFontStyle"),fontWeight:r("titleFontWeight"),limit:r("titleLimit"),lineHeight:r("titleLineHeight")},{align:r("titleAlign"),baseline:r("titleBaseline")}),ss({type:Qh,role:xJe,style:w4,from:i,encode:o},n)}(e,n,i.title,m)),QA(Pb({role:EJe,from:m,encode:A_(Dtt(r,e,n),o,Fb),marks:h,aria:r("aria"),description:r("description"),zindex:r("zindex"),name:s,interactive:a,style:l}),t)}(o,t)),e.title&&function Att(e,t){const n=Eo(e=Ce(e)?{text:e}:e,t.config.title),i=e.encode||{},r=i.group||{},o=r.name||void 0,s=r.interactive,a=r.style,l=[],u=Pe(t.add(Pa(null,[{}])));return l.push(function Itt(e,t,n,i){const r={value:0},s={enter:{opacity:r},update:{opacity:{value:1}},exit:{opacity:r}};return tr(s,{text:e.text,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("color"),font:t("font"),fontSize:t("fontSize"),fontStyle:t("fontStyle"),fontWeight:t("fontWeight"),lineHeight:t("lineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),ss({type:Qh,role:MJe,style:zet,from:i,encode:s},n)}(e,n,function Mtt(e){const t=e.encode;return t&&t.title||rt({name:e.name,interactive:e.interactive,style:e.style},t)}(e),u)),e.subtitle&&l.push(function ktt(e,t,n,i){const r={value:0},s={enter:{opacity:r},update:{opacity:{value:1}},exit:{opacity:r}};return tr(s,{text:e.subtitle,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("subtitleColor"),font:t("subtitleFont"),fontSize:t("subtitleFontSize"),fontStyle:t("subtitleFontStyle"),fontWeight:t("subtitleFontWeight"),lineHeight:t("subtitleLineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),ss({type:Qh,role:NJe,style:Het,from:i,encode:s},n)}(e,n,i.subtitle,u)),QA(Pb({role:AJe,from:u,encode:Ntt(n,r),marks:l,aria:n("aria"),description:n("description"),zindex:n("zindex"),name:o,interactive:s,style:a}),t)}(e.title,t),t.parseLambdas(),t}const Jtt=e=>A_({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},e);function $b(e,t){return t&&t.signal?{name:e,update:t.signal}:{name:e,value:t}}function Pfe(e,t){this.config=e||{},this.options=t||{},this.bindings=[],this.field={},this.signals={},this.lambdas={},this.scales={},this.events={},this.data={},this.streams=[],this.updates=[],this.operators=[],this.eventConfig=null,this.locale=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function Lfe(e){this.config=e.config,this.options=e.options,this.legends=e.legends,this.field=Object.create(e.field),this.signals=Object.create(e.signals),this.lambdas=Object.create(e.lambdas),this.scales=Object.create(e.scales),this.events=Object.create(e.events),this.data=Object.create(e.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++e._nextsub[0],this._nextsub=e._nextsub,this._parent=e._parent.slice(),this._encode=e._encode.slice(),this._lookup=e._lookup.slice(),this._markpath=e._markpath}function O4(e){return(te(e)?nnt:int)(e)}function nnt(e){const t=e.length;let n="[";for(let i=0;i0?",":"")+(we(r)?r.signal||O4(r):ge(r))}return n+"]"}function int(e){let i,r,t="{",n=0;for(i in e)r=e[i],t+=(++n>1?",":"")+ge(i)+":"+(we(r)?r.signal||O4(r):ge(r));return t+"}"}function ont(e,t,n){return we(e)||J("Input Vega specification must be an object."),function ent(e,t){const n=t.config,i=Pe(t.root=t.add(VA())),r=function tnt(e,t){const n=s=>Fa(e[s],t[s]),i=[$b("background",n("background")),$b("autosize",hJe(n("autosize"))),$b("padding",gJe(n("padding"))),$b("width",n("width")||0),$b("height",n("height")||0)],r=i.reduce((s,a)=>(s[a.name]=a,s),{}),o={};return Ee(e.signals).forEach(s=>{De(r,s.name)?s=rt(r[s.name],s):i.push(s),o[s.name]=s}),Ee(t.signals).forEach(s=>{!De(o,s.name)&&!De(r,s.name)&&i.push(s)}),i}(e,n);r.forEach(c=>Qde(c,t)),t.description=e.description||n.description,t.eventConfig=n.events,t.legends=t.objectProperty(n.legend&&n.legend.layout),t.locale=n.locale;const o=t.add(Pa()),s=t.add(ife(Kde(Jtt(e.encode),qA,u4,e.style,t,{pulse:Pe(o)}))),a=t.add(sfe({layout:t.objectProperty(e.layout),legends:t.legends,autosize:t.signalRef("autosize"),mark:i,pulse:Pe(s)}));t.operators.pop(),t.pushState(Pe(s),Pe(a),null),Ffe(e,t,r),t.operators.push(a);let l=t.add(tfe({mark:i,pulse:Pe(a)}));return l=t.add(ofe({pulse:Pe(l)})),l=t.add(Xh({pulse:Pe(l)})),t.addData("root",new Zh(t,o,o,l)),t}(e,new Pfe(t=Sm(function rnt(){const e="sans-serif",i="#4c78a8",r="#000",o="#888",s="#ddd";return{description:"Vega visualization",padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:i},area:{fill:i},image:null,line:{stroke:i,strokeWidth:2},path:{stroke:i},rect:{fill:i},rule:{stroke:r},shape:{stroke:i},symbol:{fill:i,size:64},text:{fill:r,font:e,fontSize:11},trail:{fill:i,size:2},style:{"guide-label":{fill:r,font:e,fontSize:10},"guide-title":{fill:r,font:e,fontSize:11,fontWeight:"bold"},"group-title":{fill:r,font:e,fontSize:13,fontWeight:"bold"},"group-subtitle":{fill:r,font:e,fontSize:12},point:{size:30,strokeWidth:2,shape:"circle"},circle:{size:30,strokeWidth:2},square:{size:30,strokeWidth:2,shape:"square"},cell:{fill:"transparent",stroke:s},view:{fill:"transparent"}},title:{orient:"top",anchor:"middle",offset:4,subtitlePadding:3},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:!0,domainWidth:1,domainColor:o,grid:!1,gridWidth:1,gridColor:s,labels:!0,labelAngle:0,labelLimit:180,labelOffset:0,labelPadding:2,ticks:!0,tickColor:o,tickOffset:0,tickRound:!0,tickSize:5,tickWidth:1,titlePadding:4},axisBand:{tickOffset:-.5},projection:{type:"mercator"},legend:{orient:"right",padding:0,gridAlign:"each",columnPadding:10,rowPadding:2,symbolDirection:"vertical",gradientDirection:"vertical",gradientLength:200,gradientThickness:16,gradientStrokeColor:s,gradientStrokeWidth:0,gradientLabelOffset:2,labelAlign:"left",labelBaseline:"middle",labelLimit:160,labelOffset:4,labelOverlap:!0,symbolLimit:30,symbolType:"circle",symbolSize:100,symbolOffset:0,symbolStrokeWidth:1.5,symbolBaseFillColor:"transparent",symbolBaseStrokeColor:o,titleLimit:180,titleOrient:"top",titlePadding:5,layout:{offset:18,direction:"horizontal",left:{direction:"vertical"},right:{direction:"vertical"}}},range:{category:{scheme:"tableau10"},ordinal:{scheme:"blues"},heatmap:{scheme:"yellowgreenblue"},ramp:{scheme:"blues"},diverging:{scheme:"blueorange",extent:[1,0]},symbol:["circle","square","triangle-up","cross","diamond","triangle-right","triangle-down","triangle-left"]}}}(),t,e.config),n)).toRuntime()}Pfe.prototype=Lfe.prototype={parse(e){return Ffe(e,this)},fork(){return new Lfe(this)},isSubscope(){return this._subid>0},toRuntime(){return this.finish(),{description:this.description,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig,locale:this.locale}},id(){return(this._subid?this._subid+":":0)+this._id++},add(e){return this.operators.push(e),e.id=this.id(),e.refs&&(e.refs.forEach(t=>{t.$ref=e.id}),e.refs=null),e},proxy(e){const t=e instanceof h4?Pe(e):e;return this.add(_et({value:t}))},addStream(e){return this.streams.push(e),e.id=this.id(),e},addUpdate(e){return this.updates.push(e),e},finish(){let e,t;for(e in this.root&&(this.root.root=!0),this.signals)this.signals[e].signal=e;for(e in this.scales)this.scales[e].scale=e;function n(i,r,o){let s,a;i&&(s=i.data||(i.data={}),a=s[r]||(s[r]=[]),a.push(o))}for(e in this.data){t=this.data[e],n(t.input,e,"input"),n(t.output,e,"output"),n(t.values,e,"values");for(const i in t.index)n(t.index[i],e,"index:"+i)}return this},pushState(e,t,n){this._encode.push(Pe(this.add(Xh({pulse:e})))),this._parent.push(t),this._lookup.push(n?Pe(this.proxy(n)):null),this._markpath.push(-1)},popState(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},parent(){return yt(this._parent)},encode(){return yt(this._encode)},lookup(){return yt(this._lookup)},markpath(){const e=this._markpath;return++e[e.length-1]},fieldRef(e,t){if(Ce(e))return kb(e,t);e.signal||J("Unsupported field reference: "+ge(e));const n=e.signal;let i=this.field[n];if(!i){const r={name:this.signalRef(n)};t&&(r.as=t),this.field[n]=i=Pe(this.add(set(r)))}return i},compareRef(e){let t=!1;const n=o=>Si(o)?(t=!0,this.signalRef(o.signal)):function GJe(e){return e&&e.expr}(o)?(t=!0,this.exprRef(o.expr)):o,i=Ee(e.field).map(n),r=Ee(e.order).map(n);return t?Pe(this.add(nfe({fields:i,orders:r}))):Zde(i,r)},keyRef(e,t){let n=!1;const r=this.signals;return e=Ee(e).map(o=>Si(o)?(n=!0,Pe(r[o.signal])):o),n?Pe(this.add(aet({fields:e,flat:t}))):function VJe(e,t){const n={$key:e};return t&&(n.$flat=!0),n}(e,t)},sortRef(e){if(!e)return e;const t=UA(e.op,e.field),n=e.order||"ascending";return n.signal?Pe(this.add(nfe({fields:t,orders:this.signalRef(n.signal)}))):Zde(t,n)},event(e,t){const n=e+":"+t;if(!this.events[n]){const i=this.id();this.streams.push({id:i,source:e,type:t}),this.events[n]=i}return this.events[n]},hasOwnSignal(e){return De(this.signals,e)},addSignal(e,t){this.hasOwnSignal(e)&&J("Duplicate signal name: "+ge(e));const n=t instanceof h4?t:this.add(VA(t));return this.signals[e]=n},getSignal(e){return this.signals[e]||J("Unrecognized signal name: "+ge(e)),this.signals[e]},signalRef(e){return this.signals[e]?Pe(this.signals[e]):(De(this.lambdas,e)||(this.lambdas[e]=this.add(VA(null))),Pe(this.lambdas[e]))},parseLambdas(){const e=Object.keys(this.lambdas);for(let t=0,n=e.length;te*t,"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"%":(e,t)=>e%t,">":(e,t)=>e>t,"<":(e,t)=>ee<=t,">=":(e,t)=>e>=t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,"===":(e,t)=>e===t,"!==":(e,t)=>e!==t,"&":(e,t)=>e&t,"|":(e,t)=>e|t,"^":(e,t)=>e^t,"<<":(e,t)=>e<>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t},unt={"+":e=>+e,"-":e=>-e,"~":e=>~e,"!":e=>!e};const dnt=Array.prototype.slice,ep=(e,t,n)=>{const i=n?n(t[0]):t[0];return i[e].apply(i,dnt.call(t,1))};var hnt={isNaN:Number.isNaN,isFinite:Number.isFinite,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,atan2:Math.atan2,ceil:Math.ceil,cos:Math.cos,exp:Math.exp,floor:Math.floor,log:Math.log,max:Math.max,min:Math.min,pow:Math.pow,random:Math.random,round:Math.round,sin:Math.sin,sqrt:Math.sqrt,tan:Math.tan,clamp:(e,t,n)=>Math.max(t,Math.min(n,e)),now:Date.now,utc:Date.UTC,datetime:(e,t,n,i,r,o,s)=>new Date(e,t||0,n??1,i||0,r||0,o||0,s||0),date:e=>new Date(e).getDate(),day:e=>new Date(e).getDay(),year:e=>new Date(e).getFullYear(),month:e=>new Date(e).getMonth(),hours:e=>new Date(e).getHours(),minutes:e=>new Date(e).getMinutes(),seconds:e=>new Date(e).getSeconds(),milliseconds:e=>new Date(e).getMilliseconds(),time:e=>new Date(e).getTime(),timezoneoffset:e=>new Date(e).getTimezoneOffset(),utcdate:e=>new Date(e).getUTCDate(),utcday:e=>new Date(e).getUTCDay(),utcyear:e=>new Date(e).getUTCFullYear(),utcmonth:e=>new Date(e).getUTCMonth(),utchours:e=>new Date(e).getUTCHours(),utcminutes:e=>new Date(e).getUTCMinutes(),utcseconds:e=>new Date(e).getUTCSeconds(),utcmilliseconds:e=>new Date(e).getUTCMilliseconds(),length:e=>e.length,join:function(){return ep("join",arguments)},indexof:function(){return ep("indexOf",arguments)},lastindexof:function(){return ep("lastIndexOf",arguments)},slice:function(){return ep("slice",arguments)},reverse:e=>e.slice().reverse(),parseFloat,parseInt,upper:e=>String(e).toUpperCase(),lower:e=>String(e).toLowerCase(),substring:function(){return ep("substring",arguments,String)},split:function(){return ep("split",arguments,String)},replace:function(){return ep("replace",arguments,String)},trim:e=>String(e).trim(),regexp:RegExp,test:(e,t)=>RegExp(e).test(t)};const pnt=["view","item","group","xy","x","y"],R4=new Set([Function,eval,setTimeout,setInterval]);"function"==typeof setImmediate&&R4.add(setImmediate);const gnt={Literal:(e,t)=>t.value,Identifier:(e,t)=>{const n=t.name;return e.memberDepth>0?n:"datum"===n?e.datum:"event"===n?e.event:"item"===n?e.item:lnt[n]||e.params["$"+n]},MemberExpression:(e,t)=>{const n=!t.computed,i=e(t.object);n&&(e.memberDepth+=1);const r=e(t.property);if(n&&(e.memberDepth-=1),!R4.has(i[r]))return i[r];console.error(`Prevented interpretation of member "${r}" which could lead to insecure code execution`)},CallExpression:(e,t)=>{const n=t.arguments;let i=t.callee.name;return i.startsWith("_")&&(i=i.slice(1)),"if"===i?e(n[0])?e(n[1]):e(n[2]):(e.fn[i]||hnt[i]).apply(e.fn,n.map(e))},ArrayExpression:(e,t)=>t.elements.map(e),BinaryExpression:(e,t)=>cnt[t.operator](e(t.left),e(t.right)),UnaryExpression:(e,t)=>unt[t.operator](e(t.argument)),ConditionalExpression:(e,t)=>e(t.test)?e(t.consequent):e(t.alternate),LogicalExpression:(e,t)=>"&&"===t.operator?e(t.left)&&e(t.right):e(t.left)||e(t.right),ObjectExpression:(e,t)=>t.properties.reduce((n,i)=>{e.memberDepth+=1;const r=e(i.key);return e.memberDepth-=1,R4.has(e(i.value))?console.error(`Prevented interpretation of property "${r}" which could lead to insecure code execution`):n[r]=e(i.value),n},{})};function Bb(e,t,n,i,r,o){const s=a=>gnt[a.type](s,a);return s.memberDepth=0,s.fn=Object.create(t),s.params=n,s.datum=i,s.event=r,s.item=o,pnt.forEach(a=>s.fn[a]=function(){return r.vega[a](...arguments)}),s(e)}var mnt={operator(e,t){const n=t.ast,i=e.functions;return r=>Bb(n,i,r)},parameter(e,t){const n=t.ast,i=e.functions;return(r,o)=>Bb(n,i,o,r)},event(e,t){const n=t.ast,i=e.functions;return r=>Bb(n,i,void 0,void 0,r)},handler(e,t){const n=t.ast,i=e.functions;return(r,o)=>Bb(n,i,r,o.item&&o.item.datum,o)},encode(e,t){const{marktype:n,channels:i}=t,r=e.functions,o="group"===n||"image"===n||"rect"===n;return(s,a)=>{const l=s.datum;let u,c=0;for(const d in i)u=Bb(i[d].ast,r,a,l,void 0,s),s[d]!==u&&(s[d]=u,c=1);return"rule"!==n&&function ant(e,t,n){let i;t.x2&&(t.x?(n&&e.x>e.x2&&(i=e.x,e.x=e.x2,e.x2=i),e.width=e.x2-e.x):e.x=e.x2-(e.width||0)),t.xc&&(e.x=e.xc-(e.width||0)/2),t.y2&&(t.y?(n&&e.y>e.y2&&(i=e.y,e.y=e.y2,e.y2=i),e.height=e.y2-e.y):e.y=e.y2-(e.height||0)),t.yc&&(e.y=e.yc-(e.height||0)/2)}(s,i,o),c}}};function F4(e){return ce(e,"or")}function P4(e){return ce(e,"and")}function L4(e){return ce(e,"not")}function JA(e,t){if(L4(e))JA(e.not,t);else if(P4(e))for(const n of e.and)JA(n,t);else if(F4(e))for(const n of e.or)JA(n,t);else t(e)}function P_(e,t){return L4(e)?{not:P_(e.not,t)}:P4(e)?{and:e.and.map(n=>P_(n,t))}:F4(e)?{or:e.or.map(n=>P_(n,t))}:t(e)}const Ze=structuredClone;function $fe(e){throw new Error(e)}function L_(e,t){const n={};for(const i of t)De(e,i)&&(n[i]=e[i]);return n}function Co(e,t){const n={...e};for(const i of t)delete n[i];return n}function gt(e){if(At(e))return e;const t=Ce(e)?e:Jt(e);if(t.length<250)return t;let n=0;for(let i=0;i0===a?s:`[${s}]`),o=r.map((s,a)=>r.slice(0,a+1).join(""));for(const s of o)t.add(s)}return t}function U4(e,t){return void 0===e||void 0===t||j4(V4(e),V4(t))}function Zt(e){return 0===se(e).length}Set.prototype.toJSON=function(){return`Set(${[...this].map(e=>Jt(e)).join(",")})`};const se=Object.keys,nr=Object.values,Hd=Object.entries;function jb(e){return!0===e||!1===e}function Nn(e){const t=e.replace(/\W/g,"_");return(e.match(/^\d+/)?"_":"")+t}function Vb(e,t){return L4(e)?`!(${Vb(e.not,t)})`:P4(e)?`(${e.and.map(n=>Vb(n,t)).join(") && (")})`:F4(e)?`(${e.or.map(n=>Vb(n,t)).join(") || (")})`:t(e)}function eM(e,t){if(0===t.length)return!0;const n=t.shift();return n in e&&eM(e[n],t)&&delete e[n],Zt(e)}function Ub(e){return e.charAt(0).toUpperCase()+e.substr(1)}function z4(e,t="datum"){const n=xl(e),i=[];for(let r=1;r<=n.length;r++){const o=`[${n.slice(0,r).map(ge).join("][")}]`;i.push(`${t}${o}`)}return i.join(" && ")}function Vfe(e,t="datum"){return`${t}[${ge(xl(e).join("."))}]`}function bnt(e){return e.replace(/(\[|\]|\.|'|")/g,"\\$1")}function zs(e){return`${xl(e).map(bnt).join("\\.")}`}function tp(e,t,n){return e.replace(new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),n)}function B_(e){return`${xl(e).join(".")}`}function j_(e){return e?xl(e).length:0}function Xn(...e){return e.find(t=>void 0!==t)}let Ufe=42;function zfe(e){const t=++Ufe;return e?String(e)+t:t}function wnt(){Ufe=42}function Hfe(e){return Gfe(e)?e:`__${e}`}function Gfe(e){return e.startsWith("__")}function zb(e){if(void 0!==e)return(e%360+360)%360}function tM(e){return!!At(e)||!isNaN(e)&&!isNaN(parseFloat(e))}const Wfe=Object.getPrototypeOf(structuredClone({}));function as(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(!as(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const o of e.entries())if(!t.has(o[0]))return!1;for(const o of e.entries())if(!as(o[1],t.get(o[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const o of e.entries())if(!t.has(o[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!==Wfe.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&e.toString!==Wfe.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 o=r[i];if(!as(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function Jt(e){const t=[];return function n(i){if(i&&i.toJSON&&"function"==typeof i.toJSON&&(i=i.toJSON()),void 0===i)return;if("number"==typeof i)return isFinite(i)?""+i:"null";if("object"!=typeof i)return JSON.stringify(i);let r,o;if(Array.isArray(i)){for(o="[",r=0;rcM(e[t])?Nn(`_${t}_${Hd(e[t])}`):Nn(`_${t}_${e[t]}`)).join("")}function mn(e){return!0===e||op(e)&&!e.binned}function ir(e){return"binned"===e||op(e)&&!0===e.binned}function op(e){return we(e)}function cM(e){return ce(e,"param")}function ahe(e){switch(e){case au:case lu:case du:case Do:case tc:case nc:case Yd:case fu:case Wd:case qd:case So:return 6;case Kd:return 4;default:return 10}}function qb(e){return ce(e,"expr")}function rr(e,{level:t}={level:0}){const n=se(e||{}),i={};for(const r of n)i[r]=0===t?ls(e[r]):rr(e[r],{level:t-1});return i}function lhe(e){const{anchor:t,frame:n,offset:i,orient:r,angle:o,limit:s,color:a,subtitleColor:l,subtitleFont:c,subtitleFontSize:u,subtitleFontStyle:d,subtitleFontWeight:f,subtitleLineHeight:h,subtitlePadding:p,...g}=e,_={...t?{anchor:t}:{},...n?{frame:n}:{},...i?{offset:i}:{},...r?{orient:r}:{},...void 0!==o?{angle:o}:{},...void 0!==s?{limit:s}:{}},y={...l?{subtitleColor:l}:{},...c?{subtitleFont:c}:{},...u?{subtitleFontSize:u}:{},...d?{subtitleFontStyle:d}:{},...f?{subtitleFontWeight:f}:{},...h?{subtitleLineHeight:h}:{},...p?{subtitlePadding:p}:{}};return{titleMarkConfig:{...g,...a?{fill:a}:{}},subtitleMarkConfig:L_(e,["align","baseline","dx","dy","limit"]),nonMarkTitleProperties:_,subtitle:y}}function Zd(e){return Ce(e)||te(e)&&Ce(e[0])}function ke(e){return ce(e,"signal")}function sp(e){return ce(e,"step")}function gu(e){return!te(e)&&ce(e,"field")&&ce(e,"data")}const Gnt=se({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}),Wnt={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},t6=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"];function che(e){const t=te(e.condition)?e.condition.map(uhe):uhe(e.condition);return{...ls(e),condition:t}}function ls(e){if(qb(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function uhe(e){if(qb(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function En(e){if(qb(e)){const{expr:t,...n}=e;return{signal:t,...n}}return ke(e)?e:void 0!==e?{value:e}:void 0}function qnt(e){return ke(e)?e.signal:ge(e)}function dhe(e){return ke(e)?e.signal:ge(e.value)}function Ha(e){return ke(e)?e.signal:null==e?null:ge(e)}function Ynt(e,t,n){for(const i of n){const r=oc(i,t.markDef,t.config);void 0!==r&&(e[i]=En(r))}return e}function fhe(e){return[].concat(e.type,e.style??[])}function en(e,t,n,i={}){const{vgChannel:r,ignoreVgConfig:o}=i;return r&&ce(t,r)?t[r]:void 0!==t[e]?t[e]:!o||r&&r!==e?oc(e,t,n,i):void 0}function oc(e,t,n,{vgChannel:i}={}){const r=n6(e,t,n.style);return Xn(i?r:void 0,r,i?n[t.type][i]:void 0,n[t.type][e],i?n.mark[i]:n.mark[e])}function n6(e,t,n){return hhe(e,fhe(t),n)}function hhe(e,t,n){let i;t=Ee(t);for(const r of t){const o=n[r];ce(o,e)&&(i=o[e])}return i}function phe(e,t){return Ee(e).reduce((n,i)=>(n.field.push(ve(i,t)),n.order.push(i.sort??"ascending"),n),{field:[],order:[]})}function ghe(e,t){const n=[...e];return t.forEach(i=>{for(const r of n)if(as(r,i))return;n.push(i)}),n}function mhe(e,t){return as(e,t)||!t?e:e?[...Ee(e),...Ee(t)].join(", "):t}function _he(e,t){const n=e.value,i=t.value;if(null==n||null===i)return{explicit:e.explicit,value:null};if((Zd(n)||ke(n))&&(Zd(i)||ke(i)))return{explicit:e.explicit,value:mhe(n,i)};if(Zd(n)||ke(n))return{explicit:e.explicit,value:n};if(Zd(i)||ke(i))return{explicit:e.explicit,value:i};if(!(Zd(n)||ke(n)||Zd(i)||ke(i)))return{explicit:e.explicit,value:ghe(n,i)};throw new Error("It should never reach here")}function i6(e){return`Invalid specification ${Jt(e)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}const Knt='Autosize "fit" only works for single views and layered views.';function yhe(e){return("width"==e?"Width":"Height")+' "container" only works for single views and layered views.'}function vhe(e){return`${"width"==e?"Width":"Height"} "container" only works well with autosize "fit" or "fit-${"width"==e?"x":"y"}".`}function bhe(e){return e?`Dropping "fit-${e}" because spec has discrete ${To(e)}.`:'Dropping "fit" because spec has discrete size.'}function r6(e){return`Unknown field for ${e}. Cannot calculate view size.`}function whe(e){return`Cannot project a selection on encoding channel "${e}", which has no field.`}function Xnt(e,t){return`Cannot project a selection on encoding channel "${e}" as it uses an aggregate function ("${t}").`}function Ehe(e){return`Selection not supported for ${e} yet.`}function Che(e){return`The "columns" property cannot be used when "${e}" has nested row/column.`}function Dhe(e,t,n){return`An ancestor parsed field "${e}" as ${n} but a child wants to parse the field as ${t}.`}function uit(e){return`Ignoring an invalid transform: ${Jt(e)}.`}function She(e){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${e} are dropped.`}function pit(e){return`${e}Offset dropped because ${e} is continuous`}function The(e){return`Invalid field type "${e}".`}function xhe(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 o6(e,t){return`Dropping ${Jt(e)} from channel "${t}" since it does not contain any data field, datum, value, or signal.`}function uM(e,t,n){return`${e} dropped as it is incompatible with "${t}"${n?` when ${n}`:""}.`}function bit(e){return`${e}-encoding is dropped as ${e} is not a valid encoding channel.`}function wit(e){return`${e} encoding should be discrete (ordinal / nominal / binned).`}function Eit(e){return`${e} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function s6(e,t){return`Using discrete channel "${e}" to encode "${t}" field can be misleading as it does not encode ${"ordinal"===t?"order":"magnitude"}.`}function Mit(e){return`Using unaggregated domain with raw field has no effect (${Jt(e)}).`}function Nit(e){return`Unaggregated domain not applicable for "${e}" since it produces values outside the origin domain of the source data.`}function Iit(e){return`Unaggregated domain is currently unsupported for log scale (${Jt(e)}).`}function Ahe(e,t,n){return`${n}-scale's "${t}" is dropped as it does not work with ${e} scale.`}function Mhe(e){return`The step for "${e}" is dropped because the ${"width"===e?"x":"y"} is continuous.`}const Nhe="Domains that should be unioned has conflicting sort properties. Sort will be set to true.";function dM(e,t){return`Invalid ${e}: ${Jt(t)}.`}function Ihe(e){return`1D error band does not support ${e}.`}function khe(e){return`Channel ${e} is required for "binned" bin.`}const Ohe=EP(wP);let sc=Ohe;function de(...e){sc.warn(...e)}function ap(e){if(e&&we(e))for(const t of l6)if(ce(e,t))return!0;return!1}const Fhe=["january","february","march","april","may","june","july","august","september","october","november","december"],trt=Fhe.map(e=>e.substr(0,3)),Phe=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],nrt=Phe.map(e=>e.substr(0,3));function a6(e,t){const n=[];if(t&&void 0!==e.day&&se(e).length>1&&(de(function Git(e){return`Dropping day from datetime ${Jt(e)} as day cannot be combined with other units.`}(e)),delete(e=Ze(e)).day),n.push(void 0!==e.year?e.year:2012),void 0!==e.month){const i=t?function rrt(e){if(tM(e)&&(e=+e),At(e))return e-1;{const t=e.toLowerCase(),n=Fhe.indexOf(t);if(-1!==n)return n;const i=t.substr(0,3),r=trt.indexOf(i);if(-1!==r)return r;throw new Error(dM("month",e))}}(e.month):e.month;n.push(i)}else if(void 0!==e.quarter){const i=t?function irt(e){if(tM(e)&&(e=+e),At(e))return e>4&&de(dM("quarter",e)),e-1;throw new Error(dM("quarter",e))}(e.quarter):e.quarter;n.push(At(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 ort(e){if(tM(e)&&(e=+e),At(e))return e%7;{const t=e.toLowerCase(),n=Phe.indexOf(t);if(-1!==n)return n;const i=t.substr(0,3),r=nrt.indexOf(i);if(-1!==r)return r;throw new Error(dM("day",e))}}(e.day):e.day;n.push(At(i)?i+1:`${i}+1`)}else n.push(1);for(const i of["hours","minutes","seconds","milliseconds"]){const r=e[i];n.push(typeof r>"u"?0:r)}return n}function lp(e){const n=a6(e,!0).join(", ");return e.utc?`utc(${n})`:`datetime(${n})`}const Lhe={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},l6=se(Lhe);function cp(e){return we(e)?e.binned:$he(e)}function $he(e){return e&&e.startsWith("binned")}function c6(e){return e.startsWith("utc")}const urt={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function fM(e){return l6.filter(t=>jhe(e,t))}function Bhe(e){const t=fM(e);return t[t.length-1]}function jhe(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 Vhe(e){if(e)return`timeUnitSpecifier(${Jt(fM(e))}, ${Jt(urt)})`}function Pi(e){if(!e)return;let t;return Ce(e)?t=$he(e)?{unit:e.substring(6),binned:!0}:{unit:e}:we(e)&&(t={...e,...e.unit?{unit:e.unit}:{}}),c6(t.unit)&&(t.utc=!0,t.unit=function crt(e){return e.substring(3)}(t.unit)),t}function Uhe(e,t=n=>n){const n=Pi(e),i=Bhe(n.unit);if(i&&"day"!==i){const r={year:2001,month:1,date:1,hours:0,minutes:0,seconds:0,milliseconds:0},{step:o,part:s}=zhe(i,n.step);return`${t(lp({...r,[s]:+r[s]+o}))} - ${t(lp(r))}`}}const prt={year:1,month:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1};function zhe(e,t=1){if(function grt(e){return De(prt,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 u6(e){return!!e?.field&&void 0!==e.equal}function d6(e){return!!e?.field&&void 0!==e.lt}function f6(e){return!!e?.field&&void 0!==e.lte}function h6(e){return!!e?.field&&void 0!==e.gt}function p6(e){return!!e?.field&&void 0!==e.gte}function g6(e){if(e?.field){if(te(e.range)&&2===e.range.length)return!0;if(ke(e.range))return!0}return!1}function m6(e){return!!e?.field&&(te(e.oneOf)||te(e.in))}function Hhe(e){return m6(e)||u6(e)||g6(e)||d6(e)||h6(e)||f6(e)||p6(e)}function ac(e,t){return MM(e,{timeUnit:t,wrapTime:!0})}function Ghe(e,t=!0){const{field:n}=e,i=Pi(e.timeUnit),{unit:r,binned:o}=i||{},s=ve(e,{expr:"datum"}),a=r?`time(${o?s:function drt(e,t,{end:n}={end:!1}){const i=z4(t),r=c6(e)?"utc":"";function o(l){return"quarter"===l?`(${r}quarter(${i})-1)`:`${r}${l}(${i})`}let s;const a={};for(const l of l6)jhe(e,l)&&(a[l]=o(l),s=l);return n&&(a[s]+="+1"),function srt(e){const n=a6(e,!1).join(", ");return e.utc?`utc(${n})`:`datetime(${n})`}(a)}(r,n)})`:s;if(u6(e))return`${a}===${ac(e.equal,r)}`;if(d6(e))return`${a}<${ac(e.lt,r)}`;if(h6(e))return`${a}>${ac(e.gt,r)}`;if(f6(e))return`${a}<=${ac(e.lte,r)}`;if(p6(e))return`${a}>=${ac(e.gte,r)}`;if(m6(e))return`indexof([${function yrt(e,t){return e.map(n=>ac(n,t))}(e.oneOf,r).join(",")}], ${a}) !== -1`;if(function _rt(e){return!!e?.field&&void 0!==e.valid}(e))return hM(a,e.valid);if(g6(e)){const{range:l}=rr(e),c=ke(l)?{signal:`${l.signal}[0]`}:l[0],u=ke(l)?{signal:`${l.signal}[1]`}:l[1];if(null!==c&&null!==u&&t)return"inrange("+a+", ["+ac(c,r)+", "+ac(u,r)+"])";const d=[];return null!==c&&d.push(`${a} >= ${ac(c,r)}`),null!==u&&d.push(`${a} <= ${ac(u,r)}`),d.length>0?d.join(" && "):"true"}throw new Error(`Invalid field predicate: ${Jt(e)}`)}function hM(e,t=!0){return t?`isValid(${e}) && isFinite(+${e})`:`!isValid(${e}) || !isFinite(+${e})`}function vrt(e){return Hhe(e)&&e.timeUnit?{...e,timeUnit:Pi(e.timeUnit)}:e}const up={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"};function brt(e){return"quantitative"===e||"temporal"===e}function Whe(e){return"ordinal"===e||"nominal"===e}const dp=up.quantitative,_6=up.ordinal,H_=up.temporal,y6=up.nominal,G_=up.geojson;se(up);const or={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"},pM={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 Ert(e,t){const n=pM[e],i=pM[t];return n===i||"ordinal-position"===n&&"time"===i||"ordinal-position"===i&&"time"===n}se(pM);const Crt={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 qhe(e){return Crt[e]}const Yhe=new Set(["linear","log","pow","sqrt","symlog"]),Khe=new Set([...Yhe,"time","utc"]);function Xhe(e){return Yhe.has(e)}const Qhe=new Set(["quantile","quantize","threshold"]),Drt=new Set([...Khe,...Qhe,"sequential","identity"]),Srt=new Set(["ordinal","bin-ordinal","point","band"]);function Li(e){return Srt.has(e)}function Ga(e){return Drt.has(e)}function lc(e){return Khe.has(e)}function W_(e){return Qhe.has(e)}function Zhe(e){return ce(e,"param")}const Jhe={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:p2t,domain:g2t,range:m2t,rangeMax:_2t,rangeMin:y2t,scheme:v2t,...Nrt}=(se(Jhe),Jhe),Irt=se(Nrt);function v6(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 lc(e)||"band"===e||"point"===e;case"padding":case"rangeMin":case"rangeMax":return lc(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 lc(e);case"nice":return lc(e)||"quantize"===e||"threshold"===e;case"exponent":return"pow"===e;case"base":return"log"===e;case"constant":return"symlog"===e;case"zero":return Ga(e)&&!pt(["log","time","utc","threshold","quantile"],e)}}function epe(e,t){switch(t){case"interpolate":case"scheme":case"domainMid":return z_(e)?void 0:function xit(e){return`Cannot use the scale property "${e}" with non-color channel.`}(t);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 Dr={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"},tpe=Dr.arc,gM=Dr.area,mM=Dr.bar,Frt=Dr.image,_M=Dr.line,yM=Dr.point,Prt=Dr.rect,vM=Dr.rule,npe=Dr.text,b6=Dr.tick,Lrt=Dr.trail,w6=Dr.circle,E6=Dr.square,ipe=Dr.geoshape;function ef(e){return["line","area","trail"].includes(e)}function Kb(e){return["rect","bar","image","arc","tick"].includes(e)}const rpe=new Set(se(Dr));function Wa(e){return ce(e,"type")}const jrt=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit","fill","fillOpacity"],ope=se({color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBandSize:1,timeUnitBandPosition:1}),C6=["binSpacing","continuousBandSize","discreteBandSize","minBandSize"],Vrt={area:["line","point"],bar:C6,rect:C6,line:["point"],tick:["bandSize","thickness",...C6]},spe=se({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 fp(e){return ce(e,"band")}const zrt={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]},D6={binSpacing:0,continuousBandSize:5,minBandSize:.25,timeUnitBandPosition:.5},Hrt={...D6,binSpacing:1},Grt={...D6,thickness:1};function ape(e,{isPath:t}){return void 0===e||"break-paths-show-path-domains"===e?t?"break-paths-show-domains":"filter":null===e?"show":e}function S6({markDef:e,config:t,scaleChannel:n,scaleType:i,isCountAggregate:r}){if(!i||!Ga(i)||r)return"always-valid";const o=ape(en("invalid",e,t),{isPath:ef(e.type)});return void 0!==t.scale?.invalid?.[n]?"show":o}function lpe({scaleName:e,scale:t,mode:n}){const i=`domain('${e}')`;if(!t||!e)return;const r=`${i}[0]`,o=`peek(${i})`,s=t.domainHasZero();return"definitely"===s?{scale:e,value:0}:"maybe"===s?{signal:`scale('${e}', inrange(0, ${i}) ? 0 : ${"zeroOrMin"===n?r:o})`}:{signal:`scale('${e}', ${"zeroOrMin"===n?r:o})`}}function cpe({scaleChannel:e,channelDef:t,scale:n,scaleName:i,markDef:r,config:o}){const s=n?.get("type"),a=Ka(t),c=S6({scaleChannel:e,markDef:r,config:o,scaleType:s,isCountAggregate:lM(a?.aggregate)});if(a&&"show"===c){const u=o.scale.invalid?.[e]??"zero-or-min";return{test:hM(ve(a,{expr:"datum"}),!1),...Yrt(u,n,i)}}}function Yrt(e,t,n){if(function Rrt(e){return we(e)&&"value"in e}(e)){const{value:i}=e;return ke(i)?{signal:i.signal}:{value:i}}return lpe({scale:t,scaleName:n,mode:"zeroOrMin"})}function T6(e){const{channel:t,channelDef:n,markDef:i,scale:r,scaleName:o,config:s}=e,a=rp(t),l=x6(e),c=cpe({scaleChannel:a,channelDef:n,scale:r,scaleName:o,markDef:i,config:s});return void 0!==c?[c,l]:l}function hp(e,t,n,i){const r={};if(t&&(r.scale=t),cc(e)){const{datum:o}=e;ap(o)?r.signal=lp(o):ke(o)?r.signal=o.signal:qb(o)?r.signal=o.expr:r.value=o}else r.field=ve(e,n);if(i){const{offset:o,band:s}=i;o&&(r.offset=o),s&&(r.band=s)}return r}function bM({scaleName:e,fieldOrDatumDef:t,fieldOrDatumDef2:n,offset:i,startSuffix:r,endSuffix:o="end",bandPosition:s=.5}){const a=!ke(s)&&0Nn(`${"unit"===i?"":`_${i}_`}${n[i]}`)).join(""):(t?"utc":"")+"timeunit"+se(n).map(i=>Nn(`_${i}_${n[i]}`)).join("")}(c),r=(!["range","mid"].includes(t.binSuffix)&&t.binSuffix||"")+(t.suffix??""))}s&&(n=n?`${s}_${n}`:s)}return r&&(n=`${n}_${r}`),i&&(n=`${i}_${n}`),t.forAs?B_(n):t.expr?Vfe(n,t.expr)+o:zs(n)+o}function SM(e){switch(e.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return he(e)&&!!e.bin;case"temporal":return!1}throw new Error(The(e.type))}const Spe=(e,t)=>{switch(t.fieldTitle){case"plain":return e.field;case"functional":return function uot(e){const{aggregate:t,bin:n,timeUnit:i,field:r}=e;if(Qd(t))return`${r} for argmax(${t.argmax})`;if(pu(t))return`${r} for argmin(${t.argmin})`;const o=i&&!cp(i)?Pi(i):void 0,s=t||o?.unit||o?.maxbins&&"timeunit"||mn(n)&&"bin";return s?`${s.toUpperCase()}(${r})`:r}(e);default:return function cot(e,t){const{field:n,bin:i,timeUnit:r,aggregate:o}=e;if("count"===o)return t.countTitle;if(mn(i))return`${n} (binned)`;if(r&&!cp(r)){const s=Pi(r)?.unit;if(s)return`${n} (${fM(s).join("-")})`}else if(o)return Qd(o)?`${n} for max ${o.argmax}`:pu(o)?`${n} for min ${o.argmin}`:`${Ub(o)} of ${n}`;return n}(e,t)}};let Tpe=Spe;function xpe(e){Tpe=e}function K_(e,t,{allowDisabling:n,includeDefault:i=!0}){const r=k6(e)?.title;if(!he(e))return r??e.title;const o=e,s=i?O6(o,t):void 0;return n?Xn(r,o.title,s):r??o.title??s}function k6(e){return Y_(e)&&e.axis?e.axis:Cpe(e)&&e.legend?e.legend:N6(e)&&e.header?e.header:void 0}function O6(e,t){return Tpe(e,t)}function TM(e){if(Dpe(e)){const{format:t,formatType:n}=e;return{format:t,formatType:n}}{const t=k6(e)??{},{format:n,formatType:i}=t;return{format:n,formatType:i}}}function Ka(e){return he(e)?e:CM(e)?e.condition:void 0}function Ti(e){return tt(e)?e:ew(e)?e.condition:void 0}function Ape(e,t,n,i={}){return Ce(e)||At(e)||td(e)?(de(function git(e,t,n){return`Channel ${e} is a ${t}. Converted to {value: ${Jt(n)}}.`}(t,Ce(e)?"string":At(e)?"number":"boolean",e)),{value:e}):tt(e)?xM(e,t,n,i):ew(e)?{...e,condition:xM(e.condition,t,n,i)}:e}function xM(e,t,n,i){if(Dpe(e)){const{format:r,formatType:o,...s}=e;if(pp(o)&&!n.customFormatTypes)return de(She(t)),xM(s,t,n,i)}else{const r=Y_(e)?"axis":Cpe(e)?"legend":N6(e)?"header":null;if(r&&e[r]){const{format:o,formatType:s,...a}=e[r];if(pp(s)&&!n.customFormatTypes)return de(She(t)),xM({...e,[r]:a},t,n,i)}}return he(e)?R6(e,t,i):function hot(e){let t=e.type;if(t)return e;const{datum:n}=e;return t=At(n)?"quantitative":Ce(n)?"nominal":ap(n)?"temporal":void 0,{...e,type:t}}(e)}function R6(e,t,{compositeMark:n=!1}={}){const{aggregate:i,timeUnit:r,bin:o,field:s}=e,a={...e};if(!n&&i&&!e6(i)&&!Qd(i)&&!pu(i)&&(de(function _it(e){return`Invalid aggregation operator "${e}".`}(i)),delete a.aggregate),r&&(a.timeUnit=Pi(r)),s&&(a.field=`${s}`),mn(o)&&(a.bin=AM(o,t)),ir(o)&&!Qn(t)&&de(function Kit(e){return`Channel ${e} should not be used with "binned" bin.`}(t)),eo(a)){const{type:l}=a,c=function wrt(e){if(e)switch(e=e.toLowerCase(),e){case"q":case dp:return"quantitative";case"t":case H_:return"temporal";case"o":case _6:return"ordinal";case"n":case y6:return"nominal";case G_:return"geojson"}}(l);l!==c&&(a.type=c),"quantitative"!==l&&lM(i)&&(de(function mit(e,t){return`Invalid field type "${e}" for aggregate: "${t}", using "quantitative" instead.`}(l,i)),a.type="quantitative")}else if(!the(t)){const l=function fot(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(I6(e)&&te(e.sort))return"ordinal";const{aggregate:n,bin:i,timeUnit:r}=e;if(r)return"temporal";if(i||n&&!Qd(n)&&!pu(n))return"quantitative";if(gp(e)&&e.scale?.type)switch(pM[e.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}(a,t);a.type=l}if(eo(a)){const{compatible:l,warning:c}=function pot(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 au:case lu:case nM:return SM(e)?X_:{compatible:!1,warning:wit(t)};case In:case Fi:case Gd:case V_:case Do:case tc:case nc:case Hb:case Gb:case iM:case ip:case rM:case oM:case np:case Hs:case ja:case sM:return X_;case Ua:case Gs:case Va:case za:return n!==dp?{compatible:!1,warning:`Channel ${t} should be used with a quantitative field only, not ${e.type} field.`}:X_;case fu:case Wd:case qd:case Yd:case du:case uu:case cu:case Ba:case ec:return"nominal"!==n||e.sort?X_:{compatible:!1,warning:`Channel ${t} should not be used with an unsorted discrete field.`};case So:case Kd:return SM(e)||function aot(e){return gp(e)&&W_(e.scale?.type)}(e)?X_:{compatible:!1,warning:Eit(t)};case U_:return"nominal"!==e.type||"sort"in e?X_:{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}}}(a,t)||{};!1===l&&de(c)}if(I6(a)&&Ce(a.sort)){const{sort:l}=a;if(mpe(l))return{...a,sort:{encoding:l}};const c=l.substring(1);if("-"===l.charAt(0)&&mpe(c))return{...a,sort:{encoding:c,order:"descending"}}}if(N6(a)){const{header:l}=a;if(l){const{orient:c,...u}=l;if(c)return{...a,header:{...u,labelOrient:l.labelOrient||c,titleOrient:l.titleOrient||c}}}}return a}function AM(e,t){return td(e)?{maxbins:ahe(t)}:"binned"===e?{binned:!0}:e.maxbins||e.step?e:{...e,maxbins:ahe(t)}}const X_={compatible:!0};function Q_(e){const{formatType:t}=TM(e);return"time"===t||!t&&function got(e){return e&&("temporal"===e.type||he(e)&&!!e.timeUnit)}(e)}function MM(e,{timeUnit:t,type:n,wrapTime:i,undefinedIfExprNotRequired:r}){const o=t&&Pi(t)?.unit;let a,s=o||"temporal"===n;return qb(e)?a=e.expr:ke(e)?a=e.signal:ap(e)?(s=!0,a=lp(e)):(Ce(e)||At(e))&&s&&(a=`datetime(${Jt(e)})`,function lrt(e){return De(Lhe,e)}(o)&&(At(e)&&e<1e4||Ce(e)&&isNaN(Date.parse(e)))&&(a=lp({[o]:e}))),a?i&&s?`time(${a})`:a:r?void 0:Jt(e)}function Mpe(e,t){const{type:n}=e;return t.map(i=>{const o=MM(i,{timeUnit:he(e)&&!cp(e.timeUnit)?e.timeUnit:void 0,type:n,undefinedIfExprNotRequired:!0});return void 0!==o?{signal:o}:i})}function tw(e,t){return mn(e.bin)?rc(t)&&["ordinal","nominal"].includes(e.type):(console.warn("Only call this method for binned field defs."),!1)}const Npe={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 nw(e){return e?.condition}const Ipe=["domain","grid","labels","ticks","title"],mot={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"},kpe={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},Ope={...kpe,style:1,labelExpr:1,encoding:1};function Rpe(e){return De(Ope,e)}se(Ope);const Fpe=se({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 _u(e){return ce(e,"mark")}class NM{constructor(t,n){this.name=t,this.run=n}hasMatchingType(t){return!!_u(t)&&function Wrt(e){return Wa(e)?e.type:e}(t.mark)===this.name}}function mp(e,t){const n=e&&e[t];return!!n&&(te(n)?$_(n,i=>!!i.field):he(n)||CM(n))}function Ppe(e,t){const n=e&&e[t];return!!n&&(te(n)?$_(n,i=>!!i.field):he(n)||cc(n)||ew(n))}function Lpe(e,t){if(Qn(t)){const n=e[t];if((he(n)||cc(n))&&(Whe(n.type)||he(n)&&n.timeUnit))return Ppe(e,q4(t))}return!1}function $pe(e){return $_(Dnt,t=>{if(mp(e,t)){const n=e[t];if(te(n))return $_(n,i=>!!i.aggregate);{const i=Ka(n);return i&&!!i.aggregate}}return!1})}function Bpe(e,t){const n=[],i=[],r=[],o=[],s={};return F6(e,(a,l)=>{if(he(a)){const{field:c,aggregate:u,bin:d,timeUnit:f,...h}=a;if(u||f||d){const g=k6(a)?.title;let m=ve(a,{forAs:!0});const _={...g?[]:{title:K_(a,t,{allowDisabling:!0})},...h,field:m};if(u){let y;if(Qd(u)?(y="argmax",m=ve({op:"argmax",field:u.argmax},{forAs:!0}),_.field=`${m}.${c}`):pu(u)?(y="argmin",m=ve({op:"argmin",field:u.argmin},{forAs:!0}),_.field=`${m}.${c}`):"boxplot"!==u&&"errorbar"!==u&&"errorband"!==u&&(y=u),y){const v={op:y,as:m};c&&(v.field=c),o.push(v)}}else if(n.push(m),eo(a)&&mn(d))i.push({bin:d,field:c,as:m}),n.push(ve(a,{binSuffix:"end"})),tw(a,l)&&n.push(ve(a,{binSuffix:"range"})),Qn(l)&&(s[`${l}2`]={field:`${m}_end`}),_.bin="binned",the(l)||(_.type=dp);else if(f&&!cp(f)){r.push({timeUnit:f,field:c,as:m});const y=eo(a)&&a.type!==H_&&"time";y&&(l===Hb||l===ip?_.formatType=y:function knt(e){return De(Y4,e)}(l)?_.legend={formatType:y,..._.legend}:Qn(l)&&(_.axis={formatType:y,..._.axis}))}s[l]=_}else n.push(c),s[l]=e[l]}else s[l]=e[l]}),{bins:i,timeUnits:r,aggregate:o,groupby:n,encoding:s}}function _ot(e,t,n){const i=function Rnt(e,t){return function Pnt(e){switch(e){case Do:case tc:case nc:case sM:case Gb:case iM:case ip:case rM:case U_:case fu:case Wd:case qd:case Yd:case nM:case au:case lu:return ohe;case In:case Fi:case Gd:case V_:case Va:case Ua:return Fnt;case Ba:case ec:case za:case Gs:return{area:"always",bar:"always",image:"always",rect:"always",rule:"always",circle:"binned",point:"binned",square:"binned",tick:"binned",line:"binned",trail:"binned"};case du:return{point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",text:"always",line:"always",trail:"always"};case Kd:return{line:"always",point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",geoshape:"always"};case So:return{point:"always",geoshape:"always"};case Hb:return{text:"always"};case np:return{point:"always",square:"always",text:"always"};case oM:return{image:"always"};case Hs:case ja:return{text:"always",arc:"always"};case uu:case cu:return{arc:"always"}}}(e)[t]}(t,n);if(!i)return!1;if("binned"===i){const r=e[t===Ba?In:Fi];return!!(he(r)&&he(e[t])&&ir(r.bin))}return!0}function IM(e,t){const n={};for(const i of se(e)){const r=Ape(e[i],i,t,{compositeMark:!0});n[i]=r}return n}function F6(e,t,n){if(e)for(const i of se(e)){const r=e[i];if(te(r))for(const o of r)t.call(n,o,i);else t.call(n,r,i)}}function jpe(e,t){return se(t).reduce((n,i)=>{switch(i){case In:case Fi:case rM:case sM:case oM:case Ba:case ec:case Gd:case V_:case Hs:case uu:case ja:case cu:case Va:case Ua:case za:case Gs:case Hb:case So:case np:case ip:return n;case U_:if("line"===e||"trail"===e)return n;case Gb:case iM:{const r=t[i];if(te(r)||he(r))for(const o of Ee(r))o.aggregate||n.push(ve(o,{}));return n}case du:if("trail"===e)return n;case Do:case tc:case nc:case fu:case Wd:case qd:case Kd:case Yd:{const r=Ka(t[i]);return r&&!r.aggregate&&n.push(ve(r,{})),n}}},[])}function P6(e,t,n,i=!0){if("tooltip"in n)return{tooltip:n.tooltip};const r=e.map(({fieldPrefix:s,titlePrefix:a})=>{const l=i?` of ${L6(t)}`:"";return{field:s+t.field,type:t.type,title:ke(a)?{signal:`${a}"${escape(l)}"`}:a+l}}),o=function vot(e){const t=[];for(const n of se(e))if(mp(e,n)){const r=Ee(e[n]);for(const o of r)he(o)?t.push(o):CM(o)&&t.push(o.condition)}return t}(n).map(oot);return{tooltip:[...r,...Jl(o,gt)]}}function L6(e){const{title:t,field:n}=e;return Xn(t,n)}function $6(e,t,n,i,r){const{scale:o,axis:s}=n;return({partName:a,mark:l,positionPrefix:c,endPositionPrefix:u,extraEncoding:d={}})=>{const f=L6(n);return Vpe(e,a,r,{mark:l,encoding:{[t]:{field:`${c}_${n.field}`,type:n.type,...void 0!==f?{title:f}:{},...void 0!==o?{scale:o}:{},...void 0!==s?{axis:s}:{}},...Ce(u)?{[`${t}2`]:{field:`${u}_${n.field}`}}:{},...i,...d}})}}function Vpe(e,t,n,i){const{clip:r,color:o,opacity:s}=e,a=e.type;return e[t]||void 0===e[t]&&n[t]?[{...i,mark:{...n[t],...r?{clip:r}:{},...o?{color:o}:{},...s?{opacity:s}:{},...Wa(i.mark)?i.mark:{type:i.mark},style:`${a}-${String(t)}`,...td(e[t])?{}:e[t]}}]:[]}function Upe(e,t,n){const{encoding:i}=e,r="vertical"===t?"y":"x",s=i[`${r}2`],a=i[`${r}Error`],l=i[`${r}Error2`];return{continuousAxisChannelDef:kM(i[r],n),continuousAxisChannelDef2:kM(s,n),continuousAxisChannelDefError:kM(a,n),continuousAxisChannelDefError2:kM(l,n),continuousAxis:r}}function kM(e,t){if(e?.aggregate){const{aggregate:n,...i}=e;return n!==t&&de(function Yit(e,t){return`Continuous axis should not have customized aggregation function ${e}; ${t} already agregates the axis.`}(n,t)),i}return e}function zpe(e,t){const{mark:n,encoding:i}=e,{x:r,y:o}=i;if(Wa(n)&&n.orient)return n.orient;if(nf(r)){if(nf(o)){const s=he(r)&&r.aggregate,a=he(o)&&o.aggregate;if(!s&&a===t)return"vertical";if(!a&&s===t)return"horizontal";if(s===t&&a===t)throw new Error("Both x and y cannot have aggregate");return Q_(o)&&!Q_(r)?"horizontal":"vertical"}return"horizontal"}if(nf(o))return"vertical";throw new Error(`Need a valid continuous axis for ${t}s`)}const OM="boxplot",Cot=new NM(OM,Gpe);function Hpe(e){return At(e)?"tukey":e}function Gpe(e,{config:t}){e={...e,encoding:IM(e.encoding,t)};const{mark:n,encoding:i,params:r,projection:o,...s}=e,a=Wa(n)?n:{type:n};r&&de(Ehe("boxplot"));const l=a.extent??t.boxplot.extent,c=en("size",a,t),u=a.invalid,d=Hpe(l),{bins:f,timeUnits:h,transform:p,continuousAxisChannelDef:g,continuousAxis:m,groupby:_,aggregate:y,encodingWithoutContinuousAxis:v,ticksOrient:b,boxOrient:w,customTooltipWithoutAggregatedField:C}=function Dot(e,t,n){const i=zpe(e,OM),{continuousAxisChannelDef:r,continuousAxis:o}=Upe(e,i,OM),s=r.field,a=B_(s),l=Hpe(t),c=[...Wpe(s),{op:"median",field:s,as:`mid_box_${a}`},{op:"min",field:s,as:("min-max"===l?"lower_whisker_":"min_")+a},{op:"max",field:s,as:("min-max"===l?"upper_whisker_":"max_")+a}],u="min-max"===l||"tukey"===l?[]:[{calculate:`datum["upper_box_${a}"] - datum["lower_box_${a}"]`,as:`iqr_${a}`},{calculate:`min(datum["upper_box_${a}"] + datum["iqr_${a}"] * ${t}, datum["max_${a}"])`,as:`upper_whisker_${a}`},{calculate:`max(datum["lower_box_${a}"] - datum["iqr_${a}"] * ${t}, datum["min_${a}"])`,as:`lower_whisker_${a}`}],{[o]:d,...f}=e.encoding,{customTooltipWithoutAggregatedField:h,filteredEncoding:p}=function wot(e){const{tooltip:t,...n}=e;if(!t)return{filteredEncoding:n};let i,r;if(te(t)){for(const o of t)o.aggregate?(i||(i=[]),i.push(o)):(r||(r=[]),r.push(o));i&&(n.tooltip=i)}else t.aggregate?n.tooltip=t:r=t;return te(r)&&1===r.length&&(r=r[0]),{customTooltipWithoutAggregatedField:r,filteredEncoding:n}}(f),{bins:g,timeUnits:m,aggregate:_,groupby:y,encoding:v}=Bpe(p,n),b="vertical"===i?"horizontal":"vertical",w=i;return{bins:g,timeUnits:m,transform:[...g,...m,{aggregate:[..._,...c],groupby:y},...u],groupby:y,aggregate:_,continuousAxisChannelDef:r,continuousAxis:o,encodingWithoutContinuousAxis:v,ticksOrient:b,boxOrient:w,customTooltipWithoutAggregatedField:h}}(e,l,t),E=B_(g.field),{color:D,size:M,...k}=v,R=Et=>$6(a,m,g,Et,t.boxplot),F=R(k),P=R(v),T=(we(t.boxplot.box)?t.boxplot.box.color:t.mark.color)||"#4c78a8",S=R({...k,...M?{size:M}:{},color:{condition:{test:`datum['lower_box_${g.field}'] >= datum['upper_box_${g.field}']`,...D||{value:T}}}}),x=P6([{fieldPrefix:"min-max"===d?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:"min-max"===d?"lower_whisker_":"min_",titlePrefix:"Min"}],g,v),I={type:"tick",color:"black",opacity:1,orient:b,invalid:u,aria:!1},A="min-max"===d?x:P6([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],g,v),N=[...F({partName:"rule",mark:{type:"rule",invalid:u,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:A}),...F({partName:"rule",mark:{type:"rule",invalid:u,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:A}),...F({partName:"ticks",mark:I,positionPrefix:"lower_whisker",extraEncoding:A}),...F({partName:"ticks",mark:I,positionPrefix:"upper_whisker",extraEncoding:A})],O=[..."tukey"!==d?N:[],...P({partName:"box",mark:{type:"bar",...c?{size:c}:{},orient:w,invalid:u,ariaRoleDescription:"box"},positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:x}),...S({partName:"median",mark:{type:"tick",invalid:u,...we(t.boxplot.median)&&t.boxplot.median.color?{color:t.boxplot.median.color}:{},...c?{size:c}:{},orient:b,aria:!1},positionPrefix:"mid_box",extraEncoding:x})];if("min-max"===d)return{...s,transform:(s.transform??[]).concat(p),layer:O};const $=`datum["lower_box_${g.field}"]`,B=`datum["upper_box_${g.field}"]`,V=`(${B} - ${$})`,j=`${$} - ${l} * ${V}`,H=`${B} + ${l} * ${V}`,oe=`datum["${g.field}"]`,Y={joinaggregate:Wpe(g.field),groupby:_},ue={transform:[{filter:`(${j} <= ${oe}) && (${oe} <= ${H})`},{aggregate:[{op:"min",field:g.field,as:`lower_whisker_${E}`},{op:"max",field:g.field,as:`upper_whisker_${E}`},{op:"min",field:`lower_box_${g.field}`,as:`lower_box_${E}`},{op:"max",field:`upper_box_${g.field}`,as:`upper_box_${E}`},...y],groupby:_}],layer:N},{tooltip:W,...ne}=k,{scale:ie,axis:G}=g,ye=L6(g),Se=Co(G,["title"]),Ue=Vpe(a,"outliers",t.boxplot,{transform:[{filter:`(${oe} < ${j}) || (${oe} > ${H})`}],mark:"point",encoding:{[m]:{field:g.field,type:g.type,...void 0!==ye?{title:ye}:{},...void 0!==ie?{scale:ie}:{},...Zt(Se)?{}:{axis:Se}},...ne,...D?{color:D}:{},...C?{tooltip:C}:{}}})[0];let Te;const Oe=[...f,...h,Y];return Ue?Te={transform:Oe,layer:[Ue,ue]}:(Te=ue,Te.transform.unshift(...Oe)),{...s,layer:[Te,{transform:p,layer:O}]}}function Wpe(e){const t=B_(e);return[{op:"q1",field:e,as:`lower_box_${t}`},{op:"q3",field:e,as:`upper_box_${t}`}]}const B6="errorbar",Tot=new NM(B6,qpe);function qpe(e,{config:t}){e={...e,encoding:IM(e.encoding,t)};const{transform:n,continuousAxisChannelDef:i,continuousAxis:r,encodingWithoutContinuousAxis:o,ticksOrient:s,markDef:a,outerSpec:l,tooltipEncoding:c}=Ype(e,B6,t);delete o.size;const u=$6(a,r,i,o,t.errorbar),d=a.thickness,f=a.size,h={type:"tick",orient:s,aria:!1,...void 0!==d?{thickness:d}:{},...void 0!==f?{size:f}:{}},p=[...u({partName:"ticks",mark:h,positionPrefix:"lower",extraEncoding:c}),...u({partName:"ticks",mark:h,positionPrefix:"upper",extraEncoding:c}),...u({partName:"rule",mark:{type:"rule",ariaRoleDescription:"errorbar",...void 0!==d?{size:d}:{}},positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:c})];return{...l,transform:n,...p.length>1?{layer:p}:{...p[0]}}}function Ype(e,t,n){const{mark:i,encoding:r,params:o,projection:s,...a}=e,l=Wa(i)?i:{type:i};o&&de(Ehe(t));const{orient:c,inputType:u}=function xot(e,t){const{encoding:n}=e;if(function Aot(e){return(tt(e.x)||tt(e.y))&&!tt(e.x2)&&!tt(e.y2)&&!tt(e.xError)&&!tt(e.xError2)&&!tt(e.yError)&&!tt(e.yError2)}(n))return{orient:zpe(e,t),inputType:"raw"};const i=function Mot(e){return tt(e.x2)||tt(e.y2)}(n),r=function Not(e){return tt(e.xError)||tt(e.xError2)||tt(e.yError)||tt(e.yError2)}(n),o=n.x,s=n.y;if(i){if(r)throw new Error(`${t} cannot be both type aggregated-upper-lower and aggregated-error`);const a=n.x2,l=n.y2;if(tt(a)&&tt(l))throw new Error(`${t} cannot have both x2 and y2`);if(tt(a)){if(nf(o))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${t}`)}if(tt(l)){if(nf(s))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${t}`)}throw new Error("No ranged axis")}{const a=n.xError,c=n.yError,u=n.yError2;if(tt(n.xError2)&&!tt(a))throw new Error(`${t} cannot have xError2 without xError`);if(tt(u)&&!tt(c))throw new Error(`${t} cannot have yError2 without yError`);if(tt(a)&&tt(c))throw new Error(`${t} cannot have both xError and yError with both are quantiative`);if(tt(a)){if(nf(o))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}if(tt(c)){if(nf(s))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}(e,t),{continuousAxisChannelDef:d,continuousAxisChannelDef2:f,continuousAxisChannelDefError:h,continuousAxisChannelDefError2:p,continuousAxis:g}=Upe(e,c,t),{errorBarSpecificAggregate:m,postAggregateCalculates:_,tooltipSummary:y,tooltipTitleWithFieldName:v}=function Iot(e,t,n,i,r,o,s,a){let l=[],c=[];const u=t.field;let d,f=!1;if("raw"===o){const h=e.center?e.center:e.extent?"iqr"===e.extent?"median":"mean":a.errorbar.center,p=e.extent?e.extent:"mean"===h?"stderr":"iqr";if("median"===h!=("iqr"===p)&&de(function qit(e,t,n){return`${e} is not usually used with ${t} for ${n}.`}(h,p,s)),"stderr"===p||"stdev"===p)l=[{op:p,field:u,as:`extent_${u}`},{op:h,field:u,as:`center_${u}`}],c=[{calculate:`datum["center_${u}"] + datum["extent_${u}"]`,as:`upper_${u}`},{calculate:`datum["center_${u}"] - datum["extent_${u}"]`,as:`lower_${u}`}],d=[{fieldPrefix:"center_",titlePrefix:Ub(h)},{fieldPrefix:"upper_",titlePrefix:Kpe(h,p,"+")},{fieldPrefix:"lower_",titlePrefix:Kpe(h,p,"-")}],f=!0;else{let g,m,_;"ci"===p?(g="mean",m="ci0",_="ci1"):(g="median",m="q1",_="q3"),l=[{op:m,field:u,as:`lower_${u}`},{op:_,field:u,as:`upper_${u}`},{op:g,field:u,as:`center_${u}`}],d=[{fieldPrefix:"upper_",titlePrefix:K_({field:u,aggregate:_,type:"quantitative"},a,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:K_({field:u,aggregate:m,type:"quantitative"},a,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:K_({field:u,aggregate:g,type:"quantitative"},a,{allowDisabling:!1})}]}}else{(e.center||e.extent)&&de(function Wit(e,t){return`${t?"extent ":""}${t&&e?"and ":""}${e?"center ":""}${t&&e?"are ":"is "}not needed when data are aggregated.`}(e.center,e.extent)),"aggregated-upper-lower"===o?(d=[],c=[{calculate:`datum["${n.field}"]`,as:`upper_${u}`},{calculate:`datum["${u}"]`,as:`lower_${u}`}]):"aggregated-error"===o&&(d=[{fieldPrefix:"",titlePrefix:u}],c=[{calculate:`datum["${u}"] + datum["${i.field}"]`,as:`upper_${u}`}],c.push(r?{calculate:`datum["${u}"] + datum["${r.field}"]`,as:`lower_${u}`}:{calculate:`datum["${u}"] - datum["${i.field}"]`,as:`lower_${u}`}));for(const h of c)d.push({fieldPrefix:h.as.substring(0,6),titlePrefix:tp(tp(h.calculate,'datum["',""),'"]',"")})}return{postAggregateCalculates:c,errorBarSpecificAggregate:l,tooltipSummary:d,tooltipTitleWithFieldName:f}}(l,d,f,h,p,u,t,n),{[g]:b,["x"===g?"x2":"y2"]:w,["x"===g?"xError":"yError"]:C,["x"===g?"xError2":"yError2"]:E,...D}=r,{bins:M,timeUnits:k,aggregate:R,groupby:F,encoding:P}=Bpe(D,n),T=[...R,...m],S="raw"!==u?[]:F,x=P6(y,d,P,v);return{transform:[...a.transform??[],...M,...k,...0===T.length?[]:[{aggregate:T,groupby:S}],..._],groupby:S,continuousAxisChannelDef:d,continuousAxis:g,encodingWithoutContinuousAxis:P,ticksOrient:"vertical"===c?"horizontal":"vertical",markDef:l,outerSpec:a,tooltipEncoding:x}}function Kpe(e,t,n){return`${Ub(e)} ${n} ${t}`}const j6="errorband",Oot=new NM(j6,Xpe);function Xpe(e,{config:t}){e={...e,encoding:IM(e.encoding,t)};const{transform:n,continuousAxisChannelDef:i,continuousAxis:r,encodingWithoutContinuousAxis:o,markDef:s,outerSpec:a,tooltipEncoding:l}=Ype(e,j6,t),c=s,u=$6(c,r,i,o,t.errorband),d=void 0!==e.encoding.x&&void 0!==e.encoding.y;let f={type:d?"area":"rect"},h={type:d?"line":"rule"};const p={...c.interpolate?{interpolate:c.interpolate}:{},...c.tension&&c.interpolate?{tension:c.tension}:{}};return d?(f={...f,...p,ariaRoleDescription:"errorband"},h={...h,...p,aria:!1}):c.interpolate?de(Ihe("interpolate")):c.tension&&de(Ihe("tension")),{...a,transform:n,layer:[...u({partName:"band",mark:f,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:l}),...u({partName:"borders",mark:h,positionPrefix:"lower",extraEncoding:l}),...u({partName:"borders",mark:h,positionPrefix:"upper",extraEncoding:l})]}}const V6={};function U6(e,t,n){const i=new NM(e,t);V6[e]={normalizer:i,parts:n}}U6(OM,Gpe,["box","median","outliers","rule","ticks"]),U6(B6,qpe,["ticks","rule"]),U6(j6,Xpe,["band","borders"]);const Fot=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],Qpe={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"},Zpe={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"},Pot=se(Qpe),Lot=se(Zpe),Jpe=se({header:1,headerRow:1,headerColumn:1,headerFacet:1}),ege=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],tge={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},Xa=(se(tge),"_vgsid_"),Bot={point:{on:"click",fields:[Xa],toggle:"event.shiftKey",resolve:"global",clear:"dblclick"},interval:{on:"[pointerdown, window:pointerup] > window:pointermove!",encodings:["x","y"],translate:"[pointerdown, window:pointerup] > window:pointermove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}};function z6(e){return"legend"===e||!!e?.legend}function H6(e){return z6(e)&&we(e)}function G6(e){return!!e?.select}function nge(e){const t=[];for(const n of e||[]){if(G6(n))continue;const{expr:i,bind:r,...o}=n;if(r&&i){const s={...o,bind:r,init:i};t.push(s)}else{const s={...o,...i?{update:i}:{},...r?{bind:r}:{}};t.push(s)}}return t}function W6(e){return ce(e,"concat")}function RM(e){return ce(e,"vconcat")}function q6(e){return ce(e,"hconcat")}function ige({step:e,offsetIsDiscrete:t}){return t?e.for??"offset":"position"}function uc(e){return ce(e,"step")}function rge(e){return ce(e,"view")||ce(e,"width")||ce(e,"height")}const Vot=se({align:1,bounds:1,center:1,columns:1,spacing:1});function Y6(e,t){return e[t]??e["width"===t?"continuousWidth":"continuousHeight"]}function K6(e,t){const n=FM(e,t);return uc(n)?n.step:sge}function FM(e,t){return Xn(e[t]??e["width"===t?"discreteWidth":"discreteHeight"],{step:e.step})}const sge=20,Hot={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:{continuousWidth:200,continuousHeight:200,step:sge},mark:{color:"#4c78a8",invalid:"break-paths-show-path-domains",timeUnitBandSize:1},arc:{},area:{},bar:Hrt,circle:{},geoshape:{},image:{},line:{},point:{},rect:D6,rule:{color:"black"},square:{},text:{color:"black"},tick:Grt,trail:{},boxplot:{size:14,extent:1.5,box:{},median:{color:"white"},outliers:{},rule:{},ticks:null},errorbar:{center:"mean",rule:!0,ticks:!1},errorband:{band:{opacity:.3},borders:!1},scale:{pointPadding:.5,barBandPaddingInner:.1,rectBandPaddingInner:0,tickBandPaddingInner:.25,bandWithNestedOffsetPaddingInner:.2,bandWithNestedOffsetPaddingOuter:.2,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:4,minStrokeWidth:1,maxStrokeWidth:4,quantileCount:4,quantizeCount:4,zero:!0},projection:{},legend:{gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},header:{titlePadding:10,labelPadding:10},headerColumn:{},headerRow:{},headerFacet:{},selection:Bot,style:{},title:{},facet:{spacing:20},concat:{spacing:20},normalizedNumberFormat:".0%"},yu=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],age={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},lge={blue:yu[0],orange:yu[1],red:yu[2],teal:yu[3],green:yu[4],yellow:yu[5],purple:yu[6],pink:yu[7],brown:yu[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 cge(e){const t=se(e||{}),n={};for(const i of t){const r=e[i];n[i]=nw(r)?che(r):ls(r)}return n}const Kot=[...spe,...Fpe,...Jpe,"background","padding","legend","lineBreak","scale","style","title","view"];function uge(e={}){const{color:t,font:n,fontSize:i,selection:r,...o}=e,s=Sm({},Ze(Hot),n?function qot(e){return{text:{font:e},style:{"guide-label":{font:e},"guide-title":{font:e},"group-title":{font:e},"group-subtitle":{font:e}}}}(n):{},t?function Got(e={}){return{signals:[{name:"color",value:we(e)?{...lge,...e}:lge}],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"}]}}}(t):{},i?function Wot(e){return{signals:[{name:"fontSize",value:we(e)?{...age,...e}:age}],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"}}}}}(i):{},o||{});r&&Tm(s,"selection",r,!0);const a=Co(s,Kot);for(const l of["background","lineBreak","padding"])s[l]&&(a[l]=ls(s[l]));for(const l of spe)s[l]&&(a[l]=rr(s[l]));for(const l of Fpe)s[l]&&(a[l]=cge(s[l]));for(const l of Jpe)s[l]&&(a[l]=rr(s[l]));if(s.legend&&(a.legend=rr(s.legend)),s.scale){const{invalid:l,...c}=s.scale,u=rr(l,{level:1});a.scale={...rr(c),...se(u).length>0?{invalid:u}:{}}}return s.style&&(a.style=function Yot(e){const t=se(e),n={};for(const i of t)n[i]=cge(e[i]);return n}(s.style)),s.title&&(a.title=rr(s.title)),s.view&&(a.view=rr(s.view)),a}const Xot=new Set(["view",...rpe]),Qot=["color","fontSize","background","padding","facet","concat","numberFormat","numberFormatType","normalizedNumberFormat","normalizedNumberFormatType","timeFormat","countTitle","header","axisQuantitative","axisTemporal","axisDiscrete","axisPoint","axisXBand","axisXPoint","axisXDiscrete","axisXQuantitative","axisXTemporal","axisYBand","axisYPoint","axisYDiscrete","axisYQuantitative","axisYTemporal","scale","selection","overlay"],Zot={view:["continuousWidth","continuousHeight","discreteWidth","discreteHeight","step"],...Vrt};function tst(e,t,n,i){"view"===t&&(n="cell");const o={...i?e[t][i]:e[t],...e.style[n??t]};Zt(o)||(e.style[n??t]=o),i||delete e[t]}function PM(e){return ce(e,"layer")}class X6{map(t,n){return EM(t)?this.mapFacet(t,n):function nst(e){return ce(e,"repeat")}(t)?this.mapRepeat(t,n):q6(t)?this.mapHConcat(t,n):RM(t)?this.mapVConcat(t,n):W6(t)?this.mapConcat(t,n):this.mapLayerOrUnit(t,n)}mapLayerOrUnit(t,n){if(PM(t))return this.mapLayer(t,n);if(_u(t))return this.mapUnit(t,n);throw new Error(i6(t))}mapLayer(t,n){return{...t,layer:t.layer.map(i=>this.mapLayerOrUnit(i,n))}}mapHConcat(t,n){return{...t,hconcat:t.hconcat.map(i=>this.map(i,n))}}mapVConcat(t,n){return{...t,vconcat:t.vconcat.map(i=>this.map(i,n))}}mapConcat(t,n){const{concat:i,...r}=t;return{...r,concat:i.map(o=>this.map(o,n))}}mapFacet(t,n){return{...t,spec:this.map(t.spec,n)}}mapRepeat(t,n){return{...t,spec:this.map(t.spec,n)}}}const rst={zero:1,center:1,normalize:1},sst=new Set([tpe,mM,gM,vM,yM,w6,E6,_M,npe,b6]),ast=new Set([mM,gM,tpe]);function Z_(e){return he(e)&&"quantitative"===q_(e)&&!e.bin}function dge(e,t,{orient:n,type:i}){const r="x"===t?"y":"radius",o="x"===t&&["bar","area"].includes(i),s=e[t],a=e[r];if(he(s)&&he(a))if(Z_(s)&&Z_(a)){if(s.stack)return t;if(a.stack)return r;const l=he(s)&&!!s.aggregate;if(l!==(he(a)&&!!a.aggregate))return l?t:r;if(o){if("vertical"===n)return r;if("horizontal"===n)return t}}else{if(Z_(s))return t;if(Z_(a))return r}else{if(Z_(s))return o&&"vertical"===n?void 0:t;if(Z_(a))return o&&"horizontal"===n?void 0:r}}function fge(e,t){const n=Wa(e)?e:{type:e},i=n.type;if(!sst.has(i))return null;const r=dge(t,"x",n)||dge(t,"theta",n);if(!r)return null;const o=t[r],s=he(o)?ve(o,{}):void 0,a=function lst(e){switch(e){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}(r),l=[],c=new Set;if(t[a]){const g=t[a],m=he(g)?ve(g,{}):void 0;m&&m!==s&&(l.push(a),c.add(m))}const u="x"===a?"xOffset":"yOffset",d=t[u],f=he(d)?ve(d,{}):void 0;f&&f!==s&&(l.push(u),c.add(f));const h=Mnt.reduce((g,m)=>{if("tooltip"!==m&&mp(t,m)){const _=t[m];for(const y of Ee(_)){const v=Ka(y);if(v.aggregate)continue;const b=ve(v,{});(!b||!c.has(b))&&g.push({channel:m,fieldDef:v})}}return g},[]);let p;return void 0!==o.stack?p=td(o.stack)?o.stack?"zero":null:o.stack:ast.has(i)&&(p="zero"),!p||!function ost(e){return De(rst,e)}(p)||$pe(t)&&0===h.length?null:(o?.scale?.type&&o?.scale?.type!==or.LINEAR&&o?.stack&&de(function zit(e){return`Stack is applied to a non-linear scale (${e}).`}(o.scale.type)),tt(t[ic(r)])?(void 0!==o.stack&&de(function Uit(e){return`Cannot stack "${e}" if there is already "${e}2".`}(r)),null):(he(o)&&o.aggregate&&!Vnt.has(o.aggregate)&&de(function Hit(e){return`Stacking is applied even though the aggregate function is non-summative ("${e}").`}(o.aggregate)),{groupbyChannels:l,groupbyFields:c,fieldChannel:r,impute:null!==o.impute&&ef(i),stackBy:h,offset:p}))}function hge(e,t,n){const i=rr(e),r=en("orient",i,n);if(i.orient=function fst(e,t,n){switch(e){case yM:case w6:case E6:case npe:case Prt:case Frt:return}const{x:i,y:r,x2:o,y2:s}=t;switch(e){case mM:if(he(i)&&(ir(i.bin)||he(r)&&r.aggregate&&!i.aggregate))return"vertical";if(he(r)&&(ir(r.bin)||he(i)&&i.aggregate&&!r.aggregate))return"horizontal";if(s||o){if(n)return n;if(!o)return(he(i)&&i.type===dp&&!mn(i.bin)||DM(i))&&he(r)&&ir(r.bin)?"horizontal":"vertical";if(!s)return(he(r)&&r.type===dp&&!mn(r.bin)||DM(r))&&he(i)&&ir(i.bin)?"vertical":"horizontal"}case vM:if(o&&(!he(i)||!ir(i.bin))&&s&&(!he(r)||!ir(r.bin)))return;case gM:if(s)return he(r)&&ir(r.bin)?"horizontal":"vertical";if(o)return he(i)&&ir(i.bin)?"vertical":"horizontal";if(e===vM){if(i&&!r)return"vertical";if(r&&!i)return"horizontal"}case _M:case b6:{const a=Epe(i),l=Epe(r);if(n)return n;if(a&&!l)return"tick"!==e?"horizontal":"vertical";if(!a&&l)return"tick"!==e?"vertical":"horizontal";if(a&&l)return"vertical";{const c=eo(i)&&i.type===H_,u=eo(r)&&r.type===H_;if(c&&!u)return"vertical";if(!c&&u)return"horizontal"}return}}return"vertical"}(i.type,t,r),void 0!==r&&r!==i.orient&&de(function Tit(e,t){return`Specified orient "${e}" overridden with "${t}".`}(i.orient,r)),"bar"===i.type&&i.orient){const l=en("cornerRadiusEnd",i,n);if(void 0!==l){const c="horizontal"===i.orient&&t.x2||"vertical"===i.orient&&t.y2?["cornerRadius"]:zrt[i.orient];for(const u of c)i[u]=l;void 0!==i.cornerRadiusEnd&&delete i.cornerRadiusEnd}}const o=en("opacity",i,n),s=en("fillOpacity",i,n);return void 0===o&&void 0===s&&(i.opacity=function ust(e,t){if(pt([yM,b6,w6,E6],e)&&!$pe(t))return.7}(i.type,t)),void 0===en("cursor",i,n)&&(i.cursor=function cst(e,t,n){return t.href||e.href||en("href",e,n)?"pointer":e.cursor}(i,t,n)),i}function hst(e){const{point:t,line:n,...i}=e;return se(i).length>1?i:i.type}function pst(e){for(const t of["line","area","rule","trail"])e[t]&&(e={...e,[t]:Co(e[t],["point","line"])});return e}function Q6(e,t={},n){return"transparent"===e.point?{opacity:0}:e.point?we(e.point)?e.point:{}:void 0!==e.point?null:t.point||n.shape?we(t.point)?t.point:{}:void 0}function pge(e,t={}){return e.line?!0===e.line?{}:e.line:void 0!==e.line?null:t.line?!0===t.line?{}:t.line:void 0}class gst{constructor(){this.name="path-overlay"}hasMatchingType(t,n){if(_u(t)){const{mark:i,encoding:r}=t,o=Wa(i)?i:{type:i};switch(o.type){case"line":case"rule":case"trail":return!!Q6(o,n[o.type],r);case"area":return!!Q6(o,n[o.type],r)||!!pge(o,n[o.type])}}return!1}run(t,n,i){const{config:r}=n,{params:o,projection:s,mark:a,name:l,encoding:c,...u}=t,d=IM(c,r),f=Wa(a)?a:{type:a},h=Q6(f,r[f.type],d),p="area"===f.type&&pge(f,r[f.type]),g=[{name:l,...o?{params:o}:{},mark:hst({..."area"===f.type&&void 0===f.opacity&&void 0===f.fillOpacity?{opacity:.7}:{},...f}),encoding:Co(d,["shape"])}],m=fge(hge(f,d,r),d);let _=d;if(m){const{fieldChannel:y,offset:v}=m;_={...d,[y]:{...d[y],...v?{stack:v}:{}}}}return _=Co(_,["y2","x2"]),p&&g.push({...s?{projection:s}:{},mark:{type:"line",...L_(f,["clip","interpolate","tension","tooltip"]),...p},encoding:_}),h&&g.push({...s?{projection:s}:{},mark:{type:"point",opacity:1,filled:!0,...L_(f,["clip","tooltip"]),...h},encoding:_}),i({...u,layer:g},{...n,config:pst(r)})}}function mst(e,t){return t?Zb(e)?yge(e,t):gge(e,t):e}function Z6(e,t){return t?yge(e,t):e}function J6(e,t,n){const i=t[e];return function iot(e){return!Ce(e)&&ce(e,"repeat")}(i)?i.repeat in n?{...t,[e]:n[i.repeat]}:void de(function sit(e){return`Unknown repeated value "${e}".`}(i.repeat)):t}function gge(e,t){if(void 0!==(e=J6("field",e,t))){if(null===e)return null;if(I6(e)&&mu(e.sort)){const n=J6("field",e.sort,t);e={...e,...n?{sort:n}:{}}}return e}}function mge(e,t){if(he(e))return gge(e,t);{const n=J6("datum",e,t);return n!==e&&!n.type&&(n.type="nominal"),n}}function _ge(e,t){if(!tt(e)){if(ew(e)){const n=mge(e.condition,t);if(n)return{...e,condition:n};{const{condition:i,...r}=e;return r}}return e}{const n=mge(e,t);if(n)return n;if(Jb(e))return{condition:e.condition}}}function yge(e,t){const n={};for(const i in e)if(ce(e,i)){const r=e[i];if(te(r))n[i]=r.map(o=>_ge(o,t)).filter(o=>o);else{const o=_ge(r,t);void 0!==o&&(n[i]=o)}}return n}class _st{constructor(){this.name="RuleForRangedLine"}hasMatchingType(t){if(_u(t)){const{encoding:n,mark:i}=t;if("line"===i||Wa(i)&&"line"===i.type)for(const r of Tnt){const s=n[rp(r)];if(n[r]&&(he(s)&&!ir(s.bin)||cc(s)))return!0}}return!1}run(t,n,i){const{encoding:r,mark:o}=t;return de(function Sit(e,t){return`Line mark is for continuous lines and thus cannot be used with ${e&&t?"x2 and y2":e?"x2":"y2"}. We will use the rule mark (line segments) instead.`}(!!r.x2,!!r.y2)),i({...t,mark:we(o)?{...o,type:"rule"}:"rule"},n)}}function vge({parentEncoding:e,encoding:t={},layer:n}){let i={};if(e){const r=new Set([...se(e),...se(t)]);for(const o of r){const s=t[o],a=e[o];if(tt(s)){const l={...a,...s};i[o]=l}else ew(s)?i[o]={...s,condition:{...a,...s.condition}}:s||null===s?i[o]=s:(n||Ya(a)||ke(a)||tt(a)||te(a))&&(i[o]=a)}}else i=t;return!i||Zt(i)?void 0:i}function bge(e){const{parentProjection:t,projection:n}=e;return t&&n&&de(function fit(e){const{parentProjection:t,projection:n}=e;return`Layer's shared projection ${Jt(t)} is overridden by a child projection ${Jt(n)}.`}({parentProjection:t,projection:n})),n??t}function ej(e){return ce(e,"filter")}function wge(e){return ce(e,"lookup")}function Est(e){return ce(e,"pivot")}function Cst(e){return ce(e,"density")}function Dst(e){return ce(e,"quantile")}function Sst(e){return ce(e,"regression")}function Tst(e){return ce(e,"loess")}function xst(e){return ce(e,"sample")}function Ast(e){return ce(e,"window")}function Mst(e){return ce(e,"joinaggregate")}function Nst(e){return ce(e,"flatten")}function Ist(e){return ce(e,"calculate")}function Ege(e){return ce(e,"bin")}function kst(e){return ce(e,"impute")}function Ost(e){return ce(e,"timeUnit")}function Rst(e){return ce(e,"aggregate")}function Fst(e){return ce(e,"stack")}function Pst(e){return ce(e,"fold")}function Lst(e){return ce(e,"extent")&&!ce(e,"density")&&!ce(e,"regression")}function Cge(e,t){const{transform:n,...i}=e;return n?{...i,transform:n.map(o=>{if(ej(o))return{filter:tj(o,t)};if(Ege(o)&&op(o.bin))return{...o,bin:Sge(o.bin)};if(wge(o)){const{selection:s,...a}=o.from;return s?{...o,from:{param:s,...a}}:o}return o})}:e}function Dge(e,t){const n=Ze(e);if(he(n)&&op(n.bin)&&(n.bin=Sge(n.bin)),gp(n)&&n.scale?.domain?.selection){const{selection:i,...r}=n.scale.domain;n.scale.domain={...r,...i?{param:i}:{}}}if(Jb(n))if(te(n.condition))n.condition=n.condition.map(i=>{const{selection:r,param:o,test:s,...a}=i;return o?i:{...a,test:tj(i,t)}});else{const{selection:i,param:r,test:o,...s}=Dge(n.condition,t);n.condition=r?n.condition:{...s,test:tj(n.condition,t)}}return n}function Sge(e){const t=e.extent;if(t?.selection){const{selection:n,...i}=t;return{...e,extent:{...i,param:n}}}return e}function tj(e,t){const n=i=>P_(i,r=>{var o;const a={param:r,empty:t.emptySelections[r]??!0};return(o=t.selectionPredicates)[r]??(o[r]=[]),t.selectionPredicates[r].push(a),a});return e.selection?n(e.selection):P_(e.test||e.filter,i=>i.selection?n(i.selection):i)}class nj extends X6{map(t,n){const i=n.selections??[];if(t.params&&!_u(t)){const r=[];for(const o of t.params)G6(o)?i.push(o):r.push(o);t.params=r}return n.selections=i,super.map(t,n)}mapUnit(t,n){const i=n.selections;if(!i||!i.length)return t;const r=(n.path??[]).concat(t.name),o=[];for(const s of i)if(s.views&&s.views.length)for(const a of s.views)(Ce(a)&&(a===t.name||r.includes(a))||te(a)&&a.map(l=>r.indexOf(l)).every((l,c,u)=>-1!==l&&(0===c||l>u[c-1])))&&o.push(s);else o.push(s);return o.length&&(t.params=o),t}}for(const e of["mapFacet","mapRepeat","mapHConcat","mapVConcat","mapLayer"]){const t=nj.prototype[e];nj.prototype[e]=function(n,i){return t.call(this,n,jst(n,i))}}function jst(e,t){return e.name?{...t,path:(t.path??[]).concat(e.name)}:t}function Tge(e,t){void 0===t&&(t=uge(e.config));const n=function Hst(e,t={}){const n={config:t};return zst.map(Vst.map(Ust.map(e,n),n),n)}(e,t),{width:i,height:r}=e,o=function Gst(e,t,n){let{width:i,height:r}=t;const o=_u(e)||PM(e),s={};o?"container"==i&&"container"==r?(s.type="fit",s.contains="padding"):"container"==i?(s.type="fit-x",s.contains="padding"):"container"==r&&(s.type="fit-y",s.contains="padding"):("container"==i&&(de(yhe("width")),i=void 0),"container"==r&&(de(yhe("height")),r=void 0));const a={type:"pad",...s,...n?xge(n.autosize):{},...xge(e.autosize)};if("fit"===a.type&&!o&&(de(Knt),a.type="pad"),"container"==i&&!("fit"==a.type||"fit-x"==a.type)&&de(vhe("width")),"container"==r&&!("fit"==a.type||"fit-y"==a.type)&&de(vhe("height")),!as(a,{type:"pad"}))return a}(n,{width:i,height:r,autosize:e.autosize},t);return{...n,...o?{autosize:o}:{}}}const Vst=new class yst extends X6{constructor(){super(...arguments),this.nonFacetUnitNormalizers=[Cot,Tot,Oot,new gst,new _st]}map(t,n){if(_u(t)){const i=mp(t.encoding,au),r=mp(t.encoding,lu),o=mp(t.encoding,nM);if(i||r||o)return this.mapFacetedUnit(t,n)}return super.map(t,n)}mapUnit(t,n){const{parentEncoding:i,parentProjection:r}=n,o=Z6(t.encoding,n.repeater),s={...t,...t.name?{name:[n.repeaterPrefix,t.name].filter(l=>l).join("_")}:{},...o?{encoding:o}:{}};if(i||r)return this.mapUnitWithParentEncodingOrProjection(s,n);const a=this.mapLayerOrUnit.bind(this);for(const l of this.nonFacetUnitNormalizers)if(l.hasMatchingType(s,n.config))return l.run(s,n,a);return s}mapRepeat(t,n){return function ist(e){return!te(e.repeat)&&ce(e.repeat,"layer")}(t)?this.mapLayerRepeat(t,n):this.mapNonLayerRepeat(t,n)}mapLayerRepeat(t,n){const{repeat:i,spec:r,...o}=t,{row:s,column:a,layer:l}=i,{repeater:c={},repeaterPrefix:u=""}=n;return s||a?this.mapRepeat({...t,repeat:{...s?{row:s}:{},...a?{column:a}:{}},spec:{repeat:{layer:l},spec:r}},n):{...o,layer:l.map(d=>{const f={...c,layer:d},h=`${(r.name?`${r.name}_`:"")+u}child__layer_${Nn(d)}`,p=this.mapLayerOrUnit(r,{...n,repeater:f,repeaterPrefix:h});return p.name=h,p})}}mapNonLayerRepeat(t,n){const{repeat:i,spec:r,data:o,...s}=t;!te(i)&&t.columns&&(t=Co(t,["columns"]),de(Che("repeat")));const a=[],{repeater:l={},repeaterPrefix:c=""}=n,u=!te(i)&&i.row||[l?l.row:null],d=!te(i)&&i.column||[l?l.column:null],f=te(i)&&i||[l?l.repeat:null];for(const p of f)for(const g of u)for(const m of d){const _={repeat:p,row:g,column:m,layer:l.layer},y=(r.name?`${r.name}_`:"")+c+"child__"+(te(i)?`${Nn(p)}`:(i.row?`row_${Nn(g)}`:"")+(i.column?`column_${Nn(m)}`:"")),v=this.map(r,{...n,repeater:_,repeaterPrefix:y});v.name=y,a.push(Co(v,["data"]))}const h=te(i)?t.columns:i.column?i.column.length:1;return{data:r.data??o,align:"all",...s,columns:h,concat:a}}mapFacet(t,n){const{facet:i}=t;return Zb(i)&&t.columns&&(t=Co(t,["columns"]),de(Che("facet"))),super.mapFacet(t,n)}mapUnitWithParentEncodingOrProjection(t,n){const{encoding:i,projection:r}=t,{parentEncoding:o,parentProjection:s,config:a}=n,l=bge({parentProjection:s,projection:r}),c=vge({parentEncoding:o,encoding:Z6(i,n.repeater)});return this.mapUnit({...t,...l?{projection:l}:{},...c?{encoding:c}:{}},{config:a})}mapFacetedUnit(t,n){const{row:i,column:r,facet:o,...s}=t.encoding,{mark:a,width:l,projection:c,height:u,view:d,params:f,encoding:h,...p}=t,{facetMapping:g,layout:m}=this.getFacetMappingAndLayout({row:i,column:r,facet:o},n),_=Z6(s,n.repeater);return this.mapFacet({...p,...m,facet:g,spec:{...l?{width:l}:{},...u?{height:u}:{},...d?{view:d}:{},...c?{projection:c}:{},mark:a,encoding:_,...f?{params:f}:{}}},n)}getFacetMappingAndLayout(t,n){const{row:i,column:r,facet:o}=t;if(i||r){o&&de(function Cit(e){return`Facet encoding dropped as ${e.join(" and ")} ${e.length>1?"are":"is"} also specified.`}([...i?[au]:[],...r?[lu]:[]]));const s={},a={};for(const l of[au,lu]){const c=t[l];if(c){const{align:u,center:d,spacing:f,columns:h,...p}=c;s[l]=p;for(const g of["align","center","spacing"])void 0!==c[g]&&(a[g]??(a[g]={}),a[g][l]=c[g])}}return{facetMapping:s,layout:a}}{const{align:s,center:a,spacing:l,columns:c,...u}=o;return{facetMapping:mst(u,n.repeater),layout:{...s?{align:s}:{},...a?{center:a}:{},...l?{spacing:l}:{},...c?{columns:c}:{}}}}}mapLayer(t,{parentEncoding:n,parentProjection:i,...r}){const{encoding:o,projection:s,...a}=t,l={...r,parentEncoding:vge({parentEncoding:n,encoding:o,layer:!0}),parentProjection:bge({parentProjection:i,projection:s})};return super.mapLayer({...a,...t.name?{name:[l.repeaterPrefix,t.name].filter(c=>c).join("_")}:{}},l)}},Ust=new class Bst extends X6{map(t,n){return n.emptySelections??(n.emptySelections={}),n.selectionPredicates??(n.selectionPredicates={}),t=Cge(t,n),super.map(t,n)}mapLayerOrUnit(t,n){if((t=Cge(t,n)).encoding){const i={};for(const[r,o]of Hd(t.encoding))i[r]=Dge(o,n);t={...t,encoding:i}}return super.mapLayerOrUnit(t,n)}mapUnit(t,n){const{selection:i,...r}=t;return i?{...r,params:Hd(i).map(([o,s])=>{const{init:a,bind:l,empty:c,...u}=s;"single"===u.type?(u.type="point",u.toggle=!1):"multi"===u.type&&(u.type="point"),n.emptySelections[o]="none"!==c;for(const d of nr(n.selectionPredicates[o]??{}))d.empty="none"!==c;return{name:o,value:a,select:u,bind:l}})}:t}},zst=new nj;function xge(e){return Ce(e)?{type:e}:e??{}}const Yst=["background","padding"];function Age(e,t){const n={};for(const i of Yst)e&&void 0!==e[i]&&(n[i]=ls(e[i]));return t&&(n.params=e.params),n}class vu{constructor(t={},n={}){this.explicit=t,this.implicit=n}clone(){return new vu(Ze(this.explicit),Ze(this.implicit))}combine(){return{...this.explicit,...this.implicit}}get(t){return Xn(this.explicit[t],this.implicit[t])}getWithExplicit(t){return void 0!==this.explicit[t]?{explicit:!0,value:this.explicit[t]}:void 0!==this.implicit[t]?{explicit:!1,value:this.implicit[t]}:{explicit:!1,value:void 0}}setWithExplicit(t,{value:n,explicit:i}){void 0!==n&&this.set(t,n,i)}set(t,n,i){return delete this[i?"implicit":"explicit"][t],this[i?"explicit":"implicit"][t]=n,this}copyKeyFromSplit(t,{explicit:n,implicit:i}){void 0!==n[t]?this.set(t,n[t],!0):void 0!==i[t]&&this.set(t,i[t],!1)}copyKeyFromObject(t,n){void 0!==n[t]&&this.set(t,n[t],!0)}copyAll(t){for(const n of se(t.combine())){const i=t.getWithExplicit(n);this.setWithExplicit(n,i)}}}function dc(e){return{explicit:!0,value:e}}function cs(e){return{explicit:!1,value:e}}function Mge(e){return(t,n,i,r)=>{const o=e(t.value,n.value);return o>0?t:o<0?n:LM(t,n,i,r)}}function LM(e,t,n,i){return e.explicit&&t.explicit&&de(function Fit(e,t,n,i){return`Conflicting ${t.toString()} property "${e.toString()}" (${Jt(n)} and ${Jt(i)}). Using ${Jt(n)}.`}(n,i,e.value,t.value)),e}function rf(e,t,n,i,r=LM){return void 0===e||void 0===e.value?t:e.explicit&&!t.explicit?e:t.explicit&&!e.explicit?t:as(e.value,t.value)?e:r(e,t,n,i)}class Kst extends vu{constructor(t={},n={},i=!1){super(t,n),this.explicit=t,this.implicit=n,this.parseNothing=i}clone(){const t=super.clone();return t.parseNothing=this.parseNothing,t}}function J_(e){return ce(e,"url")}function iw(e){return ce(e,"values")}function Nge(e){return ce(e,"name")&&!J_(e)&&!iw(e)&&!sf(e)}function sf(e){return e&&(Ige(e)||kge(e)||ij(e))}function Ige(e){return ce(e,"sequence")}function kge(e){return ce(e,"sphere")}function ij(e){return ce(e,"graticule")}var Zn=function(e){return e[e.Raw=0]="Raw",e[e.Main=1]="Main",e[e.Row=2]="Row",e[e.Column=3]="Column",e[e.Lookup=4]="Lookup",e[e.PreFilterInvalid=5]="PreFilterInvalid",e[e.PostFilterInvalid=6]="PostFilterInvalid",e}(Zn||{});function Oge({invalid:e,isPath:t}){switch(ape(e,{isPath:t})){case"filter":return{marks:"exclude-invalid-values",scales:"exclude-invalid-values"};case"break-paths-show-domains":return{marks:t?"include-invalid-values":"exclude-invalid-values",scales:"include-invalid-values"};case"break-paths-filter-domains":return{marks:t?"include-invalid-values":"exclude-invalid-values",scales:"exclude-invalid-values"};case"show":return{marks:"include-invalid-values",scales:"include-invalid-values"}}}function Rge(e){const{signals:t,hasLegend:n,index:i,...r}=e;return r.field=zs(r.field),r}function _p(e,t=!0,n=hr){if(te(e)){const i=e.map(r=>_p(r,t,n));return t?`[${i.join(", ")}]`:i}return ap(e)?n(t?lp(e):function art(e){const t=a6(e,!0);return e.utc?+new Date(Date.UTC(...t)):+new Date(...t)}(e)):t?n(Jt(e)):e}function Qst(e,t){for(const n of nr(e.component.selection??{})){const i=n.name;let r=`${i}${af}, ${"global"===n.resolve?"true":`{unit: ${vp(e)}}`}`;for(const o of HM)o.defined(n)&&(o.signals&&(t=o.signals(e,n,t)),o.modifyExpr&&(r=o.modifyExpr(e,n,r)));t.push({name:i+Aat,on:[{events:{signal:n.name+af},update:`modify(${ge(n.name+yp)}, ${r})`}]})}return rj(t)}function Zst(e,t){if(e.component.selection&&se(e.component.selection).length){const n=ge(e.getName("cell"));t.unshift({name:"facet",value:{},on:[{events:Ud("pointermove","scope"),update:`isTuple(facet) ? facet : group(${n}).datum`}]})}return rj(t)}function Fge(e,t){for(const n of nr(e.component.selection??{}))for(const i of HM)i.defined(n)&&i.marks&&(t=i.marks(e,n,t));return t}function rj(e){return e.map(t=>(t.on&&!t.on.length&&delete t.on,t))}class Kt{constructor(t,n){this.debugName=n,this._children=[],this._parent=null,t&&(this.parent=t)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(t){this._parent=t,t&&t.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(t,n){this._children.includes(t)?de("Attempt to add the same child twice."):void 0!==n?this._children.splice(n,0,t):this._children.push(t)}removeChild(t){const n=this._children.indexOf(t);return this._children.splice(n,1),n}remove(){let t=this._parent.removeChild(this);for(const n of this._children)n._parent=this._parent,this._parent.addChild(n,t++)}insertAsParentOf(t){const n=t.parent;n.removeChild(this),this.parent=n,t.parent=this}swapWithParent(){const t=this._parent,n=t.parent;for(const r of this._children)r.parent=t;this._children=[],t.removeChild(this);const i=t.parent.removeChild(t);this._parent=n,n.addChild(this,i),t.parent=this}}class xo extends Kt{clone(){const t=new this.constructor;return t.debugName=`clone_${this.debugName}`,t._source=this._source,t._name=`clone_${this._name}`,t.type=this.type,t.refCounts=this.refCounts,t.refCounts[t._name]=0,t}constructor(t,n,i,r){super(t,n),this.type=i,this.refCounts=r,this._source=this._name=n,this.refCounts&&!(this._name in this.refCounts)&&(this.refCounts[this._name]=0)}dependentFields(){return new Set}producedFields(){return new Set}hash(){return void 0===this._hash&&(this._hash=`Output ${zfe()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(t){this._source=t}}function oj(e){return void 0!==e.as}function Pge(e){return`${e}_end`}class fc extends Kt{clone(){return new fc(null,Ze(this.timeUnits))}constructor(t,n){super(t),this.timeUnits=n}static makeFromEncoding(t,n){const i=n.reduceFieldDef((r,o,s)=>{const{field:a,timeUnit:l}=o;if(l){let c;if(cp(l)){if(On(n)){const{mark:u,markDef:d,config:f}=n,h=tf({fieldDef:o,markDef:d,config:f});(Kb(u)||h)&&(c={timeUnit:Pi(l),field:a})}}else c={as:ve(o,{forAs:!0}),field:a,timeUnit:l};if(On(n)){const{mark:u,markDef:d,config:f}=n,h=tf({fieldDef:o,markDef:d,config:f});Kb(u)&&Qn(s)&&.5!==h&&(c.rectBandPosition=h)}c&&(r[gt(c)]=c)}return r},{});return Zt(i)?null:new fc(t,i)}static makeFromTransform(t,n){const{timeUnit:i,...r}={...n},s={...r,timeUnit:Pi(i)};return new fc(t,{[gt(s)]:s})}merge(t){this.timeUnits={...this.timeUnits};for(const n in t.timeUnits)this.timeUnits[n]||(this.timeUnits[n]=t.timeUnits[n]);for(const n of t.children)t.removeChild(n),n.parent=this;t.remove()}removeFormulas(t){const n={};for(const[i,r]of Hd(this.timeUnits)){const o=oj(r)?r.as:`${r.field}_end`;t.has(o)||(n[i]=r)}this.timeUnits=n}producedFields(){return new Set(nr(this.timeUnits).map(t=>oj(t)?t.as:Pge(t.field)))}dependentFields(){return new Set(nr(this.timeUnits).map(t=>t.field))}hash(){return`TimeUnit ${gt(this.timeUnits)}`}assemble(){const t=[];for(const n of nr(this.timeUnits)){const{rectBandPosition:i}=n,r=Pi(n.timeUnit);if(oj(n)){const{field:o,as:s}=n,{unit:a,utc:l,...c}=r,u=[s,`${s}_end`];t.push({field:zs(o),type:"timeunit",...a?{units:fM(a)}:{},...l?{timezone:"utc"}:{},...c,as:u}),t.push(...$ge(u,i,r))}else if(n){const{field:o}=n,s=o.replaceAll("\\.","."),a=Lge({timeUnit:r,field:s}),l=Pge(s);t.push({type:"formula",expr:a,as:l}),t.push(...$ge([s,l],i,r))}}return t}}const $M="offsetted_rect_start",BM="offsetted_rect_end";function Lge({timeUnit:e,field:t,reverse:n}){const{unit:i,utc:r}=e,o=Bhe(i),{part:s,step:a}=zhe(o,e.step);return`${r?"utcOffset":"timeOffset"}('${s}', datum['${t}'], ${n?-a:a})`}function $ge([e,t],n,i){if(void 0!==n&&.5!==n){const r=`datum['${e}']`,o=`datum['${t}']`;return[{type:"formula",expr:Bge([Lge({timeUnit:i,field:e,reverse:!0}),r],n+.5),as:`${e}_${$M}`},{type:"formula",expr:Bge([r,o],n+.5),as:`${e}_${BM}`}]}return[]}function Bge([e,t],n){return`${1-n} * ${e} + ${n} * ${t}`}const rw="_tuple_fields";class iat{constructor(...t){this.items=t,this.hasChannel={},this.hasField={},this.hasSelectionId=!1}}const rat={defined:()=>!0,parse:(e,t,n)=>{const i=t.name,r=t.project??(t.project=new iat),o={},s={},a=new Set,l=(p,g)=>{const m="visual"===g?p.channel:p.field;let _=Nn(`${i}_${m}`);for(let y=1;a.has(_);y++)_=Nn(`${i}_${m}_${y}`);return a.add(_),{[g]:_}},c=t.type,u=e.config.selection[c],d=void 0!==n.value?Ee(n.value):null;let{fields:f,encodings:h}=we(n.select)?n.select:{};if(!f&&!h&&d)for(const p of d)if(we(p))for(const g of se(p))Snt(g)?(h||(h=[])).push(g):"interval"===c?(de('Interval selections should be initialized using "x", "y", "longitude", or "latitude" keys.'),h=u.encodings):(f??(f=[])).push(g);!f&&!h&&(h=u.encodings,"fields"in u&&(f=u.fields));for(const p of h??[]){const g=e.fieldDef(p);if(g){let m=g.field;if(g.aggregate){de(Xnt(p,g.aggregate));continue}if(!m){de(whe(p));continue}if(g.timeUnit&&!cp(g.timeUnit)){m=e.vgField(p);const _={timeUnit:g.timeUnit,as:m,field:g.field};s[gt(_)]=_}if(!o[m]){const y={field:m,channel:p,type:"interval"===c&&rc(p)&&Ga(e.getScaleComponent(p).get("type"))?"R":g.bin?"R-RE":"E",index:r.items.length};y.signals={...l(y,"data"),...l(y,"visual")},r.items.push(o[m]=y),r.hasField[m]=o[m],r.hasSelectionId=r.hasSelectionId||m===Xa,Xfe(p)?(y.geoChannel=p,y.channel=Kfe(p),r.hasChannel[y.channel]=o[m]):r.hasChannel[p]=o[m]}}else de(whe(p))}for(const p of f??[]){if(r.hasField[p])continue;const g={type:"E",field:p,index:r.items.length};g.signals={...l(g,"data")},r.items.push(g),r.hasField[p]=g,r.hasSelectionId=r.hasSelectionId||p===Xa}d&&(t.init=d.map(p=>r.items.map(g=>we(p)?void 0!==p[g.geoChannel||g.channel]?p[g.geoChannel||g.channel]:p[g.field]:p))),Zt(s)||(r.timeUnit=new fc(null,s))},signals:(e,t,n)=>{const i=t.name+rw;return n.filter(o=>o.name===i).length>0||t.project.hasSelectionId?n:n.concat({name:i,value:t.project.items.map(Rge)})}},bu={defined:e=>"interval"===e.type&&"global"===e.resolve&&e.bind&&"scales"===e.bind,parse:(e,t)=>{const n=t.scales=[];for(const i of t.project.items){const r=i.channel;if(!rc(r))continue;const o=e.getScaleComponent(r),s=o?o.get("type"):void 0;"sequential"==s&&de("Sequntial scales are deprecated. The available quantitative scale type values are linear, log, pow, sqrt, symlog, time and utc"),o&&Ga(s)?(o.set("selectionExtent",{param:t.name,field:i.field},!0),n.push(i)):de("Scale bindings are currently only supported for scales with unbinned, continuous domains.")}},topLevelSignals:(e,t,n)=>{const i=t.scales.filter(s=>0===n.filter(a=>a.name===s.signals.data).length);if(!e.parent||jge(e)||0===i.length)return n;const r=n.find(s=>s.name===t.name);let o=r.update;if(o.includes(ume))r.update=`{${i.map(s=>`${ge(zs(s.field))}: ${s.signals.data}`).join(", ")}}`;else{for(const s of i){const a=`${ge(zs(s.field))}: ${s.signals.data}`;o.includes(a)||(o=`${o.substring(0,o.length-1)}, ${a}}`)}r.update=o}return n.concat(i.map(s=>({name:s.signals.data})))},signals:(e,t,n)=>{if(e.parent&&!jge(e))for(const i of t.scales){const r=n.find(o=>o.name===i.signals.data);r.push="outer",delete r.value,delete r.update}return n}};function sj(e,t){return`domain(${ge(e.scaleName(t))})`}function jge(e){return e.parent&&uy(e.parent)&&!e.parent.parent}const ey="_brush",Vge="_scale_trigger",ow="geo_interval_init_tick",sat={defined:e=>"interval"===e.type,parse:(e,t,n)=>{var i;if(e.hasProjection){const r={...we(n.select)?n.select:{}};r.fields=[Xa],r.encodings||(r.encodings=n.value?se(n.value):[Ua,Va]),n.select={type:"interval",...r}}if(t.translate&&!bu.defined(t)){const r=`!event.item || event.item.mark.name !== ${ge(t.name+ey)}`;for(const o of t.events){if(!o.between){de(`${o} is not an ordered event stream for interval selections.`);continue}const s=Ee((i=o.between[0]).filter??(i.filter=[]));s.includes(r)||s.push(r)}}},signals:(e,t,n)=>{const i=t.name,r=i+af,o=nr(t.project.hasChannel).filter(a=>a.channel===In||a.channel===Fi),s=t.init?t.init[0]:null;if(n.push(...o.reduce((a,l)=>a.concat(function aat(e,t,n,i){const r=!e.hasProjection,o=n.channel,s=n.signals.visual,a=ge(r?e.scaleName(o):e.projectionName()),l=f=>`scale(${a}, ${f})`,c=e.getSizeSignalRef(o===In?"width":"height").signal,u=`${o}(unit)`,d=t.events.reduce((f,h)=>[...f,{events:h.between[0],update:`[${u}, ${u}]`},{events:h,update:`[${s}[0], clamp(${u}, 0, ${c})]`}],[]);if(r){const f=n.signals.data,h=bu.defined(t),p=e.getScaleComponent(o),g=p?p.get("type"):void 0,m=i?{init:_p(i,!0,l)}:{value:[]};return d.push({events:{signal:t.name+Vge},update:Ga(g)?`[${l(`${f}[0]`)}, ${l(`${f}[1]`)}]`:"[0, 0]"}),h?[{name:f,on:[]}]:[{name:s,...m,on:d},{name:f,...i?{init:_p(i)}:{},on:[{events:{signal:s},update:`${s}[0] === ${s}[1] ? null : invert(${a}, ${s})`}]}]}{const f=o===In?0:1,h=t.name+"_init";return[{name:s,...i?{init:`[${h}[0][${f}], ${h}[1][${f}]]`}:{value:[]},on:d}]}}(e,t,l,s&&s[l.index])),[])),e.hasProjection){const a=ge(e.projectionName()),l=e.projectionName()+"_center",{x:c,y:u}=t.project.hasChannel,d=c&&c.signals.visual,f=u&&u.signals.visual,h=c?s&&s[c.index]:`${l}[0]`,p=u?s&&s[u.index]:`${l}[1]`,g=w=>e.getSizeSignalRef(w).signal,m=`[[${d?d+"[0]":"0"}, ${f?f+"[0]":"0"}],[${d?d+"[1]":g("width")}, ${f?f+"[1]":g("height")}]]`;s&&(n.unshift({name:i+"_init",init:`[scale(${a}, [${c?h[0]:h}, ${u?p[0]:p}]), scale(${a}, [${c?h[1]:h}, ${u?p[1]:p}])]`}),(!c||!u)&&(n.find(C=>C.name===l)||n.unshift({name:l,update:`invert(${a}, [${g("width")}/2, ${g("height")}/2])`})));const v=`vlSelectionTuples(intersect(${m}, {markname: ${ge(e.getName("marks"))}}, unit.mark), {unit: ${vp(e)}})`,b=o.map(w=>w.signals.visual);return n.concat({name:r,on:[{events:[...b.length?[{signal:b.join(" || ")}]:[],...s?[{signal:ow}]:[]],update:v}]})}{if(!bu.defined(t)){const c=i+Vge,u=o.map(d=>{const f=d.channel,{data:h,visual:p}=d.signals,g=ge(e.scaleName(f)),_=Ga(e.getScaleComponent(f).get("type"))?"+":"";return`(!isArray(${h}) || (${_}invert(${g}, ${p})[0] === ${_}${h}[0] && ${_}invert(${g}, ${p})[1] === ${_}${h}[1]))`});u.length&&n.push({name:c,value:{},on:[{events:o.map(d=>({scale:e.scaleName(d.channel)})),update:u.join(" && ")+` ? ${c} : {}`}]})}const a=o.map(c=>c.signals.data),l=`unit: ${vp(e)}, fields: ${i+rw}, values`;return n.concat({name:r,...s?{init:`{${l}: ${_p(s)}}`}:{},...a.length?{on:[{events:[{signal:a.join(" || ")}],update:`${a.join(" && ")} ? {${l}: [${a}]} : null`}]}:{}})}},topLevelSignals:(e,t,n)=>(On(e)&&e.hasProjection&&t.init&&(n.filter(r=>r.name===ow).length||n.unshift({name:ow,value:null,on:[{events:"timer{1}",update:`${ow} === null ? {} : ${ow}`}]})),n),marks:(e,t,n)=>{const i=t.name,{x:r,y:o}=t.project.hasChannel,s=r?.signals.visual,a=o?.signals.visual,l=`data(${ge(t.name+yp)})`;if(bu.defined(t)||!r&&!o)return n;const c={x:void 0!==r?{signal:`${s}[0]`}:{value:0},y:void 0!==o?{signal:`${a}[0]`}:{value:0},x2:void 0!==r?{signal:`${s}[1]`}:{field:{group:"width"}},y2:void 0!==o?{signal:`${a}[1]`}:{field:{group:"height"}}};if("global"===t.resolve)for(const m of se(c))c[m]=[{test:`${l}.length && ${l}[0].unit === ${vp(e)}`,...c[m]},{value:0}];const{fill:u,fillOpacity:d,cursor:f,...h}=t.mark,p=se(h).reduce((m,_)=>(m[_]=[{test:[void 0!==r&&`${s}[0] !== ${s}[1]`,void 0!==o&&`${a}[0] !== ${a}[1]`].filter(y=>y).join(" && "),value:h[_]},{value:null}],m),{}),g=f??(t.translate?"move":null);return[{name:`${i+ey}_bg`,type:"rect",clip:!0,encode:{enter:{fill:{value:u},fillOpacity:{value:d}},update:c}},...n,{name:i+ey,type:"rect",clip:!0,encode:{enter:{...g?{cursor:{value:g}}:{},fill:{value:"transparent"}},update:{...c,...p}}}]}},lat={defined:e=>"point"===e.type,signals:(e,t,n)=>{const i=t.name,r=i+rw,o=t.project,s="(item().isVoronoi ? datum.datum : datum)",a=nr(e.component.selection??{}).reduce((d,f)=>"interval"===f.type?d.concat(f.name+ey):d,[]).map(d=>`indexof(item().mark.name, '${d}') < 0`).join(" && "),l="datum && item().mark.marktype !== 'group' && indexof(item().mark.role, 'legend') < 0"+(a?` && ${a}`:"");let c=`unit: ${vp(e)}, `;c+=t.project.hasSelectionId?`${Xa}: ${s}[${ge(Xa)}]`:`fields: ${r}, values: [${o.items.map(f=>e.fieldDef(f.channel)?.bin?`[${s}[${ge(e.vgField(f.channel,{}))}], ${s}[${ge(e.vgField(f.channel,{binSuffix:"end"}))}]]`:`${s}[${ge(f.field)}]`).join(", ")}]`;const u=t.events;return n.concat([{name:i+af,on:u?[{events:u,update:`${l} ? {${c}} : null`,force:!0}]:[]}])}};function ty({model:e,channelDef:t,vgChannel:n,invalidValueRef:i,mainRefFn:r}){const o=Jb(t)&&t.condition;let s=[];o&&(s=Ee(o).map(c=>{const u=r(c);if(function not(e){return ce(e,"param")}(c)){const{param:d,empty:f}=c;return{test:pme(e,{param:d,empty:f}),...u}}return{test:GM(e,c.test),...u}})),void 0!==i&&s.push(i);const a=r(t);return void 0!==a&&s.push(a),s.length>1||1===s.length&&s[0].test?{[n]:s}:1===s.length?{[n]:s[0]}:{}}function aj(e,t="text"){return ty({model:e,channelDef:e.encoding[t],vgChannel:t,mainRefFn:i=>jM(i,e.config),invalidValueRef:void 0})}function jM(e,t,n="datum"){if(e){if(Ya(e))return En(e.value);if(tt(e)){const{format:i,formatType:r}=TM(e);return A6({fieldOrDatumDef:e,format:i,formatType:r,expr:n,config:t})}}}function zge(e,t={}){const{encoding:n,markDef:i,config:r,stack:o}=e,s=n.tooltip;if(te(s))return{tooltip:Gge({tooltip:s},o,r,t)};{const a=t.reactiveGeom?"datum.datum":"datum";return ty({model:e,channelDef:s,vgChannel:"tooltip",mainRefFn:c=>{const u=jM(c,r,a);if(u)return u;if(null===c)return;let d=en("tooltip",i,r);return!0===d&&(d={content:"encoding"}),Ce(d)?{value:d}:we(d)?ke(d)?d:"encoding"===d.content?Gge(n,o,r,t):{signal:a}:void 0},invalidValueRef:void 0})}}function Hge(e,t,n,{reactiveGeom:i}={}){const r={...n,...n.tooltipFormat},o=new Set,s=i?"datum.datum":"datum",a=[];function l(u,d){const f=rp(d),h=eo(u)?u:{...u,type:e[f].type},g=Ee(h.title||O6(h,r)).join(", ").replaceAll(/"/g,'\\"');let m;if(Qn(d)){const _="x"===d?"x2":"y2",y=Ka(e[_]);if(ir(h.bin)&&y){const v=ve(h,{expr:s}),b=ve(y,{expr:s}),{format:w,formatType:C}=TM(h);m=Qb(v,b,w,C,r),o.add(_)}}if((Qn(d)||d===Hs||d===ja)&&t&&t.fieldChannel===d&&"normalize"===t.offset){const{format:_,formatType:y}=TM(h);m=A6({fieldOrDatumDef:h,format:_,formatType:y,expr:s,config:r,normalizeStack:!0}).signal}m??(m=jM(h,r,s).signal),a.push({channel:d,key:g,value:m})}F6(e,(u,d)=>{he(u)?l(u,d):CM(u)&&l(u.condition,d)});const c={};for(const{channel:u,key:d,value:f}of a)!o.has(u)&&!c[d]&&(c[d]=f);return c}function Gge(e,t,n,{reactiveGeom:i}={}){const r=Hge(e,t,n,{reactiveGeom:i}),o=Hd(r).map(([s,a])=>`"${s}": ${a}`);return o.length>0?{signal:`{${o.join(", ")}}`}:void 0}function cat(e){const{markDef:t,config:n}=e,i=en("aria",t,n);return!1===i?{}:{...i?{aria:i}:{},...uat(e),...dat(e)}}function uat(e){const{mark:t,markDef:n,config:i}=e;if(!1===i.aria)return{};const r=en("ariaRoleDescription",n,i);return null!=r?{ariaRoleDescription:{value:r}}:De(Wnt,t)?{}:{ariaRoleDescription:{value:t}}}function dat(e){const{encoding:t,markDef:n,config:i,stack:r}=e,o=t.description;if(o)return ty({model:e,channelDef:o,vgChannel:"description",mainRefFn:l=>jM(l,e.config),invalidValueRef:void 0});const s=en("description",n,i);if(null!=s)return{description:En(s)};if(!1===i.aria)return{};const a=Hge(t,r,i);return Zt(a)?void 0:{description:{signal:Hd(a).map(([l,c],u)=>`"${u>0?"; ":""}${l}: " + (${c})`).join(" + ")}}}function sr(e,t,n={}){const{markDef:i,encoding:r,config:o}=t,{vgChannel:s}=n;let{defaultRef:a,defaultValue:l}=n;const c=r[e];void 0===a&&(l??(l=en(e,i,o,{vgChannel:s,ignoreVgConfig:!Jb(c)})),void 0!==l&&(a=En(l)));const u={markDef:i,config:o,scaleName:t.scaleName(e),scale:t.getScaleComponent(e)},d=cpe({...u,scaleChannel:e,channelDef:c});return ty({model:t,channelDef:c,vgChannel:s??e,invalidValueRef:d,mainRefFn:h=>x6({...u,channel:e,channelDef:h,stack:null,defaultRef:a})})}function Wge(e,t={filled:void 0}){const{markDef:n,encoding:i,config:r}=e,{type:o}=n,s=t.filled??en("filled",n,r),a=pt(["bar","point","circle","square","geoshape"],o)?"transparent":void 0,l=en(!0===s?"color":void 0,n,r,{vgChannel:"fill"})??r.mark[!0===s&&"color"]??a,c=en(!1===s?"color":void 0,n,r,{vgChannel:"stroke"})??r.mark[!1===s&&"color"],u=s?"fill":"stroke",d={...l?{fill:En(l)}:{},...c?{stroke:En(c)}:{}};return n.color&&(s?n.fill:n.stroke)&&de(xhe("property",{fill:"fill"in n,stroke:"stroke"in n})),{...d,...sr("color",e,{vgChannel:u,defaultValue:s?l:c}),...sr("fill",e,{defaultValue:i.fill?l:void 0}),...sr("stroke",e,{defaultValue:i.stroke?c:void 0})}}function fat(e){const{encoding:t,mark:n}=e,i=t.order;return!ef(n)&&Ya(i)?ty({model:e,channelDef:i,vgChannel:"zindex",mainRefFn:r=>En(r.value),invalidValueRef:void 0}):{}}function ny({channel:e,markDef:t,encoding:n={},model:i,bandPosition:r}){const o=`${e}Offset`,s=t[o],a=n[o];if(("xOffset"===o||"yOffset"===o)&&a)return{offsetType:"encoding",offset:x6({channel:o,channelDef:a,markDef:t,config:i?.config,scaleName:i.scaleName(o),scale:i.getScaleComponent(o),stack:null,defaultRef:En(s),bandPosition:r})};const l=t[o];return l?{offsetType:"visual",offset:l}:{}}function to(e,t,{defaultPos:n,vgChannel:i}){const{encoding:r,markDef:o,config:s,stack:a}=t,l=r[e],c=r[ic(e)],u=t.scaleName(e),d=t.getScaleComponent(e),{offset:f,offsetType:h}=ny({channel:e,markDef:o,encoding:r,model:t,bandPosition:.5}),p=lj({model:t,defaultPos:n,channel:e,scaleName:u,scale:d}),g=!l&&Qn(e)&&(r.latitude||r.longitude)?{field:t.getName(e)}:function hat(e){const{channel:t,channelDef:n,scaleName:i,stack:r,offset:o,markDef:s}=e;if(tt(n)&&r&&t===r.fieldChannel){if(he(n)){let a=n.bandPosition;if(void 0===a&&"text"===s.type&&("radius"===t||"theta"===t)&&(a=.5),void 0!==a)return bM({scaleName:i,fieldOrDatumDef:n,startSuffix:"start",bandPosition:a,offset:o})}return hp(n,i,{suffix:"end"},{offset:o})}return T6(e)}({channel:e,channelDef:l,channel2Def:c,markDef:o,config:s,scaleName:u,scale:d,stack:a,offset:f,defaultRef:p,bandPosition:"encoding"===h?0:void 0});return g?{[i||e]:g}:void 0}function lj({model:e,defaultPos:t,channel:n,scaleName:i,scale:r}){const{markDef:o,config:s}=e;return()=>{const a=rp(n),l=Xd(n),c=en(n,o,s,{vgChannel:l});if(void 0!==c)return Xb(n,c);switch(t){case"zeroOrMin":return qge({scaleName:i,scale:r,mode:"zeroOrMin",mainChannel:a,config:s});case"zeroOrMax":return qge({scaleName:i,scale:r,mode:{zeroOrMax:{widthSignal:e.width.signal,heightSignal:e.height.signal}},mainChannel:a,config:s});case"mid":return{...e[To(n)],mult:.5}}}}function qge({mainChannel:e,config:t,...n}){const i=lpe(n),{mode:r}=n;if(i)return i;switch(e){case"radius":{if("zeroOrMin"===r)return{value:0};const{widthSignal:o,heightSignal:s}=r.zeroOrMax;return{signal:`min(${o},${s})/2`}}case"theta":return"zeroOrMin"===r?{value:0}:{signal:"2*PI"};case"x":return"zeroOrMin"===r?{value:0}:{field:{group:"width"}};case"y":return"zeroOrMin"===r?{field:{group:"height"}}:{value:0}}}const pat={left:"x",center:"xc",right:"x2"},gat={top:"y",middle:"yc",bottom:"y2"};function Yge(e,t,n,i="middle"){if("radius"===e||"theta"===e)return Xd(e);const r="x"===e?"align":"baseline",o=en(r,t,n);let s;return ke(o)?(de(function Dit(e){return`The ${e} for range marks cannot be an expression`}(r)),s=void 0):s=o,"x"===e?pat[s||("top"===i?"left":"center")]:gat[s||i]}function VM(e,t,{defaultPos:n,defaultPos2:i,range:r}){return r?Kge(e,t,{defaultPos:n,defaultPos2:i}):to(e,t,{defaultPos:n})}function Kge(e,t,{defaultPos:n,defaultPos2:i}){const{markDef:r,config:o}=t,s=ic(e),a=To(e),l=function mat(e,t,n){const{encoding:i,mark:r,markDef:o,stack:s,config:a}=e,l=rp(n),c=To(n),u=Xd(n),d=i[l],f=e.scaleName(l),h=e.getScaleComponent(l),{offset:p}=ny(n in i||n in o?{channel:n,markDef:o,encoding:i,model:e}:{channel:l,markDef:o,encoding:i,model:e});if(!d&&("x2"===n||"y2"===n)&&(i.latitude||i.longitude)){const m=To(n),_=e.markDef[m];return null!=_?{[m]:{value:_}}:{[u]:{field:e.getName(n)}}}const g=function _at({channel:e,channelDef:t,channel2Def:n,markDef:i,config:r,scaleName:o,scale:s,stack:a,offset:l,defaultRef:c}){return tt(t)&&a&&e.charAt(0)===a.fieldChannel.charAt(0)?hp(t,o,{suffix:"start"},{offset:l}):T6({channel:e,channelDef:n,scaleName:o,scale:s,stack:a,markDef:i,config:r,offset:l,defaultRef:c})}({channel:n,channelDef:d,channel2Def:i[n],markDef:o,config:a,scaleName:f,scale:h,stack:s,offset:p,defaultRef:void 0});return void 0!==g?{[u]:g}:UM(n,o)||UM(n,{[n]:n6(n,o,a.style),[c]:n6(c,o,a.style)})||UM(n,a[r])||UM(n,a.mark)||{[u]:lj({model:e,defaultPos:t,channel:n,scaleName:f,scale:h})()}}(t,i,s);return{...to(e,t,{defaultPos:n,vgChannel:l[a]?Yge(e,r,o):Xd(e)}),...l}}function UM(e,t){const n=To(e),i=Xd(e);if(void 0!==t[i])return{[i]:Xb(e,t[i])};if(void 0!==t[e])return{[i]:Xb(e,t[e])};if(t[n]){const r=t[n];if(!fp(r))return{[n]:Xb(e,r)};de(function yit(e){return`Position range does not support relative band size for ${e}.`}(n))}}function wu(e,t){const{config:n,encoding:i,markDef:r}=e,o=r.type,s=ic(t),a=To(t),l=i[t],c=i[s],u=e.getScaleComponent(t),d=u?u.get("type"):void 0,f=r.orient,h=i[a]??i.size??en("size",r,n,{vgChannel:a}),p=nhe(t),g="bar"===o&&("x"===t?"vertical"===f:"horizontal"===f)||"tick"===o&&("y"===t?"vertical"===f:"horizontal"===f);return!he(l)||!(mn(l.bin)||ir(l.bin)||l.timeUnit&&!c)||h&&!fp(h)||i[p]||Li(d)?(tt(l)&&Li(d)||g)&&!c?function vat(e,t,n){const{markDef:i,encoding:r,config:o,stack:s}=n,a=i.orient,l=n.scaleName(t),c=n.getScaleComponent(t),u=To(t),d=ic(t),f=nhe(t),h=n.scaleName(f),p=n.getScaleComponent(q4(t)),g="tick"===i.type||"horizontal"===a&&"y"===t||"vertical"===a&&"x"===t;let m;(r.size||i.size)&&(g?m=sr("size",n,{vgChannel:u,defaultRef:En(i.size)}):de(function kit(e){return`Cannot apply size to non-oriented mark "${e}".`}(i.type)));const _=!!m,y=vpe({channel:t,fieldDef:e,markDef:i,config:o,scaleType:(c||p)?.get("type"),useVlSizeChannel:g});m=m||{[u]:yat(u,h||l,p||c,o,y,!!e,i.type)};const b=Yge(t,i,o,"band"===(c||p)?.get("type")&&fp(y)&&!_?"top":"middle"),w="xc"===b||"yc"===b,{offset:C,offsetType:E}=ny({channel:t,markDef:i,encoding:r,model:n,bandPosition:w?.5:0}),D=T6({channel:t,channelDef:e,markDef:i,config:o,scaleName:l,scale:c,stack:s,offset:C,defaultRef:lj({model:n,defaultPos:"mid",channel:t,scaleName:l,scale:c}),bandPosition:w?"encoding"===E?0:.5:ke(y)?{signal:`(1-${y})/2`}:fp(y)?(1-y.band)/2:0});if(u)return{[b]:D,...m};{const M=Xd(d),k=m[u],R=C?{...k,offset:C}:k;return{[b]:D,[M]:te(D)?[D[0],{...D[1],offset:R}]:{...D,offset:R}}}}(l,t,e):Kge(t,e,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"}):function bat({fieldDef:e,fieldDef2:t,channel:n,model:i}){const{config:r,markDef:o,encoding:s}=i,a=i.getScaleComponent(n),l=i.scaleName(n),c=a?a.get("type"):void 0,u=a.get("reverse"),d=vpe({channel:n,fieldDef:e,markDef:o,config:r,scaleType:c}),h=i.component.axes[n]?.[0]?.get("translate")??.5,p=Qn(n)?en("binSpacing",o,r)??0:0,g=ic(n),m=Xd(n),_=Xd(g),y=oc("minBandSize",o,r),{offset:v}=ny({channel:n,markDef:o,encoding:s,model:i,bandPosition:0}),{offset:b}=ny({channel:g,markDef:o,encoding:s,model:i,bandPosition:0}),w=function Xrt({scaleName:e,fieldDef:t}){const n=ve(t,{expr:"datum"});return`abs(scale("${e}", ${ve(t,{expr:"datum",suffix:"end"})}) - scale("${e}", ${n}))`}({fieldDef:e,scaleName:l}),C=Xge(n,p,u,h,v,y,w),E=Xge(g,p,u,h,b??v,y,w),D=ke(d)?{signal:`(1-${d.signal})/2`}:fp(d)?(1-d.band)/2:.5,M=tf({fieldDef:e,fieldDef2:t,markDef:o,config:r});if(mn(e.bin)||e.timeUnit){const k=e.timeUnit&&.5!==M;return{[_]:Qge({fieldDef:e,scaleName:l,bandPosition:D,offset:E,useRectOffsetField:k}),[m]:Qge({fieldDef:e,scaleName:l,bandPosition:ke(D)?{signal:`1-${D.signal}`}:1-D,offset:C,useRectOffsetField:k})}}if(ir(e.bin)){const k=hp(e,l,{},{offset:E});if(he(t))return{[_]:k,[m]:hp(t,l,{},{offset:C})};if(op(e.bin)&&e.bin.step)return{[_]:k,[m]:{signal:`scale("${l}", ${ve(e,{expr:"datum"})} + ${e.bin.step})`,offset:C}}}de(khe(g))}({fieldDef:l,fieldDef2:c,channel:t,model:e})}function yat(e,t,n,i,r,o,s){if(fp(r)){if(!n)return{mult:r.band,field:{group:e}};{const l=n.get("type");if("band"===l){let c=`bandwidth('${t}')`;1!==r.band&&(c=`${r.band} * ${c}`);const u=oc("minBandSize",{type:s},i);return{signal:u?`max(${Ha(u)}, ${c})`:c}}1!==r.band&&(de(function Ait(e){return`Cannot use the relative band size with ${e} scale.`}(l)),r=void 0)}}else{if(ke(r))return r;if(r)return{value:r}}if(n){const l=n.get("range");if(sp(l)&&At(l.step))return{value:l.step-2}}if(!o){const{bandPaddingInner:l,barBandPaddingInner:c,rectBandPaddingInner:u,tickBandPaddingInner:d}=i.scale,f=Xn(l,"tick"===s?d:"bar"===s?c:u);if(ke(f))return{signal:`(1 - (${f.signal})) * ${e}`};if(At(f))return{signal:`${1-f} * ${e}`}}return{value:K6(i.view,e)-2}}function Xge(e,t,n,i,r,o,s){if(Yfe(e))return 0;const a="x"===e||"y2"===e,l=a?-t/2:t/2;if(ke(n)||ke(r)||ke(i)||o){const c=Ha(n),u=Ha(r),d=Ha(i),f=Ha(o),p=o?`(${s} < ${f} ? ${a?"":"-"}0.5 * (${f} - (${s})) : ${l})`:l;return{signal:(d?`${d} + `:"")+(c?`(${c} ? -1 : 1) * `:"")+(u?`(${u} + ${p})`:p)}}return r=r||0,i+(n?-r-l:+r+l)}function Qge({fieldDef:e,scaleName:t,bandPosition:n,offset:i,useRectOffsetField:r}){return bM({scaleName:t,fieldOrDatumDef:e,bandPosition:n,offset:i,...r?{startSuffix:$M,endSuffix:BM}:{}})}const wat=new Set(["aria","width","height"]);function qs(e,t){const{fill:n,stroke:i}="include"===t.color?Wge(e):{};return{...Eat(e.markDef,t),...Zge("fill",n),...Zge("stroke",i),...sr("opacity",e),...sr("fillOpacity",e),...sr("strokeOpacity",e),...sr("strokeWidth",e),...sr("strokeDash",e),...fat(e),...zge(e),...aj(e,"href"),...cat(e)}}function Zge(e,t){return t?{[e]:t}:{}}function Eat(e,t){return Gnt.reduce((n,i)=>(!wat.has(i)&&ce(e,i)&&"ignore"!==t[i]&&(n[i]=En(e[i])),n),{})}function cj(e){const{config:t,markDef:n}=e,i=new Set;if(e.forEachFieldDef((r,o)=>{let s;if(!rc(o)||!(s=e.getScaleType(o)))return;const a=lM(r.aggregate);if(function qrt(e){return"break-paths-filter-domains"===e||"break-paths-show-domains"===e}(S6({scaleChannel:o,markDef:n,config:t,scaleType:s,isCountAggregate:a}))){const c=e.vgField(o,{expr:"datum",binSuffix:e.stack?.impute?"mid":void 0});c&&i.add(c)}}),i.size>0)return{defined:{signal:[...i].map(o=>hM(o,!0)).join(" && ")}}}function Jge(e,t){if(void 0!==t)return{[e]:En(t)}}const uj="voronoi",eme={defined:e=>"point"===e.type&&e.nearest,parse:(e,t)=>{if(t.events)for(const n of t.events)n.markname=e.getName(uj)},marks:(e,t,n)=>{const{x:i,y:r}=t.project.hasChannel,o=e.mark;if(ef(o))return de(function Qnt(e){return`The "nearest" transform is not supported for ${e} marks.`}(o)),n;const s={name:e.getName(uj),type:"path",interactive:!0,from:{data:e.getName("marks")},encode:{update:{fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0},...zge(e,{reactiveGeom:!0})}},transform:[{type:"voronoi",x:{expr:i||!r?"datum.datum.x || 0":"0"},y:{expr:r||!i?"datum.datum.y || 0":"0"},size:[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]}]};let a=0,l=!1;return n.forEach((c,u)=>{const d=c.name??"";d===e.component.mark[0].name?a=u:d.includes(uj)&&(l=!0)}),l||n.splice(a+1,0,s),n}},tme={defined:e=>"point"===e.type&&"global"===e.resolve&&e.bind&&"scales"!==e.bind&&!z6(e.bind),parse:(e,t,n)=>dme(t,n),topLevelSignals:(e,t,n)=>{const i=t.name,r=t.project,o=t.bind,s=t.init&&t.init[0],a=eme.defined(t)?"(item().isVoronoi ? datum.datum : datum)":"datum";return r.items.forEach((l,c)=>{const u=Nn(`${i}_${l.field}`);n.filter(f=>f.name===u).length||n.unshift({name:u,...s?{init:_p(s[c])}:{value:null},on:t.events?[{events:t.events,update:`datum && item().mark.marktype !== 'group' ? ${a}[${ge(l.field)}] : null`}]:[],bind:o[l.field]??o[l.channel]??o})}),n},signals:(e,t,n)=>{const i=t.name,r=t.project,o=n.find(c=>c.name===i+af),s=i+rw,a=r.items.map(c=>Nn(`${i}_${c.field}`)),l=a.map(c=>`${c} !== null`).join(" && ");return a.length&&(o.update=`${l} ? {fields: ${s}, values: [${a.join(", ")}]} : null`),delete o.value,delete o.on,n}},zM="_toggle",nme={defined:e=>"point"===e.type&&!!e.toggle,signals:(e,t,n)=>n.concat({name:t.name+zM,value:!1,on:[{events:t.events,update:t.toggle}]}),modifyExpr:(e,t)=>{const n=t.name+af,i=t.name+zM;return`${i} ? null : ${n}, `+("global"===t.resolve?`${i} ? null : true, `:`${i} ? null : {unit: ${vp(e)}}, `)+`${i} ? ${n} : null`}},Cat={defined:e=>void 0!==e.clear&&!1!==e.clear,parse:(e,t)=>{t.clear&&(t.clear=Ce(t.clear)?Ud(t.clear,"view"):t.clear)},topLevelSignals:(e,t,n)=>{if(tme.defined(t))for(const i of t.project.items){const r=n.findIndex(o=>o.name===Nn(`${t.name}_${i.field}`));-1!==r&&n[r].on.push({events:t.clear,update:"null"})}return n},signals:(e,t,n)=>{function i(r,o){-1!==r&&n[r].on&&n[r].on.push({events:t.clear,update:o})}if("interval"===t.type)for(const r of t.project.items){const o=n.findIndex(s=>s.name===r.signals.visual);i(o,"[0, 0]"),-1===o&&i(n.findIndex(a=>a.name===r.signals.data),"null")}else{let r=n.findIndex(o=>o.name===t.name+af);i(r,"null"),nme.defined(t)&&(r=n.findIndex(o=>o.name===t.name+zM),i(r,"false"))}return n}},ime={defined:e=>{const t="global"===e.resolve&&e.bind&&z6(e.bind),n=1===e.project.items.length&&e.project.items[0].field!==Xa;return t&&!n&&de("Legend bindings are only supported for selections over an individual field or encoding channel."),t&&n},parse:(e,t,n)=>{const i=Ze(n);if(i.select=Ce(i.select)?{type:i.select,toggle:t.toggle}:{...i.select,toggle:t.toggle},dme(t,i),we(n.select)&&(n.select.on||n.select.clear)){const s='event.item && indexof(event.item.mark.role, "legend") < 0';for(const a of t.events)a.filter=Ee(a.filter??[]),a.filter.includes(s)||a.filter.push(s)}const r=H6(t.bind)?t.bind.legend:"click",o=Ce(r)?Ud(r,"view"):Ee(r);t.bind={legend:{merge:o}}},topLevelSignals:(e,t,n)=>{const i=t.name,r=H6(t.bind)&&t.bind.legend,o=s=>a=>{const l=Ze(a);return l.markname=s,l};for(const s of t.project.items){if(!s.hasLegend)continue;const a=`${Nn(s.field)}_legend`,l=`${i}_${a}`;if(0===n.filter(u=>u.name===l).length){const u=r.merge.map(o(`${a}_symbols`)).concat(r.merge.map(o(`${a}_labels`))).concat(r.merge.map(o(`${a}_entries`)));n.unshift({name:l,...t.init?{}:{value:null},on:[{events:u,update:"isDefined(datum.value) ? datum.value : item().items[0].items[0].datum.value",force:!0},{events:r.merge,update:`!event.item || !datum ? null : ${l}`,force:!0}]})}}return n},signals:(e,t,n)=>{const i=t.name,r=t.project,o=n.find(f=>f.name===i+af),s=i+rw,a=r.items.filter(f=>f.hasLegend).map(f=>Nn(`${i}_${Nn(f.field)}_legend`)),c=`${a.map(f=>`${f} !== null`).join(" && ")} ? {fields: ${s}, values: [${a.join(", ")}]} : null`;t.events&&a.length>0?o.on.push({events:a.map(f=>({signal:f})),update:c}):a.length>0&&(o.update=c,delete o.value,delete o.on);const u=n.find(f=>f.name===i+zM),d=H6(t.bind)&&t.bind.legend;return u&&(t.events?u.on.push({...u.on[0],events:d}):u.on[0].events=d),n}},rme="_translate_anchor",ome="_translate_delta",Tat={defined:e=>"interval"===e.type&&e.translate,signals:(e,t,n)=>{const i=t.name,r=bu.defined(t),o=i+rme,{x:s,y:a}=t.project.hasChannel;let l=Ud(t.translate,"scope");return r||(l=l.map(c=>(c.between[0].markname=i+ey,c))),n.push({name:o,value:{},on:[{events:l.map(c=>c.between[0]),update:"{x: x(unit), y: y(unit)"+(void 0!==s?`, extent_x: ${r?sj(e,In):`slice(${s.signals.visual})`}`:"")+(void 0!==a?`, extent_y: ${r?sj(e,Fi):`slice(${a.signals.visual})`}`:"")+"}"}]},{name:i+ome,value:{},on:[{events:l,update:`{x: ${o}.x - x(unit), y: ${o}.y - y(unit)}`}]}),void 0!==s&&sme(e,t,s,"width",n),void 0!==a&&sme(e,t,a,"height",n),n}};function sme(e,t,n,i,r){const o=t.name,s=o+rme,a=o+ome,l=n.channel,c=bu.defined(t),u=r.find(w=>w.name===n.signals[c?"data":"visual"]),d=e.getSizeSignalRef(i).signal,f=e.getScaleComponent(l),h=f&&f.get("type"),p=f&&f.get("reverse"),m=`${s}.extent_${l}`,b=`${c&&f?"log"===h?"panLog":"symlog"===h?"panSymlog":"pow"===h?"panPow":"panLinear":"panLinear"}(${m}, ${c?l===In?p?"":"-":p?"-":"":""}${a}.${l} / ${c?`${d}`:`span(${m})`}${c?"pow"===h?`, ${f.get("exponent")??1}`:"symlog"===h?`, ${f.get("constant")??1}`:"":""})`;u.on.push({events:{signal:a},update:c?b:`clampRange(${b}, 0, ${d})`})}const ame="_zoom_anchor",lme="_zoom_delta",xat={defined:e=>"interval"===e.type&&e.zoom,signals:(e,t,n)=>{const i=t.name,r=bu.defined(t),o=i+lme,{x:s,y:a}=t.project.hasChannel,l=ge(e.scaleName(In)),c=ge(e.scaleName(Fi));let u=Ud(t.zoom,"scope");return r||(u=u.map(d=>(d.markname=i+ey,d))),n.push({name:i+ame,on:[{events:u,update:r?"{"+[l?`x: invert(${l}, x(unit))`:"",c?`y: invert(${c}, y(unit))`:""].filter(d=>d).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:o,on:[{events:u,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),void 0!==s&&cme(e,t,s,"width",n),void 0!==a&&cme(e,t,a,"height",n),n}};function cme(e,t,n,i,r){const o=t.name,s=n.channel,a=bu.defined(t),l=r.find(y=>y.name===n.signals[a?"data":"visual"]),c=e.getSizeSignalRef(i).signal,u=e.getScaleComponent(s),d=u&&u.get("type"),f=a?sj(e,s):l.name,h=o+lme,_=`${a&&u?"log"===d?"zoomLog":"symlog"===d?"zoomSymlog":"pow"===d?"zoomPow":"zoomLinear":"zoomLinear"}(${f}, ${o}${ame}.${s}, ${h}${a?"pow"===d?`, ${u.get("exponent")??1}`:"symlog"===d?`, ${u.get("constant")??1}`:"":""})`;l.on.push({events:{signal:h},update:a?_:`clampRange(${_}, 0, ${c})`})}const yp="_store",af="_tuple",Aat="_modify",ume="vlSelectionResolve",HM=[lat,sat,rat,nme,tme,bu,ime,Cat,Tat,xat,eme];function vp(e,{escape:t}={escape:!0}){let n=t?ge(e.name):e.name;const i=function Mat(e){let t=e.parent;for(;t&&!us(t);)t=t.parent;return t}(e);if(i){const{facet:r}=i;for(const o of Ws)r[o]&&(n+=` + '__facet_${o}_' + (facet[${ge(i.vgField(o))}])`)}return n}function dj(e){return nr(e.component.selection??{}).reduce((t,n)=>t||n.project.hasSelectionId,!1)}function dme(e,t){(Ce(t.select)||!t.select.on)&&delete e.events,(Ce(t.select)||!t.select.clear)&&delete e.clear,(Ce(t.select)||!t.select.toggle)&&delete e.toggle}function fj(e){const t=[];return"Identifier"===e.type?[e.name]:"Literal"===e.type?[e.value]:("MemberExpression"===e.type&&(t.push(...fj(e.object)),t.push(...fj(e.property))),t)}function fme(e){return"MemberExpression"===e.object.type?fme(e.object):"datum"===e.object.name}function hme(e){const t=M8(e),n=new Set;return t.visit(i=>{"MemberExpression"===i.type&&fme(i)&&n.add(fj(i).slice(1).join("."))}),n}class iy extends Kt{clone(){return new iy(null,this.model,Ze(this.filter))}constructor(t,n,i){super(t),this.model=n,this.filter=i,this.expr=GM(this.model,this.filter,this),this._dependentFields=hme(this.expr)}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}function pme(e,t,n,i="datum"){const r=Ce(t)?t:t.param,o=Nn(r),s=ge(o+yp);let a;try{a=e.getSelectionComponent(o,r)}catch{return`!!${o}`}if(a.project.timeUnit){const f=n??e.component.data.raw,h=a.project.timeUnit.clone();f.parent?h.insertAsParentOf(f):f.parent=h}const u=`${a.project.hasSelectionId?"vlSelectionIdTest(":"vlSelectionTest("}${s}, ${i}${"global"===a.resolve?")":`, ${ge(a.resolve)})`}`,d=`length(data(${s}))`;return!1===t.empty?`${d} && ${u}`:`!${d} || ${u}`}function gme(e,t,n){const i=Nn(t),r=n.encoding;let s,o=n.field;try{s=e.getSelectionComponent(i,t)}catch{return i}if(r||o){if(r&&!o){const a=s.project.items.filter(l=>l.channel===r);!a.length||a.length>1?(o=s.project.items[0].field,de((a.length?"Multiple ":"No ")+`matching ${ge(r)} encoding found for selection ${ge(n.param)}. Using "field": ${ge(o)}.`)):o=a[0].field}}else o=s.project.items[0].field,s.project.items.length>1&&de(`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${ge(o)}.`);return`${s.name}[${ge(zs(o))}]`}function GM(e,t,n){return Vb(t,i=>Ce(i)?i:function mrt(e){return ce(e,"param")}(i)?pme(e,i,n):Ghe(i))}function hj(e,t,n,i){var r,o;e.encode??(e.encode={}),(r=e.encode)[t]??(r[t]={}),(o=e.encode[t]).update??(o.update={}),e.encode[t].update[n]=i}function sw(e,t,n,i={header:!1}){const{disable:r,orient:o,scale:s,labelExpr:a,title:l,zindex:c,...u}=e.combine();if(!r){for(const d in u){const f=d,h=mot[f],p=u[f];if(h&&h!==t&&"both"!==h)delete u[f];else if(nw(p)){const{condition:g,...m}=p,_=Ee(g),y=Npe[f];if(y){const{vgProp:v,part:b}=y;hj(u,b,v,[..._.map(C=>{const{test:E,...D}=C;return{test:GM(null,E),...D}}),m]),delete u[f]}else if(null===y){const v={signal:_.map(b=>{const{test:w,...C}=b;return`${GM(null,w)} ? ${dhe(C)} : `}).join("")+dhe(m)};u[f]=v}}else if(ke(p)){const g=Npe[f];if(g){const{vgProp:m,part:_}=g;hj(u,_,m,p),delete u[f]}}pt(["labelAlign","labelBaseline"],f)&&null===u[f]&&delete u[f]}if("grid"===t){if(!u.grid)return;if(u.encode){const{grid:d}=u.encode;u.encode={...d?{grid:d}:{}},Zt(u.encode)&&delete u.encode}return{scale:s,orient:o,...u,domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:Xn(c,0)}}{if(!i.header&&e.mainExtracted)return;if(void 0!==a){let f=a;u.encode?.labels?.update&&ke(u.encode.labels.update.text)&&(f=tp(a,"datum.label",u.encode.labels.update.text.signal)),hj(u,"labels","text",{signal:f})}if(null===u.labelAlign&&delete u.labelAlign,u.encode){for(const f of Ipe)e.hasAxisPart(f)||delete u.encode[f];Zt(u.encode)&&delete u.encode}const d=function kat(e,t){if(e)return te(e)&&!Zd(e)?e.map(n=>O6(n,t)).join(", "):e}(l,n);return{scale:s,orient:o,grid:!1,...d?{title:d}:{},...u,...!1===n.aria?{aria:!1}:{},zindex:Xn(c,0)}}}}function mme(e){const{axes:t}=e.component,n=[];for(const i of hu)if(t[i])for(const r of t[i])if(!r.get("disable")&&!r.get("gridScale")){const o="x"===i?"height":"width",s=e.getSizeSignalRef(o).signal;o!==s&&n.push({name:o,update:s})}return n}function _me(e,t,n,i){return Object.assign.apply(null,[{},...e.map(r=>{if("axisOrient"===r){const o="x"===n?"bottom":"left",s=t["x"===n?"axisBottom":"axisLeft"]||{},a=t["x"===n?"axisTop":"axisRight"]||{},l=new Set([...se(s),...se(a)]),c={};for(const u of l.values())c[u]={signal:`${i.signal} === "${o}" ? ${Ha(s[u])} : ${Ha(a[u])}`};return c}return t[r]})])}function Fat(e,t){const n=[{}];for(const i of e){let r=t[i]?.style;if(r){r=Ee(r);for(const o of r)n.push(t.style[o])}}return Object.assign.apply(null,n)}function pj(e,t,n,i={}){const r=hhe(e,n,t);if(void 0!==r)return{configFrom:"style",configValue:r};for(const o of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(void 0!==i[o]?.[e])return{configFrom:o,configValue:i[o][e]};return{}}const yme={scale:({model:e,channel:t})=>e.scaleName(t),format:({format:e})=>e,formatType:({formatType:e})=>e,grid:({fieldOrDatumDef:e,axis:t,scaleType:n})=>t.grid??function Pat(e,t){return!Li(e)&&he(t)&&!mn(t?.bin)&&!ir(t?.bin)}(n,e),gridScale:({model:e,channel:t})=>function Lat(e,t){const n="x"===t?"y":"x";if(e.getScaleComponent(n))return e.scaleName(n)}(e,t),labelAlign:({axis:e,labelAngle:t,orient:n,channel:i})=>e.labelAlign||bme(t,n,i),labelAngle:({labelAngle:e})=>e,labelBaseline:({axis:e,labelAngle:t,orient:n,channel:i})=>e.labelBaseline||vme(t,n,i),labelFlush:({axis:e,fieldOrDatumDef:t,channel:n})=>e.labelFlush??function Bat(e,t){if("x"===t&&pt(["quantitative","temporal"],e))return!0}(t.type,n),labelOverlap:({axis:e,fieldOrDatumDef:t,scaleType:n})=>e.labelOverlap??function jat(e,t,n,i){if(n&&!we(i)||"nominal"!==e&&"ordinal"!==e)return"log"!==t&&"symlog"!==t||"greedy"}(t.type,n,he(t)&&!!t.timeUnit,he(t)?t.sort:void 0),orient:({orient:e})=>e,tickCount:({channel:e,model:t,axis:n,fieldOrDatumDef:i,scaleType:r})=>{const o="x"===e?"width":"y"===e?"height":void 0,s=o?t.getSizeSignalRef(o):void 0;return n.tickCount??function Uat({fieldOrDatumDef:e,scaleType:t,size:n,values:i}){if(!i&&!Li(t)&&"log"!==t){if(he(e)){if(mn(e.bin))return{signal:`ceil(${n.signal}/10)`};if(e.timeUnit&&pt(["month","hours","day","quarter"],Pi(e.timeUnit)?.unit))return}return{signal:`ceil(${n.signal}/40)`}}}({fieldOrDatumDef:i,scaleType:r,size:s,values:n.values})},tickMinStep:function zat({format:e,fieldOrDatumDef:t}){if("d"===e)return 1;if(he(t)){const{timeUnit:n}=t;if(n){const i=Uhe(n);if(i)return{signal:i}}}},title:({axis:e,model:t,channel:n})=>{if(void 0!==e.title)return e.title;const i=wme(t,n);if(void 0!==i)return i;const r=t.typedFieldDef(n),s=t.fieldDef("x"===n?"x2":"y2");return ghe(r?[ype(r)]:[],he(s)?[ype(s)]:[])},values:({axis:e,fieldOrDatumDef:t})=>function Hat(e,t){const n=e.values;return te(n)?Mpe(t,n):ke(n)?n:void 0}(e,t),zindex:({axis:e,fieldOrDatumDef:t,mark:n})=>e.zindex??function Gat(e,t){return"rect"===e&&SM(t)?1:0}(n,t)};function gj(e){return`(((${e.signal} % 360) + 360) % 360)`}function vme(e,t,n,i){if(void 0!==e){if("x"===n){if(ke(e)){const r=gj(e);return{signal:`(45 < ${r} && ${r} < 135) || (225 < ${r} && ${r} < 315) ? "middle" :(${r} <= 45 || 315 <= ${r}) === ${ke(t)?`(${t.signal} === "top")`:"top"===t} ? "bottom" : "top"`}}return 45{if(gp(i)&&_pe(i.sort)){const{field:o,timeUnit:s}=i,a=i.sort,l=a.map((c,u)=>`${Ghe({field:o,timeUnit:s,equal:c})} ? ${u} : `).join("")+a.length;t=new ry(t,{calculate:l,as:oy(i,r,{forAs:!0})})}}),t}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 ${gt(this.transform)}`}}function oy(e,t,n){return ve(e,{prefix:t,suffix:"sort_index",...n})}function WM(e,t){return pt(["top","bottom"],t)?"column":pt(["left","right"],t)||"row"===e?"row":"column"}function sy(e,t,n,i){return Xn((t||{})[e],("row"===i?n.headerRow:"column"===i?n.headerColumn:n.headerFacet)[e],n.header[e])}function qM(e,t,n,i){const r={};for(const o of e){const s=sy(o,t||{},n,i);void 0!==s&&(r[o]=s)}return r}const mj=["row","column"],_j=["header","footer"];function Wat(e,t){const n=e.component.layoutHeaders[t].title,i=e.config?e.config:void 0,r=e.component.layoutHeaders[t].facetFieldDef?e.component.layoutHeaders[t].facetFieldDef:void 0,{titleAnchor:o,titleAngle:s,titleOrient:a}=qM(["titleAnchor","titleAngle","titleOrient"],r.header,i,t),l=WM(t,a),c=zb(s);return{name:`${t}-title`,type:"group",role:`${l}-title`,title:{text:n,..."row"===t?{orient:"left"}:{},style:"guide-title",...Cme(c,l),...Eme(l,c,o),...Dme(i,r,t,Pot,Qpe)}}}function Eme(e,t,n="middle"){switch(n){case"start":return{align:"left"};case"end":return{align:"right"}}const i=bme(t,"row"===e?"left":"top","row"===e?"y":"x");return i?{align:i}:{}}function Cme(e,t){const n=vme(e,"row"===t?"left":"top","row"===t?"y":"x",!0);return n?{baseline:n}:{}}function qat(e,t){const n=e.component.layoutHeaders[t],i=[];for(const r of _j)if(n[r])for(const o of n[r]){const s=Kat(e,t,r,n,o);null!=s&&i.push(s)}return i}function Yat(e,t){const{sort:n}=e;return mu(n)?{field:ve(n,{expr:"datum"}),order:n.order??"ascending"}:te(n)?{field:oy(e,t,{expr:"datum"}),order:"ascending"}:{field:ve(e,{expr:"datum"}),order:n??"ascending"}}function yj(e,t,n){const{format:i,formatType:r,labelAngle:o,labelAnchor:s,labelOrient:a,labelExpr:l}=qM(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],e.header,n,t),c=A6({fieldOrDatumDef:e,format:i,formatType:r,expr:"parent",config:n}).signal,u=WM(t,a);return{text:{signal:l?tp(tp(l,"datum.label",c),"datum.value",ve(e,{expr:"parent"})):c},..."row"===t?{orient:"left"}:{},style:"guide-label",frame:"group",...Cme(o,u),...Eme(u,o,s),...Dme(n,e,t,Lot,Zpe)}}function Kat(e,t,n,i,r){if(r){let o=null;const{facetFieldDef:s}=i,a=e.config?e.config:void 0;if(s&&r.labels){const{labelOrient:d}=qM(["labelOrient"],s.header,a,t);("row"===t&&!pt(["top","bottom"],d)||"column"===t&&!pt(["left","right"],d))&&(o=yj(s,t,a))}const l=us(e)&&!Zb(e.facet),c=r.axes,u=c?.length>0;if(o||u){const d="row"===t?"height":"width";return{name:e.getName(`${t}_${n}`),type:"group",role:`${t}-${n}`,...i.facetFieldDef?{from:{data:e.getName(`${t}_domain`)},sort:Yat(s,t)}:{},...u&&l?{from:{data:e.getName(`facet_domain_${t}`)}}:{},...o?{title:o}:{},...r.sizeSignal?{encode:{update:{[d]:r.sizeSignal}}}:{},...u?{axes:c}:{}}}}return null}const Xat={column:{start:0,end:1},row:{start:1,end:0}};function Qat(e,t){return Xat[t][e]}function Dme(e,t,n,i,r){const o={};for(const s of i){if(!r[s])continue;const a=sy(s,t?.header,e,n);void 0!==a&&(o[r[s]]=a)}return o}function vj(e){return[...YM(e,"width"),...YM(e,"height"),...YM(e,"childWidth"),...YM(e,"childHeight")]}function YM(e,t){const n="width"===t?"x":"y",i=e.component.layoutSize.get(t);if(!i||"merged"===i)return[];const r=e.getSizeSignalRef(t).signal;if("step"===i){const o=e.getScaleComponent(n);if(o){const s=o.get("type"),a=o.get("range");if(Li(s)&&sp(a)){const l=e.scaleName(n);return us(e.parent)&&"independent"===e.parent.component.resolve.scale[n]?[Sme(l,a)]:[Sme(l,a),{name:r,update:Tme(l,o,`domain('${l}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}if("container"==i){const o=r.endsWith("width"),s=o?"containerSize()[0]":"containerSize()[1]",l=`isFinite(${s}) ? ${s} : ${Y6(e.config.view,o?"width":"height")}`;return[{name:r,init:l,on:[{update:l,events:"window:resize"}]}]}return[{name:r,value:i}]}function Sme(e,t){const n=`${e}_step`;return ke(t.step)?{name:n,update:t.step.signal}:{name:n,value:t.step}}function Tme(e,t,n){const i=t.get("type"),r=t.get("padding"),o=Xn(t.get("paddingOuter"),r);let s=t.get("paddingInner");return s="band"===i?void 0!==s?s:r:1,`bandspace(${n}, ${Ha(s)}, ${Ha(o)}) * ${e}_step`}function xme(e){return"childWidth"===e?"width":"childHeight"===e?"height":e}function Ame(e,t){return se(e).reduce((n,i)=>({...n,...ty({model:t,channelDef:e[i],vgChannel:i,mainRefFn:r=>En(r.value),invalidValueRef:void 0})}),{})}function Mme(e,t){if(us(t))return"theta"===e?"independent":"shared";if(uy(t))return"shared";if(Fj(t))return Qn(e)||"theta"===e||"radius"===e?"independent":"shared";throw new Error("invalid model type for resolve")}function bj(e,t){const n=e.scale[t],i=Qn(t)?"axis":"legend";return"independent"===n?("shared"===e[i][t]&&de(function Lit(e){return`Setting the scale to be independent for "${e}" means we also have to set the guide (axis or legend) to be independent.`}(t)),"independent"):e[i][t]||"shared"}const Jat={...tge,disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1},Nme=se(Jat);class elt extends vu{}const Ime={symbols:function tlt(e,{fieldOrDatumDef:t,model:n,channel:i,legendCmpt:r,legendType:o}){if("symbol"!==o)return;const{markDef:s,encoding:a,config:l,mark:c}=n,u=s.filled&&"trail"!==c;let d={...Ynt({},n,jrt),...Wge(n,{filled:u})};const f=r.get("symbolOpacity")??l.legend.symbolOpacity,h=r.get("symbolFillColor")??l.legend.symbolFillColor,p=r.get("symbolStrokeColor")??l.legend.symbolStrokeColor,g=void 0===f?kme(a.opacity)??s.opacity:void 0;if(d.fill)if("fill"===i||u&&i===Do)delete d.fill;else if(ce(d.fill,"field"))h?delete d.fill:(d.fill=En(l.legend.symbolBaseFillColor??"black"),d.fillOpacity=En(g??1));else if(te(d.fill)){const m=wj(a.fill??a.color)??s.fill??(u&&s.color);m&&(d.fill=En(m))}if(d.stroke)if("stroke"===i||!u&&i===Do)delete d.stroke;else if(ce(d.stroke,"field")||p)delete d.stroke;else if(te(d.stroke)){const m=Xn(wj(a.stroke||a.color),s.stroke,u?s.color:void 0);m&&(d.stroke={value:m})}if(i!==fu){const m=he(t)&&Rme(0,r,t);m?d.opacity=[{test:m,...En(g??1)},En(l.legend.unselectedOpacity)]:g&&(d.opacity=En(g))}return d={...d,...e},Zt(d)?void 0:d},gradient:function nlt(e,{model:t,legendType:n,legendCmpt:i}){if("gradient"!==n)return;const{config:r,markDef:o,encoding:s}=t;let a={};const c=void 0===(i.get("gradientOpacity")??r.legend.gradientOpacity)?kme(s.opacity)||o.opacity:void 0;return c&&(a.opacity=En(c)),a={...a,...e},Zt(a)?void 0:a},labels:function ilt(e,{fieldOrDatumDef:t,model:n,channel:i,legendCmpt:r}){const o=n.legend(i)||{},s=n.config,a=he(t)?Rme(0,r,t):void 0,l=a?[{test:a,value:1},{value:s.legend.unselectedOpacity}]:void 0,{format:c,formatType:u}=o;let d;pp(u)?d=qa({fieldOrDatumDef:t,field:"datum.value",format:c,formatType:u,config:s}):void 0===c&&void 0===u&&s.customFormatTypes&&("quantitative"===t.type&&s.numberFormatType?d=qa({fieldOrDatumDef:t,field:"datum.value",format:s.numberFormat,formatType:s.numberFormatType,config:s}):"temporal"===t.type&&s.timeFormatType&&he(t)&&void 0===t.timeUnit&&(d=qa({fieldOrDatumDef:t,field:"datum.value",format:s.timeFormat,formatType:s.timeFormatType,config:s})));const f={...l?{opacity:l}:{},...d?{text:d}:{},...e};return Zt(f)?void 0:f},entries:function rlt(e,{legendCmpt:t}){return t.get("selections")?.length?{...e,fill:{value:"transparent"}}:e}};function kme(e){return Ome(e,(t,n)=>Math.max(t,n.value))}function wj(e){return Ome(e,(t,n)=>Xn(t,n.value))}function Ome(e,t){return function rot(e){const t=e?.condition;return!!t&&(te(t)||Ya(t))}(e)?Ee(e.condition).reduce(t,e.value):Ya(e)?e.value:void 0}function Rme(e,t,n){const i=t.get("selections");if(!i?.length)return;const r=ge(n.field);return i.map(o=>`(!length(data(${ge(Nn(o)+yp)})) || (${o}[${r}] && indexof(${o}[${r}], datum.value) >= 0))`).join(" || ")}const Fme={direction:({direction:e})=>e,format:({fieldOrDatumDef:e,legend:t,config:n})=>{const{format:i,formatType:r}=t;return fpe(e,e.type,i,r,n,!1)},formatType:({legend:e,fieldOrDatumDef:t,scaleType:n})=>{const{formatType:i}=e;return hpe(i,t,n)},gradientLength:e=>{const{legend:t,legendConfig:n}=e;return t.gradientLength??n.gradientLength??function dlt({legendConfig:e,model:t,direction:n,orient:i,scaleType:r}){const{gradientHorizontalMaxLength:o,gradientHorizontalMinLength:s,gradientVerticalMaxLength:a,gradientVerticalMinLength:l}=e;if(lc(r))return"horizontal"===n?"top"===i||"bottom"===i?Pme(t,"width",s,o):s:Pme(t,"height",l,a)}(e)},labelOverlap:({legend:e,legendConfig:t,scaleType:n})=>e.labelOverlap??t.labelOverlap??function flt(e){if(pt(["quantile","threshold","log","symlog"],e))return"greedy"}(n),symbolType:({legend:e,markDef:t,channel:n,encoding:i})=>e.symbolType??function slt(e,t,n,i){if("shape"!==t){const r=wj(n)??i;if(r)return r}switch(e){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}(t.type,n,i.shape,t.shape),title:({fieldOrDatumDef:e,config:t})=>K_(e,t,{allowDisabling:!0}),type:({legendType:e,scaleType:t,channel:n})=>{if(z_(n)&&lc(t)){if("gradient"===e)return}else if("symbol"===e)return;return e},values:({fieldOrDatumDef:e,legend:t})=>function olt(e,t){const n=e.values;return te(n)?Mpe(t,n):ke(n)?n:void 0}(t,e)};function Pme(e,t,n,i){return{signal:`clamp(${e.getSizeSignalRef(t).signal}, ${n}, ${i})`}}function Lme(e){const t=On(e)?function hlt(e){const{encoding:t}=e,n={};for(const i of[Do,...ege]){const r=Ti(t[i]);!r||!e.getScaleComponent(i)||i===So&&he(r)&&r.type===G_||(n[i]=mlt(e,i))}return n}(e):function _lt(e){const{legends:t,resolve:n}=e.component;for(const i of e.children){Lme(i);for(const r of se(i.component.legends))n.legend[r]=bj(e.component.resolve,r),"shared"===n.legend[r]&&(t[r]=$me(t[r],i.component.legends[r]),t[r]||(n.legend[r]="independent",delete t[r]))}for(const i of se(t))for(const r of e.children)r.component.legends[i]&&"shared"===n.legend[i]&&delete r.component.legends[i];return t}(e);return e.component.legends=t,t}function glt(e,t,n,i){switch(t){case"disable":return void 0!==n;case"values":return!!n?.values;case"title":if("title"===t&&e===i?.title)return!0}return e===(n||{})[t]}function mlt(e,t){let n=e.legend(t);const{markDef:i,encoding:r,config:o}=e,s=o.legend,a=new elt({},function plt(e,t){const n=e.scaleName(t);if("trail"===e.mark){if("color"===t)return{stroke:n};if("size"===t)return{strokeWidth:n}}return"color"===t?e.markDef.filled?{fill:n}:{stroke:n}:{[t]:n}}(e,t));!function Sat(e,t,n){const i=e.fieldDef(t)?.field;for(const r of nr(e.component.selection??{})){const o=r.project.hasField[i]??r.project.hasChannel[t];if(o&&ime.defined(r)){const s=n.get("selections")??[];s.push(r.name),n.set("selections",s,!1),o.hasLegend=!0}}}(e,t,a);const l=void 0!==n?!n:s.disable;if(a.set("disable",l,void 0!==n),l)return a;n=n||{};const c=e.getScaleComponent(t).get("type"),u=Ti(r[t]),d=he(u)?Pi(u.timeUnit)?.unit:void 0,f=n.orient||o.legend.orient||"right",h=function alt(e){const{legend:t}=e;return Xn(t.type,function llt({channel:e,timeUnit:t,scaleType:n}){if(z_(e)){if(pt(["quarter","month","day"],t))return"symbol";if(lc(n))return"gradient"}return"symbol"}(e))}({legend:n,channel:t,timeUnit:d,scaleType:c}),p=function clt({legendConfig:e,legendType:t,orient:n,legend:i}){return i.direction??e[t?"gradientDirection":"symbolDirection"]??function ult(e,t){switch(e){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return"gradient"===t?"horizontal":void 0}}(n,t)}({legend:n,legendType:h,orient:f,legendConfig:s}),g={legend:n,channel:t,model:e,markDef:i,encoding:r,fieldOrDatumDef:u,legendConfig:s,config:o,scaleType:c,orient:f,legendType:h,direction:p};for(const b of Nme){if("gradient"===h&&b.startsWith("symbol")||"symbol"===h&&b.startsWith("gradient"))continue;const w=b in Fme?Fme[b](g):n[b];if(void 0!==w){const C=glt(w,b,n,e.fieldDef(t));(C||void 0===o.legend[b])&&a.set(b,w,C)}}const m=n?.encoding??{},_=a.get("selections"),y={},v={fieldOrDatumDef:u,model:e,channel:t,legendCmpt:a,legendType:h};for(const b of["labels","legend","title","symbols","gradient","entries"]){const w=Ame(m[b]??{},e),C=b in Ime?Ime[b](w,v):w;void 0!==C&&!Zt(C)&&(y[b]={..._?.length&&he(u)?{name:`${Nn(u.field)}_legend_${b}`}:{},..._?.length?{interactive:!!_}:{},update:C})}return Zt(y)||a.set("encode",y,!!n?.encoding),a}function $me(e,t){if(!e)return t.clone();const n=e.getWithExplicit("orient"),i=t.getWithExplicit("orient");if(n.explicit&&i.explicit&&n.value!==i.value)return;let r=!1;for(const o of Nme){const s=rf(e.getWithExplicit(o),t.getWithExplicit(o),o,"legend",(a,l)=>{switch(o){case"symbolType":return ylt(a,l);case"title":return _he(a,l);case"type":return r=!0,cs("symbol")}return LM(a,l,o,"legend")});e.setWithExplicit(o,s)}return r&&(e.implicit?.encode?.gradient&&eM(e.implicit,["encode","gradient"]),e.explicit?.encode?.gradient&&eM(e.explicit,["encode","gradient"])),e}function ylt(e,t){return"circle"===t.value?t:e}function Bme(e){const t=e.component.legends,n={};for(const r of se(t)){const s=Jt(e.getScaleComponent(r).get("domains"));if(n[s])for(const a of n[s])$me(a,t[r])||n[s].push(t[r]);else n[s]=[t[r].clone()]}return nr(n).flat().map(r=>function blt(e,t){const{disable:n,labelExpr:i,selections:r,...o}=e.combine();if(!n){if(!1===t.aria&&null==o.aria&&(o.aria=!1),o.encode?.symbols){const s=o.encode.symbols.update;s.fill&&"transparent"!==s.fill.value&&!s.stroke&&!o.stroke&&(s.stroke={value:"transparent"});for(const a of ege)o[a]&&delete s[a]}if(o.title||delete o.title,void 0!==i){let s=i;o.encode?.labels?.update&&ke(o.encode.labels.update.text)&&(s=tp(i,"datum.label",o.encode.labels.update.text.signal)),function vlt(e,t,n,i){var r,o;e.encode??(e.encode={}),(r=e.encode)[t]??(r[t]={}),(o=e.encode[t]).update??(o.update={}),e.encode[t].update[n]=i}(o,"labels","text",{signal:s})}return o}}(r,e.config)).filter(r=>void 0!==r)}function jme(e){const t=e.component.projection;if(!t||t.merged)return[];const n=t.combine(),{name:i}=n;if(t.data){const r={signal:`[${t.size.map(s=>s.signal).join(", ")}]`},o=t.data.reduce((s,a)=>{const l=ke(a)?a.signal:`data('${e.lookupDataSource(a)}')`;return pt(s,l)||s.push(l),s},[]);if(o.length<=0)throw new Error("Projection's fit didn't find any data sources");return[{name:i,size:r,fit:{signal:o.length>1?`[${o.join(", ")}]`:o[0]},...n}]}return[{name:i,translate:{signal:"[width / 2, height / 2]"},...n}]}const Clt=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];class Vme extends vu{constructor(t,n,i,r){super({...n},{name:t}),this.specifiedProjection=n,this.size=i,this.data=r,this.merged=!1}get isFit(){return!!this.data}}function Ume(e){e.component.projection=On(e)?function Dlt(e){if(e.hasProjection){const t=rr(e.specifiedProjection),n=!(t&&(null!=t.scale||null!=t.translate)),i=n?[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]:void 0,r=n?function Slt(e){const t=[],{encoding:n}=e;for(const i of[[Ua,Va],[Gs,za]])(Ti(n[i[0]])||Ti(n[i[1]]))&&t.push({signal:e.getName(`geojson_${t.length}`)});return e.channelHasField(So)&&e.typedFieldDef(So).type===G_&&t.push({signal:e.getName(`geojson_${t.length}`)}),0===t.length&&t.push(e.requestDataName(Zn.Main)),t}(e):void 0,o=new Vme(e.projectionName(!0),{...rr(e.config.projection),...t},i,r);return o.get("type")||o.set("type","equalEarth",!1),o}}(e):function xlt(e){if(0===e.children.length)return;let t;for(const i of e.children)Ume(i);const n=B4(e.children,i=>{const r=i.component.projection;if(r){if(t){const o=function Tlt(e,t){const n=B4(Clt,r=>!!(!De(e.explicit,r)&&!De(t.explicit,r)||De(e.explicit,r)&&De(t.explicit,r)&&as(e.get(r),t.get(r))));if(as(e.size,t.size)){if(n)return e;if(as(e.explicit,{}))return t;if(as(t.explicit,{}))return e}return null}(t,r);return o&&(t=o),!!o}return t=r,!0}return!0});if(t&&n){const i=e.projectionName(!0),r=new Vme(i,t.specifiedProjection,t.size,Ze(t.data));for(const o of e.children){const s=o.component.projection;s&&(s.isFit&&r.data.push(...o.component.projection.data),o.renameProjection(s.get("name"),i),s.merged=!0)}return r}}(e)}function Alt(e,t,n,i){if(tw(t,n)){const r=On(e)?e.axis(n)??e.legend(n)??{}:{},o=ve(t,{expr:"datum"}),s=ve(t,{expr:"datum",binSuffix:"end"});return{formulaAs:ve(t,{binSuffix:"range",forAs:!0}),formula:Qb(o,s,r.format,r.formatType,i)}}return{}}function zme(e,t){return`${she(e)}_${t}`}function Ej(e,t,n){const r=zme(AM(n,void 0)??{},t);return e.getName(`${r}_bins`)}function Hme(e,t,n){let i,r;i=function Nlt(e){return"as"in e}(e)?Ce(e.as)?[e.as,`${e.as}_end`]:[e.as[0],e.as[1]]:[ve(e,{forAs:!0}),ve(e,{binSuffix:"end",forAs:!0})];const o={...AM(t,void 0)},s=zme(o,e.field),{signal:a,extentSignal:l}=function Mlt(e,t){return{signal:e.getName(`${t}_bins`),extentSignal:e.getName(`${t}_extent`)}}(n,s);if(cM(o.extent)){const u=o.extent;r=gme(n,u.param,u),delete o.extent}return{key:s,binComponent:{bin:o,field:e.field,as:[i],...a?{signal:a}:{},...l?{extentSignal:l}:{},...r?{span:r}:{}}}}class hc extends Kt{clone(){return new hc(null,Ze(this.bins))}constructor(t,n){super(t),this.bins=n}static makeFromEncoding(t,n){const i=n.reduceFieldDef((r,o,s)=>{if(eo(o)&&mn(o.bin)){const{key:a,binComponent:l}=Hme(o,o.bin,n);r[a]={...l,...r[a],...Alt(n,o,s,n.config)}}return r},{});return Zt(i)?null:new hc(t,i)}static makeFromTransform(t,n,i){const{key:r,binComponent:o}=Hme(n,n.bin,i);return new hc(t,{[r]:o})}merge(t,n){for(const i of se(t.bins))i in this.bins?(n(t.bins[i].signal,this.bins[i].signal),this.bins[i].as=Jl([...this.bins[i].as,...t.bins[i].as],gt)):this.bins[i]=t.bins[i];for(const i of t.children)t.removeChild(i),i.parent=this;t.remove()}producedFields(){return new Set(nr(this.bins).map(t=>t.as).flat(2))}dependentFields(){return new Set(nr(this.bins).map(t=>t.field))}hash(){return`Bin ${gt(this.bins)}`}assemble(){return nr(this.bins).flatMap(t=>{const n=[],[i,...r]=t.as,{extent:o,...s}=t.bin,a={type:"bin",field:zs(t.field),as:i,signal:t.signal,...cM(o)?{extent:null}:{extent:o},...t.span?{span:{signal:`span(${t.span})`}}:{},...s};!o&&t.extentSignal&&(n.push({type:"extent",field:zs(t.field),signal:t.extentSignal}),a.extent={signal:t.extentSignal}),n.push(a);for(const l of r)for(let c=0;c<2;c++)n.push({type:"formula",expr:ve({field:i[c]},{expr:"datum"}),as:l[c]});return t.formula&&n.push({type:"formula",expr:t.formula,as:t.formulaAs}),n})}}class Qa extends Kt{clone(){return new Qa(null,new Set(this.dimensions),Ze(this.measures))}constructor(t,n,i){super(t),this.dimensions=n,this.measures=i}get groupBy(){return this.dimensions}static makeFromEncoding(t,n){let i=!1;n.forEachFieldDef(s=>{s.aggregate&&(i=!0)});const r={},o=new Set;return i&&(n.forEachFieldDef((s,a)=>{const{aggregate:l,field:c}=s;if(l)if("count"===l)r["*"]??(r["*"]={}),r["*"].count=new Set([ve(s,{forAs:!0})]);else{if(pu(l)||Qd(l)){const u=pu(l)?"argmin":"argmax",d=l[u];r[d]??(r[d]={}),r[d][u]=new Set([ve({op:u,field:d},{forAs:!0})])}else r[c]??(r[c]={}),r[c][l]=new Set([ve(s,{forAs:!0})]);rc(a)&&"unaggregated"===n.scaleDomain(a)&&(r[c]??(r[c]={}),r[c].min=new Set([ve({field:c,aggregate:"min"},{forAs:!0})]),r[c].max=new Set([ve({field:c,aggregate:"max"},{forAs:!0})]))}else!function Ilt(e,t,n,i){const r=On(i)?i.encoding[ic(t)]:void 0;if(eo(n)&&On(i)&&bpe(n,r,i.markDef,i.config)){e.add(ve(n,{})),e.add(ve(n,{suffix:"end"}));const{mark:o,markDef:s,config:a}=i,l=tf({fieldDef:n,markDef:s,config:a});Kb(o)&&.5!==l&&Qn(t)&&(e.add(ve(n,{suffix:$M})),e.add(ve(n,{suffix:BM}))),n.bin&&tw(n,t)&&e.add(ve(n,{binSuffix:"range"}))}else if(Xfe(t)){const o=Kfe(t);e.add(i.getName(o))}else e.add(ve(n));return gp(n)&&function Mrt(e){return we(e)&&"field"in e}(n.scale?.range)&&e.add(n.scale.range.field),e}(o,a,s,n)}),o.size+se(r).length!==0)?new Qa(t,o,r):null}static makeFromTransform(t,n){var i;const r=new Set,o={};for(const s of n.aggregate){const{op:a,field:l,as:c}=s;a&&("count"===a?(o["*"]??(o["*"]={}),o["*"].count=new Set([c||ve(s,{forAs:!0})])):(o[l]??(o[l]={}),(i=o[l])[a]??(i[a]=new Set),o[l][a].add(c||ve(s,{forAs:!0}))))}for(const s of n.groupby??[])r.add(s);return r.size+se(o).length===0?null:new Qa(t,r,o)}merge(t){return jfe(this.dimensions,t.dimensions)?(function klt(e,t){for(const n of se(t)){const i=t[n];for(const r of se(i))n in e?e[n][r]=new Set([...e[n][r]??[],...i[r]]):e[n]={[r]:i[r]}}}(this.measures,t.measures),!0):(function ert(...e){sc.debug(...e)}("different dimensions, cannot merge"),!1)}addDimensions(t){t.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...se(this.measures)])}producedFields(){const t=new Set;for(const n of se(this.measures))for(const i of se(this.measures[n])){const r=this.measures[n][i];0===r.size?t.add(`${i}_${n}`):r.forEach(t.add,t)}return t}hash(){return`Aggregate ${gt({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const t=[],n=[],i=[];for(const o of se(this.measures))for(const s of se(this.measures[o]))for(const a of this.measures[o][s])i.push(a),t.push(s),n.push("*"===o?null:zs(o));return{type:"aggregate",groupby:[...this.dimensions].map(zs),ops:t,fields:n,as:i}}}class ay extends Kt{constructor(t,n,i,r){super(t),this.model=n,this.name=i,this.data=r;for(const o of Ws){const s=n.facet[o];if(s){const{bin:a,sort:l}=s;this[o]={name:n.getName(`${o}_domain`),fields:[ve(s),...mn(a)?[ve(s,{binSuffix:"end"})]:[]],...mu(l)?{sortField:l}:te(l)?{sortIndexField:oy(s,o)}:{}}}}this.childModel=n.child}hash(){let t="Facet";for(const n of Ws)this[n]&&(t+=` ${n.charAt(0)}:${gt(this[n])}`);return t}get fields(){const t=[];for(const n of Ws)this[n]?.fields&&t.push(...this[n].fields);return t}dependentFields(){const t=new Set(this.fields);for(const n of Ws)this[n]&&(this[n].sortField&&t.add(this[n].sortField.field),this[n].sortIndexField&&t.add(this[n].sortIndexField));return t}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const t={};for(const n of hu){const i=this.childModel.component.scales[n];if(i&&!i.merged){const r=i.get("type"),o=i.get("range");if(Li(r)&&sp(o)){const a=Oj(XM(this.childModel,n));a?t[n]=a:de(r6(n))}}}return t}assembleRowColumnHeaderData(t,n,i){const r={row:"y",column:"x",facet:void 0}[t],o=[],s=[],a=[];r&&i&&i[r]&&(n?(o.push(`distinct_${i[r]}`),s.push("max")):(o.push(i[r]),s.push("distinct")),a.push(`distinct_${i[r]}`));const{sortField:l,sortIndexField:c}=this[t];if(l){const{op:u=wM,field:d}=l;o.push(d),s.push(u),a.push(ve(l,{forAs:!0}))}else c&&(o.push(c),s.push("max"),a.push(c));return{name:this[t].name,source:n??this.data,transform:[{type:"aggregate",groupby:this[t].fields,...o.length?{fields:o,ops:s,as:a}:{}}]}}assembleFacetHeaderData(t){const{columns:n}=this.model.layout,{layoutHeaders:i}=this.model.component,r=[],o={};for(const l of mj){for(const c of _j){const u=(i[l]&&i[l][c])??[];for(const d of u)if(d.axes?.length>0){o[l]=!0;break}}if(o[l]){const c=`length(data("${this.facet.name}"))`;r.push({name:`${this.facet.name}_${l}`,transform:[{type:"sequence",start:0,stop:"row"===l?n?{signal:`ceil(${c} / ${n})`}:1:n?{signal:`min(${c}, ${n})`}:{signal:c}}]})}}const{row:s,column:a}=o;return(s||a)&&r.unshift(this.assembleRowColumnHeaderData("facet",null,t)),r}assemble(){const t=[];let n=null;const i=this.getChildIndependentFieldsWithStep(),{column:r,row:o,facet:s}=this;if(r&&o&&(i.x||i.y)){n=`cross_${this.column.name}_${this.row.name}`;const a=[].concat(i.x??[],i.y??[]),l=a.map(()=>"distinct");t.push({name:n,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:a,ops:l}]})}for(const a of[lu,au])this[a]&&t.push(this.assembleRowColumnHeaderData(a,n,i));if(s){const a=this.assembleFacetHeaderData(i);a&&t.push(...a)}return t}}function Gme(e){return e.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}function Rlt(e){const t={};return JA(e.filter,n=>{if(Hhe(n)){let i=null;u6(n)?i=ls(n.equal):f6(n)?i=ls(n.lte):d6(n)?i=ls(n.lt):h6(n)?i=ls(n.gt):p6(n)?i=ls(n.gte):g6(n)?i=n.range[0]:m6(n)&&(i=(n.oneOf??n.in)[0]),i&&(ap(i)?t[n.field]="date":At(i)?t[n.field]="number":Ce(i)&&(t[n.field]="string")),n.timeUnit&&(t[n.field]="date")}}),t}class Sr extends Kt{clone(){return new Sr(null,Ze(this._parse))}constructor(t,n){super(t),this._parse=n}hash(){return`Parse ${gt(this._parse)}`}static makeExplicit(t,n,i){let r={};const o=n.data;return!sf(o)&&o?.format?.parse&&(r=o.format.parse),this.makeWithAncestors(t,r,{},i)}static makeWithAncestors(t,n,i,r){for(const a of se(i)){const l=r.getWithExplicit(a);void 0!==l.value&&(l.explicit||l.value===i[a]||"derived"===l.value||"flatten"===i[a]?delete i[a]:de(Dhe(a,i[a],l.value)))}for(const a of se(n)){const l=r.get(a);void 0!==l&&(l===n[a]?delete n[a]:de(Dhe(a,n[a],l)))}const o=new vu(n,i);r.copyAll(o);const s={};for(const a of se(o.combine())){const l=o.get(a);null!==l&&(s[a]=l)}return 0===se(s).length||r.parseNothing?null:new Sr(t,s)}get parse(){return this._parse}merge(t){this._parse={...this._parse,...t.parse},t.remove()}assembleFormatParse(){const t={};for(const n of se(this._parse)){const i=this._parse[n];1===j_(n)&&(t[n]=i)}return t}producedFields(){return new Set(se(this._parse))}dependentFields(){return new Set(se(this._parse))}assembleTransforms(t=!1){return se(this._parse).filter(n=>!t||j_(n)>1).map(n=>{const i=function Olt(e,t){const n=z4(e);return"number"===t?`toNumber(${n})`:"boolean"===t?`toBoolean(${n})`:"string"===t?`toString(${n})`:"date"===t?`toDate(${n})`:"flatten"===t?n:t.startsWith("date:")?`timeParse(${n},'${Gme(t.slice(5,t.length))}')`:t.startsWith("utc:")?`utcParse(${n},'${Gme(t.slice(4,t.length))}')`:(de(function lit(e){return`Unrecognized parse "${e}".`}(t)),null)}(n,this._parse[n]);return i?{type:"formula",expr:i,as:B_(n)}:null}).filter(n=>null!==n)}}class lf extends Kt{clone(){return new lf(null)}constructor(t){super(t)}dependentFields(){return new Set}producedFields(){return new Set([Xa])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:Xa}}}class aw extends Kt{clone(){return new aw(null,this.params)}constructor(t,n){super(t),this.params=n}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${gt(this.params)}`}assemble(){return{type:"graticule",...!0===this.params?{}:this.params}}}class lw extends Kt{clone(){return new lw(null,this.params)}constructor(t,n){super(t),this.params=n}dependentFields(){return new Set}producedFields(){return new Set([this.params.as??"data"])}hash(){return`Hash ${gt(this.params)}`}assemble(){return{type:"sequence",...this.params}}}class bp extends Kt{constructor(t){let n;if(super(null),t??(t={name:"source"}),sf(t)||(n=t.format?{...Co(t.format,["parse"])}:{}),iw(t))this._data={values:t.values};else if(J_(t)){if(this._data={url:t.url},!n.type){let i=/(?:\.([^.]+))?$/.exec(t.url)[1];pt(["json","csv","tsv","dsv","topojson"],i)||(i="json"),n.type=i}}else kge(t)?this._data={values:[{type:"Sphere"}]}:(Nge(t)||sf(t))&&(this._data={});this._generator=sf(t),t.name&&(this._name=t.name),n&&!Zt(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(t){this._name=t}set parent(t){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{name:this._name,...this._data,transform:[]}}}var cw,Wme=function(e,t,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n};function Cj(e){return e instanceof bp||e instanceof aw||e instanceof lw}class Dj{constructor(){cw.set(this,void 0),Wme(this,cw,!1,"f")}setModified(){Wme(this,cw,!0,"f")}get modifiedFlag(){return function(e,t){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}(this,cw)}}cw=new WeakMap;class wp extends Dj{getNodeDepths(t,n,i){i.set(t,n);for(const r of t.children)this.getNodeDepths(r,n+1,i);return i}optimize(t){const i=[...this.getNodeDepths(t,0,new Map).entries()].sort((r,o)=>o[1]-r[1]);for(const r of i)this.run(r[0]);return this.modifiedFlag}}class Sj extends Dj{optimize(t){this.run(t);for(const n of t.children)this.optimize(n);return this.modifiedFlag}}class $lt extends Sj{mergeNodes(t,n){const i=n.shift();for(const r of n)t.removeChild(r),r.parent=i,r.remove()}run(t){const n=t.children.map(r=>r.hash()),i={};for(let r=0;r1&&(this.setModified(),this.mergeNodes(t,i[r]))}}class Blt extends Sj{constructor(t){super(),this.requiresSelectionId=t&&dj(t)}run(t){t instanceof lf&&(this.requiresSelectionId&&(Cj(t.parent)||t.parent instanceof Qa||t.parent instanceof Sr)||(this.setModified(),t.remove()))}}class jlt extends Dj{optimize(t){return this.run(t,new Set),this.modifiedFlag}run(t,n){let i=new Set;t instanceof fc&&(i=t.producedFields(),j4(i,n)&&(this.setModified(),t.removeFormulas(n),0===t.producedFields.length&&t.remove()));for(const r of t.children)this.run(r,new Set([...n,...i]))}}class Vlt extends Sj{constructor(){super()}run(t){t instanceof xo&&!t.isRequired()&&(this.setModified(),t.remove())}}class Ult extends wp{run(t){if(!(Cj(t)||t.numChildren()>1))for(const n of t.children)if(n instanceof Sr)if(t instanceof Sr)this.setModified(),t.merge(n);else{if(U4(t.producedFields(),n.dependentFields()))continue;this.setModified(),n.swapWithParent()}}}class zlt extends wp{run(t){const n=[...t.children],i=t.children.filter(r=>r instanceof Sr);if(t.numChildren()>1&&i.length>=1){const r={},o=new Set;for(const s of i){const a=s.parse;for(const l of se(a))l in r?r[l]!==a[l]&&o.add(l):r[l]=a[l]}for(const s of o)delete r[s];if(!Zt(r)){this.setModified();const s=new Sr(t,r);for(const a of n){if(a instanceof Sr)for(const l of se(r))delete a.parse[l];t.removeChild(a),a.parent=s,a instanceof Sr&&0===se(a.parse).length&&a.remove()}}}}}class Hlt extends wp{run(t){t instanceof xo||t.numChildren()>0||t instanceof ay||t instanceof bp||(this.setModified(),t.remove())}}class Glt extends wp{run(t){const n=t.children.filter(r=>r instanceof fc),i=n.pop();for(const r of n)this.setModified(),i.merge(r)}}class Wlt extends wp{run(t){const n=t.children.filter(r=>r instanceof Qa),i={};for(const r of n){const o=gt(r.groupBy);o in i||(i[o]=[]),i[o].push(r)}for(const r of se(i)){const o=i[r];if(o.length>1){const s=o.pop();for(const a of o)s.merge(a)&&(t.removeChild(a),a.parent=s,a.remove(),this.setModified())}}}}class qlt extends wp{constructor(t){super(),this.model=t}run(t){const n=!(Cj(t)||t instanceof iy||t instanceof Sr||t instanceof lf),i=[],r=[];for(const o of t.children)o instanceof hc&&(n&&!U4(t.producedFields(),o.dependentFields())?i.push(o):r.push(o));if(i.length>0){const o=i.pop();for(const s of i)o.merge(s,this.model.renameSignal.bind(this.model));this.setModified(),t instanceof hc?t.merge(o,this.model.renameSignal.bind(this.model)):o.swapWithParent()}if(r.length>1){const o=r.pop();for(const s of r)o.merge(s,this.model.renameSignal.bind(this.model));this.setModified()}}}class Ylt extends wp{run(t){const n=[...t.children];if(!$_(n,s=>s instanceof xo)||t.numChildren()<=1)return;const r=[];let o;for(const s of n)if(s instanceof xo){let a=s;for(;1===a.numChildren();){const[l]=a.children;if(!(l instanceof xo))break;a=l}r.push(...a.children),o?(t.removeChild(s),s.parent=o.parent,o.parent.removeChild(o),o.parent=a,this.setModified()):o=a}else r.push(s);if(r.length){this.setModified();for(const s of r)s.parent.removeChild(s),s.parent=o}}}class Ep extends Kt{clone(){return new Ep(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=Jl(this.transform.groupby.concat(t),n=>n)}dependentFields(){const t=new Set;return this.transform.groupby&&this.transform.groupby.forEach(t.add,t),this.transform.joinaggregate.map(n=>n.field).filter(n=>void 0!==n).forEach(t.add,t),t}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(t){return t.as??ve(t)}hash(){return`JoinAggregateTransform ${gt(this.transform)}`}assemble(){const t=[],n=[],i=[];for(const o of this.transform.joinaggregate)n.push(o.op),i.push(this.getDefaultName(o)),t.push(void 0===o.field?null:o.field);const r=this.transform.groupby;return{type:"joinaggregate",as:i,ops:n,fields:t,...void 0!==r?{groupby:r}:{}}}}class ly extends Kt{clone(){return new ly(null,{...this.filter})}constructor(t,n){super(t),this.filter=n}static make(t,n,i){const{config:r,markDef:o}=n,{marks:s,scales:a}=i;if("include-invalid-values"===s&&"include-invalid-values"===a)return null;const l=n.reduceFieldDef((c,u,d)=>{const f=rc(d)&&n.getScaleComponent(d);if(f){const h=f.get("type"),{aggregate:p}=u,g=S6({scaleChannel:d,markDef:o,config:r,scaleType:h,isCountAggregate:lM(p)});"show"!==g&&"always-valid"!==g&&(c[u.field]=u)}return c},{});return se(l).length?new ly(t,l):null}dependentFields(){return new Set(se(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${gt(this.filter)}`}assemble(){const t=se(this.filter).reduce((n,i)=>{const r=this.filter[i],o=ve(r,{expr:"datum"});return null!==r&&("temporal"===r.type?n.push(`(isDate(${o}) || (${Tj(o)}))`):"quantitative"===r.type&&n.push(Tj(o))),n},[]);return t.length>0?{type:"filter",expr:t.join(" && ")}:null}}function Tj(e){return`isValid(${e}) && isFinite(+${e})`}class Eu extends Kt{clone(){return new Eu(null,Ze(this._stack))}constructor(t,n){super(t),this._stack=n}static makeFromTransform(t,n){const{stack:i,groupby:r,as:o,offset:s="zero"}=n,a=[],l=[];if(void 0!==n.sort)for(const d of n.sort)a.push(d.field),l.push(Xn(d.order,"ascending"));const c={field:a,order:l};let u;return u=function Xlt(e){return te(e)&&e.every(t=>Ce(t))&&e.length>1}(o)?o:Ce(o)?[o,`${o}_end`]:[`${n.stack}_start`,`${n.stack}_end`],new Eu(t,{dimensionFieldDefs:[],stackField:i,groupby:r,offset:s,sort:c,facetby:[],as:u})}static makeFromEncoding(t,n){const i=n.stack,{encoding:r}=n;if(!i)return null;const{groupbyChannels:o,fieldChannel:s,offset:a,impute:l}=i,c=o.map(h=>Ka(r[h])).filter(h=>!!h),u=function Klt(e){return e.stack.stackBy.reduce((t,n)=>{const r=ve(n.fieldDef);return r&&t.push(r),t},[])}(n),d=n.encoding.order;let f;if(te(d)||he(d))f=phe(d);else{const h=wpe(d)?d.sort:"y"===s?"descending":"ascending";f=u.reduce((p,g)=>(p.field.includes(g)||(p.field.push(g),p.order.push(h)),p),{field:[],order:[]})}return new Eu(t,{dimensionFieldDefs:c,stackField:n.vgField(s),facetby:[],stackby:u,sort:f,offset:a,impute:l,as:[n.vgField(s,{suffix:"start",forAs:!0}),n.vgField(s,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(t){this._stack.facetby.push(...t)}dependentFields(){const t=new Set;return t.add(this._stack.stackField),this.getGroupbyFields().forEach(t.add,t),this._stack.facetby.forEach(t.add,t),this._stack.sort.field.forEach(t.add,t),t}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${gt(this._stack)}`}getGroupbyFields(){const{dimensionFieldDefs:t,impute:n,groupby:i}=this._stack;return t.length>0?t.map(r=>r.bin?n?[ve(r,{binSuffix:"mid"})]:[ve(r,{}),ve(r,{binSuffix:"end"})]:[ve(r)]).flat():i??[]}assemble(){const t=[],{facetby:n,dimensionFieldDefs:i,stackField:r,stackby:o,sort:s,offset:a,impute:l,as:c}=this._stack;if(l)for(const u of i){const{bandPosition:d=.5,bin:f}=u;if(f){const h=ve(u,{expr:"datum"}),p=ve(u,{expr:"datum",binSuffix:"end"});t.push({type:"formula",expr:`${Tj(h)} ? ${d}*${h}+${1-d}*${p} : ${h}`,as:ve(u,{binSuffix:"mid",forAs:!0})})}t.push({type:"impute",field:r,groupby:[...o,...n],key:ve(u,{binSuffix:"mid"}),method:"value",value:0})}return t.push({type:"stack",groupby:[...this.getGroupbyFields(),...n],field:r,sort:s,as:c,offset:a}),t}}class cy extends Kt{clone(){return new cy(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=Jl(this.transform.groupby.concat(t),n=>n)}dependentFields(){const t=new Set;return(this.transform.groupby??[]).forEach(t.add,t),(this.transform.sort??[]).forEach(n=>t.add(n.field)),this.transform.window.map(n=>n.field).filter(n=>void 0!==n).forEach(t.add,t),t}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(t){return t.as??ve(t)}hash(){return`WindowTransform ${gt(this.transform)}`}assemble(){const t=[],n=[],i=[],r=[];for(const d of this.transform.window)n.push(d.op),i.push(this.getDefaultName(d)),r.push(void 0===d.param?null:d.param),t.push(void 0===d.field?null:d.field);const o=this.transform.frame,s=this.transform.groupby;if(o&&null===o[0]&&null===o[1]&&n.every(d=>e6(d)))return{type:"joinaggregate",as:i,ops:n,fields:t,...void 0!==s?{groupby:s}:{}};const a=[],l=[];if(void 0!==this.transform.sort)for(const d of this.transform.sort)a.push(d.field),l.push(d.order??"ascending");const u=this.transform.ignorePeers;return{type:"window",params:r,as:i,ops:n,fields:t,sort:{field:a,order:l},...void 0!==u?{ignorePeers:u}:{},...void 0!==s?{groupby:s}:{},...void 0!==o?{frame:o}:{}}}}function xj(e){if(e instanceof ay)if(1!==e.numChildren()||e.children[0]instanceof xo){const t=e.model.component.data.main;qme(t);const n=function Qlt(e){return function t(n){if(!(n instanceof ay)){const i=n.clone();if(i instanceof xo){const r=Aj+i.getSource();i.setSource(r),e.model.component.data.outputNodes[r]=i}else(i instanceof Qa||i instanceof Eu||i instanceof cy||i instanceof Ep)&&i.addDimensions(e.fields);for(const r of n.children.flatMap(t))r.parent=i;return[i]}return n.children.flatMap(t)}}(e),i=e.children.map(n).flat();for(const r of i)r.parent=t}else{const t=e.children[0];(t instanceof Qa||t instanceof Eu||t instanceof cy||t instanceof Ep)&&t.addDimensions(e.fields),t.swapWithParent(),xj(e)}else e.children.map(xj)}function qme(e){if(e instanceof xo&&e.type===Zn.Main&&1===e.numChildren()){const t=e.children[0];t instanceof ay||(t.swapWithParent(),qme(e))}}const Aj="scale_",KM=5;function Mj(e){for(const t of e){for(const n of t.children)if(n.parent!==t)return!1;if(!Mj(t.children))return!1}return!0}function Za(e,t){let n=!1;for(const i of t)n=e.optimize(i)||n;return n}function Yme(e,t,n){let i=e.sources,r=!1;return r=Za(new Vlt,i)||r,r=Za(new Blt(t),i)||r,i=i.filter(o=>o.numChildren()>0),r=Za(new Hlt,i)||r,i=i.filter(o=>o.numChildren()>0),n||(r=Za(new Ult,i)||r,r=Za(new qlt(t),i)||r,r=Za(new jlt,i)||r,r=Za(new zlt,i)||r,r=Za(new Wlt,i)||r,r=Za(new Glt,i)||r,r=Za(new $lt,i)||r,r=Za(new Ylt,i)||r),e.sources=i,r}class $i{constructor(t){Object.defineProperty(this,"signal",{enumerable:!0,get:t})}static fromName(t,n){return new $i(()=>t(n))}}function Kme(e){On(e)?function Jlt(e){const t=e.component.scales;for(const n of se(t)){const i=nct(e,n);if(t[n].setWithExplicit("domains",i),rct(e,n),e.component.data.isFaceted){let o=e;for(;!us(o)&&o.parent;)o=o.parent;if("shared"===o.component.resolve.scale[n])for(const a of i.value)gu(a)&&(a.data=Aj+a.data.replace(Aj,""))}}}(e):function ect(e){for(const n of e.children)Kme(n);const t=e.component.scales;for(const n of se(t)){let i,r=null;for(const o of e.children){const s=o.component.scales[n];if(s){i=void 0===i?s.getWithExplicit("domains"):rf(i,s.getWithExplicit("domains"),"domains","scale",kj);const a=s.get("selectionExtent");r&&a&&r.param!==a.param&&de("The same selection must be used to override scale domains in a layered view."),r=a}}t[n].setWithExplicit("domains",i),r&&t[n].set("selectionExtent",r,!0)}}(e)}function nct(e,t){const n=e.getScaleComponent(t).get("type"),{encoding:i}=e,r=function tct(e,t,n,i){if("unaggregated"===e){const{valid:r,reason:o}=Xme(t,n);if(!r)return void de(o)}else if(void 0===e&&i.useUnaggregatedDomain){const{valid:r}=Xme(t,n);if(r)return"unaggregated"}return e}(e.scaleDomain(t),e.typedFieldDef(t),n,e.config.scale);return r!==e.scaleDomain(t)&&(e.specifiedScales[t]={...e.specifiedScales[t],domain:r}),"x"===t&&Ti(i.x2)?Ti(i.x)?rf(cf(n,r,e,"x"),cf(n,r,e,"x2"),"domain","scale",kj):cf(n,r,e,"x2"):"y"===t&&Ti(i.y2)?Ti(i.y)?rf(cf(n,r,e,"y"),cf(n,r,e,"y2"),"domain","scale",kj):cf(n,r,e,"y2"):cf(n,r,e,t)}function Nj(e,t,n){const i=Pi(n)?.unit;return"temporal"===t||i?function ict(e,t,n){return e.map(i=>({signal:`{data: ${MM(i,{timeUnit:n,type:t})}}`}))}(e,t,i):[e]}function cf(e,t,n,i){const{encoding:r,markDef:o,mark:s,config:a,stack:l}=n,c=Ti(r[i]),{type:u}=c,d=c.timeUnit,f=function Xst(e){const{marks:t,scales:n}=Oge(e);return t===n?Zn.Main:"include-invalid-values"===n?Zn.PreFilterInvalid:Zn.PostFilterInvalid}({invalid:oc("invalid",o,a),isPath:ef(s)});if(function Art(e){return ce(e,"unionWith")}(t)){const g=cf(e,void 0,n,i);return dc([...Nj(t.unionWith,u,d),...g.value])}if(ke(t))return dc([t]);if(t&&"unaggregated"!==t&&!Zhe(t))return dc(Nj(t,u,d));if(l&&i===l.fieldChannel){if("normalize"===l.offset)return cs([[0,1]]);const g=n.requestDataName(f);return cs([{data:g,field:n.vgField(i,{suffix:"start"})},{data:g,field:n.vgField(i,{suffix:"end"})}])}const h=rc(i)&&he(c)?function oct(e,t,n){if(!Li(n))return;const i=e.fieldDef(t),r=i.sort;if(_pe(r))return{op:"min",field:oy(i,t),order:"ascending"};const{stack:o}=e,s=o?new Set([...o.groupbyFields,...o.stackBy.map(a=>a.fieldDef.field)]):void 0;if(mu(r))return Ij(r,o&&!s.has(r.field));if(function tot(e){return ce(e,"encoding")}(r)){const{encoding:a,order:l}=r,c=e.fieldDef(a),{aggregate:u,field:d}=c,f=o&&!s.has(d);if(pu(u)||Qd(u))return Ij({field:ve(c),order:l},f);if(e6(u)||!u)return Ij({op:u,field:d,order:l},f)}else{if("descending"===r)return{op:"min",field:e.vgField(t),order:"descending"};if(pt(["ascending",void 0],r))return!0}}(n,i,e):void 0;if(cc(c))return cs(Nj([c.datum],u,d));const p=c;if("unaggregated"===t){const{field:g}=c;return cs([{data:n.requestDataName(f),field:ve({field:g,aggregate:"min"})},{data:n.requestDataName(f),field:ve({field:g,aggregate:"max"})}])}if(mn(p.bin)){if(Li(e))return cs("bin-ordinal"===e?[]:[{data:jb(h)?n.requestDataName(f):n.requestDataName(Zn.Raw),field:n.vgField(i,tw(p,i)?{binSuffix:"range"}:{}),sort:!0!==h&&we(h)?h:{field:n.vgField(i,{}),op:"min"}}]);{const{bin:g}=p;if(mn(g)){const m=Ej(n,p.field,g);return cs([new $i(()=>{const _=n.getSignalName(m);return`[${_}.start, ${_}.stop]`})])}return cs([{data:n.requestDataName(f),field:n.vgField(i,{})}])}}if(p.timeUnit&&pt(["time","utc"],e)){const g=r[ic(i)];if(bpe(p,g,o,a)){const m=n.requestDataName(f),_=tf({fieldDef:p,fieldDef2:g,markDef:o,config:a}),y=Kb(s)&&.5!==_&&Qn(i);return cs([{data:m,field:n.vgField(i,y?{suffix:$M}:{})},{data:m,field:n.vgField(i,{suffix:y?BM:"end"})}])}}return cs(h?[{data:jb(h)?n.requestDataName(f):n.requestDataName(Zn.Raw),field:n.vgField(i),sort:h}]:[{data:n.requestDataName(f),field:n.vgField(i)}])}function Ij(e,t){const{op:n,field:i,order:r}=e;return{op:n??(t?"sum":wM),...i?{field:zs(i)}:{},...r?{order:r}:{}}}function rct(e,t){const n=e.component.scales[t],i=e.specifiedScales[t].domain,r=e.fieldDef(t)?.bin,o=Zhe(i)?i:void 0,s=op(r)&&cM(r.extent)?r.extent:void 0;(o||s)&&n.set("selectionExtent",o??s,!0)}function Xme(e,t){const{aggregate:n,type:i}=e;return n?Ce(n)&&!Unt.has(n)?{valid:!1,reason:Nit(n)}:"quantitative"===i&&"log"===t?{valid:!1,reason:Iit(e)}:{valid:!0}:{valid:!1,reason:Mit(e)}}function kj(e,t,n,i){return e.explicit&&t.explicit&&de(function Pit(e,t,n,i){return`Conflicting ${t.toString()} property "${e.toString()}" (${Jt(n)} and ${Jt(i)}). Using the union of the two domains.`}(n,i,e.value,t.value)),{explicit:e.explicit,value:[...e.value,...t.value]}}function Oj(e){if(gu(e)&&Ce(e.field))return e.field;if(function znt(e){return!te(e)&&ce(e,"fields")&&!ce(e,"data")}(e)){let t;for(const n of e.fields)if(gu(n)&&Ce(n.field))if(t){if(t!==n.field)return de("Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect."),t}else t=n.field;return de("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."),t}if(function Hnt(e){return!te(e)&&ce(e,"fields")&&ce(e,"data")}(e)){de("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.");const t=e.fields[0];return Ce(t)?t:void 0}}function XM(e,t){return function sct(e){const t=Jl(e.map(s=>{if(gu(s)){const{sort:a,...l}=s;return l}return s}),gt),n=Jl(e.map(s=>{if(gu(s)){const a=s.sort;return void 0!==a&&!jb(a)&&("op"in a&&"count"===a.op&&delete a.field,"ascending"===a.order&&delete a.order),a}}).filter(s=>void 0!==s),gt);if(0===t.length)return;if(1===t.length){const s=e[0];if(gu(s)&&n.length>0){let a=n[0];if(n.length>1){de(Nhe);const l=n.filter(c=>we(c)&&"op"in c&&"min"!==c.op);a=!n.every(c=>we(c)&&"op"in c)||1!==l.length||l[0]}else we(a)&&"field"in a&&s.field===a.field&&(a=!a.order||{order:a.order});return{...s,sort:a}}return s}const i=Jl(n.map(s=>jb(s)||!("op"in s)||Ce(s.op)&&De($nt,s.op)?s:(de(function $it(e){return`Dropping sort property ${Jt(e)} as unioned domains only support boolean or op "count", "min", and "max".`}(s)),!0)),gt);let r;1===i.length?r=i[0]:i.length>1&&(de(Nhe),r=!0);const o=Jl(e.map(s=>gu(s)?s.data:null),s=>s);return 1===o.length&&null!==o[0]?{data:o[0],fields:t.map(a=>a.field),...r?{sort:r}:{}}:{fields:t,...r?{sort:r}:{}}}(e.component.scales[t].get("domains").map(r=>(gu(r)&&(r.data=e.lookupDataSource(r.data)),r)))}function Qme(e){return uy(e)||Fj(e)?e.children.reduce((t,n)=>t.concat(Qme(n)),Zme(e)):Zme(e)}function Zme(e){return se(e.component.scales).reduce((t,n)=>{const i=e.component.scales[n];if(i.merged)return t;const r=i.combine(),{name:o,type:s,selectionExtent:a,domains:l,range:c,reverse:u,...d}=r,f=function act(e,t,n,i){if(Qn(n)){if(sp(e))return{step:{signal:`${t}_step`}}}else if(we(e)&&gu(e))return{...e,data:i.lookupDataSource(e.data)};return e}(r.range,o,n,e),h=XM(e,n),p=a?function nat(e,t,n,i){const r=gme(e,t.param,t);return{signal:Ga(n.get("type"))&&te(i)&&i[0]>i[1]?`isValid(${r}) && reverse(${r})`:r}}(e,a,i,h):null;return t.push({name:o,type:s,...h?{domain:h}:{},...p?{domainRaw:p}:{},range:f,...void 0!==u?{reverse:u}:{},...d}),t},[])}class Jme extends vu{constructor(t,n){super({},{name:t}),this.merged=!1,this.setWithExplicit("type",n)}domainHasZero(){const t=this.get("type");if(pt([or.LOG,or.TIME,or.UTC],t))return"definitely-not";const n=this.get("zero");if(!0===n||void 0===n&&pt([or.LINEAR,or.SQRT,or.POW],t))return"definitely";const i=this.get("domains");if(i.length>0){let r=!1,o=!1,s=!1;for(const a of i){if(te(a)){const l=a[0],c=a[a.length-1];if(At(l)&&At(c)){if(l<=0&&c>=0){r=!0;continue}o=!0;continue}}s=!0}if(r)return"definitely";if(o&&!s)return"definitely-not"}return"maybe"}}const lct=["range","scheme"];function e_e(e,t){const n=e.fieldDef(t);if(n?.bin){const{bin:i,field:r}=n,o=To(t),s=e.getName(o);if(we(i)&&i.binned&&void 0!==i.step)return new $i(()=>{const a=e.scaleName(t),l=`(domain("${a}")[1] - domain("${a}")[0]) / ${i.step}`;return`${e.getSignalName(s)} / (${l})`});if(mn(i)){const a=Ej(e,r,i);return new $i(()=>{const l=e.getSignalName(a),c=`(${l}.stop - ${l}.start) / ${l}.step`;return`${e.getSignalName(s)} / (${c})`})}}}function uct(e,t){const n=t.specifiedScales[e],{size:i}=t,o=t.getScaleComponent(e).get("type");for(const d of lct)if(void 0!==n[d]){const f=v6(o,d),h=epe(e,d);if(f)if(h)de(h);else switch(d){case"range":{const p=n.range;if(te(p)){if(Qn(e))return dc(p.map(g=>{if("width"===g||"height"===g){const m=t.getName(g),_=t.getSignalName.bind(t);return $i.fromName(_,m)}return g}))}else if(we(p))return dc({data:t.requestDataName(Zn.Main),field:p.field,sort:{op:"min",field:t.vgField(e)}});return dc(p)}case"scheme":return dc(dct(n[d]))}else de(Ahe(o,d,e))}const s=e===In||"xOffset"===e?"width":"height",a=i[s];if(uc(a))if(Qn(e))if(Li(o)){const d=n_e(a,t,e);if(d)return dc({step:d})}else de(Mhe(s));else if(Wb(e)&&"band"===t.getScaleComponent(e===Gd?"x":"y").get("type")){const p=i_e(a,o);if(p)return dc(p)}const{rangeMin:l,rangeMax:c}=n,u=function fct(e,t){const{size:n,config:i,mark:r,encoding:o}=t,{type:s}=Ti(o[e]),l=t.getScaleComponent(e).get("type"),{domain:c,domainMid:u}=t.specifiedScales[e];switch(e){case In:case Fi:if(pt(["point","band"],l)){const d=r_e(e,n,i.view);if(uc(d))return{step:n_e(d,t,e)}}return t_e(e,t,l);case Gd:case V_:return function hct(e,t,n){const i=e===Gd?"x":"y",r=t.getScaleComponent(i);if(!r)return t_e(i,t,n,{center:!0});const o=r.get("type"),s=t.scaleName(i),{markDef:a,config:l}=t;if("band"===o){const c=r_e(i,t.size,t.config.view);if(uc(c)){const u=i_e(c,n);if(u)return u}return[0,{signal:`bandwidth('${s}')`}]}{const c=t.encoding[i];if(he(c)&&c.timeUnit){const u=Uhe(c.timeUnit,p=>`scale('${s}', ${p})`),d=t.config.scale.bandWithNestedOffsetPaddingInner,f=tf({fieldDef:c,markDef:a,config:l})-.5,h=0!==f?` + ${f}`:"";return d?[{signal:`${ke(d)?`${d.signal}/2`+h:`${d/2+f}`} * (${u})`},{signal:`${ke(d)?`(1 - ${d.signal}/2)`+h:`${1-d/2+f}`} * (${u})`}]:[0,{signal:u}]}return $fe(`Cannot use ${e} scale if ${i} scale is not discrete.`)}}(e,t,l);case du:{const d=function mct(e,t){switch(e){case"bar":case"tick":return t.scale.minBandSize;case"line":case"trail":case"rule":return t.scale.minStrokeWidth;case"text":return t.scale.minFontSize;case"point":case"square":case"circle":return t.scale.minSize}throw new Error(uM("size",e))}(r,i),f=function _ct(e,t,n,i){const r={x:e_e(n,"x"),y:e_e(n,"y")};switch(e){case"bar":case"tick":{if(void 0!==i.scale.maxBandSize)return i.scale.maxBandSize;const o=s_e(t,r,i.view);return At(o)?o-1:new $i(()=>`${o.signal} - 1`)}case"line":case"trail":case"rule":return i.scale.maxStrokeWidth;case"text":return i.scale.maxFontSize;case"point":case"square":case"circle":{if(i.scale.maxSize)return i.scale.maxSize;const o=s_e(t,r,i.view);return At(o)?Math.pow(o_e*o,2):new $i(()=>`pow(${o_e} * ${o.signal}, 2)`)}}throw new Error(uM("size",e))}(r,n,t,i);return W_(l)?function gct(e,t,n){const i=()=>{const r=Ha(t),o=Ha(e),s=`(${r} - ${o}) / (${n} - 1)`;return`sequence(${o}, ${r} + ${s}, ${s})`};return ke(t)?new $i(i):{signal:i()}}(d,f,function pct(e,t,n,i){switch(e){case"quantile":return t.scale.quantileCount;case"quantize":return t.scale.quantizeCount;case"threshold":return void 0!==n&&te(n)?n.length+1:(de(function Xit(e){return`Domain for ${e} is required for threshold scale.`}(i)),3)}}(l,i,c,e)):[d,f]}case Hs:return[0,2*Math.PI];case np:return[0,360];case ja:return[0,new $i(()=>`min(${t.getSignalName(us(t.parent)?"child_width":"width")},${t.getSignalName(us(t.parent)?"child_height":"height")})/2`)];case Yd:return[i.scale.minStrokeWidth,i.scale.maxStrokeWidth];case Kd:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case So:return"symbol";case Do:case tc:case nc:return"ordinal"===l?"nominal"===s?"category":"ordinal":void 0!==u?"diverging":"rect"===r||"geoshape"===r?"heatmap":"ramp";case fu:case Wd:case qd:return[i.scale.minOpacity,i.scale.maxOpacity]}}(e,t);return(void 0!==l||void 0!==c)&&v6(o,"rangeMin")&&te(u)&&2===u.length?dc([l??u[0],c??u[1]]):cs(u)}function dct(e){return function xrt(e){return!Ce(e)&&ce(e,"name")}(e)?{scheme:e.name,...Co(e,["name"])}:{scheme:e}}function t_e(e,t,n,{center:i}={}){const r=To(e),o=t.getName(r),s=t.getSignalName.bind(t);return e===Fi&&Ga(n)?i?[$i.fromName(a=>`${s(a)}/2`,o),$i.fromName(a=>`-${s(a)}/2`,o)]:[$i.fromName(s,o),0]:i?[$i.fromName(a=>`-${s(a)}/2`,o),$i.fromName(a=>`${s(a)}/2`,o)]:[0,$i.fromName(s,o)]}function n_e(e,t,n){const{encoding:i}=t,r=t.getScaleComponent(n),o=q4(n),s=i[o];if("offset"===ige({step:e,offsetIsDiscrete:tt(s)&&Whe(s.type)})&&Ppe(i,o)){const l=t.getScaleComponent(o);let u=`domain('${t.scaleName(o)}').length`;"band"===l.get("type")&&(u=`bandspace(${u}, ${l.get("paddingInner")??l.get("padding")??0}, ${l.get("paddingOuter")??l.get("padding")??0})`);const d=r.get("paddingInner")??r.get("padding");return{signal:`${e.step} * ${u} / (1-${qnt(d)})`}}return e.step}function i_e(e,t){if("offset"===ige({step:e,offsetIsDiscrete:Li(t)}))return{step:e.step}}function r_e(e,t,n){const i=e===In?"width":"height";return t[i]||FM(n,i)}const o_e=.95;function s_e(e,t,n){const i=uc(e.width)?e.width.step:K6(n,"width"),r=uc(e.height)?e.height.step:K6(n,"height");return t.x||t.y?new $i(()=>`min(${[t.x?t.x.signal:i,t.y?t.y.signal:r].join(", ")})`):Math.min(i,r)}function a_e(e,t){On(e)?function yct(e,t){const n=e.component.scales,{config:i,encoding:r,markDef:o,specifiedScales:s}=e;for(const a of se(n)){const l=s[a],c=n[a],u=e.getScaleComponent(a),d=Ti(r[a]),f=l[t],h=u.get("type"),p=u.get("padding"),g=u.get("paddingInner"),m=v6(h,t),_=epe(a,t);if(void 0!==f&&(m?_&&de(_):de(Ahe(h,t,a))),m&&void 0===_)if(void 0!==f){const y=d.timeUnit,v=d.type;switch(t){case"domainMax":case"domainMin":ap(l[t])||"temporal"===v||y?c.set(t,{signal:MM(l[t],{type:v,timeUnit:y})},!0):c.set(t,l[t],!0);break;default:c.copyKeyFromObject(t,l)}}else{const y=ce(l_e,t)?l_e[t]({model:e,channel:a,fieldOrDatumDef:d,scaleType:h,scalePadding:p,scalePaddingInner:g,domain:l.domain,domainMin:l.domainMin,domainMax:l.domainMax,markDef:o,config:i,hasNestedOffsetScale:Lpe(r,a),hasSecondaryRangeChannel:!!r[ic(a)]}):i.scale[t];void 0!==y&&c.set(t,y,!1)}}}(e,t):u_e(e,t)}const l_e={bins:({model:e,fieldOrDatumDef:t})=>he(t)?function vct(e,t){const n=t.bin;if(mn(n)){const i=Ej(e,t.field,n);return new $i(()=>e.getSignalName(i))}if(ir(n)&&op(n)&&void 0!==n.step)return{step:n.step}}(e,t):void 0,interpolate:({channel:e,fieldOrDatumDef:t})=>function bct(e,t){if(pt([Do,tc,nc],e)&&"nominal"!==t)return"hcl"}(e,t.type),nice:({scaleType:e,channel:t,domain:n,domainMin:i,domainMax:r,fieldOrDatumDef:o})=>function wct(e,t,n,i,r,o){if(!(Ka(o)?.bin||te(n)||null!=r||null!=i||pt([or.TIME,or.UTC],e)))return!!Qn(t)||void 0}(e,t,n,i,r,o),padding:({channel:e,scaleType:t,fieldOrDatumDef:n,markDef:i,config:r})=>function Ect(e,t,n,i,r,o){if(Qn(e)){if(lc(t)){if(void 0!==n.continuousPadding)return n.continuousPadding;const{type:s,orient:a}=r;if("bar"===s&&(!he(i)||!i.bin&&!i.timeUnit)&&("vertical"===a&&"x"===e||"horizontal"===a&&"y"===e))return o.continuousBandSize}if(t===or.POINT)return n.pointPadding}}(e,t,r.scale,n,i,r.bar),paddingInner:({scalePadding:e,channel:t,markDef:n,scaleType:i,config:r,hasNestedOffsetScale:o})=>function Cct(e,t,n,i,r,o=!1){if(void 0===e){if(Qn(t)){const{bandPaddingInner:s,barBandPaddingInner:a,rectBandPaddingInner:l,tickBandPaddingInner:c,bandWithNestedOffsetPaddingInner:u}=r;return o?u:Xn(s,"bar"===n?a:"tick"===n?c:l)}if(Wb(t)&&i===or.BAND)return r.offsetBandPaddingInner}}(e,t,n.type,i,r.scale,o),paddingOuter:({scalePadding:e,channel:t,scaleType:n,scalePaddingInner:i,config:r,hasNestedOffsetScale:o})=>function Dct(e,t,n,i,r,o=!1){if(void 0===e)if(Qn(t)){const{bandPaddingOuter:s,bandWithNestedOffsetPaddingOuter:a}=r;if(o)return a;if(n===or.BAND)return Xn(s,ke(i)?{signal:`${i.signal}/2`}:i/2)}else if(Wb(t)){if(n===or.POINT)return.5;if(n===or.BAND)return r.offsetBandPaddingOuter}}(e,t,n,i,r.scale,o),reverse:({fieldOrDatumDef:e,scaleType:t,channel:n,config:i})=>function Sct(e,t,n,i){return"x"===n&&void 0!==i.xReverse?Ga(e)&&"descending"===t?ke(i.xReverse)?{signal:`!${i.xReverse.signal}`}:!i.xReverse:i.xReverse:!(!Ga(e)||"descending"!==t)||void 0}(t,he(e)?e.sort:void 0,n,i.scale),zero:({channel:e,fieldOrDatumDef:t,domain:n,markDef:i,scaleType:r,config:o,hasSecondaryRangeChannel:s})=>function Tct(e,t,n,i,r,o,s){if(n&&"unaggregated"!==n&&Ga(r)){if(te(n)){const l=n[0],c=n[n.length-1];if(At(l)&&l<=0&&At(c)&&c>=0)return!0}return!1}if("size"===e&&"quantitative"===t.type&&!W_(r))return!0;if((!he(t)||!t.bin)&&pt([...hu,...Nnt],e)){const{orient:l,type:c}=i;return(!pt(["bar","area","line","trail"],c)||!("horizontal"===l&&"y"===e||"vertical"===l&&"x"===e))&&(!(!pt(["bar","area"],c)||s)||o?.zero)}return!1}(e,t,n,i,r,o.scale,s)};function c_e(e){On(e)?function cct(e){const t=e.component.scales;for(const n of Z4){const i=t[n];if(!i)continue;const r=uct(n,e);i.setWithExplicit("range",r)}}(e):u_e(e,"range")}function u_e(e,t){const n=e.component.scales;for(const i of e.children)"range"===t?c_e(i):a_e(i,t);for(const i of se(n)){let r;for(const o of e.children){const s=o.component.scales[i];s&&(r=rf(r,s.getWithExplicit(t),t,"scale",Mge((l,c)=>"range"===t&&l.step&&c.step?l.step-c.step:0)))}n[i].setWithExplicit(t,r)}}function xct(e,t,n,i,r=!1){const o=function Act(e,t,n,i){switch(t.type){case"nominal":case"ordinal":if(z_(e)||"discrete"===J4(e))return"shape"===e&&"ordinal"===t.type&&de(s6(e,"ordinal")),"ordinal";if(Qn(e)||Wb(e)){if(pt(["rect","bar","image","rule","tick"],n.type)||i)return"band"}else if("arc"===n.type&&e in X4)return"band";return fp(n[To(e)])||Y_(t)&&t.axis?.tickBand?"band":"point";case"temporal":return z_(e)?"time":"discrete"===J4(e)?(de(s6(e,"temporal")),"ordinal"):he(t)&&t.timeUnit&&Pi(t.timeUnit).utc?"utc":"time";case"quantitative":return z_(e)?he(t)&&mn(t.bin)?"bin-ordinal":"linear":"discrete"===J4(e)?(de(s6(e,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error(The(t.type))}(t,n,i,r),{type:s}=e;return rc(t)?void 0!==s?function Ort(e,t,n=!1){if(!rc(e))return!1;switch(e){case In:case Fi:case Gd:case V_:case Hs:case ja:return!(!lc(t)&&"band"!==t)||"point"===t&&!n;case du:case Yd:case fu:case Wd:case qd:case np:return lc(t)||W_(t)||pt(["band","point","ordinal"],t);case Do:case tc:case nc:return"band"!==t;case Kd:case So:return"ordinal"===t||W_(t)}}(t,s)?he(n)&&!function krt(e,t){return pt([_6,y6],t)?void 0===e||Li(e):t===H_?pt([or.TIME,or.UTC,void 0],e):t!==dp||Xhe(e)||W_(e)||void 0===e}(s,n.type)?(de(function Rit(e,t){return`FieldDef does not work with "${e}" scale. We are using "${t}" scale instead.`}(s,o)),o):s:(de(function Oit(e,t,n){return`Channel "${e}" does not work with "${t}" scale. We are using "${n}" scale instead.`}(t,s,o)),o):o:null}function d_e(e){e.component.scales=On(e)?function Nct(e){const{encoding:t,mark:n,markDef:i}=e,r={};for(const o of Z4){const s=Ti(t[o]);if(s&&n===ipe&&o===So&&s.type===G_)continue;let a=s&&s.scale;if(s&&null!==a&&!1!==a){a??(a={});const c=xct(a,o,s,i,Lpe(t,o));r[o]=new Jme(e.scaleName(`${o}`,!0),{value:c,explicit:a.type===c})}}return r}(e):function kct(e){var t;const n=e.component.scales={},i={},r=e.component.resolve;for(const o of e.children){d_e(o);for(const s of se(o.component.scales))if((t=r.scale)[s]??(t[s]=Mme(s,e)),"shared"===r.scale[s]){const a=i[s],l=o.component.scales[s].getWithExplicit("type");a?Ert(a.value,l.value)?i[s]=rf(a,l,"type","scale",Ict):(r.scale[s]="independent",delete i[s]):i[s]=l}}for(const o of se(i)){const s=e.scaleName(o,!0);n[o]=new Jme(s,i[o]);for(const l of e.children){const c=l.component.scales[o];c&&(l.renameScale(c.get("name"),s),c.merged=!0)}}return n}(e)}const Ict=Mge((e,t)=>qhe(e)-qhe(t));class Rj{constructor(){this.nameMap={}}rename(t,n){this.nameMap[t]=n}has(t){return void 0!==this.nameMap[t]}get(t){for(;this.nameMap[t]&&t!==this.nameMap[t];)t=this.nameMap[t];return t}}function On(e){return"unit"===e?.type}function us(e){return"facet"===e?.type}function Fj(e){return"concat"===e?.type}function uy(e){return"layer"===e?.type}class Pj{constructor(t,n,i,r,o,s,a){this.type=n,this.parent=i,this.config=o,this.correctDataNames=l=>(l.from?.data&&(l.from.data=this.lookupDataSource(l.from.data)),l.from?.facet?.data&&(l.from.facet.data=this.lookupDataSource(l.from.facet.data)),l),this.parent=i,this.config=o,this.view=rr(a),this.name=t.name??r,this.title=Zd(t.title)?{text:t.title}:t.title?rr(t.title):void 0,this.scaleNameMap=i?i.scaleNameMap:new Rj,this.projectionNameMap=i?i.projectionNameMap:new Rj,this.signalNameMap=i?i.signalNameMap:new Rj,this.data=t.data,this.description=t.description,this.transforms=function $st(e){return e.map(t=>ej(t)?{filter:P_(t.filter,vrt)}:t)}(t.transform??[]),this.layout="layer"===n||"unit"===n?{}:function Uot(e,t,n){const i=n[t],r={},{spacing:o,columns:s}=i;void 0!==o&&(r.spacing=o),void 0!==s&&(EM(e)&&!Zb(e.facet)||W6(e))&&(r.columns=s),RM(e)&&(r.columns=1);for(const a of Vot)if(void 0!==e[a])if("spacing"===a){const l=e[a];r[a]=At(l)?l:{row:l.row??o,column:l.column??o}}else r[a]=e[a];return r}(t,n,o),this.component={data:{sources:i?i.component.data.sources:[],outputNodes:i?i.component.data.outputNodes:{},outputNodeRefCounts:i?i.component.data.outputNodeRefCounts:{},isFaceted:EM(t)||i?.component.data.isFaceted&&void 0===t.data},layoutSize:new vu,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:{scale:{},axis:{},legend:{},...s?Ze(s):{}},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(){!function Mct(e,{ignoreRange:t}={}){d_e(e),Kme(e);for(const n of Irt)a_e(e,n);t||c_e(e)}(this)}parseProjection(){Ume(this)}renameTopLevelLayoutSizeSignal(){"width"!==this.getName("width")&&this.renameSignal(this.getName("width"),"width"),"height"!==this.getName("height")&&this.renameSignal(this.getName("height"),"height")}parseLegends(){Lme(this)}assembleEncodeFromView(t){const{style:n,...i}=t,r={};for(const o of se(i)){const s=i[o];void 0!==s&&(r[o]=En(s))}return r}assembleGroupEncodeEntry(t){let n={};return this.view&&(n=this.assembleEncodeFromView(this.view)),t||(this.description&&(n.description=En(this.description)),"unit"!==this.type&&"layer"!==this.type)?Zt(n)?void 0:n:{width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height"),...n}}assembleLayout(){if(!this.layout)return;const{spacing:t,...n}=this.layout,{component:i,config:r}=this,o=function Zat(e,t){const n={};for(const i of Ws){const r=e[i];if(r?.facetFieldDef){const{titleAnchor:o,titleOrient:s}=qM(["titleAnchor","titleOrient"],r.facetFieldDef.header,t,i),a=WM(i,s),l=Qat(o,a);void 0!==l&&(n[a]=l)}}return Zt(n)?void 0:n}(i.layoutHeaders,r);return{padding:t,...this.assembleDefaultLayout(),...n,...o?{titleBand:o}:{}}}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:t}=this.component;let n=[];for(const i of Ws)t[i].title&&n.push(Wat(this,i));for(const i of mj)n=n.concat(qat(this,i));return n}assembleAxes(){return function Oat(e,t){const{x:n=[],y:i=[]}=e;return[...n.map(r=>sw(r,"grid",t)),...i.map(r=>sw(r,"grid",t)),...n.map(r=>sw(r,"main",t)),...i.map(r=>sw(r,"main",t))].filter(r=>r)}(this.component.axes,this.config)}assembleLegends(){return Bme(this)}assembleProjections(){return function wlt(e){return uy(e)||Fj(e)?function Elt(e){return e.children.reduce((t,n)=>t.concat(n.assembleProjections()),jme(e))}(e):jme(e)}(this)}assembleTitle(){const{encoding:t,...n}=this.title??{},i={...lhe(this.config.title).nonMarkTitleProperties,...n,...t?{encode:{update:t}}:{}};if(i.text)return pt(["unit","layer"],this.type)?pt(["middle",void 0],i.anchor)&&(i.frame??(i.frame="group")):i.anchor??(i.anchor="start"),Zt(i)?void 0:i}assembleGroup(t=[]){const n={};(t=t.concat(this.assembleSignals())).length>0&&(n.signals=t);const i=this.assembleLayout();i&&(n.layout=i),n.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const r=!this.parent||us(this.parent)?Qme(this):[];r.length>0&&(n.scales=r);const o=this.assembleAxes();o.length>0&&(n.axes=o);const s=this.assembleLegends();return s.length>0&&(n.legends=s),n}getName(t){return Nn((this.name?`${this.name}_`:"")+t)}getDataName(t){return this.getName(Zn[t].toLowerCase())}requestDataName(t){const n=this.getDataName(t),i=this.component.data.outputNodeRefCounts;return i[n]=(i[n]||0)+1,n}getSizeSignalRef(t){if(us(this.parent)){const i=aM(xme(t)),r=this.component.scales[i];if(r&&!r.merged){const o=r.get("type"),s=r.get("range");if(Li(o)&&sp(s)){const a=r.get("name"),c=Oj(XM(this,i));return c?{signal:Tme(a,r,ve({aggregate:"distinct",field:c},{expr:"datum"}))}:(de(r6(i)),null)}}}return{signal:this.signalNameMap.get(this.getName(t))}}lookupDataSource(t){const n=this.component.data.outputNodes[t];return n?n.getSource():t}getSignalName(t){return this.signalNameMap.get(t)}renameSignal(t,n){this.signalNameMap.rename(t,n)}renameScale(t,n){this.scaleNameMap.rename(t,n)}renameProjection(t,n){this.projectionNameMap.rename(t,n)}scaleName(t,n){return n?this.getName(t):ehe(t)&&rc(t)&&this.component.scales[t]||this.scaleNameMap.has(this.getName(t))?this.scaleNameMap.get(this.getName(t)):void 0}projectionName(t){return t?this.getName("projection"):this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection"))?this.projectionNameMap.get(this.getName("projection")):void 0}getScaleComponent(t){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[t];return n&&!n.merged?n:this.parent?this.parent.getScaleComponent(t):void 0}getScaleType(t){const n=this.getScaleComponent(t);return n?n.get("type"):void 0}getSelectionComponent(t,n){let i=this.component.selection[t];if(!i&&this.parent&&(i=this.parent.getSelectionComponent(t,n)),!i)throw new Error(function Znt(e){return`Cannot find a selection named "${e}".`}(n));return i}hasAxisOrientSignalRef(){return this.component.axes.x?.some(t=>t.hasOrientSignalRef())||this.component.axes.y?.some(t=>t.hasOrientSignalRef())}}class f_e extends Pj{vgField(t,n={}){const i=this.fieldDef(t);if(i)return ve(i,n)}reduceFieldDef(t,n){return function bot(e,t,n,i){return e?se(e).reduce((r,o)=>{const s=e[o];return te(s)?s.reduce((a,l)=>t.call(i,a,l,o),r):t.call(i,r,s,o)},n):n}(this.getMapping(),(i,r,o)=>{const s=Ka(r);return s?t(i,s,o):i},n)}forEachFieldDef(t,n){F6(this.getMapping(),(i,r)=>{const o=Ka(i);o&&t(o,r)},n)}}class QM extends Kt{clone(){return new QM(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ze(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"value",i[1]??"density"],this.transform.resolve=this.transform.resolve??"shared"}dependentFields(){return new Set([this.transform.density,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`DensityTransform ${gt(this.transform)}`}assemble(){const{density:t,...n}=this.transform,i={type:"kde",field:t,...n};return i.resolve=this.transform.resolve,i}}class ZM extends Kt{clone(){return new ZM(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ze(n)}dependentFields(){return new Set([this.transform.extent])}producedFields(){return new Set([])}hash(){return`ExtentTransform ${gt(this.transform)}`}assemble(){const{extent:t,param:n}=this.transform;return{type:"extent",field:t,signal:n}}}class JM extends Kt{clone(){return new JM(this.parent,Ze(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ze(n);const{flatten:i,as:r=[]}=this.transform;this.transform.as=i.map((o,s)=>r[s]??o)}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${gt(this.transform)}`}assemble(){const{flatten:t,as:n}=this.transform;return{type:"flatten",fields:t,as:n}}}class eN extends Kt{clone(){return new eN(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ze(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"key",i[1]??"value"]}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${gt(this.transform)}`}assemble(){const{fold:t,as:n}=this.transform;return{type:"fold",fields:t,as:n}}}class dy extends Kt{clone(){return new dy(null,Ze(this.fields),this.geojson,this.signal)}static parseAll(t,n){if(n.component.projection&&!n.component.projection.isFit)return t;let i=0;for(const r of[[Ua,Va],[Gs,za]]){const o=r.map(s=>{const a=Ti(n.encoding[s]);return he(a)?a.field:cc(a)?{expr:`${a.datum}`}:Ya(a)?{expr:`${a.value}`}:void 0});(o[0]||o[1])&&(t=new dy(t,o,null,n.getName("geojson_"+i++)))}if(n.channelHasField(So)){const r=n.typedFieldDef(So);r.type===G_&&(t=new dy(t,null,r.field,n.getName("geojson_"+i++)))}return t}constructor(t,n,i,r){super(t),this.fields=n,this.geojson=i,this.signal=r}dependentFields(){const t=(this.fields??[]).filter(Ce);return new Set([...this.geojson?[this.geojson]:[],...t])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${gt(this.fields)}`}assemble(){return[...this.geojson?[{type:"filter",expr:`isValid(datum["${this.geojson}"])`}]:[],{type:"geojson",...this.fields?{fields:this.fields}:{},...this.geojson?{geojson:this.geojson}:{},signal:this.signal}]}}class uw extends Kt{clone(){return new uw(null,this.projection,Ze(this.fields),Ze(this.as))}constructor(t,n,i,r){super(t),this.projection=n,this.fields=i,this.as=r}static parseAll(t,n){if(!n.projectionName())return t;for(const i of[[Ua,Va],[Gs,za]]){const r=i.map(s=>{const a=Ti(n.encoding[s]);return he(a)?a.field:cc(a)?{expr:`${a.datum}`}:Ya(a)?{expr:`${a.value}`}:void 0}),o=i[0]===Gs?"2":"";(r[0]||r[1])&&(t=new uw(t,n.projectionName(),r,[n.getName(`x${o}`),n.getName(`y${o}`)]))}return t}dependentFields(){return new Set(this.fields.filter(Ce))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${gt(this.fields)} ${gt(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}class Cp extends Kt{clone(){return new Cp(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n}dependentFields(){return new Set([this.transform.impute,this.transform.key,...this.transform.groupby??[]])}producedFields(){return new Set([this.transform.impute])}processSequence(t){const{start:n=0,stop:i,step:r}=t;return{signal:`sequence(${[n,i,...r?[r]:[]].join(",")})`}}static makeFromTransform(t,n){return new Cp(t,n)}static makeFromEncoding(t,n){const i=n.encoding,r=i.x,o=i.y;if(he(r)&&he(o)){const s=r.impute?r:o.impute?o:void 0;if(void 0===s)return;const a=r.impute?o:o.impute?r:void 0,{method:l,value:c,frame:u,keyvals:d}=s.impute,f=jpe(n.mark,i);return new Cp(t,{impute:s.field,key:a.field,...l?{method:l}:{},...void 0!==c?{value:c}:{},...u?{frame:u}:{},...void 0!==d?{keyvals:d}:{},...f.length?{groupby:f}:{}})}return null}hash(){return`Impute ${gt(this.transform)}`}assemble(){const{impute:t,key:n,keyvals:i,method:r,groupby:o,value:s,frame:a=[null,null]}=this.transform,l={type:"impute",field:t,key:n,...i?{keyvals:(e=i,ce(e,"stop")?this.processSequence(i):i)}:{},method:"value",...o?{groupby:o}:{},value:r&&"value"!==r?null:s};var e;return r&&"value"!==r?[l,{type:"window",as:[`imputed_${t}_value`],ops:[r],fields:[t],frame:a,ignorePeers:!1,...o?{groupby:o}:{}},{type:"formula",expr:`datum.${t} === null ? datum.imputed_${t}_value : datum.${t}`,as:t}]:[l]}}class tN extends Kt{clone(){return new tN(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ze(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??n.on,i[1]??n.loess]}dependentFields(){return new Set([this.transform.loess,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`LoessTransform ${gt(this.transform)}`}assemble(){const{loess:t,on:n,...i}=this.transform;return{type:"loess",x:n,y:t,...i}}}class dw extends Kt{clone(){return new dw(null,Ze(this.transform),this.secondary)}constructor(t,n,i){super(t),this.transform=n,this.secondary=i}static make(t,n,i,r){const o=n.component.data.sources,{from:s}=i;let a=null;if(function bst(e){return ce(e,"data")}(s)){let l=m_e(s.data,o);l||(l=new bp(s.data),o.push(l));const c=n.getName(`lookup_${r}`);a=new xo(l,c,Zn.Lookup,n.component.data.outputNodeRefCounts),n.component.data.outputNodes[c]=a}else if(function wst(e){return ce(e,"param")}(s)){const l=s.param;let c;i={as:l,...i};try{c=n.getSelectionComponent(Nn(l),l)}catch{throw new Error(function nit(e){return`Lookups can only be performed on selection parameters. "${e}" is a variable parameter.`}(l))}if(a=c.materialized,!a)throw new Error(function iit(e){return`Cannot define and lookup the "${e}" selection in the same view. Try moving the lookup into a second, layered view?`}(l))}return new dw(t,i,a.getSource())}dependentFields(){return new Set([this.transform.lookup])}producedFields(){return new Set(this.transform.as?Ee(this.transform.as):this.transform.from.fields)}hash(){return`Lookup ${gt({transform:this.transform,secondary:this.secondary})}`}assemble(){let t;if(this.transform.from.fields)t={values:this.transform.from.fields,...this.transform.as?{as:Ee(this.transform.as)}:{}};else{let n=this.transform.as;Ce(n)||(de('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.'),n="_lookup"),t={as:[n]}}return{type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup],...t,...this.transform.default?{default:this.transform.default}:{}}}}class nN extends Kt{clone(){return new nN(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ze(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"prob",i[1]??"value"]}dependentFields(){return new Set([this.transform.quantile,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`QuantileTransform ${gt(this.transform)}`}assemble(){const{quantile:t,...n}=this.transform;return{type:"quantile",field:t,...n}}}class iN extends Kt{clone(){return new iN(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ze(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??n.on,i[1]??n.regression]}dependentFields(){return new Set([this.transform.regression,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`RegressionTransform ${gt(this.transform)}`}assemble(){const{regression:t,on:n,...i}=this.transform;return{type:"regression",x:n,y:t,...i}}}class rN extends Kt{clone(){return new rN(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=Jl((this.transform.groupby??[]).concat(t),n=>n)}producedFields(){}dependentFields(){return new Set([this.transform.pivot,this.transform.value,...this.transform.groupby??[]])}hash(){return`PivotTransform ${gt(this.transform)}`}assemble(){const{pivot:t,value:n,groupby:i,limit:r,op:o}=this.transform;return{type:"pivot",field:t,value:n,...void 0!==r?{limit:r}:{},...void 0!==o?{op:o}:{},...void 0!==i?{groupby:i}:{}}}}class oN extends Kt{clone(){return new oN(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${gt(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}function h_e(e){let t=0;return function n(i,r){if(i instanceof bp&&!i.isGenerator&&!J_(i.data)&&(e.push(r),r={name:null,source:r.name,transform:[]}),i instanceof Sr&&(i.parent instanceof bp&&!r.source?(r.format={...r.format,parse:i.assembleFormatParse()},r.transform.push(...i.assembleTransforms(!0))):r.transform.push(...i.assembleTransforms())),i instanceof ay)return r.name||(r.name="data_"+t++),!r.source||r.transform.length>0?(e.push(r),i.data=r.name):i.data=r.source,void e.push(...i.assemble());switch((i instanceof aw||i instanceof lw||i instanceof ly||i instanceof iy||i instanceof ry||i instanceof uw||i instanceof Qa||i instanceof dw||i instanceof cy||i instanceof Ep||i instanceof eN||i instanceof JM||i instanceof QM||i instanceof tN||i instanceof nN||i instanceof iN||i instanceof lf||i instanceof oN||i instanceof rN||i instanceof ZM)&&r.transform.push(i.assemble()),(i instanceof hc||i instanceof fc||i instanceof Cp||i instanceof Eu||i instanceof dy)&&r.transform.push(...i.assemble()),i instanceof xo&&(r.source&&0===r.transform.length?i.setSource(r.source):i.parent instanceof xo?i.setSource(r.name):(r.name||(r.name="data_"+t++),i.setSource(r.name),1===i.numChildren()&&(e.push(r),r={name:null,source:r.name,transform:[]}))),i.numChildren()){case 0:i instanceof xo&&(!r.source||r.transform.length>0)&&e.push(r);break;case 1:n(i.children[0],r);break;default:{r.name||(r.name="data_"+t++);let o=r.name;!r.source||r.transform.length>0?e.push(r):o=r.source;for(const s of i.children)n(s,{name:null,source:o,transform:[]});break}}}}function Fct(e){return"top"===e||"left"===e||ke(e)?"header":"footer"}function Lct(e,t){const{facet:n,config:i,child:r,component:o}=e;if(e.channelHasField(t)){const s=n[t],a=sy("title",null,i,t);let l=K_(s,i,{allowDisabling:!0,includeDefault:void 0===a||!!a});r.component.layoutHeaders[t].title&&(l=te(l)?l.join(", "):l,l+=` / ${r.component.layoutHeaders[t].title}`,r.component.layoutHeaders[t].title=null);const c=sy("labelOrient",s.header,i,t),u=null!==s.header&&Xn(s.header?.labels,i.header.labels,!0),d=pt(["bottom","right"],c)?"footer":"header";o.layoutHeaders[t]={title:null!==s.header?l:null,facetFieldDef:s,[d]:"facet"===t?[]:[p_e(e,t,u)]}}}function p_e(e,t,n){const i="row"===t?"height":"width";return{labels:n,sizeSignal:e.child.component.layoutSize.get(i)?e.child.getSizeSignalRef(i):void 0,axes:[]}}function g_e(e,t){const{child:n}=e;if(n.component.axes[t]){const{layoutHeaders:i,resolve:r}=e.component;if(r.axis[t]=bj(r,t),"shared"===r.axis[t]){const o="x"===t?"column":"row",s=i[o];for(const a of n.component.axes[t]){const l=Fct(a.get("orient"));s[l]??(s[l]=[p_e(e,o,!1)]);const c=sw(a,"main",e.config,{header:!0});c&&s[l][0].axes.push(c),a.mainExtracted=!0}}}}function Lj(e){for(const t of e.children)t.parseLayoutSize()}function sN(e,t){const n=xme(t),i=aM(n),r=e.component.resolve,o=e.component.layoutSize;let s;for(const a of e.children){const l=a.component.layoutSize.getWithExplicit(n),c=r.scale[i]??Mme(i,e);if("independent"===c&&"step"===l.value){s=void 0;break}if(s){if("independent"===c&&s.value!==l.value){s=void 0;break}s=rf(s,l,n,"")}else s=l}if(s){for(const a of e.children)e.renameSignal(a.getName(n),e.getName(t)),a.component.layoutSize.set(n,"merged",!1);o.setWithExplicit(t,s)}else o.setWithExplicit(t,{explicit:!1,value:void 0})}function Vct(e,t){const i=e.config,r=e.getScaleComponent("width"===t?"x":"y");if(r){const o=r.get("type"),s=r.get("range");if(Li(o)){const a=FM(i.view,t);return sp(s)||uc(a)?"step":a}return Y6(i.view,t)}if(e.hasProjection||"arc"===e.mark)return Y6(i.view,t);{const o=FM(i.view,t);return uc(o)?o.step:o}}function $j(e,t,n){return ve(t,{suffix:`by_${ve(e)}`,...n})}class fw extends f_e{constructor(t,n,i,r){super(t,"facet",n,i,r,t.resolve),this.child=zj(t.spec,this,this.getName("child"),void 0,r),this.children=[this.child],this.facet=this.initFacet(t.facet)}initFacet(t){if(!Zb(t))return{facet:this.initFacetFieldDef(t,"facet")};const n=se(t),i={};for(const r of n){if(![au,lu].includes(r)){de(uM(r,"facet"));break}const o=t[r];if(void 0===o.field){de(o6(o,r));break}i[r]=this.initFacetFieldDef(o,r)}return i}initFacetFieldDef(t,n){const i=R6(t,n);return i.header?i.header=rr(i.header):null===i.header&&(i.header=null),i}channelHasField(t){return ce(this.facet,t)}fieldDef(t){return this.facet[t]}parseData(){this.component.data=aN(this),this.child.parseData()}parseLayoutSize(){Lj(this)}parseSelections(){this.child.parseSelections(),this.component.selection=this.child.component.selection}parseMarkGroup(){this.child.parseMarkGroup()}parseAxesAndHeaders(){this.child.parseAxesAndHeaders(),function Pct(e){for(const t of Ws)Lct(e,t);g_e(e,"x"),g_e(e,"y")}(this)}assembleSelectionTopLevelSignals(t){return this.child.assembleSelectionTopLevelSignals(t)}assembleSignals(){return this.child.assembleSignals(),[]}assembleSelectionData(t){return this.child.assembleSelectionData(t)}getHeaderLayoutMixins(){const t={};for(const n of Ws)for(const i of _j){const r=this.component.layoutHeaders[n],o=r[i],{facetFieldDef:s}=r;if(s){const a=sy("titleOrient",s.header,this.config,n);if(["right","bottom"].includes(a)){const l=WM(n,a);t.titleAnchor??(t.titleAnchor={}),t.titleAnchor[l]="end"}}if(o?.[0]){const l="header"===i?"headerBand":"footerBand";"facet"!==n&&!this.child.component.layoutSize.get("row"===n?"height":"width")&&(t[l]??(t[l]={}),t[l][n]=.5),r.title&&(t.offset??(t.offset={}),t.offset["row"===n?"rowTitle":"columnTitle"]=10)}}return t}assembleDefaultLayout(){const{column:t,row:n}=this.facet,i=t?this.columnDistinctSignal():n?1:void 0;let r="all";return(!n&&"independent"===this.component.resolve.scale.x||!t&&"independent"===this.component.resolve.scale.y)&&(r="none"),{...this.getHeaderLayoutMixins(),...i?{columns:i}:{},bounds:"full",align:r}}assembleLayoutSignals(){return this.child.assembleLayoutSignals()}columnDistinctSignal(){if(!(this.parent&&this.parent instanceof fw))return{signal:`length(data('${this.getName("column_domain")}'))`}}assembleGroupStyle(){}assembleGroup(t){return this.parent&&this.parent instanceof fw?{...this.channelHasField("column")?{encode:{update:{columns:{field:ve(this.facet.column,{prefix:"distinct"})}}}}:{},...super.assembleGroup(t)}:super.assembleGroup(t)}getCardinalityAggregateForChild(){const t=[],n=[],i=[];if(this.child instanceof fw){if(this.child.channelHasField("column")){const r=ve(this.child.facet.column);t.push(r),n.push("distinct"),i.push(`distinct_${r}`)}}else for(const r of hu){const o=this.child.component.scales[r];if(o&&!o.merged){const s=o.get("type"),a=o.get("range");if(Li(s)&&sp(a)){const c=Oj(XM(this.child,r));c?(t.push(c),n.push("distinct"),i.push(`distinct_${c}`)):de(r6(r))}}}return{fields:t,ops:n,as:i}}assembleFacet(){const{name:t,data:n}=this.component.data.facetRoot,{row:i,column:r}=this.facet,{fields:o,ops:s,as:a}=this.getCardinalityAggregateForChild(),l=[];for(const u of Ws){const d=this.facet[u];if(d){l.push(ve(d));const{bin:f,sort:h}=d;if(mn(f)&&l.push(ve(d,{binSuffix:"end"})),mu(h)){const{field:p,op:g=wM}=h,m=$j(d,h);i&&r?(o.push(m),s.push("max"),a.push(m)):(o.push(p),s.push(g),a.push(m))}else if(te(h)){const p=oy(d,u);o.push(p),s.push("max"),a.push(p)}}}const c=!!i&&!!r;return{name:t,data:n,groupby:l,...c||o.length>0?{aggregate:{...c?{cross:c}:{},...o.length?{fields:o,ops:s,as:a}:{}}}:{}}}facetSortFields(t){const{facet:n}=this,i=n[t];return i?mu(i.sort)?[$j(i,i.sort,{expr:"datum"})]:te(i.sort)?[oy(i,t,{expr:"datum"})]:[ve(i,{expr:"datum"})]:[]}facetSortOrder(t){const{facet:n}=this,i=n[t];if(i){const{sort:r}=i;return[(mu(r)?r.order:!te(r)&&r)||"ascending"]}return[]}assembleLabelTitle(){const{facet:t,config:n}=this;if(t.facet)return yj(t.facet,"facet",n);const i={row:["top","bottom"],column:["left","right"]};for(const r of mj)if(t[r]){const o=sy("labelOrient",t[r]?.header,n,r);if(i[r].includes(o))return yj(t[r],r,n)}}assembleMarks(){const{child:t}=this,i=function Oct(e){const t=[],n=h_e(t);for(const i of e.children)n(i,{source:e.name,name:null,transform:[]});return t}(this.component.data.facetRoot),r=t.assembleGroupEncodeEntry(!1),o=this.assembleLabelTitle()||t.assembleTitle(),s=t.assembleGroupStyle();return[{name:this.getName("cell"),type:"group",...o?{title:o}:{},...s?{style:s}:{},from:{facet:this.assembleFacet()},sort:{field:Ws.map(l=>this.facetSortFields(l)).flat(),order:Ws.map(l=>this.facetSortOrder(l)).flat()},...i.length>0?{data:i}:{},...r?{encode:{update:r}}:{},...t.assembleGroup(Zst(this,[]))}]}getMapping(){return this.facet}}function m_e(e,t){for(const n of t){const i=n.data;if(e.name&&n.hasName()&&e.name!==n.dataName)continue;const r=e.format?.mesh,o=i.format?.feature;if(r&&o)continue;const s=e.format?.feature;if((s||o)&&s!==o)continue;const a=i.format?.mesh;if(!r&&!a||r===a)if(iw(e)&&iw(i)){if(as(e.values,i.values))return n}else if(J_(e)&&J_(i)){if(e.url===i.url)return n}else if(Nge(e)&&e.name===n.dataName)return n}return null}function aN(e){let t=function zct(e,t){if(e.data||!e.parent){if(null===e.data){const i=new bp({values:[]});return t.push(i),i}const n=m_e(e.data,t);if(n)return sf(e.data)||(n.data.format=Bfe({},e.data.format,n.data.format)),!n.hasName()&&e.data.name&&(n.dataName=e.data.name),n;{const i=new bp(e.data);return t.push(i),i}}return e.parent.component.data.facetRoot?e.parent.component.data.facetRoot:e.parent.component.data.main}(e,e.component.data.sources);const{outputNodes:n,outputNodeRefCounts:i}=e.component.data,r=e.data,s=r&&(sf(r)||J_(r)||iw(r))||!e.parent?new Kst:e.parent.component.data.ancestorParse.clone();sf(r)?(Ige(r)?t=new lw(t,r.sequence):ij(r)&&(t=new aw(t,r.graticule)),s.parseNothing=!0):null===r?.format?.parse&&(s.parseNothing=!0),t=Sr.makeExplicit(t,e,s)??t,t=new lf(t);const a=e.parent&&uy(e.parent);(On(e)||us(e))&&a&&(t=hc.makeFromEncoding(t,e)??t),e.transforms.length>0&&(t=function Hct(e,t,n){let i=0;for(const r of t.transforms){let o,s;if(Ist(r))s=e=new ry(e,r),o="derived";else if(ej(r)){const a=Rlt(r);s=e=Sr.makeWithAncestors(e,{},a,n)??e,e=new iy(e,t,r.filter)}else if(Ege(r))s=e=hc.makeFromTransform(e,r,t),o="number";else if(Ost(r))o="date",void 0===n.getWithExplicit(r.field).value&&(e=new Sr(e,{[r.field]:o}),n.set(r.field,o,!1)),s=e=fc.makeFromTransform(e,r);else if(Rst(r))s=e=Qa.makeFromTransform(e,r),o="number",dj(t)&&(e=new lf(e));else if(wge(r))s=e=dw.make(e,t,r,i++),o="derived";else if(Ast(r))s=e=new cy(e,r),o="number";else if(Mst(r))s=e=new Ep(e,r),o="number";else if(Fst(r))s=e=Eu.makeFromTransform(e,r),o="derived";else if(Pst(r))s=e=new eN(e,r),o="derived";else if(Lst(r))s=e=new ZM(e,r),o="derived";else if(Nst(r))s=e=new JM(e,r),o="derived";else if(Est(r))s=e=new rN(e,r),o="derived";else if(xst(r))e=new oN(e,r);else if(kst(r))s=e=Cp.makeFromTransform(e,r),o="derived";else if(Cst(r))s=e=new QM(e,r),o="derived";else if(Dst(r))s=e=new nN(e,r),o="derived";else if(Sst(r))s=e=new iN(e,r),o="derived";else{if(!Tst(r)){de(uit(r));continue}s=e=new tN(e,r),o="derived"}if(s&&void 0!==o)for(const a of s.producedFields()??[])n.set(a,o,!1)}return e}(t,e,s));const l=function Plt(e){const t={};if(On(e)&&e.component.selection)for(const n of se(e.component.selection)){const i=e.component.selection[n];for(const r of i.project.items)!r.channel&&j_(r.field)>1&&(t[r.field]="flatten")}return t}(e),c=function Flt(e){const t={};function n(i){Q_(i)?t[i.field]="date":"quantitative"===i.type&&function jnt(e){return Ce(e)&&pt(["min","max"],e)}(i.aggregate)?t[i.field]="number":j_(i.field)>1?i.field in t||(t[i.field]="flatten"):gp(i)&&mu(i.sort)&&j_(i.sort.field)>1&&(i.sort.field in t||(t[i.sort.field]="flatten"))}if((On(e)||us(e))&&e.forEachFieldDef((i,r)=>{if(eo(i))n(i);else{const o=rp(r),s=e.fieldDef(o);n({...i,type:s.type})}}),On(e)){const{mark:i,markDef:r,encoding:o}=e;if(ef(i)&&!e.encoding.order){const a=o["horizontal"===r.orient?"y":"x"];he(a)&&"quantitative"===a.type&&!(a.field in t)&&(t[a.field]="number")}}return t}(e);t=Sr.makeWithAncestors(t,{},{...l,...c},s)??t,On(e)&&(t=dy.parseAll(t,e),t=uw.parseAll(t,e)),(On(e)||us(e))&&(a||(t=hc.makeFromEncoding(t,e)??t),t=fc.makeFromEncoding(t,e)??t,t=ry.parseAllForSortIndex(t,e));const u=t=lN(Zn.Raw,e,t);if(On(e)){const m=Qa.makeFromEncoding(t,e);m&&(t=m,dj(e)&&(t=new lf(t))),t=Cp.makeFromEncoding(t,e)??t,t=Eu.makeFromEncoding(t,e)??t}let d,f;if(On(e)){const{markDef:m,mark:_,config:y}=e,v=en("invalid",m,y),{marks:b,scales:w}=f=Oge({invalid:v,isPath:ef(_)});b!==w&&"include-invalid-values"===w&&(d=t=lN(Zn.PreFilterInvalid,e,t)),"exclude-invalid-values"===b&&(t=ly.make(t,e,f)??t)}const h=t=lN(Zn.Main,e,t);let p;if(On(e)&&f){const{marks:m,scales:_}=f;"include-invalid-values"===m&&"exclude-invalid-values"===_&&(t=ly.make(t,e,f)??t,p=t=lN(Zn.PostFilterInvalid,e,t))}On(e)&&function Iat(e,t){for(const[n,i]of Hd(e.component.selection??{})){const r=e.getName(`lookup_${n}`);e.component.data.outputNodes[r]=i.materialized=new xo(new iy(t,e,{param:n}),r,Zn.Lookup,e.component.data.outputNodeRefCounts)}}(e,h);let g=null;if(us(e)){const m=e.getName("facet");t=function Uct(e,t){const{row:n,column:i}=t;if(n&&i){let r=null;for(const o of[n,i])if(mu(o.sort)){const{field:s,op:a=wM}=o.sort;e=r=new Ep(e,{joinaggregate:[{op:a,field:s,as:$j(o,o.sort,{forAs:!0})}],groupby:[ve(o)]})}return r}return null}(t,e.facet)??t,g=new ay(t,e,m,h.getSource()),n[m]=g}return{...e.component.data,outputNodes:n,outputNodeRefCounts:i,raw:u,main:h,facetRoot:g,ancestorParse:s,preFilterInvalid:d,postFilterInvalid:p}}function lN(e,t,n){const{outputNodes:i,outputNodeRefCounts:r}=t.component.data,o=t.getDataName(e),s=new xo(n,o,e,r);return i[o]=s,s}class Gct extends Pj{constructor(t,n,i,r){super(t,"concat",n,i,r,t.resolve),("shared"===t.resolve?.axis?.x||"shared"===t.resolve?.axis?.y)&&de("Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415)."),this.children=this.getChildren(t).map((o,s)=>zj(o,this,this.getName(`concat_${s}`),void 0,r))}parseData(){this.component.data=aN(this);for(const t of this.children)t.parseData()}parseSelections(){this.component.selection={};for(const t of this.children){t.parseSelections();for(const n of se(t.component.selection))this.component.selection[n]=t.component.selection[n]}}parseMarkGroup(){for(const t of this.children)t.parseMarkGroup()}parseAxesAndHeaders(){for(const t of this.children)t.parseAxesAndHeaders()}getChildren(t){return RM(t)?t.vconcat:q6(t)?t.hconcat:t.concat}parseLayoutSize(){!function Bct(e){Lj(e);const n=void 0===e.layout.columns?"height":"childHeight";sN(e,1===e.layout.columns?"width":"childWidth"),sN(e,n)}(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(t){return this.children.reduce((n,i)=>i.assembleSelectionTopLevelSignals(n),t)}assembleSignals(){return this.children.forEach(t=>t.assembleSignals()),[]}assembleLayoutSignals(){const t=vj(this);for(const n of this.children)t.push(...n.assembleLayoutSignals());return t}assembleSelectionData(t){return this.children.reduce((n,i)=>i.assembleSelectionData(n),t)}assembleMarks(){return this.children.map(t=>{const n=t.assembleTitle(),i=t.assembleGroupStyle(),r=t.assembleGroupEncodeEntry(!1);return{type:"group",name:t.getName("group"),...n?{title:n}:{},...i?{style:i}:{},...r?{encode:{update:r}}:{},...t.assembleGroup()}})}assembleGroupStyle(){}assembleDefaultLayout(){const t=this.layout.columns;return{...null!=t?{columns:t}:{},bounds:"full",align:"each"}}}const qct={disable:1,gridScale:1,scale:1,...kpe,labelExpr:1,encode:1},__e=se(qct);class Bj extends vu{constructor(t={},n={},i=!1){super(),this.explicit=t,this.implicit=n,this.mainExtracted=i}clone(){return new Bj(Ze(this.explicit),Ze(this.implicit),this.mainExtracted)}hasAxisPart(t){return"axis"===t||("grid"===t||"title"===t?!!this.get(t):!function Wct(e){return!1===e||null===e}(this.get(t)))}hasOrientSignalRef(){return ke(this.explicit.orient)}}const Xct={bottom:"top",top:"bottom",left:"right",right:"left"};function Zct(e,t){if(!e)return t.map(n=>n.clone());{if(e.length!==t.length)return;const n=e.length;for(let i=0;i{switch(n){case"title":return _he(r,o);case"gridScale":return{explicit:r.explicit,value:Xn(r.value,o.value)}}return LM(r,o,n,"axis")});e.setWithExplicit(n,i)}return e}function eut(e,t,n,i,r){if("disable"===t)return void 0!==n;switch(n=n||{},t){case"titleAngle":case"labelAngle":return e===(ke(n.labelAngle)?n.labelAngle:zb(n.labelAngle));case"values":return!!n.values;case"encode":return!!n.encoding||!!n.labelAngle;case"title":if(e===wme(i,r))return!0}return e===n[t]}const tut=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function nut(e,t){let n=t.axis(e);const i=new Bj,r=Ti(t.encoding[e]),{mark:o,config:s}=t,a=n?.orient||s["x"===e?"axisX":"axisY"]?.orient||s.axis?.orient||function Vat(e){return"x"===e?"bottom":"left"}(e),l=t.getScaleComponent(e).get("type"),c=function Rat(e,t,n,i){const r="band"===t?["axisDiscrete","axisBand"]:"point"===t?["axisDiscrete","axisPoint"]:Xhe(t)?["axisQuantitative"]:"time"===t||"utc"===t?["axisTemporal"]:[],o="x"===e?"axisX":"axisY",s=ke(n)?"axisOrient":`axis${Ub(n)}`,a=[...r,...r.map(c=>o+c.substr(4))],l=["axis",s,o];return{vlOnlyAxisConfig:_me(a,i,e,n),vgAxisConfig:_me(l,i,e,n),axisConfigStyle:Fat([...l,...a],i)}}(e,l,a,t.config),u=void 0!==n?!n:pj("disable",s.style,n?.style,c).configValue;if(i.set("disable",u,void 0!==n),u)return i;n=n||{};const d=function $at(e,t,n,i,r){const o=t?.labelAngle;if(void 0!==o)return ke(o)?o:zb(o);{const{configValue:s}=pj("labelAngle",i,t?.style,r);return void 0!==s?zb(s):n!==In||!pt([y6,_6],e.type)||he(e)&&e.timeUnit?void 0:270}}(r,n,e,s.style,c),f=hpe(n.formatType,r,l),h=fpe(r,r.type,n.format,n.formatType,s,!0),p={fieldOrDatumDef:r,axis:n,channel:e,model:t,scaleType:l,orient:a,labelAngle:d,format:h,formatType:f,mark:o,config:s};for(const _ of __e){const y=_ in yme?yme[_](p):Rpe(_)?n[_]:void 0,v=void 0!==y,b=eut(y,_,n,t,e);if(v&&b)i.set(_,y,b);else{const{configValue:w,configFrom:C}=Rpe(_)&&"values"!==_?pj(_,s.style,n.style,c):{},E=void 0!==w;v&&!E?i.set(_,y,b):("vgAxisConfig"!==C||tut.has(_)&&E||nw(w)||ke(w))&&i.set(_,w,!1)}}const g=n.encoding??{},m=Ipe.reduce((_,y)=>{if(!i.hasAxisPart(y))return _;const v=Ame(g[y]??{},t),b="labels"===y?function Yct(e,t,n){const{encoding:i,config:r}=e,o=Ti(i[t])??Ti(i[ic(t)]),s=e.axis(t)||{},{format:a,formatType:l}=s;if(pp(l))return{text:qa({fieldOrDatumDef:o,field:"datum.value",format:a,formatType:l,config:r}),...n};if(void 0===a&&void 0===l&&r.customFormatTypes){if("quantitative"===q_(o)){if(Y_(o)&&"normalize"===o.stack&&r.normalizedNumberFormatType)return{text:qa({fieldOrDatumDef:o,field:"datum.value",format:r.normalizedNumberFormat,formatType:r.normalizedNumberFormatType,config:r}),...n};if(r.numberFormatType)return{text:qa({fieldOrDatumDef:o,field:"datum.value",format:r.numberFormat,formatType:r.numberFormatType,config:r}),...n}}if("temporal"===q_(o)&&r.timeFormatType&&he(o)&&!o.timeUnit)return{text:qa({fieldOrDatumDef:o,field:"datum.value",format:r.timeFormat,formatType:r.timeFormatType,config:r}),...n}}return n}(t,e,v):v;return void 0!==b&&!Zt(b)&&(_[y]={update:b}),_},{});return Zt(m)||i.set("encode",m,!!n.encoding||void 0!==n.labelAngle),i}function jj(e,t){const{config:n}=e;return{...qs(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...to("x",e,{defaultPos:"mid"}),...to("y",e,{defaultPos:"mid"}),...sr("size",e),...sr("angle",e),...dut(e,0,t)}}function dut(e,t,n){return n?{shape:{value:n}}:sr("shape",e)}function yut(e,t,n){if(void 0===en("align",e,n))return"center"}function vut(e,t,n){if(void 0===en("baseline",e,n))return"middle"}const cN={arc:{vgMark:"arc",encodeEntry:e=>({...qs(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...to("x",e,{defaultPos:"mid"}),...to("y",e,{defaultPos:"mid"}),...wu(e,"radius"),...wu(e,"theta")})},area:{vgMark:"area",encodeEntry:e=>({...qs(e,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"}),...VM("x",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"horizontal"===e.markDef.orient}),...VM("y",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"vertical"===e.markDef.orient}),...cj(e)})},bar:{vgMark:"rect",encodeEntry:e=>({...qs(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...wu(e,"x"),...wu(e,"y")})},circle:{vgMark:"symbol",encodeEntry:e=>jj(e,"circle")},geoshape:{vgMark:"shape",encodeEntry:e=>({...qs(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})}),postEncodingTransform:e=>{const{encoding:t}=e,n=t.shape;return[{type:"geoshape",projection:e.projectionName(),...n&&he(n)&&n.type===G_?{field:ve(n,{expr:"datum"})}:{}}]}},image:{vgMark:"image",encodeEntry:e=>({...qs(e,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"}),...wu(e,"x"),...wu(e,"y"),...aj(e,"url")})},line:{vgMark:"line",encodeEntry:e=>({...qs(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...to("x",e,{defaultPos:"mid"}),...to("y",e,{defaultPos:"mid"}),...sr("size",e,{vgChannel:"strokeWidth"}),...cj(e)})},point:{vgMark:"symbol",encodeEntry:e=>jj(e)},rect:{vgMark:"rect",encodeEntry:e=>({...qs(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...wu(e,"x"),...wu(e,"y")})},rule:{vgMark:"rule",encodeEntry:e=>{const{markDef:t}=e,n=t.orient;return e.encoding.x||e.encoding.y||e.encoding.latitude||e.encoding.longitude?{...qs(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...VM("x",e,{defaultPos:"horizontal"===n?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"vertical"!==n}),...VM("y",e,{defaultPos:"vertical"===n?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"horizontal"!==n}),...sr("size",e,{vgChannel:"strokeWidth"})}:{}}},square:{vgMark:"symbol",encodeEntry:e=>jj(e,"square")},text:{vgMark:"text",encodeEntry:e=>{const{config:t,encoding:n}=e;return{...qs(e,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"}),...to("x",e,{defaultPos:"mid"}),...to("y",e,{defaultPos:"mid"}),...aj(e),...sr("size",e,{vgChannel:"fontSize"}),...sr("angle",e),...Jge("align",yut(e.markDef,0,t)),...Jge("baseline",vut(e.markDef,0,t)),...to("radius",e,{defaultPos:null}),...to("theta",e,{defaultPos:null})}}},tick:{vgMark:"rect",encodeEntry:e=>{const{config:t,markDef:n}=e,i=n.orient,r="horizontal"===i?"x":"y",o="horizontal"===i?"y":"x",s="horizontal"===i?"height":"width";return{...qs(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...wu(e,r),...to(o,e,{defaultPos:"mid",vgChannel:"y"===o?"yc":"xc"}),[s]:En(en("thickness",n,t))}}},trail:{vgMark:"trail",encodeEntry:e=>({...qs(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...to("x",e,{defaultPos:"mid"}),...to("y",e,{defaultPos:"mid"}),...sr("size",e),...cj(e)})}};const y_e="faceted_path_",v_e="stack_group_";function Vj(e,t={fromPrefix:""}){const{mark:n,markDef:i,encoding:r,config:o}=e,s=Xn(i.clip,function Dut(e){const t=e.getScaleComponent("x"),n=e.getScaleComponent("y");return!(!t?.get("selectionExtent")&&!n?.get("selectionExtent"))||void 0}(e),function Sut(e){const t=e.component.projection;return!(!t||t.isFit)||void 0}(e)),a=fhe(i),l=r.key,c=function Cut(e){const{encoding:t,stack:n,mark:i,markDef:r,config:o}=e,s=t.order;if(!(!te(s)&&Ya(s)&&$4(s.value)||!s&&$4(en("order",r,o)))){if((te(s)||he(s))&&!n)return phe(s,{expr:"datum"});if(ef(i)){const a="horizontal"===r.orient?"y":"x";if(he(t[a]))return{field:a}}}}(e),u=function Tut(e){if(!e.component.selection)return null;const t=se(e.component.selection).length;let n=t,i=e.parent;for(;i&&0===n;)n=se(i.component.selection).length,i=i.parent;return n?{interactive:t>0||"geoshape"===e.mark||!!e.encoding.tooltip||!!e.markDef.tooltip}:null}(e),d=en("aria",i,o),f=cN[n].postEncodingTransform?cN[n].postEncodingTransform(e):null;return[{name:e.getName("marks"),type:cN[n].vgMark,...s?{clip:s}:{},...a?{style:a}:{},...l?{key:l.field}:{},...c?{sort:c}:{},...u||{},...!1===d?{aria:d}:{},from:{data:t.fromPrefix+e.requestDataName(Zn.Main)},encode:{update:cN[n].encodeEntry(e)},...f?{transform:f}:{}}]}class b_e extends f_e{constructor(t,n,i,r={},o){super(t,"unit",n,i,o,void 0,rge(t)?t.view:void 0),this.specifiedScales={},this.specifiedAxes={},this.specifiedLegends={},this.specifiedProjection={},this.selection=[],this.children=[];const s=Wa(t.mark)?{...t.mark}:{type:t.mark},a=s.type;void 0===s.filled&&(s.filled=function dst(e,t,{graticule:n}){if(n)return!1;const i=oc("filled",e,t),r=e.type;return Xn(i,r!==yM&&r!==_M&&r!==vM)}(s,o,{graticule:t.data&&ij(t.data)}));const l=this.encoding=function yot(e,t,n,i){const r={};for(const o of se(e))ehe(o)||de(bit(o));for(let o of Ant){if(!e[o])continue;const s=e[o];if(Wb(o)){const a=xnt(o),l=r[a];if(he(l)&&brt(l.type)&&he(s)&&!l.timeUnit){de(pit(a));continue}}if("angle"===o&&"arc"===t&&!e.theta&&(de("Arc marks uses theta channel rather than angle, replacing angle with theta."),o=Hs),_ot(e,o,t))if(o===du&&"line"===t&&Ka(e[o])?.aggregate)de("Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.");else if(o===Do&&(n?"fill"in e:"stroke"in e))de(xhe("encoding",{fill:"fill"in e,stroke:"stroke"in e}));else if(o===Gb||o===U_&&!te(s)&&!Ya(s)||o===ip&&te(s)){if(s){if(o===U_){const a=e[o];if(wpe(a)){r[o]=a;continue}}r[o]=Ee(s).reduce((a,l)=>(he(l)?a.push(R6(l,o)):de(o6(l,o)),a),[])}}else{if(o===ip&&null===s)r[o]=null;else if(!(he(s)||cc(s)||Ya(s)||Jb(s)||ke(s))){de(o6(s,o));continue}r[o]=Ape(s,o,i)}else de(uM(o,t))}return r}(t.encoding||{},a,s.filled,o);this.markDef=hge(s,l,o),this.size=function iut({encoding:e,size:t}){for(const n of hu){const i=To(n);uc(t[i])&&nf(e[n])&&(delete t[i],de(Mhe(i)))}return t}({encoding:l,size:rge(t)?{...r,...t.width?{width:t.width}:{},...t.height?{height:t.height}:{}}:r}),this.stack=fge(this.markDef,l),this.specifiedScales=this.initScales(a,l),this.specifiedAxes=this.initAxes(l),this.specifiedLegends=this.initLegends(l),this.specifiedProjection=t.projection,this.selection=(t.params??[]).filter(c=>G6(c))}get hasProjection(){const{encoding:t}=this,n=this.mark===ipe,i=t&&Cnt.some(r=>tt(t[r]));return n||i}scaleDomain(t){const n=this.specifiedScales[t];return n?n.domain:void 0}axis(t){return this.specifiedAxes[t]}legend(t){return this.specifiedLegends[t]}initScales(t,n){return Z4.reduce((i,r)=>{const o=Ti(n[r]);return o&&(i[r]=this.initScale(o.scale??{})),i},{})}initScale(t){const{domain:n,range:i}=t,r=rr(t);return te(n)&&(r.domain=n.map(ls)),te(i)&&(r.range=i.map(ls)),r}initAxes(t){return hu.reduce((n,i)=>{const r=t[i];if(tt(r)||i===In&&tt(t.x2)||i===Fi&&tt(t.y2)){const o=tt(r)?r.axis:void 0;n[i]=o&&this.initAxis({...o})}return n},{})}initAxis(t){const n=se(t),i={};for(const r of n){const o=t[r];i[r]=nw(o)?che(o):ls(o)}return i}initLegends(t){return Int.reduce((n,i)=>{const r=Ti(t[i]);if(r&&function Ont(e){switch(e){case Do:case tc:case nc:case du:case So:case fu:case Yd:case Kd:return!0;case Wd:case qd:case np:return!1}}(i)){const o=r.legend;n[i]=o&&rr(o)}return n},{})}parseData(){this.component.data=aN(this)}parseLayoutSize(){!function jct(e){const{size:t,component:n}=e;for(const i of hu){const r=To(i);if(t[r]){const o=t[r];n.layoutSize.set(r,uc(o)?"step":o,!0)}else{const o=Vct(e,r);n.layoutSize.set(r,o,!1)}}}(this)}parseSelections(){this.component.selection=function Nat(e,t){const n={},i=e.config.selection;if(!t||!t.length)return n;for(const r of t){const o=Nn(r.name),s=r.select,a=Ce(s)?s:s.type,l=we(s)?Ze(s):{type:a},c=i[a];for(const f in c)"fields"===f||"encodings"===f||("mark"===f&&(l.mark={...c.mark,...l.mark}),(void 0===l[f]||!0===l[f])&&(l[f]=Ze(c[f]??l[f])));const u=n[o]={...l,name:o,type:a,init:r.value,bind:r.bind,events:Ce(l.on)?Ud(l.on,"scope"):Ee(Ze(l.on))},d=Ze(r);for(const f of HM)f.defined(u)&&f.parse&&f.parse(e,u,d)}return n}(this,this.selection)}parseMarkGroup(){this.component.mark=function but(e){if(pt([_M,gM,Lrt],e.mark)){const t=jpe(e.mark,e.encoding);if(t.length>0)return function wut(e,t){return[{name:e.getName("pathgroup"),type:"group",from:{facet:{name:y_e+e.requestDataName(Zn.Main),data:e.requestDataName(Zn.Main),groupby:t}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:Vj(e,{fromPrefix:y_e})}]}(e,t)}else if(e.mark===mM){const t=t6.some(n=>en(n,e.markDef,e.config));if(e.stack&&!e.fieldDef("size")&&t)return function Eut(e){const[t]=Vj(e,{fromPrefix:v_e}),n=e.scaleName(e.stack.fieldChannel),i=(c={})=>e.vgField(e.stack.fieldChannel,c),r=(c,u)=>`${c}(${[i({prefix:"min",suffix:"start",expr:u}),i({prefix:"max",suffix:"start",expr:u}),i({prefix:"min",suffix:"end",expr:u}),i({prefix:"max",suffix:"end",expr:u})].map(f=>`scale('${n}',${f})`).join(",")})`;let o,s;"x"===e.stack.fieldChannel?(o={...L_(t.encode.update,["y","yc","y2","height",...t6]),x:{signal:r("min","datum")},x2:{signal:r("max","datum")},clip:{value:!0}},s={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},t.encode.update={...Co(t.encode.update,["y","yc","y2"]),height:{field:{group:"height"}}}):(o={...L_(t.encode.update,["x","xc","x2","width"]),y:{signal:r("min","datum")},y2:{signal:r("max","datum")},clip:{value:!0}},s={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},t.encode.update={...Co(t.encode.update,["x","xc","x2"]),width:{field:{group:"width"}}});for(const c of t6){const u=oc(c,e.markDef,e.config);t.encode.update[c]?(o[c]=t.encode.update[c],delete t.encode.update[c]):u&&(o[c]=En(u)),u&&(t.encode.update[c]={value:0})}const a=[];if(e.stack.groupbyChannels?.length>0)for(const c of e.stack.groupbyChannels){const u=e.fieldDef(c),d=ve(u);d&&a.push(d),(u?.bin||u?.timeUnit)&&a.push(ve(u,{binSuffix:"end"}))}return o=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce((c,u)=>{if(t.encode.update[u])return{...c,[u]:t.encode.update[u]};{const d=oc(u,e.markDef,e.config);return void 0!==d?{...c,[u]:En(d)}:c}},o),o.stroke&&(o.strokeForeground={value:!0},o.strokeOffset={value:0}),[{type:"group",from:{facet:{data:e.requestDataName(Zn.Main),name:v_e+e.requestDataName(Zn.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:s},marks:[t]}]}]}(e)}return Vj(e)}(this)}parseAxesAndHeaders(){this.component.axes=function Kct(e){return hu.reduce((t,n)=>(e.component.scales[n]&&(t[n]=[nut(n,e)]),t),{})}(this)}assembleSelectionTopLevelSignals(t){return function Jst(e,t){let n=!1;for(const i of nr(e.component.selection??{})){const r=i.name,o=ge(r+yp);if(0===t.filter(a=>a.name===r).length){const l="point"===i.type?", true, true)":")";t.push({name:i.name,update:`${ume}(${o}, ${ge("global"===i.resolve?"union":i.resolve)}${l}`})}n=!0;for(const a of HM)a.defined(i)&&a.topLevelSignals&&(t=a.topLevelSignals(e,i,t))}return n&&0===t.filter(r=>"unit"===r.name).length&&t.unshift({name:"unit",value:{},on:[{events:"pointermove",update:"isTuple(group()) ? group() : unit"}]}),rj(t)}(this,t)}assembleSignals(){return[...mme(this),...Qst(this,[])]}assembleSelectionData(t){return function eat(e,t){const n=[...t],i=vp(e,{escape:!1});for(const r of nr(e.component.selection??{})){const o={name:r.name+yp};if(r.project.hasSelectionId&&(o.transform=[{type:"collect",sort:{field:Xa}}]),r.init){const a=r.project.items.map(Rge);o.values=r.init.map(r.project.hasSelectionId?l=>({unit:i,[Xa]:_p(l,!1)[0]}):l=>({unit:i,fields:a,values:_p(l,!1)}))}n.filter(a=>a.name===r.name+yp).length||n.push(o)}return n}(this,t)}assembleLayout(){return null}assembleLayoutSignals(){return vj(this)}assembleMarks(){let t=this.component.mark??[];return(!this.parent||!uy(this.parent))&&(t=Fge(this,t)),t.map(this.correctDataNames)}assembleGroupStyle(){const{style:t}=this.view||{};return void 0!==t?t:this.encoding.x||this.encoding.y?"cell":"view"}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(t){return mp(this.encoding,t)}fieldDef(t){return Ka(this.encoding[t])}typedFieldDef(t){const n=this.fieldDef(t);return eo(n)?n:null}}class Uj extends Pj{constructor(t,n,i,r,o){super(t,"layer",n,i,o,t.resolve,t.view);const s={...r,...t.width?{width:t.width}:{},...t.height?{height:t.height}:{}};this.children=t.layer.map((a,l)=>{if(PM(a))return new Uj(a,this,this.getName(`layer_${l}`),s,o);if(_u(a))return new b_e(a,this,this.getName(`layer_${l}`),s,o);throw new Error(i6(a))})}parseData(){this.component.data=aN(this);for(const t of this.children)t.parseData()}parseLayoutSize(){!function $ct(e){Lj(e),sN(e,"width"),sN(e,"height")}(this)}parseSelections(){this.component.selection={};for(const t of this.children){t.parseSelections();for(const n of se(t.component.selection))this.component.selection[n]=t.component.selection[n]}}parseMarkGroup(){for(const t of this.children)t.parseMarkGroup()}parseAxesAndHeaders(){!function Qct(e){const{axes:t,resolve:n}=e.component,i={top:0,bottom:0,right:0,left:0};for(const r of e.children){r.parseAxesAndHeaders();for(const o of se(r.component.axes))n.axis[o]=bj(e.component.resolve,o),"shared"===n.axis[o]&&(t[o]=Zct(t[o],r.component.axes[o]),t[o]||(n.axis[o]="independent",delete t[o]))}for(const r of hu){for(const o of e.children)if(o.component.axes[r]){if("independent"===n.axis[r]){t[r]=(t[r]??[]).concat(o.component.axes[r]);for(const s of o.component.axes[r]){const{value:a,explicit:l}=s.getWithExplicit("orient");if(!ke(a)){if(i[a]>0&&!l){const c=Xct[a];i[a]>i[c]&&s.set("orient",c,!1)}i[a]++}}}delete o.component.axes[r]}if("independent"===n.axis[r]&&t[r]&&t[r].length>1)for(const[o,s]of(t[r]||[]).entries())o>0&&s.get("grid")&&!s.explicit.grid&&(s.implicit.grid=!1)}}(this)}assembleSelectionTopLevelSignals(t){return this.children.reduce((n,i)=>i.assembleSelectionTopLevelSignals(n),t)}assembleSignals(){return this.children.reduce((t,n)=>t.concat(n.assembleSignals()),mme(this))}assembleLayoutSignals(){return this.children.reduce((t,n)=>t.concat(n.assembleLayoutSignals()),vj(this))}assembleSelectionData(t){return this.children.reduce((n,i)=>i.assembleSelectionData(n),t)}assembleGroupStyle(){const t=new Set;for(const i of this.children)for(const r of Ee(i.assembleGroupStyle()))t.add(r);const n=Array.from(t);return n.length>1?n:1===n.length?n[0]:void 0}assembleTitle(){let t=super.assembleTitle();if(t)return t;for(const n of this.children)if(t=n.assembleTitle(),t)return t}assembleLayout(){return null}assembleMarks(){return function tat(e,t){for(const n of e.children)On(n)&&(t=Fge(n,t));return t}(this,this.children.flatMap(t=>t.assembleMarks()))}assembleLegends(){return this.children.reduce((t,n)=>t.concat(n.assembleLegends()),Bme(this))}}function zj(e,t,n,i,r){if(EM(e))return new fw(e,t,n,r);if(PM(e))return new Uj(e,t,n,i,r);if(_u(e))return new b_e(e,t,n,i,r);if(function jot(e){return RM(e)||q6(e)||W6(e)}(e))return new Gct(e,t,n,r);throw new Error(i6(e))}function xut(e,t={}){t.logger&&function Jit(e){sc=e}(t.logger),t.fieldTitle&&xpe(t.fieldTitle);try{const n=uge(Sm(t.config,e.config)),i=Tge(e,n),r=zj(i,null,"",void 0,n);return r.parse(),function Zlt(e,t){Mj(e.sources);let n=0,i=0;for(let r=0;r"width"!==h.name&&"height"!==h.name||void 0===h.value||(t[h.name]=+h.value,!1));const{params:d,...f}=t;return{$schema:"https://vega.github.io/schema/vega/v5.json",...e.description?{description:e.description}:{},...f,...a?{title:a}:{},...l?{style:l}:{},...c?{encode:{update:c}}:{},data:o,...s.length>0?{projections:s}:{},...e.assembleGroup([...u,...e.assembleSelectionTopLevelSignals([]),...nge(d)]),...r?{config:r}:{},...i?{usermeta:i}:{}}}const Nut="5.21.0",w_e=function Iut(e){const[t,n]=/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1,3);return{library:t,version:n}};const fy="#fff",Qut={background:"#333",view:{stroke:"#888"},title:{color:fy,subtitleColor:fy},style:{"guide-label":{fill:fy},"guide-title":{fill:fy}},axis:{domainColor:fy,gridColor:"#888",tickColor:fy}},Dp="#4572a7",Zut={background:"#fff",arc:{fill:Dp},area:{fill:Dp},line:{stroke:Dp,strokeWidth:2},path:{stroke:Dp},rect:{fill:Dp},shape:{stroke:Dp},symbol:{fill:Dp,strokeWidth:1.5,size:50},axis:{bandPosition:.5,grid:!0,gridColor:"#000000",gridOpacity:1,gridWidth:.5,labelPadding:10,tickSize:5,tickWidth:.5},axisBand:{grid:!1,tickExtra:!0},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:50,symbolType:"square"},range:{category:["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]}},Sp="#30a2da",Hj="#cbcbcb",tdt={arc:{fill:Sp},area:{fill:Sp},axis:{domainColor:Hj,grid:!0,gridColor:Hj,gridWidth:1,labelColor:"#999",labelFontSize:10,titleColor:"#333",tickColor:Hj,tickSize:10,titleFontSize:14,titlePadding:10,labelPadding:4},axisBand:{grid:!1},background:"#f0f0f0",group:{fill:"#f0f0f0"},legend:{labelColor:"#333",labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:"#333",titleFontSize:14,titlePadding:10},line:{stroke:Sp,strokeWidth:2},path:{stroke:Sp,strokeWidth:.5},rect:{fill:Sp},range:{category:["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],diverging:["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],heatmap:["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},point:{filled:!0,shape:"circle"},shape:{stroke:Sp},bar:{binSpacing:2,fill:Sp,stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},Tp="#000",ndt={group:{fill:"#e5e5e5"},arc:{fill:Tp},area:{fill:Tp},line:{stroke:Tp},path:{stroke:Tp},rect:{fill:Tp},shape:{stroke:Tp},symbol:{fill:Tp,size:40},axis:{domain:!1,grid:!0,gridColor:"#FFFFFF",gridOpacity:1,labelColor:"#7F7F7F",labelPadding:4,tickColor:"#7F7F7F",tickSize:5.67,titleFontSize:16,titleFontWeight:"normal"},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:40},range:{category:["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]}},S_e="Benton Gothic, sans-serif",xp="#82c6df",Gj="Benton Gothic Bold, sans-serif",hw={"category-6":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"fire-7":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"fireandice-6":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"],"ice-7":["#edefee","#dadfe2","#c4ccd2","#a6b7c6","#849eae","#607785","#47525d"]},sdt={background:"#ffffff",title:{anchor:"start",color:"#000000",font:Gj,fontSize:22,fontWeight:"normal"},arc:{fill:xp},area:{fill:xp},line:{stroke:xp,strokeWidth:2},path:{stroke:xp},rect:{fill:xp},shape:{stroke:xp},symbol:{fill:xp,size:30},axis:{labelFont:S_e,labelFontSize:11.5,labelFontWeight:"normal",titleFont:Gj,titleFontSize:13,titleFontWeight:"normal"},axisX:{labelAngle:0,labelPadding:4,tickSize:3},axisY:{labelBaseline:"middle",maxExtent:45,minExtent:45,tickSize:2,titleAlign:"left",titleAngle:0,titleX:-45,titleY:-11},legend:{labelFont:S_e,labelFontSize:11.5,symbolType:"square",titleFont:Gj,titleFontSize:13,titleFontWeight:"normal"},range:{category:hw["category-6"],diverging:hw["fireandice-6"],heatmap:hw["fire-7"],ordinal:hw["fire-7"],ramp:hw["fire-7"]}},Ap="#ab5787",uN="#979797",adt={background:"#f9f9f9",arc:{fill:Ap},area:{fill:Ap},line:{stroke:Ap},path:{stroke:Ap},rect:{fill:Ap},shape:{stroke:Ap},symbol:{fill:Ap,size:30},axis:{domainColor:uN,domainWidth:.5,gridWidth:.2,labelColor:uN,tickColor:uN,tickWidth:.2,titleColor:uN},axisBand:{grid:!1},axisX:{grid:!0,tickSize:10},axisY:{domain:!1,grid:!0,tickSize:0},legend:{labelFontSize:11,padding:1,symbolSize:30,symbolType:"square"},range:{category:["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]}},Mp="#3e5c69",ldt={background:"#fff",arc:{fill:Mp},area:{fill:Mp},line:{stroke:Mp},path:{stroke:Mp},rect:{fill:Mp},shape:{stroke:Mp},symbol:{fill:Mp},axis:{domainWidth:.5,grid:!0,labelPadding:2,tickSize:5,tickWidth:.5,titleFontWeight:"normal"},axisBand:{grid:!1},axisX:{gridWidth:.2},axisY:{gridDash:[3],gridWidth:.4},legend:{labelFontSize:11,padding:1,symbolType:"square"},range:{category:["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]}},Ys="#1696d2",dN="Lato",Wj="Lato",pw={"main-colors":["#1696d2","#d2d2d2","#000000","#fdbf11","#ec008b","#55b748","#5c5859","#db2b27"],"shades-blue":["#CFE8F3","#A2D4EC","#73BFE2","#46ABDB","#1696D2","#12719E","#0A4C6A","#062635"],"shades-gray":["#F5F5F5","#ECECEC","#E3E3E3","#DCDBDB","#D2D2D2","#9D9D9D","#696969","#353535"],"shades-yellow":["#FFF2CF","#FCE39E","#FDD870","#FCCB41","#FDBF11","#E88E2D","#CA5800","#843215"],"shades-magenta":["#F5CBDF","#EB99C2","#E46AA7","#E54096","#EC008B","#AF1F6B","#761548","#351123"],"shades-green":["#DCEDD9","#BCDEB4","#98CF90","#78C26D","#55B748","#408941","#2C5C2D","#1A2E19"],"shades-black":["#D5D5D4","#ADABAC","#848081","#5C5859","#332D2F","#262223","#1A1717","#0E0C0D"],"shades-red":["#F8D5D4","#F1AAA9","#E9807D","#E25552","#DB2B27","#A4201D","#6E1614","#370B0A"],"one-group":["#1696d2","#000000"],"two-groups-cat-1":["#1696d2","#000000"],"two-groups-cat-2":["#1696d2","#fdbf11"],"two-groups-cat-3":["#1696d2","#db2b27"],"two-groups-seq":["#a2d4ec","#1696d2"],"three-groups-cat":["#1696d2","#fdbf11","#000000"],"three-groups-seq":["#a2d4ec","#1696d2","#0a4c6a"],"four-groups-cat-1":["#000000","#d2d2d2","#fdbf11","#1696d2"],"four-groups-cat-2":["#1696d2","#ec0008b","#fdbf11","#5c5859"],"four-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a"],"five-groups-cat-1":["#1696d2","#fdbf11","#d2d2d2","#ec008b","#000000"],"five-groups-cat-2":["#1696d2","#0a4c6a","#d2d2d2","#fdbf11","#332d2f"],"five-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a","#000000"],"six-groups-cat-1":["#1696d2","#ec008b","#fdbf11","#000000","#d2d2d2","#55b748"],"six-groups-cat-2":["#1696d2","#d2d2d2","#ec008b","#fdbf11","#332d2f","#0a4c6a"],"six-groups-seq":["#cfe8f3","#a2d4ec","#73bfe2","#46abdb","#1696d2","#12719e"],"diverging-colors":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"]},hdt={background:"#FFFFFF",title:{anchor:"start",fontSize:18,font:dN},axisX:{domain:!0,domainColor:"#000000",domainWidth:1,grid:!1,labelFontSize:12,labelFont:Wj,labelAngle:0,tickColor:"#000000",tickSize:5,titleFontSize:12,titlePadding:10,titleFont:dN},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:"#DEDDDD",gridWidth:1,labelFontSize:12,labelFont:Wj,labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:dN,titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:Wj,symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:dN,orient:"right",offset:10},view:{stroke:"transparent"},range:{category:pw["six-groups-cat-1"],diverging:pw["diverging-colors"],heatmap:pw["diverging-colors"],ordinal:pw["six-groups-seq"],ramp:pw["shades-blue"]},area:{fill:Ys},rect:{fill:Ys},line:{color:Ys,stroke:Ys,strokeWidth:5},trail:{color:Ys,stroke:Ys,strokeWidth:0,size:1},path:{stroke:Ys,strokeWidth:.5},point:{filled:!0},text:{font:"Lato",color:Ys,fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:Ys,stroke:null}},arc:{fill:Ys},shape:{stroke:Ys},symbol:{fill:Ys,size:30}},Np="#3366CC",fN="Arial, sans-serif",pdt={arc:{fill:Np},area:{fill:Np},path:{stroke:Np},rect:{fill:Np},shape:{stroke:Np},symbol:{stroke:Np},circle:{fill:Np},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:fN,fontSize:12},"guide-title":{font:fN,fontSize:12},"group-title":{font:fN,fontSize:12}},title:{font:fN,fontSize:14,fontWeight:"bold",dy:-3,anchor:"start"},axis:{gridColor:"#ccc",tickColor:"#ccc",domain:!1,grid:!0},range:{category:["#4285F4","#DB4437","#F4B400","#0F9D58","#AB47BC","#00ACC1","#FF7043","#9E9D24","#5C6BC0","#F06292","#00796B","#C2185B"],heatmap:["#c6dafc","#5e97f6","#2a56c6"]}},qj=e=>e*(1/3+1),I_e=qj(9),k_e=qj(10),O_e=qj(12),gw="Segoe UI",R_e="wf_standard-font, helvetica, arial, sans-serif",mw="#605E5C",P_e="transparent",Ja="#118DFF",B_e=["#DEEFFF",Ja],Cdt={view:{stroke:P_e},background:P_e,font:gw,header:{titleFont:R_e,titleFontSize:O_e,titleColor:"#252423",labelFont:gw,labelFontSize:k_e,labelColor:mw},axis:{ticks:!1,grid:!1,domain:!1,labelColor:mw,labelFontSize:I_e,titleFont:R_e,titleColor:"#252423",titleFontSize:O_e,titleFontWeight:"normal"},axisQuantitative:{tickCount:3,grid:!0,gridColor:"#C8C6C4",gridDash:[1,5],labelFlush:!1},axisBand:{tickExtra:!0},axisX:{labelPadding:5},axisY:{labelPadding:10},bar:{fill:Ja},line:{stroke:Ja,strokeWidth:3,strokeCap:"round",strokeJoin:"round"},text:{font:gw,fontSize:I_e,fill:mw},arc:{fill:Ja},area:{fill:Ja,line:!0,opacity:.6},path:{stroke:Ja},rect:{fill:Ja},point:{fill:Ja,filled:!0,size:75},shape:{stroke:Ja},symbol:{fill:Ja,strokeWidth:1.5,size:50},legend:{titleFont:gw,titleFontWeight:"bold",titleColor:mw,labelFont:gw,labelFontSize:k_e,labelColor:mw,symbolType:"circle",symbolSize:75},range:{category:[Ja,"#12239E","#E66C37","#6B007B","#E044A7","#744EC2","#D9B300","#D64550"],diverging:B_e,heatmap:B_e,ordinal:["#DEEFFF","#c7e4ff","#b0d9ff","#9aceff","#83c3ff","#6cb9ff","#55aeff","#3fa3ff","#2898ff",Ja]}},Yj='IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,".sfnstext-regular",sans-serif',hN={textPrimary:{g90:"#f4f4f4",g100:"#f4f4f4",white:"#161616",g10:"#161616"},textSecondary:{g90:"#c6c6c6",g100:"#c6c6c6",white:"#525252",g10:"#525252"},layerAccent01:{white:"#e0e0e0",g10:"#e0e0e0",g90:"#525252",g100:"#393939"},gridBg:{white:"#ffffff",g10:"#ffffff",g90:"#161616",g100:"#161616"}},Sdt=["#8a3ffc","#33b1ff","#007d79","#ff7eb6","#fa4d56","#fff1f1","#6fdc8c","#4589ff","#d12771","#d2a106","#08bdba","#bae6ff","#ba4e00","#d4bbff"],Tdt=["#6929c4","#1192e8","#005d5d","#9f1853","#fa4d56","#570408","#198038","#002d9c","#ee538b","#b28600","#009d9a","#012749","#8a3800","#a56eff"];function pN({theme:e,background:t}){const n=["white","g10"].includes(e)?"light":"dark",i=hN.gridBg[e],r=hN.textPrimary[e],o=hN.textSecondary[e],a="dark"===n?"#d4bbff":"#6929c4";return{background:t,arc:{fill:a},area:{fill:a},path:{stroke:a},rect:{fill:a},shape:{stroke:a},symbol:{stroke:a},circle:{fill:a},view:{fill:i,stroke:i},group:{fill:i},title:{color:r,anchor:"start",dy:-15,fontSize:16,font:Yj,fontWeight:600},axis:{labelColor:o,labelFontSize:12,labelFont:'IBM Plex Sans Condensed, system-ui, -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", sans-serif',labelFontWeight:400,titleColor:r,titleFontWeight:600,titleFontSize:12,grid:!0,gridColor:hN.layerAccent01[e],labelAngle:0},axisX:{titlePadding:10},axisY:{titlePadding:2.5},style:{"guide-label":{font:Yj,fill:o,fontWeight:400},"guide-title":{font:Yj,fill:o,fontWeight:400}},range:{category:"dark"===n?Sdt:Tdt,diverging:["#750e13","#a2191f","#da1e28","#fa4d56","#ff8389","#ffb3b8","#ffd7d9","#fff1f1","#e5f6ff","#bae6ff","#82cfff","#33b1ff","#1192e8","#0072c3","#00539a","#003a6d"],heatmap:["#f6f2ff","#e8daff","#d4bbff","#be95ff","#a56eff","#8a3ffc","#6929c4","#491d8b","#31135e","#1c0f30"]}}}const xdt=pN({theme:"white",background:"#ffffff"}),Adt=pN({theme:"g10",background:"#f4f4f4"}),Mdt=pN({theme:"g90",background:"#262626"}),Ndt=pN({theme:"g100",background:"#161616"}),Idt="2.15.0";function j_e(e,t){return JSON.stringify(e,function eft(e){const t=[];return function(n,i){if("object"!=typeof i||null===i)return i;const r=t.indexOf(this)+1;return t.length=r,t.length>e?"[Object]":t.indexOf(i)>=0?"[Circular]":(t.push(i),i)}}(t))}const V_e="vg-tooltip-element",nft={offsetX:10,offsetY:10,id:V_e,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:function ift(e){return String(e).replace(/&/g,"&").replace(/t(Ce(r)?r:j_e(r,n))).join(", ")}]`;if(we(e)){let r="";const{title:o,image:s,...a}=e;o&&(r+=`

${t(o)}

`),s&&(r+=``);const l=Object.keys(a);if(l.length>0){r+="";for(const c of l){let u=a[c];void 0!==u&&(we(u)&&(u=j_e(u,n)),r+=``)}r+="
${t(c)}${t(u)}
"}return r||"{}"}return t(e)},baseURL:"",anchor:"cursor",position:["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"]};function U_e(e,t,{offsetX:n,offsetY:i}){const r=z_e({x1:e.clientX,x2:e.clientX,y1:e.clientY,y2:e.clientY},t,n,i),o=["bottom-right","bottom-left","top-right","top-left"];for(const s of o)if(H_e(r[s],t))return r[s];return r["top-left"]}function z_e(e,t,n,i){const s=e.x1-t.width-n,a=(e.x1+e.x2)/2-t.width/2,l=e.x2+n,c=e.y1-t.height-i,u=(e.y1+e.y2)/2-t.height/2,d=e.y2+i;return{top:{x:a,y:c},bottom:{x:a,y:d},left:{x:s,y:u},right:{x:l,y:u},"top-left":{x:s,y:c},"top-right":{x:l,y:c},"bottom-left":{x:s,y:d},"bottom-right":{x:l,y:d}}}function H_e(e,t){return e.x>=0&&e.y>=0&&e.x+t.width<=window.innerWidth&&e.y+t.height<=window.innerHeight}function aft(e,t,n){return e.clientX>=t.x&&e.clientX<=t.x+n.width&&e.clientY>=t.y&&e.clientY<=t.y+n.height}class G_e{constructor(t){this.options={...nft,...t};const n=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const i=document.createElement("style");i.setAttribute("id",this.options.styleId),i.innerHTML=function rft(e){if(!/^[A-Za-z]+[-:.\w]*$/.test(e))throw new Error("Invalid HTML ID");return"#vg-tooltip-element {\n visibility: hidden;\n padding: 8px;\n position: fixed;\n z-index: 1000;\n font-family: sans-serif;\n font-size: 11px;\n border-radius: 3px;\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);\n /* The default theme is the light theme. */\n background-color: rgba(255, 255, 255, 0.95);\n border: 1px solid #d9d9d9;\n color: black;\n}\n#vg-tooltip-element.visible {\n visibility: visible;\n}\n#vg-tooltip-element h2 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 13px;\n}\n#vg-tooltip-element table {\n border-spacing: 0;\n}\n#vg-tooltip-element table tr {\n border: none;\n}\n#vg-tooltip-element table tr td {\n overflow: hidden;\n text-overflow: ellipsis;\n padding-top: 2px;\n padding-bottom: 2px;\n}\n#vg-tooltip-element table tr td.key {\n color: #808080;\n max-width: 150px;\n text-align: right;\n padding-right: 4px;\n}\n#vg-tooltip-element table tr td.value {\n display: block;\n max-width: 300px;\n max-height: 7em;\n text-align: left;\n}\n#vg-tooltip-element.dark-theme {\n background-color: rgba(32, 32, 32, 0.9);\n border: 1px solid #f5f5f5;\n color: white;\n}\n#vg-tooltip-element.dark-theme td.key {\n color: #bfbfbf;\n}\n".toString().replace(V_e,e)}(n);const r=document.head;r.childNodes.length>0?r.insertBefore(i,r.childNodes[0]):r.appendChild(i)}}tooltipHandler(t,n,i,r){if(this.el=document.getElementById(this.options.id),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip"),(document.fullscreenElement??document.body).appendChild(this.el)),null==r||""===r)return void this.el.classList.remove("visible",`${this.options.theme}-theme`);this.el.innerHTML=this.options.formatTooltip(r,this.options.sanitize,this.options.maxDepth,this.options.baseURL),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:o,y:s}="mark"===this.options.anchor?function oft(e,t,n,i,r){const{position:o,offsetX:s,offsetY:a}=r,u=function sft(e,t,n){const i=n.isVoronoi?n.datum.bounds:n.bounds;let r=e.left+t[0]+i.x1,o=e.top+t[1]+i.y1,s=n;for(;s.mark.group;)s=s.mark.group,r+=s.x??0,o+=s.y??0;return{x1:r,x2:r+(i.x2-i.x1),y1:o,y2:o+(i.y2-i.y1)}}(e._el.getBoundingClientRect(),e._origin,n),d=z_e(u,i,s,a),f=Array.isArray(o)?o:[o];for(const h of f)if(H_e(d[h],i)&&!aft(t,d[h],i))return d[h];return U_e(t,i,r)}(t,n,i,this.el.getBoundingClientRect(),this.options):U_e(n,this.el.getBoundingClientRect(),this.options);this.el.style.top=`${s}px`,this.el.style.left=`${o}px`}}var lft=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var o in r)r.hasOwnProperty(o)&&(i[o]=r[o])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cft=Object.prototype.hasOwnProperty;function Xj(e,t){return cft.call(e,t)}function Qj(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n=48&&i<=57))return!1;t++}return!0}function Ip(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function W_e(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Jj(e){if(void 0===e)return!0;if(e)if(Array.isArray(e)){for(var t=0,n=e.length;t0&&"constructor"==l[u-1]))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&void 0===f&&(void 0===c[h]?f=l.slice(0,u).join("/"):u==d-1&&(f=t.path),void 0!==f&&p(t,0,e,f)),u++,Array.isArray(c)){if("-"===h)h=c.length;else{if(n&&!Zj(h))throw new Vn("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",o,t,e);Zj(h)&&(h=~~h)}if(u>=d){if(n&&"add"===t.op&&h>c.length)throw new Vn("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",o,t,e);if(!1===(s=dft[t.op].call(t,c,h,e)).test)throw new Vn("Test operation failed","TEST_OPERATION_FAILED",o,t,e);return s}}else if(u>=d){if(!1===(s=hy[t.op].call(t,c,h,e)).test)throw new Vn("Test operation failed","TEST_OPERATION_FAILED",o,t,e);return s}if(c=c[h],n&&u0)throw new Vn('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new Vn("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new Vn("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&Jj(e.value))throw new Vn("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n)if("add"==e.op){var r=e.path.split("/").length,o=i.split("/").length;if(r!==o+1&&r!==o)throw new Vn("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==i)throw new Vn("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if("move"===e.op||"copy"===e.op){var a=K_e([{op:"_get",path:e.from,value:void 0}],n);if(a&&"OPERATION_PATH_UNRESOLVABLE"===a.name)throw new Vn("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}function K_e(e,t,n){try{if(!Array.isArray(e))throw new Vn("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)mN(ds(t),ds(e),n||!0);else{n=n||_N;for(var i=0;i0&&(e.patches=[],e.callback&&e.callback(i)),i}function nV(e,t,n,i,r){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var o=Qj(t),s=Qj(e),a=!1,l=s.length-1;l>=0;l--){var u=e[c=s[l]];if(!Xj(t,c)||void 0===t[c]&&void 0!==u&&!1===Array.isArray(t))Array.isArray(e)===Array.isArray(t)?(r&&n.push({op:"test",path:i+"/"+Ip(c),value:ds(u)}),n.push({op:"remove",path:i+"/"+Ip(c)}),a=!0):(r&&n.push({op:"test",path:i,value:e}),n.push({op:"replace",path:i,value:t}));else{var d=t[c];"object"==typeof u&&null!=u&&"object"==typeof d&&null!=d&&Array.isArray(u)===Array.isArray(d)?nV(u,d,n,i+"/"+Ip(c),r):u!==d&&(r&&n.push({op:"test",path:i+"/"+Ip(c),value:ds(u)}),n.push({op:"replace",path:i+"/"+Ip(c),value:ds(d)}))}}if(a||o.length!=s.length)for(l=0;li?"object"!=typeof i?e:i:t}Object.assign({},hft,Object.freeze({__proto__:null,compare:function wft(e,t,n){void 0===n&&(n=!1);var i=[];return nV(e,t,i,"",n),i},generate:tV,observe:function bft(e,t){var i,r=function mft(e){return eV.get(e)}(e);if(r){var o=function _ft(e,t){return e.observers.get(t)}(r,t);i=o&&o.observer}else r=new pft(e),eV.set(e,r);if(i)return i;if(i={},r.value=ds(e),t){i.callback=t,i.next=null;var s=function(){tV(i)},a=function(){clearTimeout(i.next),i.next=setTimeout(s)};typeof window<"u"&&(window.addEventListener("mouseup",a),window.addEventListener("keyup",a),window.addEventListener("mousedown",a),window.addEventListener("keydown",a),window.addEventListener("change",a))}return i.patches=[],i.object=e,i.unobserve=function(){tV(i),clearTimeout(i.next),function yft(e,t){e.observers.delete(t.callback)}(r,i),typeof window<"u"&&(window.removeEventListener("mouseup",a),window.removeEventListener("keyup",a),window.removeEventListener("mousedown",a),window.removeEventListener("keydown",a),window.removeEventListener("change",a))},r.observers.set(t,new gft(t,i)),i},unobserve:function vft(e,t){t.unobserve()}}),{JsonPatchError:Y_e,deepClone:ds,escapePathComponent:Ip,unescapePathComponent:W_e});var sV,Z_e,lV,J_e,eye,uV,tye,dV,nye,hV,iye,pV,rye,gV,oye,mV,sye,_V,aye,yV,lye,vV,cye,bV,uye,wV,dye,EV,fye,CV,pye,yN={exports:{}};function aV(){return Z_e?sV:(Z_e=1,sV={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2})}function vN(){return J_e||(J_e=1,lV="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{}),lV}function cV(){return eye||(eye=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:r}=aV(),o=vN(),s=(t=e.exports={}).re=[],a=t.safeRe=[],l=t.src=[],c=t.t={};let u=0;const d="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",r],[d,i]],p=(g,m,_)=>{const y=(g=>{for(const[m,_]of f)g=g.split(`${m}*`).join(`${m}{0,${_}}`).split(`${m}+`).join(`${m}{1,${_}}`);return g})(m),v=u++;o(g,v,m),c[g]=v,l[v]=m,s[v]=new RegExp(m,_?"g":void 0),a[v]=new RegExp(y,_?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),p("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${l[c.NUMERICIDENTIFIER]}|${l[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NUMERICIDENTIFIERLOOSE]}|${l[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${d}+`),p("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),p("FULL",`^${l[c.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),p("LOOSE",`^${l[c.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),p("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),p("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?(?:${l[c.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",l[c.COERCE],!0),p("COERCERTLFULL",l[c.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(yN,yN.exports)),yN.exports}function fV(){if(nye)return dV;nye=1;const e=vN(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=aV(),{safeRe:i,t:r}=cV(),o=oV(),{compareIdentifiers:s}=function Sft(){if(tye)return uV;tye=1;const e=/^[0-9]+$/,t=(i,r)=>{const o=e.test(i),s=e.test(r);return o&&s&&(i=+i,r=+r),i===r?0:o&&!s?-1:s&&!o?1:it(r,i)}}();class a{constructor(c,u){if(u=o(u),c instanceof a){if(c.loose===!!u.loose&&c.includePrerelease===!!u.includePrerelease)return c;c=c.version}else if("string"!=typeof c)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof c}".`);if(c.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",c,u),this.options=u,this.loose=!!u.loose,this.includePrerelease=!!u.includePrerelease;const d=c.trim().match(u.loose?i[r.LOOSE]:i[r.FULL]);if(!d)throw new TypeError(`Invalid Version: ${c}`);if(this.raw=c,this.major=+d[1],this.minor=+d[2],this.patch=+d[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");this.prerelease=d[4]?d[4].split(".").map(f=>{if(/^[0-9]+$/.test(f)){const h=+f;if(h>=0&&h=0;)"number"==typeof this.prerelease[h]&&(this.prerelease[h]++,h=-2);if(-1===h){if(u===this.prerelease.join(".")&&!1===d)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(f)}}if(u){let h=[u,f];!1===d&&(h=[u]),0===s(this.prerelease[0],u)?isNaN(this.prerelease[1])&&(this.prerelease=h):this.prerelease=h}break}default:throw new Error(`invalid increment argument: ${c}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return dV=a}function py(){if(iye)return hV;iye=1;const e=fV();return hV=(n,i,r)=>new e(n,r).compare(new e(i,r))}function hye(){if(fye)return EV;fye=1;const e=/\s+/g;class t{constructor(S,x){if(x=r(x),S instanceof t)return S.loose===!!x.loose&&S.includePrerelease===!!x.includePrerelease?S:new t(S.raw,x);if(S instanceof o)return this.raw=S.value,this.set=[[S]],this.formatted=void 0,this;if(this.options=x,this.loose=!!x.loose,this.includePrerelease=!!x.includePrerelease,this.raw=S.trim().replace(e," "),this.set=this.raw.split("||").map(I=>this.parseRange(I.trim())).filter(I=>I.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const I=this.set[0];if(this.set=this.set.filter(A=>!g(A[0])),0===this.set.length)this.set=[I];else if(this.set.length>1)for(const A of this.set)if(1===A.length&&m(A[0])){this.set=[A];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let S=0;S0&&(this.formatted+="||");const x=this.set[S];for(let I=0;I0&&(this.formatted+=" "),this.formatted+=x[I].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(S){const I=((this.options.includePrerelease&&h)|(this.options.loose&&p))+":"+S,A=i.get(I);if(A)return A;const N=this.options.loose;S=S.replace(N?l[c.HYPHENRANGELOOSE]:l[c.HYPHENRANGE],F(this.options.includePrerelease)),s("hyphen replace",S),S=S.replace(l[c.COMPARATORTRIM],u),s("comparator trim",S),S=S.replace(l[c.TILDETRIM],d),s("tilde trim",S),S=S.replace(l[c.CARETTRIM],f),s("caret trim",S);let $=S.split(" ").map(H=>y(H,this.options)).join(" ").split(/\s+/).map(H=>R(H,this.options));N&&($=$.filter(H=>(s("loose invalid filter",H,this.options),!!H.match(l[c.COMPARATORLOOSE])))),s("range list",$);const B=new Map,V=$.map(H=>new o(H,this.options));for(const H of V){if(g(H))return[H];B.set(H.value,H)}B.size>1&&B.has("")&&B.delete("");const j=[...B.values()];return i.set(I,j),j}intersects(S,x){if(!(S instanceof t))throw new TypeError("a Range is required");return this.set.some(I=>_(I,x)&&S.set.some(A=>_(A,x)&&I.every(N=>A.every(O=>N.intersects(O,x)))))}test(S){if(!S)return!1;if("string"==typeof S)try{S=new a(S,this.options)}catch{return!1}for(let x=0;x=this.max){const o=this.map.keys().next().value;this.delete(o)}this.map.set(n,i)}return this}})}(),i=new n,r=oV(),o=function Oft(){if(dye)return wV;dye=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(u,d){if(d=n(d),u instanceof t){if(u.loose===!!d.loose)return u;u=u.value}u=u.trim().split(/\s+/).join(" "),s("comparator",u,d),this.options=d,this.loose=!!d.loose,this.parse(u),this.value=this.semver===e?"":this.operator+this.semver.version,s("comp",this)}parse(u){const f=u.match(this.options.loose?i[r.COMPARATORLOOSE]:i[r.COMPARATOR]);if(!f)throw new TypeError(`Invalid comparator: ${u}`);this.operator=void 0!==f[1]?f[1]:"","="===this.operator&&(this.operator=""),this.semver=f[2]?new a(f[2],this.options.loose):e}toString(){return this.value}test(u){if(s("Comparator.test",u,this.options.loose),this.semver===e||u===e)return!0;if("string"==typeof u)try{u=new a(u,this.options)}catch{return!1}return o(u,this.operator,this.semver,this.options)}intersects(u,d){if(!(u instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(u.value,d).test(this.value):""===u.operator?""===u.value||new l(this.value,d).test(u.semver):!((d=n(d)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===u.value)||!d.includePrerelease&&(this.value.startsWith("<0.0.0")||u.value.startsWith("<0.0.0"))||!(this.operator.startsWith(">")&&u.operator.startsWith(">")||this.operator.startsWith("<")&&u.operator.startsWith("<")||this.semver.version===u.semver.version&&this.operator.includes("=")&&u.operator.includes("=")||o(this.semver,"<",u.semver,d)&&this.operator.startsWith(">")&&u.operator.startsWith("<")||o(this.semver,">",u.semver,d)&&this.operator.startsWith("<")&&u.operator.startsWith(">")))}}wV=t;const n=oV(),{safeRe:i,t:r}=cV(),o=function kft(){if(uye)return bV;uye=1;const e=function Tft(){if(rye)return pV;rye=1;const e=py();return pV=(n,i,r)=>0===e(n,i,r)}(),t=function xft(){if(oye)return gV;oye=1;const e=py();return gV=(n,i,r)=>0!==e(n,i,r)}(),n=function Aft(){if(sye)return mV;sye=1;const e=py();return mV=(n,i,r)=>e(n,i,r)>0}(),i=function Mft(){if(aye)return _V;aye=1;const e=py();return _V=(n,i,r)=>e(n,i,r)>=0}(),r=function Nft(){if(lye)return yV;lye=1;const e=py();return yV=(n,i,r)=>e(n,i,r)<0}(),o=function Ift(){if(cye)return vV;cye=1;const e=py();return vV=(n,i,r)=>e(n,i,r)<=0}();return bV=(a,l,c,u)=>{switch(l){case"===":return"object"==typeof a&&(a=a.version),"object"==typeof c&&(c=c.version),a===c;case"!==":return"object"==typeof a&&(a=a.version),"object"==typeof c&&(c=c.version),a!==c;case"":case"=":case"==":return e(a,c,u);case"!=":return t(a,c,u);case">":return n(a,c,u);case">=":return i(a,c,u);case"<":return r(a,c,u);case"<=":return o(a,c,u);default:throw new TypeError(`Invalid operator: ${l}`)}}}(),s=vN(),a=fV(),l=hye();return wV}(),s=vN(),a=fV(),{safeRe:l,t:c,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=cV(),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:p}=aV(),g=T=>"<0.0.0-0"===T.value,m=T=>""===T.value,_=(T,S)=>{let x=!0;const I=T.slice();let A=I.pop();for(;x&&I.length;)x=I.every(N=>A.intersects(N,S)),A=I.pop();return x},y=(T,S)=>(s("comp",T,S),T=C(T,S),s("caret",T),T=b(T,S),s("tildes",T),T=D(T,S),s("xrange",T),T=k(T,S),s("stars",T),T),v=T=>!T||"x"===T.toLowerCase()||"*"===T,b=(T,S)=>T.trim().split(/\s+/).map(x=>w(x,S)).join(" "),w=(T,S)=>T.replace(S.loose?l[c.TILDELOOSE]:l[c.TILDE],(I,A,N,O,$)=>{let B;return s("tilde",T,I,A,N,O,$),v(A)?B="":v(N)?B=`>=${A}.0.0 <${+A+1}.0.0-0`:v(O)?B=`>=${A}.${N}.0 <${A}.${+N+1}.0-0`:$?(s("replaceTilde pr",$),B=`>=${A}.${N}.${O}-${$} <${A}.${+N+1}.0-0`):B=`>=${A}.${N}.${O} <${A}.${+N+1}.0-0`,s("tilde return",B),B}),C=(T,S)=>T.trim().split(/\s+/).map(x=>E(x,S)).join(" "),E=(T,S)=>{s("caret",T,S);const I=S.includePrerelease?"-0":"";return T.replace(S.loose?l[c.CARETLOOSE]:l[c.CARET],(A,N,O,$,B)=>{let V;return s("caret",T,A,N,O,$,B),v(N)?V="":v(O)?V=`>=${N}.0.0${I} <${+N+1}.0.0-0`:v($)?V="0"===N?`>=${N}.${O}.0${I} <${N}.${+O+1}.0-0`:`>=${N}.${O}.0${I} <${+N+1}.0.0-0`:B?(s("replaceCaret pr",B),V="0"===N?"0"===O?`>=${N}.${O}.${$}-${B} <${N}.${O}.${+$+1}-0`:`>=${N}.${O}.${$}-${B} <${N}.${+O+1}.0-0`:`>=${N}.${O}.${$}-${B} <${+N+1}.0.0-0`):(s("no pr"),V="0"===N?"0"===O?`>=${N}.${O}.${$}${I} <${N}.${O}.${+$+1}-0`:`>=${N}.${O}.${$}${I} <${N}.${+O+1}.0-0`:`>=${N}.${O}.${$} <${+N+1}.0.0-0`),s("caret return",V),V})},D=(T,S)=>(s("replaceXRanges",T,S),T.split(/\s+/).map(x=>M(x,S)).join(" ")),M=(T,S)=>(T=T.trim()).replace(S.loose?l[c.XRANGELOOSE]:l[c.XRANGE],(I,A,N,O,$,B)=>{s("xRange",T,I,A,N,O,$,B);const V=v(N),j=V||v(O),H=j||v($);return"="===A&&H&&(A=""),B=S.includePrerelease?"-0":"",V?I=">"===A||"<"===A?"<0.0.0-0":"*":A&&H?(j&&(O=0),$=0,">"===A?(A=">=",j?(N=+N+1,O=0,$=0):(O=+O+1,$=0)):"<="===A&&(A="<",j?N=+N+1:O=+O+1),"<"===A&&(B="-0"),I=`${A+N}.${O}.${$}${B}`):j?I=`>=${N}.0.0${B} <${+N+1}.0.0-0`:H&&(I=`>=${N}.${O}.0${B} <${N}.${+O+1}.0-0`),s("xRange return",I),I}),k=(T,S)=>(s("replaceStars",T,S),T.trim().replace(l[c.STAR],"")),R=(T,S)=>(s("replaceGTE0",T,S),T.trim().replace(l[S.includePrerelease?c.GTE0PRE:c.GTE0],"")),F=T=>(S,x,I,A,N,O,$,B,V,j,H,oe)=>`${x=v(I)?"":v(A)?`>=${I}.0.0${T?"-0":""}`:v(N)?`>=${I}.${A}.0${T?"-0":""}`:O?`>=${x}`:`>=${x}${T?"-0":""}`} ${B=v(V)?"":v(j)?`<${+V+1}.0.0-0`:v(H)?`<${V}.${+j+1}.0-0`:oe?`<=${V}.${j}.${H}-${oe}`:T?`<${V}.${j}.${+H+1}-0`:`<=${B}`}`.trim(),P=(T,S,x)=>{for(let I=0;I0){const A=T[I].semver;if(A.major===S.major&&A.minor===S.minor&&A.patch===S.patch)return!0}return!1}return!0};return EV}var gye=Cft(function Rft(){if(pye)return CV;pye=1;const e=hye();return CV=(n,i,r)=>{try{i=new e(i,r)}catch{return!1}return i.test(n)}}()),Lft='.vega-embed {\n position: relative;\n display: inline-block;\n box-sizing: border-box;\n}\n.vega-embed.has-actions {\n padding-right: 38px;\n}\n.vega-embed details:not([open]) > :not(summary) {\n display: none !important;\n}\n.vega-embed summary {\n list-style: none;\n position: absolute;\n top: 0;\n right: 0;\n padding: 6px;\n z-index: 1000;\n background: white;\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);\n color: #1b1e23;\n border: 1px solid #aaa;\n border-radius: 999px;\n opacity: 0.2;\n transition: opacity 0.4s ease-in;\n cursor: pointer;\n line-height: 0px;\n}\n.vega-embed summary::-webkit-details-marker {\n display: none;\n}\n.vega-embed summary:active {\n box-shadow: #aaa 0px 0px 0px 1px inset;\n}\n.vega-embed summary svg {\n width: 14px;\n height: 14px;\n}\n.vega-embed details[open] summary {\n opacity: 0.7;\n}\n.vega-embed:hover summary, .vega-embed:focus-within summary {\n opacity: 1 !important;\n transition: opacity 0.2s ease;\n}\n.vega-embed .vega-actions {\n position: absolute;\n z-index: 1001;\n top: 35px;\n right: -9px;\n display: flex;\n flex-direction: column;\n padding-bottom: 8px;\n padding-top: 8px;\n border-radius: 4px;\n box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);\n border: 1px solid #d9d9d9;\n background: white;\n animation-duration: 0.15s;\n animation-name: scale-in;\n animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);\n text-align: left;\n}\n.vega-embed .vega-actions a {\n padding: 8px 16px;\n font-family: sans-serif;\n font-size: 14px;\n font-weight: 600;\n white-space: nowrap;\n color: #434a56;\n text-decoration: none;\n}\n.vega-embed .vega-actions a:hover, .vega-embed .vega-actions a:focus {\n background-color: #f7f7f9;\n color: black;\n}\n.vega-embed .vega-actions::before, .vega-embed .vega-actions::after {\n content: "";\n display: inline-block;\n position: absolute;\n}\n.vega-embed .vega-actions::before {\n left: auto;\n right: 14px;\n top: -16px;\n border: 8px solid rgba(0, 0, 0, 0);\n border-bottom-color: #d9d9d9;\n}\n.vega-embed .vega-actions::after {\n left: auto;\n right: 15px;\n top: -14px;\n border: 7px solid rgba(0, 0, 0, 0);\n border-bottom-color: #fff;\n}\n.vega-embed .chart-wrapper.fit-x {\n width: 100%;\n}\n.vega-embed .chart-wrapper.fit-y {\n height: 100%;\n}\n\n.vega-embed-wrapper {\n max-width: 100%;\n overflow: auto;\n padding-right: 14px;\n}\n\n@keyframes scale-in {\n from {\n opacity: 0;\n transform: scale(0.6);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n';function mye(e,...t){for(const n of t)$ft(e,n);return e}function $ft(e,t){for(const n of Object.keys(t))Tm(e,n,t[n],!0)}const pc=f2;let yw=h2;const _ye=typeof window<"u"?window:void 0;void 0===yw&&_ye?.vl?.compile&&(yw=_ye.vl);const aht={export:{svg:!0,png:!0},source:!0,compiled:!0,editor:!0},lht={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"},vw={vega:"Vega","vega-lite":"Vega-Lite"},bN={vega:pc.version,"vega-lite":yw?yw.version:"not available"},cht={vega:e=>e,"vega-lite":(e,t)=>yw.compile(e,{config:t}).spec},uht='\n\n \n \n \n',dht="chart-wrapper";function yye(e,t,n,i){const r=`${t}
`,o=`
${n}`,s=window.open("");s.document.write(r+e+o),s.document.title=`${vw[i]} JSON Source`}function vye(e){return!(!e||!("load"in e))}function bye(e){return vye(e)?e:pc.loader(e)}function gy(e,t){return DV.apply(this,arguments)}function DV(){return DV=qn(function*(e,t,n={}){let i,r;Ce(t)?(r=bye(n.loader),i=JSON.parse(yield r.load(t))):i=t;const o=function pht(e){const t=e.usermeta?.embedOptions??{};return Ce(t.defaultStyle)&&(t.defaultStyle=!1),t}(i),s=o.loader;(!r||s)&&(r=bye(n.loader??s));const a=yield wye(o,r),l=yield wye(n,r),c={...mye(l,a),config:Sm(l.config??{},a.config??{})};return yield function mht(e,t){return TV.apply(this,arguments)}(e,i,c,r)}),DV.apply(this,arguments)}function wye(e,t){return SV.apply(this,arguments)}function SV(){return(SV=qn(function*(e,t){const n=Ce(e.config)?JSON.parse(yield t.load(e.config)):e.config??{},i=Ce(e.patch)?JSON.parse(yield t.load(e.patch)):e.patch;return{...e,...i?{patch:i}:{},...n?{config:n}:{}}})).apply(this,arguments)}function TV(){return TV=qn(function*(e,t,n={},i){const r=n.theme?Sm(p2[n.theme],n.config??{}):n.config,o=td(n.actions)?n.actions:mye({},aht,n.actions??{}),s={...lht,...n.i18n},a=n.renderer??"canvas",l=n.logLevel??pc.Warn,c=n.downloadFileName??"visualization",u="string"==typeof e?document.querySelector(e):e;if(!u)throw new Error(`${e} does not exist`);if(!1!==n.defaultStyle){const w="vega-embed-style",{root:C,rootContainer:E}=function ght(e){const t=e.getRootNode?e.getRootNode():document;return t instanceof ShadowRoot?{root:t,rootContainer:t}:{root:document,rootContainer:document.head??document.body}}(u);if(!C.getElementById(w)){const D=document.createElement("style");D.id=w,D.innerHTML=void 0===n.defaultStyle||!0===n.defaultStyle?Lft.toString():n.defaultStyle,E.appendChild(D)}}const d=function hht(e,t){if(e.$schema){const n=w_e(e.$schema);t&&t!==n.library&&console.warn(`The given visualization spec is written in ${vw[n.library]}, but mode argument sets ${vw[t]??t}.`);const i=n.library;return gye(bN[i],`^${n.version.slice(1)}`)||console.warn(`The input spec uses ${vw[i]} ${n.version}, but the current version of ${vw[i]} is v${bN[i]}.`),i}return"mark"in e||"encoding"in e||"layer"in e||"hconcat"in e||"vconcat"in e||"facet"in e||"repeat"in e?"vega-lite":"marks"in e||"signals"in e||"scales"in e||"axes"in e?"vega":t??"vega"}(t,n.mode);let f=cht[d](t,r);if("vega-lite"===d&&f.$schema){const w=w_e(f.$schema);gye(bN.vega,`^${w.version.slice(1)}`)||console.warn(`The compiled spec uses Vega ${w.version}, but current version is v${bN.vega}.`)}u.classList.add("vega-embed"),o&&u.classList.add("has-actions"),u.innerHTML="";let h=u;if(o){const w=document.createElement("div");w.classList.add(dht),u.appendChild(w),h=w}const p=n.patch;if(p&&(f=p instanceof Function?p(f):mN(f,p,!0,!1).newDocument),n.formatLocale&&pc.formatLocale(n.formatLocale),n.timeFormatLocale&&pc.timeFormatLocale(n.timeFormatLocale),n.expressionFunctions)for(const w in n.expressionFunctions){const C=n.expressionFunctions[w];"fn"in C?pc.expressionFunction(w,C.fn,C.visitor):C instanceof Function&&pc.expressionFunction(w,C)}const{ast:g}=n,m=pc.parse(f,"vega-lite"===d?{}:r,{ast:g}),_=new(n.viewClass||pc.View)(m,{loader:i,logLevel:l,renderer:a,...g?{expr:pc.expressionInterpreter??n.expr??mnt}:{}});if(_.addSignalListener("autosize",(w,C)=>{const{type:E}=C;"fit-x"==E?(h.classList.add("fit-x"),h.classList.remove("fit-y")):"fit-y"==E?(h.classList.remove("fit-x"),h.classList.add("fit-y")):"fit"==E?h.classList.add("fit-x","fit-y"):h.classList.remove("fit-x","fit-y")}),!1!==n.tooltip){const{loader:w,tooltip:C}=n,E=w&&!vye(w)?w?.baseURL:void 0,D=function fht(e){return"function"==typeof e}(C)?C:new G_e({baseURL:E,...!0===C?{}:C}).call;_.tooltip(D)}let v,{hover:y}=n;if(void 0===y&&(y="vega"===d),y){const{hoverSet:w,updateSet:C}="boolean"==typeof y?{}:y;_.hover(w,C)}if(n&&(null!=n.width&&_.width(n.width),null!=n.height&&_.height(n.height),null!=n.padding&&_.padding(n.padding)),yield _.initialize(h,n.bind).runAsync(),!1!==o){let w=u;if(!1!==n.defaultStyle||n.forceActionsMenu){const E=document.createElement("details");E.title=s.CLICK_TO_VIEW_ACTIONS,u.append(E),w=E;const D=document.createElement("summary");D.innerHTML=uht,E.append(D),v=M=>{E.contains(M.target)||E.removeAttribute("open")},document.addEventListener("click",v)}const C=document.createElement("div");if(w.append(C),C.classList.add("vega-actions"),!0===o||!1!==o.export)for(const E of["svg","png"])if(!0===o||!0===o.export||o.export[E]){const D=s[`${E.toUpperCase()}_ACTION`],M=document.createElement("a"),k=we(n.scaleFactor)?n.scaleFactor[E]:n.scaleFactor;M.text=D,M.href="#",M.target="_blank",M.download=`${c}.${E}`,M.addEventListener("mousedown",function(){var R=qn(function*(F){F.preventDefault();const P=yield _.toImageURL(E,k);this.href=P});return function(F){return R.apply(this,arguments)}}()),C.append(M)}if(!0===o||!1!==o.source){const E=document.createElement("a");E.text=s.SOURCE_ACTION,E.href="#",E.addEventListener("click",function(D){yye(vP(t),n.sourceHeader??"",n.sourceFooter??"",d),D.preventDefault()}),C.append(E)}if("vega-lite"===d&&(!0===o||!1!==o.compiled)){const E=document.createElement("a");E.text=s.COMPILED_ACTION,E.href="#",E.addEventListener("click",function(D){yye(vP(f),n.sourceHeader??"",n.sourceFooter??"","vega"),D.preventDefault()}),C.append(E)}if(!0===o||!1!==o.editor){const E=n.editorUrl??"https://vega.github.io/editor/",D=document.createElement("a");D.text=s.EDITOR_ACTION,D.href="#",D.addEventListener("click",function(M){(function Pft(e,t,n){const i=e.open(t),{origin:s}=new URL(t);let a=40;e.addEventListener("message",function l(u){u.source===i&&(a=0,e.removeEventListener("message",l,!1))},!1),setTimeout(function c(){a<=0||(i.postMessage(n,s),setTimeout(c,250),a-=1)},250)})(window,E,{config:r,mode:p?"vega":d,renderer:a,spec:vP(p?f:t)}),M.preventDefault()}),C.append(D)}}return{view:_,spec:t,vgSpec:f,finalize:function b(){v&&document.removeEventListener("click",v),_.finalize()},embedOptions:n}}),TV.apply(this,arguments)}class wN{}class EN{}class Ks{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?"string"==typeof t?this.lazyInit=()=>{this.headers=new Map,t.split("\n").forEach(n=>{const i=n.indexOf(":");if(i>0){const r=n.slice(0,i),o=r.toLowerCase(),s=n.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((n,i)=>{this.setHeaderEntries(i,n)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([n,i])=>{this.setHeaderEntries(n,i)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const n=this.headers.get(t.toLowerCase());return n&&n.length>0?n[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,n){return this.clone({name:t,value:n,op:"a"})}set(t,n){return this.clone({name:t,value:n,op:"s"})}delete(t,n){return this.clone({name:t,value:n,op:"d"})}maybeSetNormalizedName(t,n){this.normalizedNames.has(n)||this.normalizedNames.set(n,t)}init(){this.lazyInit&&(this.lazyInit instanceof Ks?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(n=>{this.headers.set(n,t.headers.get(n)),this.normalizedNames.set(n,t.normalizedNames.get(n))})}clone(t){const n=new Ks;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof Ks?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([t]),n}applyUpdate(t){const n=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(t.name,n);const r=("a"===t.op?this.headers.get(n):void 0)||[];r.push(...i),this.headers.set(n,r);break;case"d":const o=t.value;if(o){let s=this.headers.get(n);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(n),this.normalizedNames.delete(n)):this.headers.set(n,s)}else this.headers.delete(n),this.normalizedNames.delete(n)}}setHeaderEntries(t,n){const i=(Array.isArray(n)?n:[n]).map(o=>o.toString()),r=t.toLowerCase();this.headers.set(r,i),this.maybeSetNormalizedName(t,r)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(n=>t(this.normalizedNames.get(n),this.headers.get(n)))}}class _ht{encodeKey(t){return Eye(t)}encodeValue(t){return Eye(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const vht=/%(\d[a-f0-9])/gi,bht={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Eye(e){return encodeURIComponent(e).replace(vht,(t,n)=>bht[n]??t)}function CN(e){return`${e}`}class uf{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new _ht,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function yht(e,t){const n=new Map;return e.length>0&&e.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,o)),t.decodeValue(r.slice(o+1))],l=n.get(s)||[];l.push(a),n.set(s,l)}),n}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(n=>{const i=t.fromObject[n],r=Array.isArray(i)?i.map(CN):[CN(i)];this.map.set(n,r)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const n=this.map.get(t);return n?n[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,n){return this.clone({param:t,value:n,op:"a"})}appendAll(t){const n=[];return Object.keys(t).forEach(i=>{const r=t[i];Array.isArray(r)?r.forEach(o=>{n.push({param:i,value:o,op:"a"})}):n.push({param:i,value:r,op:"a"})}),this.clone(n)}set(t,n){return this.clone({param:t,value:n,op:"s"})}delete(t,n){return this.clone({param:t,value:n,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const n=this.encoder.encodeKey(t);return this.map.get(t).map(i=>n+"="+this.encoder.encodeValue(i)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const n=new uf({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat(t),n}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const n=("a"===t.op?this.map.get(t.param):void 0)||[];n.push(CN(t.value)),this.map.set(t.param,n);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let i=this.map.get(t.param)||[];const r=i.indexOf(CN(t.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(t.param,i):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}class wht{constructor(){this.map=new Map}set(t,n){return this.map.set(t,n),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}}function Cye(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer}function Dye(e){return typeof Blob<"u"&&e instanceof Blob}function Sye(e){return typeof FormData<"u"&&e instanceof FormData}class bw{constructor(t,n,i,r){let o;if(this.url=n,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function Eht(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),this.headers??=new Ks,this.context??=new wht,this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=n;else{const a=n.indexOf("?");this.urlWithParams=n+(-1===a?"?":af.set(h,t.setHeaders[h]),c)),t.setParams&&(u=Object.keys(t.setParams).reduce((f,h)=>f.set(h,t.setParams[h]),u)),new bw(n,i,s,{params:u,headers:c,context:d,reportProgress:l,responseType:r,withCredentials:a,transferCache:o})}}var df=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}(df||{});class xV{constructor(t,n=200,i="OK"){this.headers=t.headers||new Ks,this.status=void 0!==t.status?t.status:n,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class DN extends xV{constructor(t={}){super(t),this.type=df.ResponseHeader}clone(t={}){return new DN({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class Op extends xV{constructor(t={}){super(t),this.type=df.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new Op({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class my extends xV{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function AV(e,t){return{body:t,headers:e.headers,context:e.context,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials,transferCache:e.transferCache}}let ww=(()=>{class e{constructor(n){this.handler=n}request(n,i,r={}){let o;if(n instanceof bw)o=n;else{let l,c;l=r.headers instanceof Ks?r.headers:new Ks(r.headers),r.params&&(c=r.params instanceof uf?r.params:new uf({fromObject:r.params})),o=new bw(n,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache})}const s=Ge(o).pipe(Kg(l=>this.handler.handle(l)));if(n instanceof bw||"events"===r.observe)return s;const a=s.pipe(Wn(l=>l instanceof Op));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(at(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(at(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(at(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(at(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(n,i={}){return this.request("DELETE",n,i)}get(n,i={}){return this.request("GET",n,i)}head(n,i={}){return this.request("HEAD",n,i)}jsonp(n,i){return this.request("JSONP",n,{params:(new uf).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,i={}){return this.request("OPTIONS",n,i)}patch(n,i,r={}){return this.request("PATCH",n,AV(r,i))}post(n,i,r={}){return this.request("POST",n,AV(r,i))}put(n,i,r={}){return this.request("PUT",n,AV(r,i))}static{this.\u0275fac=function(i){return new(i||e)(Ne(wN))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();const Tht=/^\)\]\}',?\n/;function xye(e){if(e.url)return e.url;const t="X-Request-URL".toLocaleLowerCase();return e.headers.get(t)}let MV=(()=>{class e{constructor(){this.fetchImpl=L(Aht,{optional:!0})?.fetch??((...n)=>globalThis.fetch(...n)),this.ngZone=L(ct)}handle(n){return new cn(i=>{const r=new AbortController;return this.doRequest(n,r.signal,i).then(NV,o=>i.error(new my({error:o}))),()=>r.abort()})}doRequest(n,i,r){var o=this;return qn(function*(){const s=o.createRequestInit(n);let a;try{const p=o.ngZone.runOutsideAngular(()=>o.fetchImpl(n.urlWithParams,{signal:i,...s}));(function Mht(e){e.then(NV,NV)})(p),r.next({type:df.Sent}),a=yield p}catch(p){return void r.error(new my({error:p,status:p.status??0,statusText:p.statusText,url:n.urlWithParams,headers:p.headers}))}const l=new Ks(a.headers),c=a.statusText,u=xye(a)??n.urlWithParams;let d=a.status,f=null;if(n.reportProgress&&r.next(new DN({headers:l,status:d,statusText:c,url:u})),a.body){const p=a.headers.get("content-length"),g=[],m=a.body.getReader();let y,v,_=0;const b=typeof Zone<"u"&&Zone.current;yield o.ngZone.runOutsideAngular(qn(function*(){for(;;){const{done:C,value:E}=yield m.read();if(C)break;if(g.push(E),_+=E.length,n.reportProgress){v="text"===n.responseType?(v??"")+(y??=new TextDecoder).decode(E,{stream:!0}):void 0;const D=()=>r.next({type:df.DownloadProgress,total:p?+p:void 0,loaded:_,partialText:v});b?b.run(D):D()}}}));const w=o.concatChunks(g,_);try{const C=a.headers.get("Content-Type")??"";f=o.parseBody(n,w,C)}catch(C){return void r.error(new my({error:C,headers:new Ks(a.headers),status:a.status,statusText:a.statusText,url:xye(a)??n.urlWithParams}))}}0===d&&(d=f?200:0),d>=200&&d<300?(r.next(new Op({body:f,headers:l,status:d,statusText:c,url:u})),r.complete()):r.error(new my({error:f,headers:l,status:d,statusText:c,url:u}))})()}parseBody(n,i,r){switch(n.responseType){case"json":const o=(new TextDecoder).decode(i).replace(Tht,"");return""===o?null:JSON.parse(o);case"text":return(new TextDecoder).decode(i);case"blob":return new Blob([i],{type:r});case"arraybuffer":return i.buffer}}createRequestInit(n){const i={},r=n.withCredentials?"include":void 0;if(n.headers.forEach((o,s)=>i[o]=s.join(",")),n.headers.has("Accept")||(i.Accept="application/json, text/plain, */*"),!n.headers.has("Content-Type")){const o=n.detectContentTypeHeader();null!==o&&(i["Content-Type"]=o)}return{body:n.serializeBody(),method:n.method,headers:i,credentials:r}}concatChunks(n,i){const r=new Uint8Array(i);let o=0;for(const s of n)r.set(s,o),o+=s.length;return r}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();class Aht{}function NV(){}function Aye(e,t){return t(e)}function Nht(e,t){return(n,i)=>t.intercept(n,{handle:r=>e(r,i)})}const kht=new _e(""),Ew=new _e(""),Mye=new _e(""),Nye=new _e("",{providedIn:"root",factory:()=>!0});function Oht(){let e=null;return(t,n)=>{null===e&&(e=(L(kht,{optional:!0})??[]).reduceRight(Nht,Aye));const i=L(Sc);if(L(Nye)){const o=i.add();return e(t,n).pipe(av(()=>i.remove(o)))}return e(t,n)}}let Iye=(()=>{class e extends wN{constructor(n,i){super(),this.backend=n,this.injector=i,this.chain=null,this.pendingTasks=L(Sc),this.contributeToStability=L(Nye)}handle(n){if(null===this.chain){const i=Array.from(new Set([...this.injector.get(Ew),...this.injector.get(Mye,[])]));this.chain=i.reduceRight((r,o)=>function Iht(e,t,n){return(i,r)=>ol(n,()=>t(i,o=>e(o,r)))}(r,o,this.injector),Aye)}if(this.contributeToStability){const i=this.pendingTasks.add();return this.chain(n,r=>this.backend.handle(r)).pipe(av(()=>this.pendingTasks.remove(i)))}return this.chain(n,i=>this.backend.handle(i))}static{this.\u0275fac=function(i){return new(i||e)(Ne(EN),Ne(ji))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();const $ht=/^\)\]\}',?\n/;let Oye=(()=>{class e{constructor(n){this.xhrFactory=n}handle(n){if("JSONP"===n.method)throw new q(-2800,!1);const i=this.xhrFactory;return(i.\u0275loadImpl?si(i.\u0275loadImpl()):Ge(null)).pipe(Es(()=>new cn(o=>{const s=i.build();if(s.open(n.method,n.urlWithParams),n.withCredentials&&(s.withCredentials=!0),n.headers.forEach((g,m)=>s.setRequestHeader(g,m.join(","))),n.headers.has("Accept")||s.setRequestHeader("Accept","application/json, text/plain, */*"),!n.headers.has("Content-Type")){const g=n.detectContentTypeHeader();null!==g&&s.setRequestHeader("Content-Type",g)}if(n.responseType){const g=n.responseType.toLowerCase();s.responseType="json"!==g?g:"text"}const a=n.serializeBody();let l=null;const c=()=>{if(null!==l)return l;const g=s.statusText||"OK",m=new Ks(s.getAllResponseHeaders()),_=function Bht(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(s)||n.url;return l=new DN({headers:m,status:s.status,statusText:g,url:_}),l},u=()=>{let{headers:g,status:m,statusText:_,url:y}=c(),v=null;204!==m&&(v=typeof s.response>"u"?s.responseText:s.response),0===m&&(m=v?200:0);let b=m>=200&&m<300;if("json"===n.responseType&&"string"==typeof v){const w=v;v=v.replace($ht,"");try{v=""!==v?JSON.parse(v):null}catch(C){v=w,b&&(b=!1,v={error:C,text:v})}}b?(o.next(new Op({body:v,headers:g,status:m,statusText:_,url:y||void 0})),o.complete()):o.error(new my({error:v,headers:g,status:m,statusText:_,url:y||void 0}))},d=g=>{const{url:m}=c(),_=new my({error:g,status:s.status||0,statusText:s.statusText||"Unknown Error",url:m||void 0});o.error(_)};let f=!1;const h=g=>{f||(o.next(c()),f=!0);let m={type:df.DownloadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),"text"===n.responseType&&s.responseText&&(m.partialText=s.responseText),o.next(m)},p=g=>{let m={type:df.UploadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),o.next(m)};return s.addEventListener("load",u),s.addEventListener("error",d),s.addEventListener("timeout",d),s.addEventListener("abort",d),n.reportProgress&&(s.addEventListener("progress",h),null!==a&&s.upload&&s.upload.addEventListener("progress",p)),s.send(a),o.next({type:df.Sent}),()=>{s.removeEventListener("error",d),s.removeEventListener("abort",d),s.removeEventListener("load",u),s.removeEventListener("timeout",d),n.reportProgress&&(s.removeEventListener("progress",h),null!==a&&s.upload&&s.upload.removeEventListener("progress",p)),s.readyState!==s.DONE&&s.abort()}})))}static{this.\u0275fac=function(i){return new(i||e)(Ne(CK))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();const IV=new _e(""),Rye=new _e("",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),Fye=new _e("",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class Pye{}let Uht=(()=>{class e{constructor(n,i,r){this.doc=n,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=hK(n,this.cookieName),this.lastCookieString=n),this.lastToken}static{this.\u0275fac=function(i){return new(i||e)(Ne(Ln),Ne(Tc),Ne(Rye))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();function zht(e,t){const n=e.url.toLowerCase();if(!L(IV)||"GET"===e.method||"HEAD"===e.method||n.startsWith("http://")||n.startsWith("https://"))return t(e);const i=L(Pye).getToken(),r=L(Fye);return null!=i&&!e.headers.has(r)&&(e=e.clone({headers:e.headers.set(r,i)})),t(e)}var ff=function(e){return e[e.Interceptors=0]="Interceptors",e[e.LegacyInterceptors=1]="LegacyInterceptors",e[e.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",e[e.NoXsrfProtection=3]="NoXsrfProtection",e[e.JsonpSupport=4]="JsonpSupport",e[e.RequestsMadeViaParent=5]="RequestsMadeViaParent",e[e.Fetch=6]="Fetch",e}(ff||{});function Rp(e,t){return{\u0275kind:e,\u0275providers:t}}function Hht(...e){const t=[ww,Oye,Iye,{provide:wN,useExisting:Iye},{provide:EN,useFactory:()=>L(MV,{optional:!0})??L(Oye)},{provide:Ew,useValue:zht,multi:!0},{provide:IV,useValue:!0},{provide:Pye,useClass:Uht}];for(const n of e)t.push(...n.\u0275providers);return function Ly(e){return{\u0275providers:e}}(t)}const Lye=new _e(""),ept=["map"],tpt=e=>({"font-style":e});function npt(e,t){if(1&e&&(U(0,"i"),X(1),z()),2&e){const n=Qe();re(),kr("in "+n.selectedYear)}}function ipt(e,t){1&e&&(U(0,"span"),X(1),z()),2&e&&(re(),kr(" based on the most recent available data"))}function rpt(e,t){if(1&e&&(U(0,"option",17),X(1),z()),2&e){const n=t.$implicit;Ae("ngValue",n.id),re(),kr(n.name)}}function opt(e,t){1&e&&(U(0,"div",21),Ke(1,"img",22),U(2,"p",23),X(3,"You explored unresearched areas, no data available."),z()())}let spt=(()=>{class e{constructor(n,i,r){this.http=n,this.apparelService=i,this.renderer=r,this.title="The top 100 apparel companies'",this.apparelTop100=[],this.suppliers=[],this.selectedYear="latest",this.selectedCompany=0,this.apparelTop100=i.getCompanies()}ngOnInit(){this.company=this.apparelService.getCompany(this.selectedCompany),this.title=0!=this.company.id?this.company.name:"The top 100 apparel companies'",this.updateChart()}ngAfterViewInit(){}updateChart(){let n="https://wikirate.org/Commons+Supplied_By+RelationshipAnswer/answer_list.json?filter[company_group]=Apparel%20100%20Companies&filter[year]="+this.selectedYear+"&limit=0";0!=this.company.id&&(n="https://wikirate.org/Commons+Supplied_By+RelationshipAnswer/answer_list.json?filter[subject_company_id]="+this.company.id+"&filter[year]="+this.selectedYear+"&limit=0"),this.suppliers=[],null!=this.suppliers_map&&this.renderer.removeChild(this.mapElement.nativeElement,this.suppliers_map),this.http.get(n).subscribe(i=>{this.suppliers=i,this.suppliers.length>0&&(this.suppliers_map=this.renderer.createElement("div"),this.suppliers_map.id="supplier-map",this.renderer.appendChild(this.mapElement.nativeElement,this.suppliers_map),gy("div#supplier-map",{$schema:"https://vega.github.io/schema/vega/v5.json",description:"Number of Apparel Top 100 Suppliers per Country",width:800,height:520,signals:[{name:"type",value:"equalEarth"},{name:"scale",value:200},{name:"rotate0",value:-15},{name:"rotate1",value:0},{name:"rotate2",value:0},{name:"center0",value:0},{name:"center1",value:0},{name:"translate0",update:"width / 2"},{name:"translate1",update:"height / 2"},{name:"borderWidth",value:2},{name:"hover",value:null,on:[{events:"@circles:mouseover",update:"datum"},{events:"@circles:mouseout",update:"null"}]},{name:"title",value:"Number of Apparel Top 100 Suppliers per Country",update:"hover ? hover.country + ' (' + hover.companies + ')' : 'Number of Apparel Top 100 Suppliers per Country'"},{name:"cell_stroke",value:null,on:[{events:"dblclick",update:"cell_stroke ? null : 'brown'"},{events:"mousedown!",update:"cell_stroke"}]}],data:[{name:"world",url:"assets/world-110m.json",format:{type:"topojson",feature:"countries"},transform:[{type:"geopath",projection:"projection"}]},{name:"suppliers_country",url:"../../assets/content/Core+Country+Answer.json",format:{type:"json",parse:"auto"}},{name:"suppliers",values:this.suppliers,transform:[{type:"lookup",from:"suppliers_country",key:"company",fields:["object_company"],values:["value"],as:["country"]}]},{name:"wikirate_countries",values:[{code:"AD",name:"Andorra",card_id:2917786},{code:"AE",name:"United Arab Emirates",card_id:169529},{code:"AF",name:"Afghanistan",card_id:2917789},{code:"AG",name:"Antigua and Barbuda",card_id:2917790},{code:"AI",name:"Anguilla",card_id:2917791},{code:"AL",name:"Albania",card_id:2917792},{code:"AM",name:"Armenia",card_id:2917793},{code:"AO",name:"Angola",card_id:2917794},{code:"AQ",name:"Antarctica",card_id:2917795},{code:"AR",name:"Argentina",card_id:14400},{code:"AS",name:"American Samoa",card_id:2917796},{code:"AT",name:"Austria",card_id:17233},{code:"AU",name:"Australia",card_id:14405},{code:"AW",name:"Aruba",card_id:2917797},{code:"AX",name:"\xc5land Islands",card_id:2917798},{code:"AZ",name:"Azerbaijan",card_id:2917799},{code:"BA",name:"Bosnia and Herzegovina",card_id:2917800},{code:"BB",name:"Barbados",card_id:2917801},{code:"BD",name:"Bangladesh",card_id:14386},{code:"BE",name:"Belgium",card_id:19867},{code:"BF",name:"Burkina Faso",card_id:14408},{code:"BG",name:"Bulgaria",card_id:13973},{code:"BH",name:"Bahrain",card_id:2917802},{code:"BI",name:"Burundi",card_id:2917803},{code:"BJ",name:"Benin",card_id:2917804},{code:"BL",name:"Saint Barth\xe9lemy",card_id:2917805},{code:"BM",name:"Bermuda",card_id:2917806},{code:"BN",name:"Brunei Darussalam",card_id:2917807},{code:"BO",name:"Bolivia",card_id:2917808},{code:"BQ",name:"Bonaire, Sint Eustatius and Saba",card_id:2917809},{code:"BR",name:"Brazil",card_id:12379},{code:"BS",name:"Bahamas",card_id:2917810},{code:"BT",name:"Bhutan",card_id:2917811},{code:"BV",name:"Bouvet Island",card_id:2917812},{code:"BW",name:"Botswana",card_id:2917813},{code:"BY",name:"Belarus",card_id:2917814},{code:"BZ",name:"Belize",card_id:2917815},{code:"CA",name:"Canada",card_id:14965},{code:"CC",name:"Cocos (Keeling) Islands",card_id:2917828},{code:"CD",name:"Democratic Republic of the Congo",card_id:2917829},{code:"CF",name:"Central African Republic",card_id:2917830},{code:"CG",name:"Congo",card_id:38190},{code:"CH",name:"Switzerland",card_id:15220},{code:"CI",name:"C\xf4te d'Ivoire",card_id:2917831},{code:"CK",name:"Cook Islands",card_id:2917832},{code:"CL",name:"Chile",card_id:14404},{code:"CM",name:"Cameroon",card_id:2917833},{code:"CN",name:"China",card_id:12378},{code:"CO",name:"Colombia",card_id:12320},{code:"CR",name:"Costa Rica",card_id:2917834},{code:"CU",name:"Cuba",card_id:19542},{code:"CV",name:"Cape Verde",card_id:2917835},{code:"CW",name:"Cura\xe7ao",card_id:2917836},{code:"CX",name:"Christmas Island",card_id:2917837},{code:"CY",name:"Cyprus",card_id:2917838},{code:"CZ",name:"Czech Republic",card_id:45425},{code:"DE",name:"Germany",card_id:15272},{code:"DJ",name:"Djibouti",card_id:2917839},{code:"DK",name:"Denmark",card_id:21425},{code:"DM",name:"Dominica",card_id:2917840},{code:"DO",name:"Dominican Republic",card_id:18543},{code:"DZ",name:"Algeria",card_id:2917841},{code:"EC",name:"Ecuador",card_id:2917842},{code:"EE",name:"Estonia",card_id:2917843},{code:"EG",name:"Egypt",card_id:2917844},{code:"EH",name:"Western Sahara",card_id:2917845},{code:"ER",name:"Eritrea",card_id:2917846},{code:"ES",name:"Spain",card_id:12333},{code:"ET",name:"Ethiopia",card_id:14424},{code:"FI",name:"Finland",card_id:2917847},{code:"FJ",name:"Fiji",card_id:2917848},{code:"FK",name:"Falkland Islands (Malvinas)",card_id:2917849},{code:"FM",name:"Micronesia, Federated States of",card_id:2917850},{code:"FO",name:"Faroe Islands",card_id:2917851},{code:"FR",name:"France",card_id:19365},{code:"GA",name:"Gabon",card_id:2917852},{code:"GB",name:"United Kingdom",card_id:14908},{code:"GD",name:"Grenada",card_id:2917853},{code:"GE",name:"Georgia",card_id:2917854},{code:"GF",name:"French Guiana",card_id:2917855},{code:"GG",name:"Guernsey",card_id:2917856},{code:"GH",name:"Ghana",card_id:18541},{code:"GI",name:"Gibraltar",card_id:2917857},{code:"GL",name:"Greenland",card_id:2917858},{code:"GM",name:"Gambia",card_id:2917859},{code:"GN",name:"Guinea",card_id:2917860},{code:"GP",name:"Guadeloupe",card_id:2917861},{code:"GQ",name:"Equatorial Guinea",card_id:2917862},{code:"GR",name:"Greece",card_id:34142},{code:"GS",name:"South Georgia and the South Sandwich Islands",card_id:2917863},{code:"GT",name:"Guatemala",card_id:2917864},{code:"GU",name:"Guam",card_id:2917865},{code:"GW",name:"Guinea-Bissau",card_id:2917866},{code:"GY",name:"Guyana",card_id:2917867},{code:"HK",name:"Hong Kong",card_id:2917868},{code:"HM",name:"Heard Island and McDonald Islands",card_id:2917869},{code:"HN",name:"Honduras",card_id:18094},{code:"HR",name:"Croatia",card_id:2917870},{code:"HT",name:"Haiti",card_id:2917871},{code:"HU",name:"Hungary",card_id:45424},{code:"ID",name:"Indonesia",card_id:14371},{code:"IE",name:"Ireland",card_id:14394},{code:"IL",name:"Israel",card_id:14701},{code:"IM",name:"Isle of Man",card_id:2917872},{code:"IN",name:"India",card_id:14389},{code:"IO",name:"British Indian Ocean Territory",card_id:2917873},{code:"IQ",name:"Iraq",card_id:3913},{code:"IR",name:"Iran",card_id:2917874},{code:"IS",name:"Iceland",card_id:2917875},{code:"IT",name:"Italy",card_id:16175},{code:"JE",name:"Jersey",card_id:2917876},{code:"JM",name:"Jamaica",card_id:2917877},{code:"JO",name:"Jordan",card_id:1812107},{code:"JP",name:"Japan",card_id:14387},{code:"KE",name:"Kenya",card_id:21392},{code:"KG",name:"Kyrgyzstan",card_id:2917878},{code:"KH",name:"Cambodia",card_id:13908},{code:"KI",name:"Kiribati",card_id:2917879},{code:"KM",name:"Comoros",card_id:2917880},{code:"KN",name:"Saint Kitts and Nevis",card_id:2917881},{code:"KP",name:"Korea, Democratic People's Republic of",card_id:2917882},{code:"KR",name:"Korea, Republic of",card_id:2917883},{code:"KW",name:"Kuwait",card_id:2917884},{code:"KY",name:"Cayman Islands",card_id:2917885},{code:"KZ",name:"Kazakhstan",card_id:2917886},{code:"LA",name:"Laos",card_id:2917887},{code:"LB",name:"Lebanon",card_id:2917888},{code:"LC",name:"Saint Lucia",card_id:2917889},{code:"LI",name:"Liechtenstein",card_id:2917890},{code:"LK",name:"Sri Lanka",card_id:2917891},{code:"LR",name:"Liberia",card_id:2917892},{code:"LS",name:"Lesotho",card_id:2917893},{code:"LT",name:"Lithuania",card_id:2917894},{code:"LU",name:"Luxembourg",card_id:20766},{code:"LV",name:"Latvia",card_id:2917895},{code:"LY",name:"Libya",card_id:2917896},{code:"MA",name:"Morocco",card_id:14426},{code:"MC",name:"Monaco",card_id:2917897},{code:"MD",name:"Moldova",card_id:2917898},{code:"ME",name:"Montenegro",card_id:2917899},{code:"MF",name:"Saint Martin (French part)",card_id:2917900},{code:"MG",name:"Madagascar",card_id:40709},{code:"MH",name:"Marshall Islands",card_id:2917901},{code:"MK",name:"North Macedonia",card_id:2917902},{code:"ML",name:"Mali",card_id:20033},{code:"MM",name:"Myanmar",card_id:2917903},{code:"MN",name:"Mongolia",card_id:2917904},{code:"MO",name:"Macao",card_id:2917905},{code:"MP",name:"Northern Mariana Islands",card_id:2917906},{code:"MQ",name:"Martinique",card_id:2917907},{code:"MR",name:"Mauritania",card_id:2917908},{code:"MS",name:"Montserrat",card_id:2917909},{code:"MT",name:"Malta",card_id:2917910},{code:"MU",name:"Mauritius",card_id:2917911},{code:"MV",name:"Maldives",card_id:2917912},{code:"MW",name:"Malawi",card_id:14410},{code:"MX",name:"Mexico",card_id:14403},{code:"MY",name:"Malaysia",card_id:16948},{code:"MZ",name:"Mozambique",card_id:2917913},{code:"NA",name:"Namibia",card_id:2917914},{code:"NC",name:"New Caledonia",card_id:2917915},{code:"NE",name:"Niger",card_id:2917916},{code:"NF",name:"Norfolk Island",card_id:2917917},{code:"NG",name:"Nigeria",card_id:14384},{code:"NI",name:"Nicaragua",card_id:2917918},{code:"NL",name:"Netherlands",card_id:2917919},{code:"NO",name:"Norway",card_id:2917920},{code:"NP",name:"Nepal",card_id:45091},{code:"NR",name:"Nauru",card_id:2917921},{code:"NU",name:"Niue",card_id:2917922},{code:"NZ",name:"New Zealand",card_id:2917923},{code:"OM",name:"Oman",card_id:2917924},{code:"PA",name:"Panama",card_id:2917925},{code:"PE",name:"Peru",card_id:16184},{code:"PF",name:"French Polynesia",card_id:2917926},{code:"PG",name:"Papua New Guinea",card_id:16949},{code:"PH",name:"Philippines",card_id:37238},{code:"PK",name:"Pakistan",card_id:36162},{code:"PL",name:"Poland",card_id:37189},{code:"PM",name:"Saint Pierre and Miquelon",card_id:2917927},{code:"PN",name:"Pitcairn",card_id:2917928},{code:"PR",name:"Puerto Rico",card_id:2917929},{code:"PS",name:"Palestinian Territory",card_id:2917930},{code:"PT",name:"Portugal",card_id:2917931},{code:"PW",name:"Palau",card_id:2917932},{code:"PY",name:"Paraguay",card_id:2917933},{code:"QA",name:"Qatar",card_id:168817},{code:"RE",name:"R\xe9union",card_id:2917934},{code:"RO",name:"Romania",card_id:13974},{code:"RS",name:"Serbia",card_id:2917935},{code:"RU",name:"Russia",card_id:35176},{code:"RW",name:"Rwanda",card_id:2917936},{code:"SA",name:"Saudi Arabia",card_id:43202},{code:"SB",name:"Solomon Islands",card_id:2917937},{code:"SC",name:"Seychelles",card_id:2917938},{code:"SD",name:"Sudan",card_id:14149},{code:"SE",name:"Sweden",card_id:43201},{code:"SG",name:"Singapore",card_id:2917939},{code:"SH",name:"Saint Helena, Ascension and Tristan da Cunha",card_id:2917940},{code:"SI",name:"Slovenia",card_id:20157},{code:"SJ",name:"Svalbard and Jan Mayen",card_id:2917941},{code:"SK",name:"Slovakia",card_id:2917942},{code:"SL",name:"Sierra Leone",card_id:2917943},{code:"SM",name:"San Marino",card_id:2917944},{code:"SN",name:"Senegal",card_id:15492},{code:"SO",name:"Somalia",card_id:2917945},{code:"SR",name:"Suriname",card_id:2917946},{code:"SS",name:"South Sudan",card_id:2917947},{code:"ST",name:"Sao Tome and Principe",card_id:2917948},{code:"SV",name:"El Salvador",card_id:33639},{code:"SX",name:"Sint Maarten (Dutch part)",card_id:2917949},{code:"SY",name:"Syrian Arab Republic",card_id:2917950},{code:"SZ",name:"Swaziland",card_id:2917951},{code:"TC",name:"Turks and Caicos Islands",card_id:2917952},{code:"TD",name:"Chad",card_id:2917953},{code:"TF",name:"French Southern Territories",card_id:2917954},{code:"TG",name:"Togo",card_id:2917955},{code:"TH",name:"Thailand",card_id:14214},{code:"TJ",name:"Tajikistan",card_id:2917956},{code:"TK",name:"Tokelau",card_id:2917957},{code:"TL",name:"Timor-Leste",card_id:2917958},{code:"TM",name:"Turkmenistan",card_id:2917959},{code:"TN",name:"Tunisia",card_id:2917960},{code:"TO",name:"Tonga",card_id:2917961},{code:"TR",name:"Turkey",card_id:13972},{code:"TT",name:"Trinidad and Tobago",card_id:2917962},{code:"TV",name:"Tuvalu",card_id:2917963},{code:"TW",name:"Taiwan, Province of China",card_id:2917964},{code:"TZ",name:"Tanzania",card_id:16808},{code:"UA",name:"Ukraine",card_id:2917965},{code:"UG",name:"Uganda",card_id:40396},{code:"UM",name:"United States Minor Outlying Islands",card_id:2917966},{code:"US",name:"United States",card_id:14551},{code:"UY",name:"Uruguay",card_id:2918018},{code:"UZ",name:"Uzbekistan",card_id:14412},{code:"VA",name:"Holy See (Vatican City State)",card_id:2918019},{code:"VC",name:"Saint Vincent and the Grenadines",card_id:2918020},{code:"VE",name:"Venezuela",card_id:2918021},{code:"VG",name:"British Virgin Islands",card_id:2918022},{code:"VI",name:"U.S. Virgin Islands",card_id:2918023},{code:"VN",name:"Vietnam",card_id:2918024},{code:"VU",name:"Vanuatu",card_id:2918025},{code:"WF",name:"Wallis and Futuna",card_id:2918026},{code:"WS",name:"Samoa",card_id:2918027},{code:"XK",name:"Kosovo",card_id:2918028},{code:"YE",name:"Yemen",card_id:2918029},{code:"YT",name:"Mayotte",card_id:2918030},{code:"ZA",name:"South Africa",card_id:14938},{code:"ZM",name:"Zambia",card_id:2918031},{code:"ZW",name:"Zimbabwe",card_id:2918032}]},{name:"country_codes",values:[{name:"Afghanistan","alpha-2":"AF","country-code":"004"},{name:"\xc5land Islands","alpha-2":"AX","country-code":"248"},{name:"Albania","alpha-2":"AL","country-code":"008"},{name:"Algeria","alpha-2":"DZ","country-code":"012"},{name:"American Samoa","alpha-2":"AS","country-code":"016"},{name:"Andorra","alpha-2":"AD","country-code":"020"},{name:"Angola","alpha-2":"AO","country-code":"024"},{name:"Anguilla","alpha-2":"AI","country-code":"660"},{name:"Antarctica","alpha-2":"AQ","country-code":"010"},{name:"Antigua and Barbuda","alpha-2":"AG","country-code":"028"},{name:"Argentina","alpha-2":"AR","country-code":"032"},{name:"Armenia","alpha-2":"AM","country-code":"051"},{name:"Aruba","alpha-2":"AW","country-code":"533"},{name:"Australia","alpha-2":"AU","country-code":"036"},{name:"Austria","alpha-2":"AT","country-code":"040"},{name:"Azerbaijan","alpha-2":"AZ","country-code":"031"},{name:"Bahamas","alpha-2":"BS","country-code":"044"},{name:"Bahrain","alpha-2":"BH","country-code":"048"},{name:"Bangladesh","alpha-2":"BD","country-code":"050"},{name:"Barbados","alpha-2":"BB","country-code":"052"},{name:"Belarus","alpha-2":"BY","country-code":"112"},{name:"Belgium","alpha-2":"BE","country-code":"056"},{name:"Belize","alpha-2":"BZ","country-code":"084"},{name:"Benin","alpha-2":"BJ","country-code":"204"},{name:"Bermuda","alpha-2":"BM","country-code":"060"},{name:"Bhutan","alpha-2":"BT","country-code":"064"},{name:"Bolivia (Plurinational State of)","alpha-2":"BO","country-code":"068"},{name:"Bonaire, Sint Eustatius and Saba","alpha-2":"BQ","country-code":"535"},{name:"Bosnia and Herzegovina","alpha-2":"BA","country-code":"070"},{name:"Botswana","alpha-2":"BW","country-code":"072"},{name:"Bouvet Island","alpha-2":"BV","country-code":"074"},{name:"Brazil","alpha-2":"BR","country-code":"076"},{name:"British Indian Ocean Territory","alpha-2":"IO","country-code":"086"},{name:"Brunei Darussalam","alpha-2":"BN","country-code":"096"},{name:"Bulgaria","alpha-2":"BG","country-code":"100"},{name:"Burkina Faso","alpha-2":"BF","country-code":"854"},{name:"Burundi","alpha-2":"BI","country-code":"108"},{name:"Cabo Verde","alpha-2":"CV","country-code":"132"},{name:"Cambodia","alpha-2":"KH","country-code":"116"},{name:"Cameroon","alpha-2":"CM","country-code":"120"},{name:"Canada","alpha-2":"CA","country-code":"124"},{name:"Cayman Islands","alpha-2":"KY","country-code":"136"},{name:"Central African Republic","alpha-2":"CF","country-code":"140"},{name:"Chad","alpha-2":"TD","country-code":"148"},{name:"Chile","alpha-2":"CL","country-code":"152"},{name:"China","alpha-2":"CN","country-code":"156"},{name:"Christmas Island","alpha-2":"CX","country-code":"162"},{name:"Cocos (Keeling) Islands","alpha-2":"CC","country-code":"166"},{name:"Colombia","alpha-2":"CO","country-code":"170"},{name:"Comoros","alpha-2":"KM","country-code":"174"},{name:"Congo","alpha-2":"CG","country-code":"178"},{name:"Congo, Democratic Republic of the","alpha-2":"CD","country-code":"180"},{name:"Cook Islands","alpha-2":"CK","country-code":"184"},{name:"Costa Rica","alpha-2":"CR","country-code":"188"},{name:"C\xf4te d'Ivoire","alpha-2":"CI","country-code":"384"},{name:"Croatia","alpha-2":"HR","country-code":"191"},{name:"Cuba","alpha-2":"CU","country-code":"192"},{name:"Cura\xe7ao","alpha-2":"CW","country-code":"531"},{name:"Cyprus","alpha-2":"CY","country-code":"196"},{name:"Czechia","alpha-2":"CZ","country-code":"203"},{name:"Denmark","alpha-2":"DK","country-code":"208"},{name:"Djibouti","alpha-2":"DJ","country-code":"262"},{name:"Dominica","alpha-2":"DM","country-code":"212"},{name:"Dominican Republic","alpha-2":"DO","country-code":"214"},{name:"Ecuador","alpha-2":"EC","country-code":"218"},{name:"Egypt","alpha-2":"EG","country-code":"818"},{name:"El Salvador","alpha-2":"SV","country-code":"222"},{name:"Equatorial Guinea","alpha-2":"GQ","country-code":"226"},{name:"Eritrea","alpha-2":"ER","country-code":"232"},{name:"Estonia","alpha-2":"EE","country-code":"233"},{name:"Eswatini","alpha-2":"SZ","country-code":"748"},{name:"Ethiopia","alpha-2":"ET","country-code":"231"},{name:"Falkland Islands (Malvinas)","alpha-2":"FK","country-code":"238"},{name:"Faroe Islands","alpha-2":"FO","country-code":"234"},{name:"Fiji","alpha-2":"FJ","country-code":"242"},{name:"Finland","alpha-2":"FI","country-code":"246"},{name:"France","alpha-2":"FR","country-code":"250"},{name:"French Guiana","alpha-2":"GF","country-code":"254"},{name:"French Polynesia","alpha-2":"PF","country-code":"258"},{name:"French Southern Territories","alpha-2":"TF","country-code":"260"},{name:"Gabon","alpha-2":"GA","country-code":"266"},{name:"Gambia","alpha-2":"GM","country-code":"270"},{name:"Georgia","alpha-2":"GE","country-code":"268"},{name:"Germany","alpha-2":"DE","country-code":"276"},{name:"Ghana","alpha-2":"GH","country-code":"288"},{name:"Gibraltar","alpha-2":"GI","country-code":"292"},{name:"Greece","alpha-2":"GR","country-code":"300"},{name:"Greenland","alpha-2":"GL","country-code":"304"},{name:"Grenada","alpha-2":"GD","country-code":"308"},{name:"Guadeloupe","alpha-2":"GP","country-code":"312"},{name:"Guam","alpha-2":"GU","country-code":"316"},{name:"Guatemala","alpha-2":"GT","country-code":"320"},{name:"Guernsey","alpha-2":"GG","country-code":"831"},{name:"Guinea","alpha-2":"GN","country-code":"324"},{name:"Guinea-Bissau","alpha-2":"GW","country-code":"624"},{name:"Guyana","alpha-2":"GY","country-code":"328"},{name:"Haiti","alpha-2":"HT","country-code":"332"},{name:"Heard Island and McDonald Islands","alpha-2":"HM","country-code":"334"},{name:"Holy See","alpha-2":"VA","country-code":"336"},{name:"Honduras","alpha-2":"HN","country-code":"340"},{name:"Hong Kong","alpha-2":"HK","country-code":"344"},{name:"Hungary","alpha-2":"HU","country-code":"348"},{name:"Iceland","alpha-2":"IS","country-code":"352"},{name:"India","alpha-2":"IN","country-code":"356"},{name:"Indonesia","alpha-2":"ID","country-code":"360"},{name:"Iran (Islamic Republic of)","alpha-2":"IR","country-code":"364"},{name:"Iraq","alpha-2":"IQ","country-code":"368"},{name:"Ireland","alpha-2":"IE","country-code":"372"},{name:"Isle of Man","alpha-2":"IM","country-code":"833"},{name:"Israel","alpha-2":"IL","country-code":"376"},{name:"Italy","alpha-2":"IT","country-code":"380"},{name:"Jamaica","alpha-2":"JM","country-code":"388"},{name:"Japan","alpha-2":"JP","country-code":"392"},{name:"Jersey","alpha-2":"JE","country-code":"832"},{name:"Jordan","alpha-2":"JO","country-code":"400"},{name:"Kazakhstan","alpha-2":"KZ","country-code":"398"},{name:"Kenya","alpha-2":"KE","country-code":"404"},{name:"Kiribati","alpha-2":"KI","country-code":"296"},{name:"Korea (Democratic People's Republic of)","alpha-2":"KP","country-code":"408"},{name:"Korea, Republic of","alpha-2":"KR","country-code":"410"},{name:"Kuwait","alpha-2":"KW","country-code":"414"},{name:"Kyrgyzstan","alpha-2":"KG","country-code":"417"},{name:"Lao People's Democratic Republic","alpha-2":"LA","country-code":"418"},{name:"Latvia","alpha-2":"LV","country-code":"428"},{name:"Lebanon","alpha-2":"LB","country-code":"422"},{name:"Lesotho","alpha-2":"LS","country-code":"426"},{name:"Liberia","alpha-2":"LR","country-code":"430"},{name:"Libya","alpha-2":"LY","country-code":"434"},{name:"Liechtenstein","alpha-2":"LI","country-code":"438"},{name:"Lithuania","alpha-2":"LT","country-code":"440"},{name:"Luxembourg","alpha-2":"LU","country-code":"442"},{name:"Macao","alpha-2":"MO","country-code":"446"},{name:"Madagascar","alpha-2":"MG","country-code":"450"},{name:"Malawi","alpha-2":"MW","country-code":"454"},{name:"Malaysia","alpha-2":"MY","country-code":"458"},{name:"Maldives","alpha-2":"MV","country-code":"462"},{name:"Mali","alpha-2":"ML","country-code":"466"},{name:"Malta","alpha-2":"MT","country-code":"470"},{name:"Marshall Islands","alpha-2":"MH","country-code":"584"},{name:"Martinique","alpha-2":"MQ","country-code":"474"},{name:"Mauritania","alpha-2":"MR","country-code":"478"},{name:"Mauritius","alpha-2":"MU","country-code":"480"},{name:"Mayotte","alpha-2":"YT","country-code":"175"},{name:"Mexico","alpha-2":"MX","country-code":"484"},{name:"Micronesia (Federated States of)","alpha-2":"FM","country-code":"583"},{name:"Moldova, Republic of","alpha-2":"MD","country-code":"498"},{name:"Monaco","alpha-2":"MC","country-code":"492"},{name:"Mongolia","alpha-2":"MN","country-code":"496"},{name:"Montenegro","alpha-2":"ME","country-code":"499"},{name:"Montserrat","alpha-2":"MS","country-code":"500"},{name:"Morocco","alpha-2":"MA","country-code":"504"},{name:"Mozambique","alpha-2":"MZ","country-code":"508"},{name:"Myanmar","alpha-2":"MM","country-code":"104"},{name:"Namibia","alpha-2":"NA","country-code":"516"},{name:"Nauru","alpha-2":"NR","country-code":"520"},{name:"Nepal","alpha-2":"NP","country-code":"524"},{name:"Netherlands","alpha-2":"NL","country-code":"528"},{name:"New Caledonia","alpha-2":"NC","country-code":"540"},{name:"New Zealand","alpha-2":"NZ","country-code":"554"},{name:"Nicaragua","alpha-2":"NI","country-code":"558"},{name:"Niger","alpha-2":"NE","country-code":"562"},{name:"Nigeria","alpha-2":"NG","country-code":"566"},{name:"Niue","alpha-2":"NU","country-code":"570"},{name:"Norfolk Island","alpha-2":"NF","country-code":"574"},{name:"North Macedonia","alpha-2":"MK","country-code":"807"},{name:"Northern Mariana Islands","alpha-2":"MP","country-code":"580"},{name:"Norway","alpha-2":"NO","country-code":"578"},{name:"Oman","alpha-2":"OM","country-code":"512"},{name:"Pakistan","alpha-2":"PK","country-code":"586"},{name:"Palau","alpha-2":"PW","country-code":"585"},{name:"Palestine, State of","alpha-2":"PS","country-code":"275"},{name:"Panama","alpha-2":"PA","country-code":"591"},{name:"Papua New Guinea","alpha-2":"PG","country-code":"598"},{name:"Paraguay","alpha-2":"PY","country-code":"600"},{name:"Peru","alpha-2":"PE","country-code":"604"},{name:"Philippines","alpha-2":"PH","country-code":"608"},{name:"Pitcairn","alpha-2":"PN","country-code":"612"},{name:"Poland","alpha-2":"PL","country-code":"616"},{name:"Portugal","alpha-2":"PT","country-code":"620"},{name:"Puerto Rico","alpha-2":"PR","country-code":"630"},{name:"Qatar","alpha-2":"QA","country-code":"634"},{name:"R\xe9union","alpha-2":"RE","country-code":"638"},{name:"Romania","alpha-2":"RO","country-code":"642"},{name:"Russian Federation","alpha-2":"RU","country-code":"643"},{name:"Rwanda","alpha-2":"RW","country-code":"646"},{name:"Saint Barth\xe9lemy","alpha-2":"BL","country-code":"652"},{name:"Saint Helena, Ascension and Tristan da Cunha","alpha-2":"SH","country-code":"654"},{name:"Saint Kitts and Nevis","alpha-2":"KN","country-code":"659"},{name:"Saint Lucia","alpha-2":"LC","country-code":"662"},{name:"Saint Martin (French part)","alpha-2":"MF","country-code":"663"},{name:"Saint Pierre and Miquelon","alpha-2":"PM","country-code":"666"},{name:"Saint Vincent and the Grenadines","alpha-2":"VC","country-code":"670"},{name:"Samoa","alpha-2":"WS","country-code":"882"},{name:"San Marino","alpha-2":"SM","country-code":"674"},{name:"Sao Tome and Principe","alpha-2":"ST","country-code":"678"},{name:"Saudi Arabia","alpha-2":"SA","country-code":"682"},{name:"Senegal","alpha-2":"SN","country-code":"686"},{name:"Serbia","alpha-2":"RS","country-code":"688"},{name:"Seychelles","alpha-2":"SC","country-code":"690"},{name:"Sierra Leone","alpha-2":"SL","country-code":"694"},{name:"Singapore","alpha-2":"SG","country-code":"702"},{name:"Sint Maarten (Dutch part)","alpha-2":"SX","country-code":"534"},{name:"Slovakia","alpha-2":"SK","country-code":"703"},{name:"Slovenia","alpha-2":"SI","country-code":"705"},{name:"Solomon Islands","alpha-2":"SB","country-code":"090"},{name:"Somalia","alpha-2":"SO","country-code":"706"},{name:"South Africa","alpha-2":"ZA","country-code":"710"},{name:"South Georgia and the South Sandwich Islands","alpha-2":"GS","country-code":"239"},{name:"South Sudan","alpha-2":"SS","country-code":"728"},{name:"Spain","alpha-2":"ES","country-code":"724"},{name:"Sri Lanka","alpha-2":"LK","country-code":"144"},{name:"Sudan","alpha-2":"SD","country-code":"729"},{name:"Suriname","alpha-2":"SR","country-code":"740"},{name:"Svalbard and Jan Mayen","alpha-2":"SJ","country-code":"744"},{name:"Sweden","alpha-2":"SE","country-code":"752"},{name:"Switzerland","alpha-2":"CH","country-code":"756"},{name:"Syrian Arab Republic","alpha-2":"SY","country-code":"760"},{name:"Taiwan, Province of China","alpha-2":"TW","country-code":"158"},{name:"Tajikistan","alpha-2":"TJ","country-code":"762"},{name:"Tanzania, United Republic of","alpha-2":"TZ","country-code":"834"},{name:"Thailand","alpha-2":"TH","country-code":"764"},{name:"Timor-Leste","alpha-2":"TL","country-code":"626"},{name:"Togo","alpha-2":"TG","country-code":"768"},{name:"Tokelau","alpha-2":"TK","country-code":"772"},{name:"Tonga","alpha-2":"TO","country-code":"776"},{name:"Trinidad and Tobago","alpha-2":"TT","country-code":"780"},{name:"Tunisia","alpha-2":"TN","country-code":"788"},{name:"Turkey","alpha-2":"TR","country-code":"792"},{name:"Turkmenistan","alpha-2":"TM","country-code":"795"},{name:"Turks and Caicos Islands","alpha-2":"TC","country-code":"796"},{name:"Tuvalu","alpha-2":"TV","country-code":"798"},{name:"Uganda","alpha-2":"UG","country-code":"800"},{name:"Ukraine","alpha-2":"UA","country-code":"804"},{name:"United Arab Emirates","alpha-2":"AE","country-code":"784"},{name:"United Kingdom of Great Britain and Northern Ireland","alpha-2":"GB","country-code":"826"},{name:"United States of America","alpha-2":"US","country-code":"840"},{name:"United States Minor Outlying Islands","alpha-2":"UM","country-code":"581"},{name:"Uruguay","alpha-2":"UY","country-code":"858"},{name:"Uzbekistan","alpha-2":"UZ","country-code":"860"},{name:"Vanuatu","alpha-2":"VU","country-code":"548"},{name:"Venezuela (Bolivarian Republic of)","alpha-2":"VE","country-code":"862"},{name:"Viet Nam","alpha-2":"VN","country-code":"704"},{name:"Virgin Islands (British)","alpha-2":"VG","country-code":"092"},{name:"Virgin Islands (U.S.)","alpha-2":"VI","country-code":"850"},{name:"Wallis and Futuna","alpha-2":"WF","country-code":"876"},{name:"Western Sahara","alpha-2":"EH","country-code":"732"},{name:"Yemen","alpha-2":"YE","country-code":"887"},{name:"Zambia","alpha-2":"ZM","country-code":"894"},{name:"Zimbabwe","alpha-2":"ZW","country-code":"716"}],format:{type:"json",parse:{"country-code":"number"}}},{name:"suppliers_per_country",source:"suppliers",transform:[{type:"aggregate",groupby:["country"],fields:["name"],ops:["count"],as:["companies"]},{type:"lookup",from:"wikirate_countries",key:"name",fields:["country"],values:["code"],as:["country_code"]},{type:"lookup",from:"country_codes",key:"alpha-2",fields:["country_code"],values:["country-code"],as:["country_number"]},{type:"lookup",from:"world",key:"id",fields:["country_number"],as:["geo"]},{type:"filter",expr:"datum.geo"},{type:"formula",as:"centroid",expr:"geoCentroid('projection', datum.geo)"}]},{name:"graticule",transform:[{type:"graticule"}]}],projections:[{name:"projection",type:{signal:"type"},scale:{signal:"scale"},rotate:[{signal:"rotate0"},{signal:"rotate1"},{signal:"rotate2"}],center:[{signal:"center0"},{signal:"center1"}],translate:[{signal:"translate0"},{signal:"translate1"}]}],scales:[{name:"size",domain:{data:"suppliers_per_country",field:"companies"},zero:!1,range:[50,2e3]},{name:"color",type:"linear",nice:!0,domain:{data:"suppliers_per_country",field:"companies"},range:["#fef1eb","#F7733D"]}],marks:[{type:"shape",from:{data:"graticule"},encode:{update:{strokeWidth:{value:1},stroke:{signal:"'#ddd'"},fill:{value:null}}},transform:[{type:"geoshape",projection:"projection"}]},{type:"shape",from:{data:"world"},encode:{update:{strokeWidth:{signal:"+borderWidth"},fill:{value:"#171832"},zindex:{value:0}}},transform:[{type:"geoshape",projection:"projection"}]},{name:"circles",type:"symbol",from:{data:"suppliers_per_country"},encode:{enter:{x:{field:"centroid[0]"},y:{field:"centroid[1]"},size:{scale:"size",field:"companies"},strokeWidth:{value:.7},tooltip:{signal:"{'title': datum.country, 'Number of Companies': datum.companies}"}},update:{fill:{scale:"color",field:"companies"},stroke:{value:"#171832"}},hover:{fill:{value:"#912E06"},stroke:{value:"#171832"}}},transform:[{type:"force",static:!0,forces:[{force:"collide",radius:{expr:"1 + sqrt(datum.size) / 2"}},{force:"x",x:"datum.centroid[0]"},{force:"y",y:"datum.centroid[1]"}]}]}],legends:[{fill:"color",orient:"bottom-left",title:"No. of Suppliers"}]},{renderer:"svg",actions:{source:!1,editor:!1}}))},i=>{})}onSelectYear(){this.updateChart()}onSelectCompany(){this.company=this.apparelService.getCompany(this.selectedCompany),this.title=0!=this.company.id?this.company.name:"The top 100 apparel companies'",this.updateChart()}static{this.\u0275fac=function(i){return new(i||e)(ee(ww),ee(sm),ee(aa))}}static{this.\u0275cmp=Cn({type:e,selectors:[["app-suppliers-map"]],viewQuery:function(i,r){if(1&i&&ua(ept,5),2&i){let o;Wt(o=qt())&&(r.mapElement=o.first)}},decls:31,vars:14,consts:[["map",""],[1,"wikirate-creme-box"],[1,"wikirate-container"],[1,"row"],[1,"col-md-8"],[1,"showcase-title"],[1,"showcase-subtitle"],[3,"ngStyle"],[4,"ngIf"],[1,"filters","col-md-4"],[1,"row","col","justify-content-md-end"],[1,"company-filter","mt-1","mr-1"],["id","inputCompany",1,"form-control","form-control-sm",3,"ngModelChange","change","ngModel"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"year-filter","mt-1"],["id","inputYear",1,"form-control","form-control-sm",3,"ngModelChange","change","ngModel"],["selected","",3,"ngValue"],[3,"ngValue"],[1,"row","mb-2","no-gutters","mt-2","col-12"],[1,"col-md"],["id","no_data","class","mt-4 text-center",4,"ngIf"],["id","no_data",1,"mt-4","text-center"],["src","assets/moon.svg","width","60px",1,"mb-1"],[1,"mt-2","showcase-main-text"]],template:function(i,r){if(1&i){const o=$o();U(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h2",5),X(5," Suppliers per country "),z(),U(6,"h3",6)(7,"span",7),X(8),z(),X(9," suppliers' locations "),mt(10,npt,2,1,"i",8)(11,ipt,2,1,"span",8),z()(),U(12,"div",9)(13,"div",10)(14,"div",11)(15,"select",12),kc("ngModelChange",function(a){return Fn(o),zu(r.selectedCompany,a)||(r.selectedCompany=a),Pn(a)}),nt("change",function(){return Fn(o),Pn(r.onSelectCompany())}),mt(16,rpt,2,2,"option",13),z()(),U(17,"div",14)(18,"select",15),kc("ngModelChange",function(a){return Fn(o),zu(r.selectedYear,a)||(r.selectedYear=a),Pn(a)}),nt("change",function(){return Fn(o),Pn(r.updateChart())}),U(19,"option",16),X(20,"latest"),z(),U(21,"option",17),X(22,"2020"),z(),U(23,"option",17),X(24,"2019"),z(),U(25,"option",17),X(26,"2018"),z()()()()(),U(27,"div",18,0)(29,"div",19),mt(30,opt,4,0,"div",20),z()()()()()}2&i&&(re(7),Ae("ngStyle",function Vg(e,t,n,i){return Oq(Q(),Mr(),e,t,n,i)}(12,tpt,0!=r.selectedCompany?"italic":"normal")),re(),kr(r.title),re(2),Ae("ngIf","latest"!==r.selectedYear),re(),Ae("ngIf","latest"===r.selectedYear),re(4),Ic("ngModel",r.selectedCompany),re(),Ae("ngForOf",r.apparelTop100),re(2),Ic("ngModel",r.selectedYear),re(),Ae("ngValue","latest"),re(2),Ae("ngValue",2020),re(2),Ae("ngValue",2019),re(2),Ae("ngValue",2018),re(5),Ae("ngIf",r.suppliers&&0==r.suppliers.length))},dependencies:[dm,fm,Qu,am,Qf,oD,J0,vK]})}}return e})(),apt=(()=>{class e{transform(n,i){return"string"==typeof n?n:Number.isNaN(n)?null:n<1e3?n:(r=Math.floor(Math.log(n)/Math.log(1e3)),(n/Math.pow(1e3,r)).toFixed(i)+["k","M","B","T","P","E"][r-1]);var r}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=lr({name:"bigNumSuff",type:e,pure:!0})}}return e})(),lpt=(()=>{class e{constructor(n){this.http=n,this.total_market_cap="unknown",this.total_employees="Unknown",this.number_of_suppliers="Unknown",this.workers_in_supply_chain="Unknown",this.selectedYear="latest"}ngOnInit(){this.updateSection()}ngAfterViewInit(){}updateSection(){this.http.get("https://wikirate.org/Core+Market_Cap+Answer.json?filter[not_ids]=&filter[year]="+this.selectedYear+"&filter[company_group][]=Apparel%20100%20Companies&limit=0&view=answer_list").subscribe(s=>{this.total_market_cap=this.getSum(s),gy("div#vis",{$schema:"https://vega.github.io/schema/vega/v5.json",description:"Market Cap of Apparel Top 100 Companies",width:900,height:560,autosize:"none",signals:[{name:"type",value:"equalEarth"},{name:"rotate0",value:-15},{name:"rotate1",value:0},{name:"rotate2",value:0},{name:"center0",value:0},{name:"center1",value:0},{name:"translate0",update:"width / 2"},{name:"translate1",update:"height / 2"},{name:"borderWidth",value:1},{name:"hover",value:null,on:[{events:"@circles:mouseover",update:"datum"},{events:"@circles:mouseout",update:"null"}]},{name:"title",value:"Market Cap of Apparel Top 100 Companies",update:"hover ? hover.name + ' (' + hover.market_cap_text + ')' : 'Market Cap of Apparel Top 100 Companies'"},{name:"cell_stroke",value:null,on:[{events:"dblclick",update:"cell_stroke ? null : 'brown'"},{events:"mousedown!",update:"cell_stroke"}]},{name:"tx",update:"width / 2"},{name:"ty",update:"height / 2"}],data:[{name:"world",url:"assets/world-110m.json",format:{type:"topojson",feature:"countries"},transform:[{type:"geopath",projection:"projection"}]},{name:"market_cap",values:s,format:{type:"json",parse:{value:"number"}}},{name:"apparel_top_100_geo",values:[{company:"Puma",lat:49.5755269,lng:10.8714149},{company:"H&M",lat:59.3317973,lng:18.0583112},{company:"Gap inc.",lat:37.79081085,lng:-122.3909804},{company:"Marks and Spencer Group plc",lat:51.51865225,lng:-.175000995},{company:"Asos",lat:51.5333888,lng:-.139905636},{company:"Nike Inc.",lat:45.507191,lng:-122.827393},{company:"Adidas AG",lat:49.58253265,lng:10.91048856},{company:"Louis Vuitton Malletier SA (LVMH)",lat:48.8586162,lng:2.3429393},{company:"Burberry Group plc",lat:51.49437555,lng:-.126392473},{company:"Guess? Inc",lat:34.02410214,lng:-118.2391726},{company:"Zalando SE",lat:52.50655705,lng:13.44148723},{company:"Nordstrom",lat:47.614361,lng:-122.335852},{company:"Fossil Group, Inc.",lat:32.939486,lng:-96.745425},{company:"Inditex",lat:43.32307,lng:-8.49019},{company:"American Eagle Outfitters",lat:40.4282854,lng:-79.9606724},{company:"Hugo Boss AG",lat:48.54694115,lng:9.271591308},{company:"Urban Outfitters",lat:39.9046154,lng:-75.1739344},{company:"Skechers USA Inc",lat:33.88490024,lng:-118.4100629},{company:"Ralph Lauren Corporation",lat:40.7638797,lng:-73.97161599},{company:"Prada",lat:43.5463209,lng:11.5707173},{company:"Under Armour",lat:39.27516635,lng:-76.5903856},{company:"Tapestry Inc",lat:40.75274965,lng:-74.00152052},{company:"Columbia Sportswear",lat:45.52966955,lng:-122.8248874},{company:"Foot Locker Inc.",lat:40.7526738,lng:-73.9950505},{company:"Abercrombie & Fitch",lat:40.0904919,lng:-82.7755106},{company:"Macy's",lat:40.7509149,lng:-73.98933149},{company:"DSW Inc.",lat:39.98864,lng:-82.89824},{company:"Esprit Holdings Limited",lat:22.2924077,lng:114.20294},{company:"Moncler",lat:45.4540887,lng:9.1588378},{company:"Asics Corporation",lat:34.6913,lng:135.183},{company:"Ross Stores",lat:37.7079277,lng:-121.8881302},{company:"Chico's FAS Inc",lat:28.75054,lng:-82.5001},{company:"Gildan Activewear Inc.",lat:45.504205,lng:-73.571125},{company:"Boohoo.com",lat:53.480813,lng:-2.2326412},{company:"Anta Sports Products",lat:24.66745455,lng:118.5540534},{company:"Gerry Weber",lat:52.0603355,lng:8.3615619},{company:"Brunello Cucinelli",lat:43.0830538,lng:12.277156},{company:"Next",lat:52.6071351,lng:-1.2418189},{company:"Salvatore Ferragamo SpA",lat:43.7722809,lng:11.2513491},{company:"Express Inc",lat:40.001342,lng:-83.094886},{company:"Tiffany & Co.",lat:42.7158328,lng:-73.7079487},{company:"Hermes International",lat:48.8688993,lng:2.3217376},{company:"Hudson's Bay Company",lat:43.7823924,lng:-79.7718789},{company:"United Arrows",lat:35.706766,lng:139.7616265},{company:"Canada Goose",lat:43.6954839,lng:-79.46397981},{company:"Bosideng International Holdings Limited",lat:31.2322758,lng:121.4692071},{company:"Metersbonwe",lat:31.2322758,lng:121.4692071},{company:"Dick's Sporting Goods",lat:40.465624,lng:-80.205892},{company:"Capri Holdings Ltd (formerly Michael Kors)",lat:51.51414,lng:-.11828},{company:"Buckle Inc",lat:40.699424,lng:-99.105033},{company:"TOD'S",lat:43.2627,lng:13.7203},{company:"Dillard's, Inc.",lat:34.753373,lng:-92.287569},{company:"Li-Ning",lat:39.812904,lng:116.547259},{company:"Children's Place Inc",lat:40.78885,lng:-74.056035},{company:"Steve Madden",lat:40.75017166,lng:-73.91508484},{company:"lululemon athletica",lat:49.272004,lng:-123.147121},{company:"PVH",lat:40.74969101,lng:-73.98155975},{company:"Ted Baker",lat:51.537667,lng:-.132265},{company:"Fast Retailing",lat:34.0372,lng:131.3577},{company:"JD Sports Fashion plc",lat:53.573908,lng:-2.278928},{company:"Burlington Stores Inc",lat:40.094145,lng:-74.812232},{company:"Sports Direct",lat:53.2063042,lng:-1.2205319},{company:"Superdry plc",lat:51.9202605,lng:-2.0968209},{company:"VF",lat:39.751618,lng:-105.002998},{company:"Christian Dior",lat:48.8697044,lng:2.325038},{company:"Semir",lat:27.9963899,lng:120.695345},{company:"L Brands",lat:39.981797,lng:-83.033627},{company:"Deckers Outdoor Corporation",lat:34.4314978,lng:-119.8635551},{company:"Hanesbrands",lat:36.18900595,lng:-80.2640623},{company:"Carter's Inc",lat:33.848681,lng:-84.366387},{company:"TJX",lat:42.308755,lng:-71.382745},{company:"Oxford Industries Inc",lat:33.7811172,lng:-84.3837092},{company:"Cato Corp",lat:35.128699,lng:-80.87873},{company:"JC Penney",lat:33.0136764,lng:-96.6925096},{company:"G-III Apparel Group, LTD.",lat:40.6256945,lng:-73.9870861},{company:"Lojas Renner S.A.",lat:-30.0324999,lng:-51.2303767},{company:"Kering",lat:48.8464177,lng:2.3153025},{company:"Caleres Inc",lat:38.6526865,lng:-90.3477704},{company:"Genesco Inc.",lat:36.114742,lng:-86.693776},{company:"Ascena Retail Group Inc",lat:41.07202702,lng:-74.17060403},{company:"Wolverine World Wide",lat:43.13425389,lng:-85.54185089},{company:"Mulberry Group Plc",lat:51.50370825,lng:-.191581413},{company:"Luxottica Group SpA",lat:45.4673878,lng:9.1775777},{company:"Arvind Limited",lat:23.0583877,lng:72.6371753},{company:"Aditya Birla Fashion & Retail Ltd",lat:19.0652797,lng:72.8793805},{company:"Vipshop Holdings",lat:23.1025812,lng:113.2245207},{company:"Geox SpA",lat:45.7883555,lng:12.0476363},{company:"Alpargatas - Havaianas",lat:-23.5506507,lng:-46.6333824},{company:"Onward Holdings",lat:35.666255,lng:139.775565},{company:"Lao Feng Xiang Jewelry",lat:31.2322758,lng:121.4692071},{company:"Richemont",lat:46.2587,lng:6.1351},{company:"Cia Hering",lat:-7.33561,lng:-47.46218},{company:"Vera Bradley Inc.",lat:40.9570408,lng:-85.3015323},{company:"Boot Barn Holdings Inc.",lat:33.6596704,lng:-117.7380569},{company:"Swatch Group",lat:47.1354263,lng:7.234641},{company:"Francesca's",lat:29.83278726,lng:-95.51077112},{company:"Chow Tai Fook",lat:22.28365,lng:114.15494},{company:"Van de Velde",lat:51.01324,lng:3.9258203},{company:"YOOX NET-A-PORTER Group SpA",lat:45.4450409,lng:9.1514221},{company:"Grendene",lat:-3.68611,lng:-40.34972}]},{name:"apparel_top_100_companies",url:"../../assets/content/Apparel-100-Companies.json",format:{type:"json",property:"items"},transform:[{type:"lookup",from:"market_cap",key:"company",fields:["id"],values:["value"],as:["market_cap"],default:0},{type:"lookup",from:"apparel_top_100_geo",key:"company",fields:["name"],values:["lat","lng"],as:["lat","lng"],default:0},{type:"geopoint",projection:"projection",fields:["lng","lat"]},{type:"formula",as:"market_cap_text",expr:"replace(format(datum.market_cap,'$,.4s'), 'G', 'B')"}]},{name:"graticule",transform:[{type:"graticule",step:[15,15]}]}],projections:[{name:"projection",type:"mercator"}],scales:[{name:"size",domain:{data:"apparel_top_100_companies",field:"market_cap"},zero:!1,range:[30,500]},{name:"color",type:"linear",nice:!0,domain:{data:"apparel_top_100_companies",field:"market_cap"},range:["#fef1eb","#F7733D"]}],marks:[{type:"shape",from:{data:"graticule"},encode:{update:{strokeWidth:{value:1},fill:{value:null}}},transform:[{type:"geoshape",projection:"projection"}]},{type:"shape",from:{data:"world"},encode:{update:{fill:{value:"#1D1E3F"},stroke:{value:"rgba(247,247,248, 0.8)"},strokeWidth:{signal:"+borderWidth"},zindex:{value:0}}},transform:[{type:"geoshape",projection:"projection"}]},{name:"circles",type:"symbol",from:{data:"apparel_top_100_companies"},encode:{enter:{x:{field:"x"},y:{field:"y"},size:{scale:"size",field:"market_cap"},fillOpacity:{value:1},stroke:{value:"white"},strokeWidth:{value:.5},tooltip:{signal:"{'title': datum.name,'Headquarters': datum.headquarters, 'Market Cap': datum.market_cap_text}"}},update:{fill:{scale:"color",field:"market_cap"},stroke:{value:"#171832"}},hover:{fill:{value:"#912E06"},stroke:{value:"#171832"}}},transform:[{type:"force",static:!0,forces:[{force:"collide",radius:{expr:"1 + sqrt(datum.size) / 2"}},{force:"x",x:"datum.x"},{force:"y",y:"datum.y"}]}]},{type:"text",interactive:!1,encode:{enter:{x:{value:895},y:{value:550},fill:{value:"#F7F7F8"},fontSize:{value:12},align:{value:"right"}},update:{text:{signal:"title"}}}}],legends:[{fill:"color",orient:"bottom-left",title:"Market Cap (in USD$)",labelColor:"#F7F7F8",titleColor:"#F7F7F8"}]},{renderer:"svg",actions:{source:!1,editor:!1}}).catch(console.warn)}),this.http.get("https://wikirate.org/Commons+Employee+Answer.json?filter[not_ids]=&filter[company_name]=&filter[year]="+this.selectedYear+"&filter[company_group][]=Apparel%20100%20Companies&limit=0&view=answer_list").subscribe(s=>{this.total_employees=this.getSum(s)}),this.http.get("https://wikirate.org/Commons+Supplied_By+Answers.json?filter[not_ids]=&filter[company_name]=&filter[company_group][]=Apparel%20100%20Companies&filter[year]="+this.selectedYear+"&limit=100&view=answer_list").subscribe(s=>{this.number_of_suppliers=this.getSum(s)}),this.http.get("https://wikirate.org/Clean_Clothes_Campaign+Number_of_Workers+Answers.json?filter[not_ids]=&filter[company_name]=&filter[company_group][]=Supplier of Apparel 100&view=answer_list").subscribe(s=>{this.workers_in_supply_chain=this.getSum(s)})}getSum(n){let i=0;for(var r=0;r{class e{constructor(){}ngOnInit(){this.createChart()}createChart(){gy("div#line-chart",{$schema:"https://vega.github.io/schema/vega/v5.json",description:"Apparel Top 100 Companies Reporting their Suppliers.",width:500,height:200,padding:5,signals:[{name:"interpolate",value:"cardinal"}],data:[{name:"supplier_lists",url:"https://wikirate.org/Commons+Supplier_List_all+Answer.json?filter[not_ids]=&filter[company_name]=&filter[value][]=Yes&filter[company_group][]=Apparel%20100%20Companies&limit=0&view=answer_list",format:{type:"json",property:"items"},transform:[{type:"aggregate",groupby:["year"],fields:["company"],ops:["count"],as:["number_of_lists"]},{type:"filter",expr:"datum.year > 2016 && datum.year < 2021"}]}],scales:[{name:"x",type:"linear",range:"width",nice:!0,zero:!1,round:!0,domain:[2016,2021]},{name:"y",type:"linear",domain:[0,100],range:"height",nice:!0,zero:!1,round:!0},{name:"align",type:"ordinal",domain:["left","right","top","bottom"],range:["right","left","center","center"]},{name:"base",type:"ordinal",domain:["left","right","top","bottom"],range:["middle","middle","bottom","top"]},{name:"dx",type:"ordinal",domain:["left","right","top","bottom"],range:[-7,6,0,0]},{name:"dy",type:"ordinal",domain:["left","right","top","bottom"],range:[1,1,-5,8]}],axes:[{orient:"bottom",scale:"x",tickMinStep:1,format:""},{orient:"left",scale:"y",tickMinStep:2}],marks:[{type:"line",from:{data:"supplier_lists"},encode:{enter:{interpolate:{value:"linear"},x:{scale:"x",field:"year"},y:{scale:"y",field:"number_of_lists"},stroke:{value:"#000"},strokeWidth:{value:3}}}},{type:"symbol",from:{data:"supplier_lists"},encode:{enter:{x:{scale:"x",field:"year"},y:{scale:"y",field:"number_of_lists"},fill:{value:"#fff"},stroke:{value:"#000"},strokeWidth:{value:1},size:{value:60},tooltip:{signal:"{'Number of Companies': datum.number_of_lists, 'Year': datum.year}"}},update:{fill:{value:"#fff"},stroke:{value:"#000"}},hover:{fill:{value:"#000"},stroke:{value:"#fff"}}}}]},{renderer:"svg",actions:{source:!1,editor:!1}})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=Cn({type:e,selectors:[["app-supplier-lists-on-wikirate"]],decls:20,vars:0,consts:[[1,"wikirate-container"],[1,"row"],[1,"col-md-8"],[1,"showcase-title"],[1,"showcase-subtitle"],[1,"col-md"],[1,"wikirate","chart-container","mt-2"],["id","line-chart",1,"m-2"],[1,"col-md-9"],[1,"showcase-main-text","mt-2"],[1,"col-md-3","d-flex","align-items-end"],[1,"explore","mt-1","d-none","d-md-block","ml-auto"],["target","_blank","href","https://wikirate.org/Apparel_100_Analysis?filter%5Bnot_ids%5D=&filter%5Bcompany_name%5D=&filter%5Bmetric_name%5D=Supplier%20List%20(all)"],[1,"bi","bi-arrow-right","ml-1"]],template:function(i,r){1&i&&(U(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2",3),X(4," Companies reporting their suppliers "),z(),U(5,"h3",4),X(6," Number of the top 100 apparel companies publishing their list of suppliers "),z()()(),U(7,"div",1)(8,"div",5)(9,"div",6),Ke(10,"div",7),z()()(),U(11,"div",1)(12,"div",8)(13,"div",9),X(14," The number of the top 100 apparel companies reporting their suppliers more than doubled from 10 to 23 between 2017 and 2020. "),z()(),U(15,"div",10)(16,"div",11)(17,"a",12),X(18,"Dive Deeper"),Ke(19,"i",13),z()()()()())},styles:[".explore[_ngcontent-%COMP%]{font-family:IBMPlexSans;font-style:normal;font-weight:700;font-size:14px;line-height:16px;letter-spacing:.3px;color:#484c9d;text-transform:uppercase;text-align:center}a[_ngcontent-%COMP%]{color:inherit;text-decoration:inherit}"]})}}return e})(),upt=(()=>{class e{transform(n,i){return"string"==typeof n?n:Number.isNaN(n)?null:n<1e3?n:n.toString().slice(0,n.toString().length-3)+","+n.toString().slice(-3)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=lr({name:"numFormat",type:e,pure:!0})}}return e})();function dpt(e,t){if(1&e&&(U(0,"span")(1,"i"),X(2),z()()),2&e){const n=Qe();re(2),kr("For "+n.selectedYear)}}function fpt(e,t){1&e&&(U(0,"i"),X(1,"For the most recent years"),z())}let hpt=(()=>{class e{constructor(n,i){this.http=n,this.route=i,this.number_of_reporting_companies="Unknown",this.unique_suppliers="Unknown",this.selectedYear="latest"}ngOnInit(){this.updateSection(),this.updateChart()}ngAfterViewInit(){}updateChart(){gy("div#bar-chart",{$schema:"https://vega.github.io/schema/vega/v5.json",description:"Number of Published Supplier Lists",width:750,height:510,padding:5,autosize:"fit",data:[{name:"companies",url:"../../assets/content/Apparel-100-Companies.json",format:{type:"json",property:"items"}},{name:"published_supplier_lists",url:"https://wikirate.org/Commons+Supplier_List_all+Answers.json?filter[not_ids]=&filter[company_name]=&filter[value][]=Yes&filter[company_group][]=Apparel%20100%20Companies&view=answer_list&limit=0",transform:[{type:"lookup",from:"companies",key:"id",fields:["company"],values:["name","headquarters"],as:["company_name","headquarters"],default:0},{type:"aggregate",groupby:["company_name","headquarters"]}]}],marks:[{type:"rect",from:{data:"published_supplier_lists"},encode:{update:{y:{scale:"y",value:0},y2:{scale:"y",field:"count"},x:{scale:"x",field:"company_name"},width:{scale:"x",band:1},tooltip:{signal:"{'Company':datum.company_name, 'Headquarters':datum.headquarters , 'No. of Supplier Lists':datum.count}"},fill:{scale:"color",field:"count"},cornerRadiusTopRight:{value:5},cornerRadiusTopLeft:{value:5}},hover:{fill:{value:"#912E06"}}}}],scales:[{name:"y",type:"linear",domain:{data:"published_supplier_lists",field:"count"},range:"height",nice:!0},{name:"x",type:"band",domain:{data:"published_supplier_lists",field:"company_name",sort:{op:"max",field:"count",order:"descending"}},range:"width",padding:.1},{name:"color",type:"linear",nice:!0,domain:{data:"published_supplier_lists",field:"count"},range:["#fef1eb","#F7733D"]}],axes:[{scale:"y",orient:"left",format:",d",tickCount:5,labelFontSize:14,tickColor:"#F7F7F8",labelColor:"#F7F7F8",domainColor:"#F7F7F8"},{scale:"x",orient:"bottom",labelAngle:55,labelAlign:"left",labelLimit:100,labelFontSize:14,tickColor:"#F7F7F8",labelColor:"#F7F7F8",domainColor:"#F7F7F8"}]},{renderer:"svg",actions:{source:!1,editor:!1}})}updateSection(){this.http.get("https://wikirate.org/Commons+Supplied_By+Answer.json?filter[not_ids]=&filter[company_name]=&filter[company_group][]=Apparel%20100%20Companies&view=answer_list&limit=0&filter[year]="+this.selectedYear).subscribe(r=>{this.number_of_reporting_companies=0;for(var o=0;o{this.unique_suppliers=r.length})}static{this.\u0275fac=function(i){return new(i||e)(ee(ww),ee(Cl))}}static{this.\u0275cmp=Cn({type:e,selectors:[["app-number-of-suppliers-per-company"]],decls:43,vars:12,consts:[[1,"wikirate-navy-box"],[1,"wikirate-container"],[1,"row"],[1,"col-md-8"],[1,"showcase-title","text-white"],[1,"showcase-subtitle-white"],[1,"col-md-4","mt-2","mb-2"],[1,"year-filter","col-md-5","ml-md-auto"],["id","inputYear",1,"form-control-navy","form-control-sm",3,"ngModelChange","change","ngModel"],["selected","","value","latest",3,"ngValue"],["value","2020",3,"ngValue"],["value","2019",3,"ngValue"],["value","2018",3,"ngValue"],[1,"row","mt-2"],[1,"col-md"],[1,"wikirate-box","chart-container"],["id","bar-chart",1,"m-2"],[1,"showcase-main-text-white","col-md-9"],[4,"ngIf"],[1,"col-md-3","d-flex","align-items-end"],[1,"explore","mt-1","d-none","d-md-block","ml-auto"],["target","_blank","href","https://wikirate.org/Apparel_100_Analysis?filter%5Bnot_ids%5D=&filter%5Bcompany_name%5D=&filter%5Bmetric_name%5D=Supplied%20By&filter%5Byear%5D=latest"],[1,"bi","bi-arrow-right","ml-1"]],template:function(i,r){1&i&&(U(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h2",4),X(5," Published supplier lists "),z(),U(6,"h3",5),X(7,"Number of published supplier lists per company since 2017"),z()(),U(8,"div",6)(9,"div",7)(10,"select",8),kc("ngModelChange",function(s){return zu(r.selectedYear,s)||(r.selectedYear=s),s}),nt("change",function(){return r.updateSection()}),U(11,"option",9),X(12,"latest"),z(),U(13,"option",10),X(14,"2020"),z(),U(15,"option",11),X(16,"2019"),z(),U(17,"option",12),X(18,"2018"),z()()()()(),U(19,"div",13)(20,"div",14)(21,"div",15),Ke(22,"div",16),z()()(),U(23,"div",13)(24,"div",17),mt(25,dpt,3,1,"span",18)(26,fpt,2,0,"i",18),X(27," WikiRate's researchers retrieved the supplier lists of "),U(28,"i"),X(29),z(),X(30," out of the top 100 companies. In total, these "),U(31,"i"),X(32),z(),X(33," were supplied by "),U(34,"i"),X(35),Ug(36,"numFormat"),z(),X(37,". "),z(),U(38,"div",19)(39,"div",20)(40,"a",21),X(41,"Dive Deeper"),Ke(42,"i",22),z()()()()()()),2&i&&(re(10),Ic("ngModel",r.selectedYear),re(),Ae("ngValue","latest"),re(2),Ae("ngValue",2020),re(2),Ae("ngValue",2019),re(2),Ae("ngValue",2018),re(8),Ae("ngIf","latest"!==r.selectedYear),re(),Ae("ngIf","latest"===r.selectedYear),re(3),Or("",r.number_of_reporting_companies," companies"),re(3),Or("",r.number_of_reporting_companies," companies"),re(3),Or("",function $q(e,t,n){const i=e+Ie,r=Q(),o=Tf(r,i);return V0(r,i)?Oq(r,Mr(),t,o.transform,n,o):o.transform(n)}(36,10,r.unique_suppliers)," different suppliers"))},dependencies:[dm,fm,Qu,am,Qf,J0,upt],styles:[".explore[_ngcontent-%COMP%]{font-family:IBMPlexSans;font-style:normal;font-weight:700;font-size:14px;line-height:16px;letter-spacing:.3px;color:#f7f7f8;text-transform:uppercase;text-align:center}a[_ngcontent-%COMP%]{color:inherit;text-decoration:inherit}"]})}}return e})(),ppt=(()=>{class e{constructor(n){this.router=n}ngOnInit(){}static{this.\u0275fac=function(i){return new(i||e)(ee(Uo))}}static{this.\u0275cmp=Cn({type:e,selectors:[["more-data"]],decls:12,vars:0,consts:[[1,"wikirate-box"],[1,"wikirate-container","align-content-center"],[1,"row","justify-content-center"],[1,"showcase-title","call-to-action-title","text-center","mb-2","col-8"],[1,"mini-text","col-8"],[1,"row","justify-content-center","mt-4"],[1,"explore","mt-1"],["target","_blank","href","https://docs.google.com/forms/d/e/1FAIpQLSf4vZZ25-LQ1_xxriPxFH-Iwm6Mgok6exzAe1B3Hus1Yj8ifg/viewform"],[1,"bi","bi-arrow-right","ml-1"]],template:function(i,r){1&i&&(U(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2",3),X(4,"We need more open data"),z(),U(5,"div",4),X(6," The top 100 apparel companies in the world disclose only half of key environmental, social and governance indicators assessed here. To create systemic change and achieve the environmental and societal goals of the 21st century, we need more comparable, open data! "),z()(),U(7,"div",5)(8,"div",6)(9,"a",7),X(10,"Learn More"),Ke(11,"i",8),z()()()()())},styles:[".explore[_ngcontent-%COMP%]{font-family:IBMPlexSans;font-style:normal;font-weight:700;font-size:14px;line-height:16px;letter-spacing:.3px;color:#484c9d;text-transform:uppercase;text-align:center}a[_ngcontent-%COMP%]{cursor:pointer;color:inherit;text-decoration:inherit}"]})}}return e})();const gpt=["radarChartContainer"];function mpt(e,t){if(1&e&&(U(0,"option",16),X(1),z()),2&e){const n=t.$implicit;Ae("ngValue",n.id),re(),kr(n.name)}}function _pt(e,t){1&e&&(U(0,"div",21),Ke(1,"img",22),U(2,"p",23),X(3,"You explored unresearched areas, no data available."),z()())}let ypt=(()=>{class e{constructor(n,i,r,o){this.http=n,this.route=i,this.apparelService=r,this.renderer=o,this.environmental_disclosure_rate=0,this.social_disclosure_rate=0,this.governance_disclosure_rate=0,this.nodata=!0,this.selectedYear="latest",this.selectedCompany=0,this.apparelTop100=[],this.apparelTop100=r.getCompanies()}ngOnInit(){this.updateSection()}updateSection(){null!=this.radarChart&&this.renderer.removeChild(this.radarChartContainer.nativeElement,this.radarChart),this.nodata=!0,0!=this.selectedCompany?this.http.get("https://wikirate.org/Apparel_Research_Group+Environmental_Disclosure_Rate+~"+this.selectedCompany+"+Answer.json?filter[not_ids]=&filter[company_name]=&filter[year]="+this.selectedYear+"&limit=0&view=answer_list").subscribe(n=>{n.length>0&&(this.environmental_disclosure_rate=n[0].value,this.http.get("https://wikirate.org/Apparel_Research_Group+Social_Disclosure_Rate+~"+this.selectedCompany+"+Answer.json?filter[not_ids]=&filter[company_name]=&filter[year]="+this.selectedYear+"&limit=0&view=answer_list").subscribe(i=>{i.length>0&&(this.social_disclosure_rate=i[0].value,this.http.get("https://wikirate.org/Apparel_Research_Group+Governance_Disclosure_Rate+~"+this.selectedCompany+"+Answer.json?filter[not_ids]=&filter[company_name]=&filter[year]="+this.selectedYear+"&limit=0&view=answer_list").subscribe(r=>{r.length>0&&(this.governance_disclosure_rate=r[0].value,this.nodata=!1,this.radarChart=this.renderer.createElement("div"),this.radarChart.id="esg-performance",this.radarChart.class="radar-chart-container m-2",this.renderer.appendChild(this.radarChartContainer.nativeElement,this.radarChart),this.updateRadarChart("of "+this.apparelService.getCompany(+this.selectedCompany).name))}))}))}):this.http.get("https://wikirate.org/Apparel_Research_Group+Environmental_Disclosure_Rate+Answer.json?filter[not_ids]=&filter[company_name]=&filter[year]="+this.selectedYear+"&limit=0&view=answer_list").subscribe(n=>{this.environmental_disclosure_rate=0;for(var i=0;i{this.social_disclosure_rate=0;for(var o=0;o{this.governance_disclosure_rate=0;for(var a=0;a PI / 2",value:"right"},{value:"left"}],baseline:[{test:"scale('angular', datum.key) > 0",value:"top"},{test:"scale('angular', datum.key) == 0",value:"middle"},{value:"bottom"}],fill:{value:"#F7F7F8"},fontWeight:{value:"bold"}}}},{type:"line",name:"outer-line",from:{data:"radial-grid"},encode:{enter:{interpolate:{value:"linear-closed"},x:{field:"x2"},y:{field:"y2"},stroke:{value:"#F7F7F8"},strokeWidth:{value:1}}}}]},{renderer:"svg",actions:{source:!1,editor:!1}})}static{this.\u0275fac=function(i){return new(i||e)(ee(ww),ee(Cl),ee(sm),ee(aa))}}static{this.\u0275cmp=Cn({type:e,selectors:[["app-esg-performance"]],viewQuery:function(i,r){if(1&i&&ua(gpt,5),2&i){let o;Wt(o=qt())&&(r.radarChartContainer=o.first)}},decls:30,vars:8,consts:[["radarChartContainer",""],[1,"wikirate-navy-box"],[1,"wikirate-container"],[1,"row"],[1,"col-md-8","vertical-center"],[1,"content-container"],[1,"showcase-title","text-white"],[1,"showcase-subtitle-white"],[1,"filters","col-md-4"],[1,"row","col","justify-content-md-end"],[1,"company-filter","mt-1","mr-1"],["id","inputCompany",1,"form-control-navy","form-control-sm",3,"ngModelChange","change","ngModel"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"year-filter","mt-1"],["id","inputYear",1,"form-control-navy","form-control-sm",3,"ngModelChange","change","ngModel"],["selected","",3,"ngValue"],[3,"ngValue"],[1,"row","col-12","mt-2"],[1,"col-md"],[1,"chart-container"],["id","no_data","class","text-center mt-5",4,"ngIf"],["id","no_data",1,"text-center","mt-5"],["src","assets/moon-light.svg","width","60px",1,"mb-1"],[1,"mt-3","showcase-main-text","text-white"]],template:function(i,r){if(1&i){const o=$o();U(0,"div",1),Ke(1,"hr"),U(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"h2",6),X(7," Broken-down company ESG disclosure rating "),z(),U(8,"h3",7),X(9," The top 100 apparel companies\u2019 ESG disclosure rates per axis by year "),z()()(),U(10,"div",8)(11,"div",9)(12,"div",10)(13,"select",11),kc("ngModelChange",function(a){return Fn(o),zu(r.selectedCompany,a)||(r.selectedCompany=a),Pn(a)}),nt("change",function(){return Fn(o),Pn(r.updateSection())}),mt(14,mpt,2,2,"option",12),z()(),U(15,"div",13)(16,"select",14),kc("ngModelChange",function(a){return Fn(o),zu(r.selectedYear,a)||(r.selectedYear=a),Pn(a)}),nt("change",function(){return Fn(o),Pn(r.updateSection())}),U(17,"option",15),X(18,"latest"),z(),U(19,"option",16),X(20,"2020"),z(),U(21,"option",16),X(22,"2019"),z(),U(23,"option",16),X(24,"2018"),z()()()()(),U(25,"div",17)(26,"div",18)(27,"div",19,0),mt(29,_pt,4,0,"div",20),z()()()()()()}2&i&&(re(13),Ic("ngModel",r.selectedCompany),re(),Ae("ngForOf",r.apparelTop100),re(2),Ic("ngModel",r.selectedYear),re(),Ae("ngValue","latest"),re(2),Ae("ngValue",2020),re(2),Ae("ngValue",2019),re(2),Ae("ngValue",2018),re(6),Ae("ngIf",r.nodata))},dependencies:[dm,fm,Qu,am,Qf,oD,J0],styles:[".radar-chart-container[_ngcontent-%COMP%]{width:470px;height:380px;border-radius:5px}"]})}}return e})(),vpt=(()=>{class e{constructor(){this.selectedYear="latest",this.innerWidth=0}ngOnInit(){this.innerWidth=window.innerWidth,console.log(this.innerWidth),this.updateBarChart()}updateBarChart(){let n=20;this.innerWidth>=1200?n=40:this.innerWidth>=800&&(n=30),gy("div#esg-overall-wikirating",{$schema:"https://vega.github.io/schema/vega/v5.json",description:"ESG Disclosure Rate",width:1080,height:510,padding:5,signals:[{name:"companies",value:n,bind:{input:"range",min:20,max:100,step:1}},{name:"order",value:"descending",bind:{input:"select",options:["ascending","descending"]}}],data:[{name:"apparel_companies",url:"../../assets/content/Apparel-100-Companies.json",format:{type:"json",property:"items"}},{name:"suppplier_info",url:"https://wikirate.org/Apparel_Research_Group+ESG_Disclosure_Rate+Answers.json?filter[not_ids]=&filter[company_name]=&filter[year]="+this.selectedYear+"&filter[company_group][]=Apparel%20100%20Companies&view=answer_list&limit=0",format:{type:"json",parse:{value:"number"}},transform:[{type:"lookup",from:"apparel_companies",key:"id",fields:["company"],values:["name","headquarters"],as:["company_name","headquarters"],default:0},{type:"window",sort:{field:"value",order:{signal:"order"}},ops:["row_number"],as:["rank"]},{type:"filter",expr:"datum.rank <= companies"},{type:"formula",as:"rate",expr:"format(datum.value,',.2f')"}]}],marks:[{type:"rect",from:{data:"suppplier_info"},encode:{update:{y:{scale:"y",value:0},y2:{scale:"y",field:"value"},x:{scale:"x",field:"company_name"},width:{scale:"x",band:1},tooltip:{signal:"{'Company':datum.company_name, 'Headquarters':datum.headquarters , 'ESG Disclosure Rate':datum.rate}"},fill:{scale:"color",field:"value"},cornerRadiusTopRight:{value:3},cornerRadiusTopLeft:{value:3}},hover:{fill:{value:"black"}}}}],scales:[{name:"y",type:"linear",domain:[0,10],range:"height",nice:!0},{name:"x",type:"band",domain:{data:"suppplier_info",field:"company_name",sort:{op:"max",field:"value",order:{signal:"order"}}},range:"width",padding:.1},{name:"color",type:"linear",nice:!0,domain:{data:"suppplier_info",field:"value"},range:["#fef1eb","#F7733D"]}],axes:[{scale:"y",orient:"left",format:",d",tickCount:5,labelFontSize:{signal:"10 + 300 / companies"}},{scale:"x",orient:"bottom",labelAngle:55,labelAlign:"left",labelLimit:130,labelFontSize:{signal:"10 + 300 / companies"}}]},{renderer:"svg",actions:{source:!1,editor:!1}})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=Cn({type:e,selectors:[["app-esg-disclosure-rates"]],decls:29,vars:7,consts:[[1,"wikirate-box"],[1,"wikirate-container"],[1,"row"],[1,"col-md-8"],[1,"showcase-title"],[1,"showcase-subtitle"],[1,"filters","col-md-4","mt-1"],[1,"year-filter","col-md-5","ml-auto"],["id","inputYear",1,"form-control","form-control-sm",3,"ngModelChange","change","ngModel"],["selected","","value","latest",3,"ngValue"],["value","2020",3,"ngValue"],["value","2019",3,"ngValue"],[1,"col-12","mt-2"],[1,"bar-chart-container"],["id","esg-overall-wikirating",1,"m-2"],[1,"showcase-main-text","mt-2","col-md-9"],[1,"col-md-3","d-flex","align-items-end"],[1,"explore","mt-1","d-none","d-md-block","ml-auto"],["target","_blank",3,"href"],[1,"bi","bi-arrow-right","ml-1"]],template:function(i,r){1&i&&(U(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h2",4),X(5),z(),U(6,"h3",5),X(7," Based on ESG data shared by companies publicly "),z()(),U(8,"div",6)(9,"div",7)(10,"select",8),kc("ngModelChange",function(s){return zu(r.selectedYear,s)||(r.selectedYear=s),s}),nt("change",function(){return r.updateBarChart()}),U(11,"option",9),X(12,"latest"),z(),U(13,"option",10),X(14,"2020"),z(),U(15,"option",11),X(16,"2019"),z()()()()(),U(17,"div",2)(18,"div",12)(19,"div",13),Ke(20,"div",14),z()()(),U(21,"div",2)(22,"div",15),X(23," Nearly a third of the top 100 apparel companies don\u2019t publish a recent report with sustainability information. For example, only half share information about their greenhouse gas (GHG) emissions. "),z(),U(24,"div",16)(25,"div",17)(26,"a",18),X(27,"Dive Deeper"),Ke(28,"i",19),z()()()()()()),2&i&&(re(5),Or(" Company ESG disclosure rating (",r.selectedYear,") "),re(5),Ic("ngModel",r.selectedYear),re(),Ae("ngValue","latest"),re(2),Ae("ngValue",2020),re(2),Ae("ngValue",2019),re(11),Uu("href","https://wikirate.org/Apparel_100_Analysis?filter%5Bnot_ids%5D=&filter%5Bcompany_name%5D=&filter%5Bmetric_name%5D=ESG%20Disclosure&filter%5Byear%5D=",r.selectedYear,"",Oo))},dependencies:[dm,fm,Qu,am,Qf],styles:[".explore[_ngcontent-%COMP%]{font-family:IBMPlexSans;font-style:normal;font-weight:700;font-size:14px;line-height:16px;letter-spacing:.3px;color:#484c9d;text-transform:uppercase;text-align:center}a[_ngcontent-%COMP%]{color:inherit;text-decoration:inherit}"]})}}return e})(),bpt=(()=>{class e{constructor(n,i,r,o){this.route=n,this.scroll=i,this.meta=r,this.titleService=o,o.setTitle("Apparel companies' ESG data disclosure ratings & supplier transparency"),r.addTags([{name:"keywords",content:"wikirate, esg data,apparel supply chain,apparel company esg ratings,manufacturing supply chain,supply chain,supply transparency,apparel esg data,fashion esg data,esg company,esg companies,esg company rating,esg rating,esg ratings,esg ranking,esg rankings,esg data ranking,esg data rating,environmental,environmental concerns,social concerns,environmental social corporate governance,adidas esg data,data visualizations,data infographics, Laureen van Breen"},{name:"description",content:"Discover ESG data disclosure ratings and supplier transparency of the biggest 100 apparel companies in infographics, charts, and maps by Wikirate."},{name:"author",content:"Theresa Heithaus, Tom Howie, Laureen van Breen, Melanie Twele, Vasiliki Gkatziaki"}])}ngOnInit(){this.route.params.subscribe(n=>{this.report_params={id:+n.id,year:n.year}}),this.scrollToTop()}scrollToTop(){this.scroll.scrollToPosition([0,0])}static{this.\u0275fac=function(i){return new(i||e)(ee(Cl),ee(tv),ee(qK),ee(MR))}}static{this.\u0275cmp=Cn({type:e,selectors:[["dynamic-report"]],decls:8,vars:0,consts:[["id","market-cap-map"]],template:function(i,r){1&i&&Ke(0,"intro")(1,"app-market-cap-map",0)(2,"app-esg-disclosure-rates")(3,"app-esg-performance")(4,"app-supplier-lists-on-wikirate")(5,"app-number-of-suppliers-per-company")(6,"app-suppliers-map")(7,"more-data")},dependencies:[MBe,spt,lpt,cpt,hpt,ppt,ypt,vpt]})}}return e})();function Gye(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Wye(e){return[Lr,Ho,zo,$r].some(function(t){return e[t]>=0})}const qye={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function wpt(e){var t=e.state,n=e.name,i=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,s=vm(t,{elementContext:"reference"}),a=vm(t,{altBoundary:!0}),l=Gye(s,i),c=Gye(a,r,o),u=Wye(l),d=Wye(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};var kV=XD({defaultModifiers:[QF,ZF,JF,eP,tP,qF,KF,XF,qye]});const hf=new Map,OV={set(e,t,n){hf.has(e)||hf.set(e,new Map);const i=hf.get(e);i.has(t)||0===i.size?i.set(t,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(e,t)=>hf.has(e)&&hf.get(e).get(t)||null,remove(e,t){if(!hf.has(e))return;const n=hf.get(e);n.delete(t),0===n.size&&hf.delete(e)}},RV="transitionend",Yye=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(t,n)=>`#${CSS.escape(n)}`)),e),Kye=e=>{e.dispatchEvent(new Event(RV))},Cu=e=>!(!e||"object"!=typeof e)&&(typeof e.jquery<"u"&&(e=e[0]),typeof e.nodeType<"u"),pf=e=>Cu(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(Yye(e)):null,_y=e=>{if(!Cu(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const i=e.closest("summary");if(i&&i.parentNode!==n||null===i)return!1}return t},gf=e=>!(e&&e.nodeType===Node.ELEMENT_NODE&&!e.classList.contains("disabled"))||(typeof e.disabled<"u"?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")),Xye=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?Xye(e.parentNode):null},TN=()=>{},Qye=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,FV=[],Xs=()=>"rtl"===document.documentElement.dir,Qs=e=>{(e=>{"loading"===document.readyState?(FV.length||document.addEventListener("DOMContentLoaded",()=>{for(const t of FV)t()}),FV.push(e)):e()})(()=>{const t=Qye();if(t){const n=e.NAME,i=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=i,e.jQueryInterface)}})},Ao=(e,t=[],n=e)=>"function"==typeof e?e(...t):n,Zye=(e,t,n=!0)=>{if(!n)return void Ao(e);const r=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const i=Number.parseFloat(t),r=Number.parseFloat(n);return i||r?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0})(t)+5;let o=!1;const s=({target:a})=>{a===t&&(o=!0,t.removeEventListener(RV,s),Ao(e))};t.addEventListener(RV,s),setTimeout(()=>{o||Kye(t)},r)},PV=(e,t,n,i)=>{const r=e.length;let o=e.indexOf(t);return-1===o?!n&&i?e[r-1]:e[0]:(o+=n?1:-1,i&&(o=(o+r)%r),e[Math.max(0,Math.min(o,r-1))])},Mpt=/[^.]*(?=\..*)\.|.*/,Npt=/\..*/,Ipt=/::\d+$/,LV={};let Jye=1;const e0e={mouseenter:"mouseover",mouseleave:"mouseout"},kpt=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function t0e(e,t){return t&&`${t}::${Jye++}`||e.uidEvent||Jye++}function n0e(e){const t=t0e(e);return e.uidEvent=t,LV[t]=LV[t]||{},LV[t]}function i0e(e,t,n=null){return Object.values(e).find(i=>i.callable===t&&i.delegationSelector===n)}function r0e(e,t,n){const i="string"==typeof t,r=i?n:t||n;let o=s0e(e);return kpt.has(o)||(o=e),[i,r,o]}function o0e(e,t,n,i,r){if("string"!=typeof t||!e)return;let[o,s,a]=r0e(t,n,i);var p;t in e0e&&(p=s,s=function(g){if(!g.relatedTarget||g.relatedTarget!==g.delegateTarget&&!g.delegateTarget.contains(g.relatedTarget))return p.call(this,g)});const l=n0e(e),c=l[a]||(l[a]={}),u=i0e(c,s,o?n:null);if(u)return void(u.oneOff=u.oneOff&&r);const d=t0e(s,t.replace(Mpt,"")),f=o?function Rpt(e,t,n){return function i(r){const o=e.querySelectorAll(t);for(let{target:s}=r;s&&s!==this;s=s.parentNode)for(const a of o)if(a===s)return BV(r,{delegateTarget:s}),i.oneOff&&le.off(e,r.type,t,n),n.apply(s,[r])}}(e,n,s):function Opt(e,t){return function n(i){return BV(i,{delegateTarget:e}),n.oneOff&&le.off(e,i.type,t),t.apply(e,[i])}}(e,s);f.delegationSelector=o?n:null,f.callable=s,f.oneOff=r,f.uidEvent=d,c[d]=f,e.addEventListener(a,f,o)}function $V(e,t,n,i,r){const o=i0e(t[n],i,r);o&&(e.removeEventListener(n,o,!!r),delete t[n][o.uidEvent])}function Fpt(e,t,n,i){const r=t[n]||{};for(const[o,s]of Object.entries(r))o.includes(i)&&$V(e,t,n,s.callable,s.delegationSelector)}function s0e(e){return e=e.replace(Npt,""),e0e[e]||e}const le={on(e,t,n,i){o0e(e,t,n,i,!1)},one(e,t,n,i){o0e(e,t,n,i,!0)},off(e,t,n,i){if("string"!=typeof t||!e)return;const[r,o,s]=r0e(t,n,i),a=s!==t,l=n0e(e),c=l[s]||{},u=t.startsWith(".");if(typeof o<"u"){if(!Object.keys(c).length)return;$V(e,l,s,o,r?n:null)}else{if(u)for(const d of Object.keys(l))Fpt(e,l,d,t.slice(1));for(const[d,f]of Object.entries(c)){const h=d.replace(Ipt,"");(!a||t.includes(h))&&$V(e,l,s,f.callable,f.delegationSelector)}}},trigger(e,t,n){if("string"!=typeof t||!e)return null;const i=Qye();let s=null,a=!0,l=!0,c=!1;t!==s0e(t)&&i&&(s=i.Event(t,n),i(e).trigger(s),a=!s.isPropagationStopped(),l=!s.isImmediatePropagationStopped(),c=s.isDefaultPrevented());const u=BV(new Event(t,{bubbles:a,cancelable:!0}),n);return c&&u.preventDefault(),l&&e.dispatchEvent(u),u.defaultPrevented&&s&&s.preventDefault(),u}};function BV(e,t={}){for(const[n,i]of Object.entries(t))try{e[n]=i}catch{Object.defineProperty(e,n,{configurable:!0,get:()=>i})}return e}function a0e(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch{return e}}function jV(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const Du={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${jV(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${jV(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter(i=>i.startsWith("bs")&&!i.startsWith("bsConfig"));for(const i of n){let r=i.replace(/^bs/,"");r=r.charAt(0).toLowerCase()+r.slice(1,r.length),t[r]=a0e(e.dataset[i])}return t},getDataAttribute:(e,t)=>a0e(e.getAttribute(`data-bs-${jV(t)}`))};class Dw{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,n){const i=Cu(n)?Du.getDataAttribute(n,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...Cu(n)?Du.getDataAttributes(n):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,n=this.constructor.DefaultType){for(const[i,r]of Object.entries(n)){const o=t[i],s=Cu(o)?"element":null==(e=o)?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(r).test(s))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${s}" but expected type "${r}".`)}var e}}class el extends Dw{constructor(t,n){super(),(t=pf(t))&&(this._element=t,this._config=this._getConfig(n),OV.set(this._element,this.constructor.DATA_KEY,this))}dispose(){OV.remove(this._element,this.constructor.DATA_KEY),le.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,n,i=!0){Zye(t,n,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return OV.get(pf(t),this.DATA_KEY)}static getOrCreateInstance(t,n={}){return this.getInstance(t)||new this(t,"object"==typeof n?n:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const VV=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&"#"!==n?n.trim():null}return t?t.split(",").map(n=>Yye(n)).join(","):null},Ve={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter(n=>n.matches(t)),parents(e,t){const n=[];let i=e.parentNode.closest(t);for(;i;)n.push(i),i=i.parentNode.closest(t);return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(n=>`${n}:not([tabindex^="-"])`).join(",");return this.find(t,e).filter(n=>!gf(n)&&_y(n))},getSelectorFromElement(e){const t=VV(e);return t&&Ve.findOne(t)?t:null},getElementFromSelector(e){const t=VV(e);return t?Ve.findOne(t):null},getMultipleElementsFromSelector(e){const t=VV(e);return t?Ve.find(t):[]}},xN=(e,t="hide")=>{const i=e.NAME;le.on(document,`click.dismiss${e.EVENT_KEY}`,`[data-bs-dismiss="${i}"]`,function(r){if(["A","AREA"].includes(this.tagName)&&r.preventDefault(),gf(this))return;const o=Ve.getElementFromSelector(this)||this.closest(`.${i}`);e.getOrCreateInstance(o)[t]()})};class AN extends el{static get NAME(){return"alert"}close(){if(le.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const n=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,n)}_destroyElement(){this._element.remove(),le.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(t){return this.each(function(){const n=AN.getOrCreateInstance(this);if("string"==typeof t){if(void 0===n[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);n[t](this)}})}}xN(AN,"close"),Qs(AN);const c0e='[data-bs-toggle="button"]';class MN extends el{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each(function(){const n=MN.getOrCreateInstance(this);"toggle"===t&&n[t]()})}}le.on(document,"click.bs.button.data-api",c0e,e=>{e.preventDefault();const t=e.target.closest(c0e);MN.getOrCreateInstance(t).toggle()}),Qs(MN);const yy=".bs.swipe",Ypt=`touchstart${yy}`,Kpt=`touchmove${yy}`,Xpt=`touchend${yy}`,Qpt=`pointerdown${yy}`,Zpt=`pointerup${yy}`,igt={endCallback:null,leftCallback:null,rightCallback:null},rgt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class NN extends Dw{constructor(t,n){super(),this._element=t,t&&NN.isSupported()&&(this._config=this._getConfig(n),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return igt}static get DefaultType(){return rgt}static get NAME(){return"swipe"}dispose(){le.off(this._element,yy)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),Ao(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const n=t/this._deltaX;this._deltaX=0,n&&Ao(n>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(le.on(this._element,Qpt,t=>this._start(t)),le.on(this._element,Zpt,t=>this._end(t)),this._element.classList.add("pointer-event")):(le.on(this._element,Ypt,t=>this._start(t)),le.on(this._element,Kpt,t=>this._move(t)),le.on(this._element,Xpt,t=>this._end(t)))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const mf=".bs.carousel",sgt="ArrowLeft",agt="ArrowRight",Sw="next",vy="prev",by="left",IN="right",cgt=`slide${mf}`,UV=`slid${mf}`,ugt=`keydown${mf}`,dgt=`mouseenter${mf}`,fgt=`mouseleave${mf}`,hgt=`dragstart${mf}`,pgt=`load${mf}.data-api`,ggt=`click${mf}.data-api`,kN="active",h0e=".carousel-item",wgt=".active"+h0e,Tgt={[sgt]:IN,[agt]:by},xgt={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Agt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Tw extends el{constructor(t,n){super(t,n),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Ve.findOne(".carousel-indicators",this._element),this._addEventListeners(),"carousel"===this._config.ride&&this.cycle()}static get Default(){return xgt}static get DefaultType(){return Agt}static get NAME(){return"carousel"}next(){this._slide(Sw)}nextWhenVisible(){!document.hidden&&_y(this._element)&&this.next()}prev(){this._slide(vy)}pause(){this._isSliding&&Kye(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding)return void le.one(this._element,UV,()=>this.cycle());this.cycle()}}to(t){const n=this._getItems();if(t>n.length-1||t<0)return;if(this._isSliding)return void le.one(this._element,UV,()=>this.to(t));const i=this._getItemIndex(this._getActive());i!==t&&this._slide(t>i?Sw:vy,n[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&le.on(this._element,ugt,t=>this._keydown(t)),"hover"===this._config.pause&&(le.on(this._element,dgt,()=>this.pause()),le.on(this._element,fgt,()=>this._maybeEnableCycle())),this._config.touch&&NN.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const i of Ve.find(".carousel-item img",this._element))le.on(i,hgt,r=>r.preventDefault());this._swipeHelper=new NN(this._element,{leftCallback:()=>this._slide(this._directionToOrder(by)),rightCallback:()=>this._slide(this._directionToOrder(IN)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}})}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const n=Tgt[t.key];n&&(t.preventDefault(),this._slide(this._directionToOrder(n)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const n=Ve.findOne(".active",this._indicatorsElement);n.classList.remove(kN),n.removeAttribute("aria-current");const i=Ve.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(kN),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const n=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=n||this._config.defaultInterval}_slide(t,n=null){if(this._isSliding)return;const i=this._getActive(),r=t===Sw,o=n||PV(this._getItems(),i,r,this._config.wrap);if(o===i)return;const s=this._getItemIndex(o),a=h=>le.trigger(this._element,h,{relatedTarget:o,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:s});if(a(cgt).defaultPrevented||!i||!o)return;const c=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(s),this._activeElement=o;const u=r?"carousel-item-start":"carousel-item-end",d=r?"carousel-item-next":"carousel-item-prev";o.classList.add(d),i.classList.add(u),o.classList.add(u),this._queueCallback(()=>{o.classList.remove(u,d),o.classList.add(kN),i.classList.remove(kN,d,u),this._isSliding=!1,a(UV)},i,this._isAnimated()),c&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Ve.findOne(wgt,this._element)}_getItems(){return Ve.find(h0e,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return Xs()?t===by?vy:Sw:t===by?Sw:vy}_orderToDirection(t){return Xs()?t===vy?by:IN:t===vy?IN:by}static jQueryInterface(t){return this.each(function(){const n=Tw.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===n[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);n[t]()}}else n.to(t)})}}le.on(document,ggt,"[data-bs-slide], [data-bs-slide-to]",function(e){const t=Ve.getElementFromSelector(this);if(!t||!t.classList.contains("carousel"))return;e.preventDefault();const n=Tw.getOrCreateInstance(t),i=this.getAttribute("data-bs-slide-to");return i?(n.to(i),void n._maybeEnableCycle()):"next"===Du.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())}),le.on(window,pgt,()=>{const e=Ve.find('[data-bs-ride="carousel"]');for(const t of e)Tw.getOrCreateInstance(t)}),Qs(Tw);const xw=".bs.collapse",Igt=`show${xw}`,kgt=`shown${xw}`,Ogt=`hide${xw}`,Rgt=`hidden${xw}`,Fgt=`click${xw}.data-api`,zV="show",wy="collapse",ON="collapsing",Lgt=`:scope .${wy} .${wy}`,HV='[data-bs-toggle="collapse"]',Ugt={parent:null,toggle:!0},zgt={parent:"(null|element)",toggle:"boolean"};class Aw extends el{constructor(t,n){super(t,n),this._isTransitioning=!1,this._triggerArray=[];const i=Ve.find(HV);for(const r of i){const o=Ve.getSelectorFromElement(r),s=Ve.find(o).filter(a=>a===this._element);null!==o&&s.length&&this._triggerArray.push(r)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Ugt}static get DefaultType(){return zgt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(a=>a!==this._element).map(a=>Aw.getOrCreateInstance(a,{toggle:!1}))),t.length&&t[0]._isTransitioning||le.trigger(this._element,Igt).defaultPrevented)return;for(const a of t)a.hide();const i=this._getDimension();this._element.classList.remove(wy),this._element.classList.add(ON),this._element.style[i]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const s=`scroll${i[0].toUpperCase()+i.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(ON),this._element.classList.add(wy,zV),this._element.style[i]="",le.trigger(this._element,kgt)},this._element,!0),this._element.style[i]=`${this._element[s]}px`}hide(){if(this._isTransitioning||!this._isShown()||le.trigger(this._element,Ogt).defaultPrevented)return;const n=this._getDimension();this._element.style[n]=`${this._element.getBoundingClientRect()[n]}px`,this._element.classList.add(ON),this._element.classList.remove(wy,zV);for(const r of this._triggerArray){const o=Ve.getElementFromSelector(r);o&&!this._isShown(o)&&this._addAriaAndCollapsedClass([r],!1)}this._isTransitioning=!0,this._element.style[n]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(ON),this._element.classList.add(wy),le.trigger(this._element,Rgt)},this._element,!0)}_isShown(t=this._element){return t.classList.contains(zV)}_configAfterMerge(t){return t.toggle=!!t.toggle,t.parent=pf(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(HV);for(const n of t){const i=Ve.getElementFromSelector(n);i&&this._addAriaAndCollapsedClass([n],this._isShown(i))}}_getFirstLevelChildren(t){const n=Ve.find(Lgt,this._config.parent);return Ve.find(t,this._config.parent).filter(i=>!n.includes(i))}_addAriaAndCollapsedClass(t,n){if(t.length)for(const i of t)i.classList.toggle("collapsed",!n),i.setAttribute("aria-expanded",n)}static jQueryInterface(t){const n={};return"string"==typeof t&&/show|hide/.test(t)&&(n.toggle=!1),this.each(function(){const i=Aw.getOrCreateInstance(this,n);if("string"==typeof t){if(typeof i[t]>"u")throw new TypeError(`No method named "${t}"`);i[t]()}})}}le.on(document,Fgt,HV,function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const t of Ve.getMultipleElementsFromSelector(this))Aw.getOrCreateInstance(t,{toggle:!1}).toggle()}),Qs(Aw);const Fp=".bs.dropdown",GV=".data-api",Ggt="ArrowUp",m0e="ArrowDown",qgt=`hide${Fp}`,Ygt=`hidden${Fp}`,Kgt=`show${Fp}`,Xgt=`shown${Fp}`,_0e=`click${Fp}${GV}`,y0e=`keydown${Fp}${GV}`,Qgt=`keyup${Fp}${GV}`,Ey="show",Pp='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',imt=`${Pp}.${Ey}`,RN=".dropdown-menu",amt=Xs()?"top-end":"top-start",lmt=Xs()?"top-start":"top-end",cmt=Xs()?"bottom-end":"bottom-start",umt=Xs()?"bottom-start":"bottom-end",dmt=Xs()?"left-start":"right-start",fmt=Xs()?"right-start":"left-start",gmt={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},mmt={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class gc extends el{constructor(t,n){super(t,n),this._popper=null,this._parent=this._element.parentNode,this._menu=Ve.next(this._element,RN)[0]||Ve.prev(this._element,RN)[0]||Ve.findOne(RN,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return gmt}static get DefaultType(){return mmt}static get NAME(){return"dropdown"}toggle(){return this._isShown()?this.hide():this.show()}show(){if(gf(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!le.trigger(this._element,Kgt,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const i of[].concat(...document.body.children))le.on(i,"mouseover",TN);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Ey),this._element.classList.add(Ey),le.trigger(this._element,Xgt,t)}}hide(){!gf(this._element)&&this._isShown()&&this._completeHide({relatedTarget:this._element})}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!le.trigger(this._element,qgt,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const i of[].concat(...document.body.children))le.off(i,"mouseover",TN);this._popper&&this._popper.destroy(),this._menu.classList.remove(Ey),this._element.classList.remove(Ey),this._element.setAttribute("aria-expanded","false"),Du.removeDataAttribute(this._menu,"popper"),le.trigger(this._element,Ygt,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!Cu(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${"dropdown".toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(typeof $w>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:Cu(this._config.reference)?t=pf(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const n=this._getPopperConfig();this._popper=kV(t,this._menu,n)}_isShown(){return this._menu.classList.contains(Ey)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return dmt;if(t.classList.contains("dropstart"))return fmt;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const n="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?n?lmt:amt:n?umt:cmt}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(n=>Number.parseInt(n,10)):"function"==typeof t?n=>t(n,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(Du.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...Ao(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:n}){const i=Ve.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(r=>_y(r));i.length&&PV(i,n,t===m0e,!i.includes(n)).focus()}static jQueryInterface(t){return this.each(function(){const n=gc.getOrCreateInstance(this,t);if("string"==typeof t){if(typeof n[t]>"u")throw new TypeError(`No method named "${t}"`);n[t]()}})}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const n=Ve.find(imt);for(const i of n){const r=gc.getInstance(i);if(!r||!1===r._config.autoClose)continue;const o=t.composedPath(),s=o.includes(r._menu);if(o.includes(r._element)||"inside"===r._config.autoClose&&!s||"outside"===r._config.autoClose&&s||r._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const a={relatedTarget:r._element};"click"===t.type&&(a.clickEvent=t),r._completeHide(a)}}static dataApiKeydownHandler(t){const n=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,r=[Ggt,m0e].includes(t.key);if(!r&&!i||n&&!i)return;t.preventDefault();const o=this.matches(Pp)?this:Ve.prev(this,Pp)[0]||Ve.next(this,Pp)[0]||Ve.findOne(Pp,t.delegateTarget.parentNode),s=gc.getOrCreateInstance(o);if(r)return t.stopPropagation(),s.show(),void s._selectMenuItem(t);s._isShown()&&(t.stopPropagation(),s.hide(),o.focus())}}le.on(document,y0e,Pp,gc.dataApiKeydownHandler),le.on(document,y0e,RN,gc.dataApiKeydownHandler),le.on(document,_0e,gc.clearMenus),le.on(document,Qgt,gc.clearMenus),le.on(document,_0e,Pp,function(e){e.preventDefault(),gc.getOrCreateInstance(this).toggle()}),Qs(gc);const w0e="mousedown.bs.backdrop",ymt={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},vmt={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class E0e extends Dw{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return ymt}static get DefaultType(){return vmt}static get NAME(){return"backdrop"}show(t){if(!this._config.isVisible)return void Ao(t);this._append();this._getElement().classList.add("show"),this._emulateAnimation(()=>{Ao(t)})}hide(t){this._config.isVisible?(this._getElement().classList.remove("show"),this._emulateAnimation(()=>{this.dispose(),Ao(t)})):Ao(t)}dispose(){this._isAppended&&(le.off(this._element,w0e),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=pf(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),le.on(t,w0e,()=>{Ao(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){Zye(t,this._getElement(),this._config.isAnimated)}}const FN=".bs.focustrap",wmt=`focusin${FN}`,Emt=`keydown.tab${FN}`,Smt={autofocus:!0,trapElement:null},Tmt={autofocus:"boolean",trapElement:"element"};class D0e extends Dw{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Smt}static get DefaultType(){return Tmt}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),le.off(document,FN),le.on(document,wmt,t=>this._handleFocusin(t)),le.on(document,Emt,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,le.off(document,FN))}_handleFocusin(t){const{trapElement:n}=this._config;if(t.target===document||t.target===n||n.contains(t.target))return;const i=Ve.focusableChildren(n);0===i.length?n.focus():"backward"===this._lastTabNavDirection?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?"backward":"forward")}}const S0e=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",T0e=".sticky-top",PN="padding-right",x0e="margin-right";class WV{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,PN,n=>n+t),this._setElementAttributes(S0e,PN,n=>n+t),this._setElementAttributes(T0e,x0e,n=>n-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,PN),this._resetElementAttributes(S0e,PN),this._resetElementAttributes(T0e,x0e)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,n,i){const r=this.getWidth();this._applyManipulationCallback(t,s=>{if(s!==this._element&&window.innerWidth>s.clientWidth+r)return;this._saveInitialAttribute(s,n);const a=window.getComputedStyle(s).getPropertyValue(n);s.style.setProperty(n,`${i(Number.parseFloat(a))}px`)})}_saveInitialAttribute(t,n){const i=t.style.getPropertyValue(n);i&&Du.setDataAttribute(t,n,i)}_resetElementAttributes(t,n){this._applyManipulationCallback(t,r=>{const o=Du.getDataAttribute(r,n);null!==o?(Du.removeDataAttribute(r,n),r.style.setProperty(n,o)):r.style.removeProperty(n)})}_applyManipulationCallback(t,n){if(Cu(t))n(t);else for(const i of Ve.find(t,this._element))n(i)}}const Zs=".bs.modal",Nmt=`hide${Zs}`,Imt=`hidePrevented${Zs}`,A0e=`hidden${Zs}`,M0e=`show${Zs}`,kmt=`shown${Zs}`,Omt=`resize${Zs}`,Rmt=`click.dismiss${Zs}`,Fmt=`mousedown.dismiss${Zs}`,Pmt=`keydown.dismiss${Zs}`,Lmt=`click${Zs}.data-api`,N0e="modal-open",qV="modal-static",zmt={backdrop:!0,focus:!0,keyboard:!0},Hmt={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Cy extends el{constructor(t,n){super(t,n),this._dialog=Ve.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new WV,this._addEventListeners()}static get Default(){return zmt}static get DefaultType(){return Hmt}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||le.trigger(this._element,M0e,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(N0e),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t)))}hide(){!this._isShown||this._isTransitioning||le.trigger(this._element,Nmt).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove("show"),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){le.off(window,Zs),le.off(this._dialog,Zs),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new E0e({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new D0e({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const n=Ve.findOne(".modal-body",this._dialog);n&&(n.scrollTop=0),this._element.classList.add("show"),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,le.trigger(this._element,kmt,{relatedTarget:t})},this._dialog,this._isAnimated())}_addEventListeners(){le.on(this._element,Pmt,t=>{if("Escape"===t.key){if(this._config.keyboard)return void this.hide();this._triggerBackdropTransition()}}),le.on(window,Omt,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),le.on(this._element,Fmt,t=>{le.one(this._element,Rmt,n=>{if(this._element===t.target&&this._element===n.target){if("static"===this._config.backdrop)return void this._triggerBackdropTransition();this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(N0e),this._resetAdjustments(),this._scrollBar.reset(),le.trigger(this._element,A0e)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(le.trigger(this._element,Imt).defaultPrevented)return;const n=this._element.scrollHeight>document.documentElement.clientHeight,i=this._element.style.overflowY;"hidden"===i||this._element.classList.contains(qV)||(n||(this._element.style.overflowY="hidden"),this._element.classList.add(qV),this._queueCallback(()=>{this._element.classList.remove(qV),this._queueCallback(()=>{this._element.style.overflowY=i},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,n=this._scrollBar.getWidth(),i=n>0;if(i&&!t){const r=Xs()?"paddingLeft":"paddingRight";this._element.style[r]=`${n}px`}if(!i&&t){const r=Xs()?"paddingRight":"paddingLeft";this._element.style[r]=`${n}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,n){return this.each(function(){const i=Cy.getOrCreateInstance(this,t);if("string"==typeof t){if(typeof i[t]>"u")throw new TypeError(`No method named "${t}"`);i[t](n)}})}}le.on(document,Lmt,'[data-bs-toggle="modal"]',function(e){const t=Ve.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),le.one(t,M0e,r=>{r.defaultPrevented||le.one(t,A0e,()=>{_y(this)&&this.focus()})});const n=Ve.findOne(".modal.show");n&&Cy.getInstance(n).hide(),Cy.getOrCreateInstance(t).toggle(this)}),xN(Cy),Qs(Cy);const Su=".bs.offcanvas",Wmt=`load${Su}.data-api`,P0e=".offcanvas.show",Kmt=`show${Su}`,Xmt=`shown${Su}`,Qmt=`hide${Su}`,L0e=`hidePrevented${Su}`,$0e=`hidden${Su}`,Zmt=`resize${Su}`,Jmt=`click${Su}.data-api`,e_t=`keydown.dismiss${Su}`,n_t={backdrop:!0,keyboard:!0,scroll:!1},i_t={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class _f extends el{constructor(t,n){super(t,n),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return n_t}static get DefaultType(){return i_t}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||le.trigger(this._element,Kmt,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new WV).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add("showing"),this._queueCallback(()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add("show"),this._element.classList.remove("showing"),le.trigger(this._element,Xmt,{relatedTarget:t})},this._element,!0))}hide(){this._isShown&&!le.trigger(this._element,Qmt).defaultPrevented&&(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add("hiding"),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove("show","hiding"),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new WV).reset(),le.trigger(this._element,$0e)},this._element,!0))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const n=!!this._config.backdrop;return new E0e({className:"offcanvas-backdrop",isVisible:n,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:n?()=>{"static"!==this._config.backdrop?this.hide():le.trigger(this._element,L0e)}:null})}_initializeFocusTrap(){return new D0e({trapElement:this._element})}_addEventListeners(){le.on(this._element,e_t,t=>{if("Escape"===t.key){if(this._config.keyboard)return void this.hide();le.trigger(this._element,L0e)}})}static jQueryInterface(t){return this.each(function(){const n=_f.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);n[t](this)}})}}le.on(document,Jmt,'[data-bs-toggle="offcanvas"]',function(e){const t=Ve.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),gf(this))return;le.one(t,$0e,()=>{_y(this)&&this.focus()});const n=Ve.findOne(P0e);n&&n!==t&&_f.getInstance(n).hide(),_f.getOrCreateInstance(t).toggle(this)}),le.on(window,Wmt,()=>{for(const e of Ve.find(P0e))_f.getOrCreateInstance(e).show()}),le.on(window,Zmt,()=>{for(const e of Ve.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(e).position&&_f.getOrCreateInstance(e).hide()}),xN(_f),Qs(_f);const B0e={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},r_t=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),o_t=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,s_t=(e,t)=>{const n=e.nodeName.toLowerCase();return t.includes(n)?!r_t.has(n)||!!o_t.test(e.nodeValue):t.filter(i=>i instanceof RegExp).some(i=>i.test(n))},c_t={allowList:B0e,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},u_t={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},d_t={entry:"(string|element|function|null)",selector:"(string|element)"};class f_t extends Dw{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return c_t}static get DefaultType(){return u_t}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(t=>this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[r,o]of Object.entries(this._config.content))this._setContent(t,o,r);const n=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&n.classList.add(...i.split(" ")),n}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[n,i]of Object.entries(t))super._typeCheckConfig({selector:n,entry:i},d_t)}_setContent(t,n,i){const r=Ve.findOne(i,t);if(r){if(!(n=this._resolvePossibleFunction(n)))return void r.remove();if(Cu(n))return void this._putElementInTemplate(pf(n),r);if(this._config.html)return void(r.innerHTML=this._maybeSanitize(n));r.textContent=n}}_maybeSanitize(t){return this._config.sanitize?function a_t(e,t,n){if(!e.length)return e;if(n&&"function"==typeof n)return n(e);const r=(new window.DOMParser).parseFromString(e,"text/html"),o=[].concat(...r.body.querySelectorAll("*"));for(const s of o){const a=s.nodeName.toLowerCase();if(!Object.keys(t).includes(a)){s.remove();continue}const l=[].concat(...s.attributes),c=[].concat(t["*"]||[],t[a]||[]);for(const u of l)s_t(u,c)||s.removeAttribute(u.nodeName)}return r.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return Ao(t,[this])}_putElementInTemplate(t,n){if(this._config.html)return n.innerHTML="",void n.append(t);n.textContent=t.textContent}}const p_t=new Set(["sanitize","allowList","sanitizeFn"]),YV="fade",LN="show",m_t=".tooltip-inner",V0e="hide.bs.modal",Mw="hover",KV="focus",M_t={AUTO:"auto",TOP:"top",RIGHT:Xs()?"left":"right",BOTTOM:"bottom",LEFT:Xs()?"right":"left"},N_t={allowList:B0e,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},I_t={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Dy extends el{constructor(t,n){if(typeof $w>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,n),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return N_t}static get DefaultType(){return I_t}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown())return void this._leave();this._enter()}}dispose(){clearTimeout(this._timeout),le.off(this._element.closest(".modal"),V0e,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=le.trigger(this._element,this.constructor.eventName("show")),i=(Xye(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!i)return;this._disposePopper();const r=this._getTipElement();this._element.setAttribute("aria-describedby",r.getAttribute("id"));const{container:o}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(o.append(r),le.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(r),r.classList.add(LN),"ontouchstart"in document.documentElement)for(const a of[].concat(...document.body.children))le.on(a,"mouseover",TN);this._queueCallback(()=>{le.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!le.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(LN),"ontouchstart"in document.documentElement)for(const r of[].concat(...document.body.children))le.off(r,"mouseover",TN);this._activeTrigger.click=!1,this._activeTrigger[KV]=!1,this._activeTrigger[Mw]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),le.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const n=this._getTemplateFactory(t).toHtml();if(!n)return null;n.classList.remove(YV,LN),n.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e})(this.constructor.NAME).toString();return n.setAttribute("id",i),this._isAnimated()&&n.classList.add(YV),n}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new f_t({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[m_t]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(YV)}_isShown(){return this.tip&&this.tip.classList.contains(LN)}_createPopper(t){const n=Ao(this._config.placement,[this,t,this._element]),i=M_t[n.toUpperCase()];return kV(this._element,t,this._getPopperConfig(i))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(n=>Number.parseInt(n,10)):"function"==typeof t?n=>t(n,this._element):t}_resolvePossibleFunction(t){return Ao(t,[this._element])}_getPopperConfig(t){const n={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:i=>{this._getTipElement().setAttribute("data-popper-placement",i.state.placement)}}]};return{...n,...Ao(this._config.popperConfig,[n])}}_setListeners(){const t=this._config.trigger.split(" ");for(const n of t)if("click"===n)le.on(this._element,this.constructor.eventName("click"),this._config.selector,i=>{this._initializeOnDelegatedTarget(i).toggle()});else if("manual"!==n){const i=this.constructor.eventName(n===Mw?"mouseenter":"focusin"),r=this.constructor.eventName(n===Mw?"mouseleave":"focusout");le.on(this._element,i,this._config.selector,o=>{const s=this._initializeOnDelegatedTarget(o);s._activeTrigger["focusin"===o.type?KV:Mw]=!0,s._enter()}),le.on(this._element,r,this._config.selector,o=>{const s=this._initializeOnDelegatedTarget(o);s._activeTrigger["focusout"===o.type?KV:Mw]=s._element.contains(o.relatedTarget),s._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},le.on(this._element.closest(".modal"),V0e,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,n){clearTimeout(this._timeout),this._timeout=setTimeout(t,n)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const n=Du.getDataAttributes(this._element);for(const i of Object.keys(n))p_t.has(i)&&delete n[i];return t={...n,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:pf(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[n,i]of Object.entries(this._config))this.constructor.Default[n]!==i&&(t[n]=i);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){const n=Dy.getOrCreateInstance(this,t);if("string"==typeof t){if(typeof n[t]>"u")throw new TypeError(`No method named "${t}"`);n[t]()}})}}Qs(Dy);const O_t=".popover-header",R_t=".popover-body",F_t={...Dy.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},P_t={...Dy.DefaultType,content:"(null|string|element|function)"};class XV extends Dy{static get Default(){return F_t}static get DefaultType(){return P_t}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[O_t]:this._getTitle(),[R_t]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each(function(){const n=XV.getOrCreateInstance(this,t);if("string"==typeof t){if(typeof n[t]>"u")throw new TypeError(`No method named "${t}"`);n[t]()}})}}Qs(XV);const QV=".bs.scrollspy",B_t=`activate${QV}`,U0e=`click${QV}`,j_t=`load${QV}.data-api`,Sy="active",ZV="[href]",q_t={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Y_t={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class $N extends el{constructor(t,n){super(t,n),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return q_t}static get DefaultType(){return Y_t}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=pf(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map(n=>Number.parseFloat(n))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(le.off(this._config.target,U0e),le.on(this._config.target,U0e,ZV,t=>{const n=this._observableSections.get(t.target.hash);if(n){t.preventDefault();const i=this._rootElement||window,r=n.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:r,behavior:"smooth"});i.scrollTop=r}}))}_getNewObserver(){return new IntersectionObserver(n=>this._observerCallback(n),{root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin})}_observerCallback(t){const n=s=>this._targetLinks.get(`#${s.target.id}`),i=s=>{this._previousScrollData.visibleEntryTop=s.target.offsetTop,this._process(n(s))},r=(this._rootElement||document.documentElement).scrollTop,o=r>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=r;for(const s of t){if(!s.isIntersecting){this._activeTarget=null,this._clearActiveClass(n(s));continue}const a=s.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(o&&a){if(i(s),!r)return}else!o&&!a&&i(s)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=Ve.find(ZV,this._config.target);for(const n of t){if(!n.hash||gf(n))continue;const i=Ve.findOne(decodeURI(n.hash),this._element);_y(i)&&(this._targetLinks.set(decodeURI(n.hash),n),this._observableSections.set(n.hash,i))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Sy),this._activateParents(t),le.trigger(this._element,B_t,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))Ve.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Sy);else for(const n of Ve.parents(t,".nav, .list-group"))for(const i of Ve.prev(n,".nav-link, .nav-item > .nav-link, .list-group-item"))i.classList.add(Sy)}_clearActiveClass(t){t.classList.remove(Sy);const n=Ve.find(`${ZV}.${Sy}`,t);for(const i of n)i.classList.remove(Sy)}static jQueryInterface(t){return this.each(function(){const n=$N.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);n[t]()}})}}le.on(window,j_t,()=>{for(const e of Ve.find('[data-bs-spy="scroll"]'))$N.getOrCreateInstance(e)}),Qs($N);const Lp=".bs.tab",X_t=`hide${Lp}`,Q_t=`hidden${Lp}`,Z_t=`show${Lp}`,J_t=`shown${Lp}`,eyt=`click${Lp}`,tyt=`keydown${Lp}`,nyt=`load${Lp}`,iyt="ArrowLeft",H0e="ArrowRight",ryt="ArrowUp",G0e="ArrowDown",JV="Home",W0e="End",$p="active",eU="show",Y0e=".dropdown-toggle",tU=`:not(${Y0e})`,K0e='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',nU=`.nav-link${tU}, .list-group-item${tU}, [role="tab"]${tU}, ${K0e}`,uyt=`.${$p}[data-bs-toggle="tab"], .${$p}[data-bs-toggle="pill"], .${$p}[data-bs-toggle="list"]`;class Ty extends el{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),le.on(this._element,tyt,n=>this._keydown(n)))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const n=this._getActiveElem(),i=n?le.trigger(n,X_t,{relatedTarget:t}):null;le.trigger(t,Z_t,{relatedTarget:n}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(n,t),this._activate(t,n))}_activate(t,n){t&&(t.classList.add($p),this._activate(Ve.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),le.trigger(t,J_t,{relatedTarget:n})):t.classList.add(eU)},t,t.classList.contains("fade")))}_deactivate(t,n){t&&(t.classList.remove($p),t.blur(),this._deactivate(Ve.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),le.trigger(t,Q_t,{relatedTarget:n})):t.classList.remove(eU)},t,t.classList.contains("fade")))}_keydown(t){if(![iyt,H0e,ryt,G0e,JV,W0e].includes(t.key))return;t.stopPropagation(),t.preventDefault();const n=this._getChildren().filter(r=>!gf(r));let i;if([JV,W0e].includes(t.key))i=n[t.key===JV?0:n.length-1];else{const r=[H0e,G0e].includes(t.key);i=PV(n,t.target,r,!0)}i&&(i.focus({preventScroll:!0}),Ty.getOrCreateInstance(i).show())}_getChildren(){return Ve.find(nU,this._parent)}_getActiveElem(){return this._getChildren().find(t=>this._elemIsActive(t))||null}_setInitialAttributes(t,n){this._setAttributeIfNotExists(t,"role","tablist");for(const i of n)this._setInitialAttributesOnChild(i)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const n=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",n),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),n||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const n=Ve.getElementFromSelector(t);n&&(this._setAttributeIfNotExists(n,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(n,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,n){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const r=(o,s)=>{const a=Ve.findOne(o,i);a&&a.classList.toggle(s,n)};r(Y0e,$p),r(".dropdown-menu",eU),i.setAttribute("aria-expanded",n)}_setAttributeIfNotExists(t,n,i){t.hasAttribute(n)||t.setAttribute(n,i)}_elemIsActive(t){return t.classList.contains($p)}_getInnerElement(t){return t.matches(nU)?t:Ve.findOne(nU,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each(function(){const n=Ty.getOrCreateInstance(this);if("string"==typeof t){if(void 0===n[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);n[t]()}})}}le.on(document,eyt,K0e,function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),!gf(this)&&Ty.getOrCreateInstance(this).show()}),le.on(window,nyt,()=>{for(const e of Ve.find(uyt))Ty.getOrCreateInstance(e)}),Qs(Ty);const yf=".bs.toast",fyt=`mouseover${yf}`,hyt=`mouseout${yf}`,pyt=`focusin${yf}`,gyt=`focusout${yf}`,myt=`hide${yf}`,_yt=`hidden${yf}`,yyt=`show${yf}`,vyt=`shown${yf}`,BN="show",jN="showing",wyt={animation:"boolean",autohide:"boolean",delay:"number"},Eyt={animation:!0,autohide:!0,delay:5e3};class VN extends el{constructor(t,n){super(t,n),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Eyt}static get DefaultType(){return wyt}static get NAME(){return"toast"}show(){le.trigger(this._element,yyt).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove("hide"),this._element.classList.add(BN,jN),this._queueCallback(()=>{this._element.classList.remove(jN),le.trigger(this._element,vyt),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&!le.trigger(this._element,myt).defaultPrevented&&(this._element.classList.add(jN),this._queueCallback(()=>{this._element.classList.add("hide"),this._element.classList.remove(jN,BN),le.trigger(this._element,_yt)},this._element,this._config.animation))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(BN),super.dispose()}isShown(){return this._element.classList.contains(BN)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,n){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=n;break;case"focusin":case"focusout":this._hasKeyboardInteraction=n}if(n)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){le.on(this._element,fyt,t=>this._onInteraction(t,!0)),le.on(this._element,hyt,t=>this._onInteraction(t,!1)),le.on(this._element,pyt,t=>this._onInteraction(t,!0)),le.on(this._element,gyt,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const n=VN.getOrCreateInstance(this,t);if("string"==typeof t){if(typeof n[t]>"u")throw new TypeError(`No method named "${t}"`);n[t](this)}})}}xN(VN),Qs(VN);const Cyt=["carousel"];function Dyt(e,t){if(1&e&&(U(0,"div",51)(1,"div",52)(2,"div",53),Ke(3,"img",54),z(),U(4,"div",55),X(5),z()()()),2&e){const n=t.$implicit;re(3),Mc("src",n.logo,Oo),Mc("alt",n.contributor),re(2),Or(" ",n.contributor," ")}}const Syt=[{path:"apparel_top_100/reports/0/latest",redirectTo:"/apparel_top_100/home",pathMatch:"full"},{path:"apparel_top_100/home",component:bpt},{path:"apparel_top_100/about",component:(()=>{class e{constructor(n,i,r){this.scroll=n,this.meta=i,this.titleService=r,this.images=[944,1011,984].map(o=>`https://picsum.photos/id/${o}/900/500`),this.currentIndex=1,this.contributors=[{contributor:"Fashion Revolution",logo:"https://dq06ugkuram52.cloudfront.net/files/3765463/22301376-medium.jpg"},{contributor:"Open Supply Hub",logo:"https://dq06ugkuram52.cloudfront.net/files/5661929/40040943-medium.jpeg"},{contributor:"AMD Akademie Mode & Design Berlin",logo:"https://dq06ugkuram52.cloudfront.net/files/5467212/20834915-medium.jpg"},{contributor:"Walk Free Initiative",logo:"https://dq06ugkuram52.cloudfront.net/files/1831839/12602420-medium.png"},{contributor:"Clean Clothes Campaign",logo:"https://dq06ugkuram52.cloudfront.net/files/564260/12604027-medium.png"},{contributor:"Columbia University SIPA",logo:"https://dq06ugkuram52.cloudfront.net/files/8104623/26042255-medium.png"},{contributor:"University of Wollongong",logo:"https://dq06ugkuram52.cloudfront.net/files/2549498/12602498-medium.png"},{contributor:"Glasgow Caledonian University",logo:"https://dq06ugkuram52.cloudfront.net/files/2381047/12602618-medium.png"},{contributor:"Nottingham Trent University",logo:"https://dq06ugkuram52.cloudfront.net/files/3700624/14894897-medium.png"},{contributor:"Universidad EAFIT",logo:"https://dq06ugkuram52.cloudfront.net/files/2593569/15069279-medium.png"},{contributor:"Ewha Womans University",logo:"https://dq06ugkuram52.cloudfront.net/files/2718582/12716390-medium.jpeg"},{contributor:"University of Connecticut",logo:"https://dq06ugkuram52.cloudfront.net/files/2877060/13099154-medium.png"},{contributor:"Australian National University",logo:"https://dq06ugkuram52.cloudfront.net/files/5295432/20444349-medium.png"},{contributor:"University of Nottingham",logo:"https://dq06ugkuram52.cloudfront.net/files/3149947/13561221-medium.png"},{contributor:"Global Reporting Initiative",logo:"https://dq06ugkuram52.cloudfront.net/files/801180/12603989-medium.jpg"},{contributor:"Ellen MacArthur Foundation",logo:"https://dq06ugkuram52.cloudfront.net/files/5405942/20706304-medium.png"},{contributor:"Textile Exchange",logo:"https://dq06ugkuram52.cloudfront.net/files/5406497/20709161-medium.jpg"},{contributor:"Science Based Targets Initiative",logo:"../../assets/SBTI-logo.jpg"},{contributor:"Poverty Footprint",logo:"https://dq06ugkuram52.cloudfront.net/files/1828145/12602552-medium.png"},{contributor:"Business & Human Rights Resource Center",logo:"../../assets/BHRRC-logo.png"},{logo:"https://dq06ugkuram52.cloudfront.net/files/5663399/21715396-medium.jpeg",contributor:"As You Sow"},{contributor:"Responsible Sourcing Network",logo:"https://dq06ugkuram52.cloudfront.net/files/5340655/20553116-medium.jpg"},{contributor:"Accord on Fire and Building Safety in Bangladesh",logo:"https://dq06ugkuram52.cloudfront.net/files/5424763/20734161-medium.png"},{contributor:"Ethical Trading Initiative",logo:"https://dq06ugkuram52.cloudfront.net/files/168320/20704071-medium.jpeg"},{contributor:"Fair Labor Association",logo:"https://dq06ugkuram52.cloudfront.net/files/61327/12604154-medium.gif"},{contributor:"ACT Action, Collaboration, Transformation",logo:"https://dq06ugkuram52.cloudfront.net/files/5417974/20726868-medium.png"},{contributor:"ShareAction",logo:"https://dq06ugkuram52.cloudfront.net/files/3763173/15057247-medium.png"},{contributor:"SustainoMetric",logo:"https://dq06ugkuram52.cloudfront.net/files/8126858/26084088-medium.png"}],r.setTitle("Who made Apparel 100 and why?"),i.addTags([{name:"keywords",content:"wikirate, esg data,apparel supply chain,apparel company esg ratings,manufacturing supply chain,supply chain,supply transparency,apparel esg data,fashion esg data,esg company,esg companies,esg company rating,esg rating,esg ratings,esg ranking,esg rankings,esg data ranking,esg data rating,environmental,environmental concerns,social concerns,environmental social corporate governance,adidas esg data,data visualizations,data infographics, Laureen van Breen"},{name:"description",content:"Apparel 100 was made by WikiRate to showcase supply chain transparency and ESG data in an engaging and accessible way. These maps and infographics create a sector snapshot that tells a story the world deserves to know."}]),i.updateTag({name:"og:title",content:"Behind Apparel 100"},"property='og:title'"),i.updateTag({name:"og:url",content:"//showcase.wikirate.org/#/apparel_top_100/about"},"property='og:url'"),i.updateTag({name:"og:description",content:"Apparel 100 was made by Wikirate.org to showcase our supply chain transparency and ESG data in an engaging and accessible way."},"property='og:description'"),i.updateTag({name:"twitter:description",content:"Apparel 100 was made by Wikirate.org to showcase our supply chain transparency and ESG data in an engaging and accessible way."},"property='twitter:description'"),i.updateTag({name:"twitter:title",content:"Behind Apparel 100"},"property='twitter:title'")}ngOnInit(){this.scrollToTop()}scrollToTop(){this.scroll.scrollToPosition([0,0])}static{this.\u0275fac=function(i){return new(i||e)(ee(tv),ee(qK),ee(MR))}}static{this.\u0275cmp=Cn({type:e,selectors:[["app-about"]],viewQuery:function(i,r){if(1&i&&ua(Cyt,7),2&i){let o;Wt(o=qt())&&(r.carousel=o.first)}},decls:152,vars:1,consts:[[1,"wikirate-creme-box"],[1,"wikirate-container"],[1,"row"],[1,"col","mt-2","text-center"],[1,"mini-title","text-center"],[1,"showcase-main-text","mt-3"],[1,"row","mt-4"],[1,"col-4","text-center","mb-4"],[1,"primary-info-navy"],[1,"secondary-info-navy","mt-1"],[1,"col-4","text-center"],[1,"wikirate-navy-box"],[1,"col-md-8"],[1,"showcase-title","text-white","mt-2","mb-2"],[1,"showcase-main-text-white"],[1,"col-md-4","vertical-center","justify-content-center"],["onclick","window.open('https://forms.gle/8ru3Wh8QMoJ8NZ8Y7','_blank')",1,"btn","btn-highlight","pr-4","pl-4","mt-2"],[1,"wikirate-box"],[1,"mini-title","text-center","mt-4"],[1,"row","mt-5","mb-4"],[1,"secondary-info-navy"],["id","quotes","data-ride","carousel",1,"carousel","slide","pointer-event"],[1,"carousel-inner"],[1,"carousel-item","mt-4","mb-4","active"],[1,"row","justify-content-center"],[1,"col-9"],[1,"image-box","col-3","vertical-center","justify-content-center","d-none","d-md-inline-flex"],["src","https://dq06ugkuram52.cloudfront.net/files/3765463/22301376-medium.jpg"],[1,"showcase-main-text","font-italic"],[1,"note","mt-3"],[1,"note"],[1,"carousel-item","mt-4","mb-4"],["src","https://dq06ugkuram52.cloudfront.net/files/564260/12604027-medium.png"],["src","https://dq06ugkuram52.cloudfront.net/files/5467212/20834915-medium.jpg"],[1,"col-3","image-box","vertical-center","justify-content-center","d-none","d-md-inline-flex"],["src","https://dq06ugkuram52.cloudfront.net/files/2549498/12602498-medium.png"],["src","https://dq06ugkuram52.cloudfront.net/files/1831839/12602420-medium.png"],["type","button","data-bs-target","#quotes","data-bs-slide","prev",1,"carousel-control-prev"],["aria-hidden","true",1,"carousel-control-prev-icon"],[1,"visually-hidden"],["type","button","data-bs-target","#quotes","data-bs-slide","next",1,"carousel-control-next"],["aria-hidden","true",1,"carousel-control-next-icon"],[1,"wikirate-box","wikirate-container","d-none","d-md-block"],["id","partners-logos","data-ride","carousel",1,"carousel","slide"],[1,"container","mt-4","mb-4"],[1,"section"],[1,"col-lg-12","p-3"],[1,"mb-3"],[1,"slider","mt-3"],[1,"slide-track"],["class","slide",4,"ngFor","ngForOf"],[1,"slide"],[1,"row","col-12","justify-content-center"],[1,"image-box","d-flex","justify-content-center","align-items-center","m-2"],[3,"src","alt"],[1,"contributor-name","m3","text-center"]],template:function(i,r){1&i&&(U(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),X(5," Who made Apparel 100 and why? "),z(),U(6,"div",5)(7,"p"),X(8,"Apparel 100 was made by WikiRate to showcase supply chain transparency and ESG data in an engaging and accessible way. These maps and infographics create a sector snapshot that tells a story the world deserves to know. "),z(),U(9,"p"),X(10," This showcase came together with the support of the WikiRate community. "),z()(),U(11,"div",6)(12,"div",7)(13,"div",8),X(14,"335"),z(),U(15,"div",9),X(16,"RESEARCHERS"),z()(),U(17,"div",10)(18,"div",8),X(19,"10"),z(),U(20,"div",9),X(21,"UNIVERSITIES"),z()(),U(22,"div",10)(23,"div",8),X(24,"17"),z(),U(25,"div",9),X(26,"NGOs"),z()()()()()()(),U(27,"div",11)(28,"div",1)(29,"div",2)(30,"div",12)(31,"h2",13),X(32,"Create your own open data showcase "),z(),U(33,"div",14)(34,"p"),X(35,"With our flexible data infrastructure and committed community we have created an open data ecosystem that you can be part of. "),z()()(),U(36,"div",15)(37,"button",16),X(38," Contact Us "),z()()()()(),U(39,"div",17)(40,"div",1)(41,"p",18),X(42," The research in numbers "),z(),U(43,"div",19)(44,"div",10)(45,"div",8),X(46,"31K+"),z(),U(47,"div",20),X(48,"DATA POINTS"),z()(),U(49,"div",10)(50,"div",8),X(51,"171"),z(),U(52,"div",20),X(53,"METRICS"),z()(),U(54,"div",10)(55,"div",8),X(56,"30K+"),z(),U(57,"div",20),X(58,"CORPORATE RELATIONSHIPS"),z()()()()(),U(59,"div",0)(60,"div",1)(61,"div",21)(62,"div",22)(63,"div",23)(64,"div",24)(65,"div",25)(66,"div",24)(67,"div",26),Ke(68,"img",27),z(),U(69,"div",12)(70,"div",28),X(71,'"We believe in collaborating to improve the fashion industry and are delighted to be continuing our partnership with WikiRate into 2022. Using the WikiRate platform to host FTI research has made our work more accessible and impactful across a range of stakeholders who use our data to enable their activism and research." '),z(),U(72,"div",29)(73,"b"),X(74," Fashion Revolution "),z()(),Ke(75,"div",30),z()()()()(),U(76,"div",31)(77,"div",24)(78,"div",25)(79,"div",2)(80,"div",26),Ke(81,"img",32),z(),U(82,"div",12)(83,"div",28),X(84,'"WikiRate has proven an invaluable partner for our Fashion Checker campaign. The platform\u2019s sophisticated functionalities and open data approach has given us the flexibility we needed to bring our data to the public so that it can be used by advocates to create real change." '),z(),U(85,"div",29)(86,"b"),X(87," Anne Bienias "),z()(),U(88,"div",30),X(89,"Clean Clothes Campaign"),z()()()()()(),U(90,"div",31)(91,"div",24)(92,"div",25)(93,"div",2)(94,"div",26),Ke(95,"img",33),z(),U(96,"div",12)(97,"div",28),X(98,'"This collaborative project was a great opportunity to further develop our research skills which in turn allowed us to be more critical and analytical of fashion labels. Working with WikiRate made us understand the importance of finding the right and accurate information that backs up or contradicts the image that a fashion label is trying to portray" '),z(),U(99,"div",29)(100,"b"),X(101," Student of Akademie Mode & Design (AMD) Berlin "),z()(),Ke(102,"div",30),z()()()()(),U(103,"div",31)(104,"div",24)(105,"div",25)(106,"div",2)(107,"div",34),Ke(108,"img",35),z(),U(109,"div",12)(110,"div",28),X(111,'"WikiRate provides the opportunity for students to get a real-life experience with CSR, which helps develop their social awareness, problem-solving and critical thinking skills" '),z(),U(112,"div",29)(113,"b"),X(114," Dr. Stephanie Perkiss "),z()(),U(115,"div",30),X(116,"University of Wollongong, Australia"),z()()()()()(),U(117,"div",31)(118,"div",24)(119,"div",25)(120,"div",2)(121,"div",26),Ke(122,"img",36),z(),U(123,"div",12)(124,"div",28),X(125,'"We\'ve worked with the WikiRate for the last five years to scale our research on modern slavery. The WikiRate team maintains our methodology on their platform and each year coordinates hundreds of university students to contribute new data for analysis that we use to improve legislation to end modern slavery." '),z(),U(126,"div",29)(127,"b"),X(128," Katharine Bryant "),z()(),U(129,"div",30),X(130,"Walk Free Initiative"),z()()()()()()(),U(131,"button",37),Ke(132,"span",38),U(133,"span",39),X(134,"Previous"),z()(),U(135,"button",40),Ke(136,"span",41),U(137,"span",39),X(138,"Next"),z()()()()(),U(139,"div",42)(140,"div",43)(141,"div",44)(142,"div",45)(143,"div",2)(144,"div",46)(145,"h3",47),X(146,"Research Contributors"),z(),U(147,"p"),X(148,"This research was performed with the contribution of the following organisations"),z(),U(149,"div",48)(150,"div",49),mt(151,Dyt,6,3,"div",50),z()()()()()()()()),2&i&&(re(151),Ae("ngForOf",r.contributors))},dependencies:[oD],styles:[".roadmap[_ngcontent-%COMP%]{height:500px}.showcase-circle-purple[_ngcontent-%COMP%]{width:4.25rem;height:4.25rem;background-color:#484c9d!important}.showcase-circle-orange[_ngcontent-%COMP%]{width:4.25rem;height:4.25rem;background-color:#f7733d!important}.img[_ngcontent-%COMP%]{width:250px!important;height:250px!important;min-width:250px!important;min-height:250px!important}.image-box[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%!important;max-height:100%!important;height:auto!important}.contributor-name[_ngcontent-%COMP%]{text-transform:uppercase;font-size:.6em}.image-box[_ngcontent-%COMP%]{width:140px!important;height:140px!important}.image-box-small-screen[_ngcontent-%COMP%]{height:auto!important;max-width:200px!important}@keyframes _ngcontent-%COMP%_scroll{0%{transform:translate(0)}to{transform:translate(-1750px)}}.slider[_ngcontent-%COMP%]{height:200px;margin:auto;overflow:hidden;position:relative;width:auto}.slider[_ngcontent-%COMP%] .slide-track[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_scroll 60s linear infinite;display:flex;width:3500px}.slider[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%]{height:100px;width:250px}"]})}}return e})()},{path:"**",redirectTo:"/apparel_top_100/home",pathMatch:"full"}];let Tyt=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({providers:[{provide:Gu,useClass:iR}],imports:[dF.forRoot(Syt,{anchorScrolling:"enabled"}),dF]})}}return e})();const xyt=["search_text"];let Ayt=(()=>{class e{constructor(n,i,r){this.route=n,this.router=i,this.apparelService=r,this.exploreMore=!1,this.apparelTop100=[],this.apparelTop100=r.getCompanies()}ngOnInit(){this.report_params={id:0,year:"latest"},this.router.events.pipe(Wn(n=>n instanceof qR&&Object.keys(n.snapshot.params).length>0),at(n=>n instanceof qR?n.snapshot.params:{})).subscribe(n=>{this.report_params.id=n.id,this.report_params.year=n.year,this.selectedCompany=this.apparelService.getCompany(+this.report_params.id).name}),this.apparelService.exploreMore.subscribe(n=>{this.exploreMore=n})}setValue(n){this.search_text.nativeElement.value=n.name,this.report_params.id=n.id,null===n&&(this.search_text.nativeElement.value="overview",this.report_params.id=0)}navigateToYear(n){let i=n.target.value;i&&(null===this.report_params.id&&(this.report_params.id=0),this.router.navigate(["/apparel_top_100/reports/"+this.report_params.id+"/"+i]))}navigateToCompany(n){this.router.navigate(["/apparel_top_100/reports/"+n.id+"/"+this.report_params.year])}static{this.\u0275fac=function(i){return new(i||e)(ee(Cl),ee(Uo),ee(sm))}}static{this.\u0275cmp=Cn({type:e,selectors:[["header-component"]],viewQuery:function(i,r){if(1&i&&ua(xyt,5),2&i){let o;Wt(o=qt())&&(r.search_text=o.first)}},decls:9,vars:0,consts:[[1,"wikirate-box","bg-navy"],[1,"container"],[1,"navbar","bg-navy","navbar-expand","nomargin","drop-shadow","navbar-light"],["routerLink","apparel_top_100/home",1,"navbar-brand","title","mr-3"],[1,"navbar-nav","mr-auto"],[1,"nav-item"],["routerLink","apparel_top_100/about",1,"nav-link","ml-3","mr-3"]],template:function(i,r){1&i&&(U(0,"div",0)(1,"div",1)(2,"nav",2)(3,"a",3),X(4,"Apparel 100"),z(),U(5,"ul",4)(6,"li",5)(7,"a",6),X(8,"ABOUT"),z()()()()()())},dependencies:[OD],styles:["a[_ngcontent-%COMP%]{color:#000}hr[_ngcontent-%COMP%]{margin:.5em}.nav[_ngcontent-%COMP%]{margin-top:.5em;background:#fff}.title[_ngcontent-%COMP%]{font-weight:700;letter-spacing:0em;text-align:left;color:#fff!important}.dropdown-menu[_ngcontent-%COMP%]{max-height:280px;overflow-y:auto}.dropdown-toggle[_ngcontent-%COMP%]:after{content:none!important}"]})}}return e})(),Myt=(()=>{class e{constructor(){this.current_year=2022,this.current_year=(new Date).getFullYear()}ngOnInit(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=Cn({type:e,selectors:[["footer"]],decls:32,vars:1,consts:[[1,"wikirate-creme-purple-box"],[1,"wikirate-container"],[1,"row","text-center"],[1,"col-12"],[1,"row","justify-content-center","mb-3"],[1,"tiny-text"],[1,"row","justify-content-center"],["href","https://wikirate.org","target","_blank"],["src","assets/wikirate_logo.svg",1,"logo"],[1,"col-sm-7","mini-text","mt-3","justify-content-center"],[1,"wikirate-navy-box"],[1,"footer-container"],[1,"row"],[1,"col-11"],[1,"note","mt-3","text-light-white","mb-3"],["href","https://wikirate.org/~8079639","target","_blank"],["href","https://wikirate.org/~836561","target","_blank"],["href","https://creativecommons.org/licenses/by/4.0","target","_blank"]],template:function(i,r){1&i&&(U(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),X(6,"Powered by "),z()(),U(7,"div",6)(8,"a",7),Ke(9,"img",8),z()(),U(10,"div",6)(11,"div",9),X(12," WikiRate is an open data platform that brings corporate ESG data together in one place, making it accessible, comparable, and free for all. "),z()()()()()(),U(13,"div",10)(14,"div",11)(15,"div",12)(16,"div",13)(17,"div",14),X(18," This showcase was created by using data from "),U(19,"a",7),X(20,"Wikirate.org"),z(),X(21,", '"),U(22,"a",15),X(23,"Apparel 100 Analysis"),z(),X(24,"' by "),U(25,"a",16),X(26,"theresah"),z(),X(27,", licensed under "),U(28,"a",17),X(29,"CC BY 4.0"),z()(),U(30,"div",14),X(31),z()()()()()),2&i&&(re(31),Or(" Copyright \xa9 ",r.current_year," Wikirate.org All rights reserved "))},styles:[".nopadding[_ngcontent-%COMP%]{padding:0!important}.text-light-white[_ngcontent-%COMP%]{color:#f7f7f8!important}"]})}}return e})();function Nyt(e,t){if(1&e){const n=$o();U(0,"div",2),nt("click",function(){return Fn(n),Pn(Qe().scrollToTop())}),U(1,"button",3),nt("click",function(){return Fn(n),Pn(Qe().scrollToTop())}),Ke(2,"i",4),z()()}}let Iyt=(()=>{class e{onScroll(n){this.pageYoffset=window.pageYOffset}constructor(n,i){this.scroll=n,this.router=i,this.pageYoffset=0}ngOnInit(){this.setUpAnalytics()}scrollToTop(){this.scroll.scrollToPosition([0,0])}setUpAnalytics(){this.router.events.pipe(Wn(n=>n instanceof El)).subscribe(n=>{gtag("config","UA-34941429-8",{page_path:n.urlAfterRedirects})})}static{this.\u0275fac=function(i){return new(i||e)(ee(tv),ee(Uo))}}static{this.\u0275cmp=Cn({type:e,selectors:[["app-root"]],hostBindings:function(i,r){1&i&&nt("scroll",function(s){return r.onScroll(s)},0,Mz)},decls:6,vars:1,consts:[["report",""],["class","scroll-to-top show-scrollTop",3,"click",4,"ngIf"],[1,"scroll-to-top","show-scrollTop",3,"click"],[1,"btn","btn-highlight","btn-circle",3,"click"],[1,"bi","bi-chevron-up"]],template:function(i,r){1&i&&(U(0,"div",null,0),Ke(2,"header-component")(3,"router-outlet"),mt(4,Nyt,3,0,"div",1),z(),Ke(5,"footer")),2&i&&(re(4),Ae("ngIf",r.pageYoffset>0))},dependencies:[J0,eF,Ayt,Myt],styles:[".scroll-to-top[_ngcontent-%COMP%]{position:fixed;bottom:15px;right:15px;opacity:0;transition:all .2s ease-in-out}.show-scrollTop[_ngcontent-%COMP%]{opacity:1;transition:all .2s ease-in-out}"]})}}return e})(),kyt=(()=>{class e{constructor(n){this.apparelService=n}resolve(n,i){return this.apparelService.getCompany(+n.params.id)}static{this.\u0275fac=function(i){return new(i||e)(Ne(sm))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();function Q0e(e){return new q(3e3,!1)}function vf(e){switch(e.length){case 0:return new Dv;case 1:return e[0];default:return new CQ(e)}}function Z0e(e,t,n=new Map,i=new Map){const r=[],o=[];let s=-1,a=null;if(t.forEach(l=>{const c=l.get("offset"),u=c==s,d=u&&a||new Map;l.forEach((f,h)=>{let p=h,g=f;if("offset"!==h)switch(p=e.normalizePropertyName(p,r),g){case"!":g=n.get(h);break;case Bc:g=i.get(h);break;default:g=e.normalizeStyleValue(h,p,g,r)}d.set(p,g)}),u||o.push(d),a=d,s=c}),r.length)throw function t0t(){return new q(3502,!1)}();return o}function iU(e,t,n,i){switch(t){case"start":e.onStart(()=>i(n&&rU(n,"start",e)));break;case"done":e.onDone(()=>i(n&&rU(n,"done",e)));break;case"destroy":e.onDestroy(()=>i(n&&rU(n,"destroy",e)))}}function rU(e,t,n){const o=oU(e.element,e.triggerName,e.fromState,e.toState,t||e.phaseName,n.totalTime??e.totalTime,!!n.disabled),s=e._data;return null!=s&&(o._data=s),o}function oU(e,t,n,i,r="",o=0,s){return{element:e,triggerName:t,fromState:n,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function fs(e,t,n){let i=e.get(t);return i||e.set(t,i=n),i}function J0e(e){const t=e.indexOf(":");return[e.substring(1,t),e.slice(t+1)]}const h0t=typeof document>"u"?null:document.documentElement;function sU(e){const t=e.parentNode||e.host||null;return t===h0t?null:t}let Bp=null,eve=!1;function tve(e,t){for(;t;){if(t===e)return!0;t=sU(t)}return!1}function nve(e,t,n){if(n)return Array.from(e.querySelectorAll(t));const i=e.querySelector(t);return i?[i]:[]}let aU=(()=>{class e{validateStyleProperty(n){return function g0t(e){Bp||(Bp=function m0t(){return typeof document<"u"?document.body:null}()||{},eve=!!Bp.style&&"WebkitAppearance"in Bp.style);let t=!0;return Bp.style&&!function p0t(e){return"ebkit"==e.substring(1,6)}(e)&&(t=e in Bp.style,!t&&eve&&(t="Webkit"+e.charAt(0).toUpperCase()+e.slice(1)in Bp.style)),t}(n)}containsElement(n,i){return tve(n,i)}getParentElement(n){return sU(n)}query(n,i,r){return nve(n,i,r)}computeStyle(n,i,r){return r||""}animate(n,i,r,o,s,a=[],l){return new Dv(r,o)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();class lU{static{this.NOOP=new aU}}class cU{}const y0t=1e3,uU="ng-enter",UN="ng-leave",zN="ng-trigger",HN=".ng-trigger",rve="ng-animating",dU=".ng-animating";function Tu(e){if("number"==typeof e)return e;const t=e.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:fU(parseFloat(t[1]),t[2])}function fU(e,t){return"s"===t?e*y0t:e}function GN(e,t,n){return e.hasOwnProperty("duration")?e:function b0t(e,t,n){let r,o=0,s="";if("string"==typeof e){const a=e.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return t.push(Q0e()),{duration:0,delay:0,easing:""};r=fU(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(o=fU(parseFloat(l),a[4]));const c=a[5];c&&(s=c)}else r=e;if(!n){let a=!1,l=t.length;r<0&&(t.push(function Oyt(){return new q(3100,!1)}()),a=!0),o<0&&(t.push(function Ryt(){return new q(3101,!1)}()),a=!0),a&&t.splice(l,0,Q0e())}return{duration:r,delay:o,easing:s}}(e,t,n)}function mc(e,t,n){t.forEach((i,r)=>{const o=pU(r);n&&!n.has(r)&&n.set(r,e.style[o]),e.style[o]=i})}function jp(e,t){t.forEach((n,i)=>{const r=pU(i);e.style[r]=""})}function Nw(e){return Array.isArray(e)?1==e.length?e[0]:function yFe(e,t=null){return{type:Xe.Sequence,steps:e,options:t}}(e):e}const hU=new RegExp("{{\\s*(.+?)\\s*}}","g");function sve(e){let t=[];if("string"==typeof e){let n;for(;n=hU.exec(e);)t.push(n[1]);hU.lastIndex=0}return t}function Iw(e,t,n){const i=`${e}`,r=i.replace(hU,(o,s)=>{let a=t[s];return null==a&&(n.push(function Pyt(){return new q(3003,!1)}()),a=""),a.toString()});return r==i?e:r}const C0t=/-+([a-z0-9])/g;function pU(e){return e.replace(C0t,(...t)=>t[1].toUpperCase())}function hs(e,t,n){switch(t.type){case Xe.Trigger:return e.visitTrigger(t,n);case Xe.State:return e.visitState(t,n);case Xe.Transition:return e.visitTransition(t,n);case Xe.Sequence:return e.visitSequence(t,n);case Xe.Group:return e.visitGroup(t,n);case Xe.Animate:return e.visitAnimate(t,n);case Xe.Keyframes:return e.visitKeyframes(t,n);case Xe.Style:return e.visitStyle(t,n);case Xe.Reference:return e.visitReference(t,n);case Xe.AnimateChild:return e.visitAnimateChild(t,n);case Xe.AnimateRef:return e.visitAnimateRef(t,n);case Xe.Query:return e.visitQuery(t,n);case Xe.Stagger:return e.visitStagger(t,n);default:throw function Lyt(){return new q(3004,!1)}()}}function gU(e,t){return window.getComputedStyle(e)[t]}const T0t=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class ave extends cU{normalizePropertyName(t,n){return pU(t)}normalizeStyleValue(t,n,i,r){let o="";const s=i.toString().trim();if(T0t.has(n)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function $yt(){return new q(3005,!1)}())}return s+o}}const WN="*";const qN=new Set(["true","1"]),YN=new Set(["false","0"]);function lve(e,t){const n=qN.has(e)||YN.has(e),i=qN.has(t)||YN.has(t);return(r,o)=>{let s=e==WN||e==r,a=t==WN||t==o;return!s&&n&&"boolean"==typeof r&&(s=r?qN.has(e):YN.has(e)),!a&&i&&"boolean"==typeof o&&(a=o?qN.has(t):YN.has(t)),s&&a}}const N0t=new RegExp("s*:selfs*,?","g");function mU(e,t,n,i){return new I0t(e).build(t,n,i)}class I0t{constructor(t){this._driver=t}build(t,n,i){const r=new R0t(n);return this._resetContextStyleTimingState(r),hs(this,Nw(t),r)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles=new Map,t.collectedStyles.set("",new Map),t.currentTime=0}visitTrigger(t,n){let i=n.queryCount=0,r=n.depCount=0;const o=[],s=[];return"@"==t.name.charAt(0)&&n.errors.push(function Byt(){return new q(3006,!1)}()),t.definitions.forEach(a=>{if(this._resetContextStyleTimingState(n),a.type==Xe.State){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,o.push(this.visitState(l,n))}),l.name=c}else if(a.type==Xe.Transition){const l=this.visitTransition(a,n);i+=l.queryCount,r+=l.depCount,s.push(l)}else n.errors.push(function jyt(){return new q(3007,!1)}())}),{type:Xe.Trigger,name:t.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(t,n){const i=this.visitStyle(t.styles,n),r=t.options&&t.options.params||null;if(i.containsDynamicStyles){const o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{sve(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&n.errors.push(function Vyt(){return new q(3008,!1)}(0,o.values()))}return{type:Xe.State,name:t.name,style:i,options:r?{params:r}:null}}visitTransition(t,n){n.queryCount=0,n.depCount=0;const i=hs(this,Nw(t.animation),n),r=function x0t(e,t){const n=[];return"string"==typeof e?e.split(/\s*,\s*/).forEach(i=>function A0t(e,t,n){if(":"==e[0]){const l=function M0t(e,t){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(n,i)=>parseFloat(i)>parseFloat(n);case":decrement":return(n,i)=>parseFloat(i) *"}}(e,n);if("function"==typeof l)return void t.push(l);e=l}const i=e.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return n.push(function Xyt(){return new q(3015,!1)}()),t;const r=i[1],o=i[2],s=i[3];t.push(lve(r,s)),"<"==o[0]&&(r!=WN||s!=WN)&&t.push(lve(s,r))}(i,n,t)):n.push(e),n}(t.expr,n.errors);return{type:Xe.Transition,matchers:r,animation:i,queryCount:n.queryCount,depCount:n.depCount,options:Vp(t.options)}}visitSequence(t,n){return{type:Xe.Sequence,steps:t.steps.map(i=>hs(this,i,n)),options:Vp(t.options)}}visitGroup(t,n){const i=n.currentTime;let r=0;const o=t.steps.map(s=>{n.currentTime=i;const a=hs(this,s,n);return r=Math.max(r,n.currentTime),a});return n.currentTime=r,{type:Xe.Group,steps:o,options:Vp(t.options)}}visitAnimate(t,n){const i=function P0t(e,t){if(e.hasOwnProperty("duration"))return e;if("number"==typeof e)return _U(GN(e,t).duration,0,"");const n=e;if(n.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=_U(0,0,"");return o.dynamic=!0,o.strValue=n,o}const r=GN(n,t);return _U(r.duration,r.delay,r.easing)}(t.timings,n.errors);n.currentAnimateTimings=i;let r,o=t.styles?t.styles:Ds({});if(o.type==Xe.Keyframes)r=this.visitKeyframes(o,n);else{let s=t.styles,a=!1;if(!s){a=!0;const c={};i.easing&&(c.easing=i.easing),s=Ds(c)}n.currentTime+=i.duration+i.delay;const l=this.visitStyle(s,n);l.isEmptyStep=a,r=l}return n.currentAnimateTimings=null,{type:Xe.Animate,timings:i,style:r,options:null}}visitStyle(t,n){const i=this._makeStyleAst(t,n);return this._validateStyleAst(i,n),i}_makeStyleAst(t,n){const i=[],r=Array.isArray(t.styles)?t.styles:[t.styles];for(let a of r)"string"==typeof a?a===Bc?i.push(a):n.errors.push(new q(3002,!1)):i.push(new Map(Object.entries(a)));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o))for(let l of a.values())if(l.toString().indexOf("{{")>=0){o=!0;break}}),{type:Xe.Style,styles:i,easing:s,offset:t.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(t,n){const i=n.currentAnimateTimings;let r=n.currentTime,o=n.currentTime;i&&o>0&&(o-=i.duration+i.delay),t.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,l)=>{const c=n.collectedStyles.get(n.currentQuerySelector),u=c.get(l);let d=!0;u&&(o!=r&&o>=u.startTime&&r<=u.endTime&&(n.errors.push(function zyt(){return new q(3010,!1)}()),d=!1),o=u.startTime),d&&c.set(l,{startTime:o,endTime:r}),n.options&&function E0t(e,t,n){const i=t.params||{},r=sve(e);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||n.push(function Fyt(){return new q(3001,!1)}())})}(a,n.options,n.errors)})})}visitKeyframes(t,n){const i={type:Xe.Keyframes,styles:[],options:null};if(!n.currentAnimateTimings)return n.errors.push(function Hyt(){return new q(3011,!1)}()),i;let o=0;const s=[];let a=!1,l=!1,c=0;const u=t.steps.map(_=>{const y=this._makeStyleAst(_,n);let v=null!=y.offset?y.offset:function F0t(e){if("string"==typeof e)return null;let t=null;if(Array.isArray(e))e.forEach(n=>{if(n instanceof Map&&n.has("offset")){const i=n;t=parseFloat(i.get("offset")),i.delete("offset")}});else if(e instanceof Map&&e.has("offset")){const n=e;t=parseFloat(n.get("offset")),n.delete("offset")}return t}(y.styles),b=0;return null!=v&&(o++,b=y.offset=v),l=l||b<0||b>1,a=a||b0&&o{const v=f>0?y==h?1:f*y:s[y],b=v*m;n.currentTime=p+g.delay+b,g.duration=b,this._validateStyleAst(_,n),_.offset=v,i.styles.push(_)}),i}visitReference(t,n){return{type:Xe.Reference,animation:hs(this,Nw(t.animation),n),options:Vp(t.options)}}visitAnimateChild(t,n){return n.depCount++,{type:Xe.AnimateChild,options:Vp(t.options)}}visitAnimateRef(t,n){return{type:Xe.AnimateRef,animation:this.visitReference(t.animation,n),options:Vp(t.options)}}visitQuery(t,n){const i=n.currentQuerySelector,r=t.options||{};n.queryCount++,n.currentQuery=t;const[o,s]=function k0t(e){const t=!!e.split(/\s*,\s*/).find(n=>":self"==n);return t&&(e=e.replace(N0t,"")),e=e.replace(/@\*/g,HN).replace(/@\w+/g,n=>HN+"-"+n.slice(1)).replace(/:animating/g,dU),[e,t]}(t.selector);n.currentQuerySelector=i.length?i+" "+o:o,fs(n.collectedStyles,n.currentQuerySelector,new Map);const a=hs(this,Nw(t.animation),n);return n.currentQuery=null,n.currentQuerySelector=i,{type:Xe.Query,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:t.selector,options:Vp(t.options)}}visitStagger(t,n){n.currentQuery||n.errors.push(function Yyt(){return new q(3013,!1)}());const i="full"===t.timings?{duration:0,delay:0,easing:"full"}:GN(t.timings,n.errors,!0);return{type:Xe.Stagger,animation:hs(this,Nw(t.animation),n),timings:i,options:null}}}class R0t{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function Vp(e){return e?(e={...e}).params&&(e.params=function O0t(e){return e?{...e}:null}(e.params)):e={},e}function _U(e,t,n){return{duration:e,delay:t,easing:n}}function yU(e,t,n,i,r,o,s=null,a=!1){return{type:1,element:e,keyframes:t,preStyleProps:n,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}class KN{constructor(){this._map=new Map}get(t){return this._map.get(t)||[]}append(t,n){let i=this._map.get(t);i||this._map.set(t,i=[]),i.push(...n)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const B0t=new RegExp(":enter","g"),V0t=new RegExp(":leave","g");function vU(e,t,n,i,r,o=new Map,s=new Map,a,l,c=[]){return(new U0t).buildKeyframes(e,t,n,i,r,o,s,a,l,c)}class U0t{buildKeyframes(t,n,i,r,o,s,a,l,c,u=[]){c=c||new KN;const d=new bU(t,n,c,r,o,u,[]);d.options=l;const f=l.delay?Tu(l.delay):0;d.currentTimeline.delayNextStep(f),d.currentTimeline.setStyles([s],null,d.errors,l),hs(this,i,d);const h=d.timelines.filter(p=>p.containsAnimation());if(h.length&&a.size){let p;for(let g=h.length-1;g>=0;g--){const m=h[g];if(m.element===n){p=m;break}}p&&!p.allowOnlyTimelineStyles()&&p.setStyles([a],null,d.errors,l)}return h.length?h.map(p=>p.buildKeyframes()):[yU(n,[],[],[],0,f,"",!1)]}visitTrigger(t,n){}visitState(t,n){}visitTransition(t,n){}visitAnimateChild(t,n){const i=n.subInstructions.get(n.element);if(i){const r=n.createSubContext(t.options),o=n.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&n.transformIntoNewTimeline(s)}n.previousNode=t}visitAnimateRef(t,n){const i=n.createSubContext(t.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([t.options,t.animation.options],n,i),this.visitReference(t.animation,i),n.transformIntoNewTimeline(i.currentTimeline.currentTime),n.previousNode=t}_applyAnimationRefDelays(t,n,i){for(const r of t){const o=r?.delay;if(o){const s="number"==typeof o?o:Tu(Iw(o,r?.params??{},n.errors));i.delayNextStep(s)}}}_visitSubInstructions(t,n,i){let o=n.currentTimeline.currentTime;const s=null!=i.duration?Tu(i.duration):null,a=null!=i.delay?Tu(i.delay):null;return 0!==s&&t.forEach(l=>{const c=n.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(t,n){n.updateOptions(t.options,!0),hs(this,t.animation,n),n.previousNode=t}visitSequence(t,n){const i=n.subContextCount;let r=n;const o=t.options;if(o&&(o.params||o.delay)&&(r=n.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){r.previousNode.type==Xe.Style&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=XN);const s=Tu(o.delay);r.delayNextStep(s)}t.steps.length&&(t.steps.forEach(s=>hs(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),n.previousNode=t}visitGroup(t,n){const i=[];let r=n.currentTimeline.currentTime;const o=t.options&&t.options.delay?Tu(t.options.delay):0;t.steps.forEach(s=>{const a=n.createSubContext(t.options);o&&a.delayNextStep(o),hs(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>n.currentTimeline.mergeTimelineCollectedStyles(s)),n.transformIntoNewTimeline(r),n.previousNode=t}_visitTiming(t,n){if(t.dynamic){const i=t.strValue;return GN(n.params?Iw(i,n.params,n.errors):i,n.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,n){const i=n.currentAnimateTimings=this._visitTiming(t.timings,n),r=n.currentTimeline;i.delay&&(n.incrementTime(i.delay),r.snapshotCurrentStyles());const o=t.style;o.type==Xe.Keyframes?this.visitKeyframes(o,n):(n.incrementTime(i.duration),this.visitStyle(o,n),r.applyStylesToKeyframe()),n.currentAnimateTimings=null,n.previousNode=t}visitStyle(t,n){const i=n.currentTimeline,r=n.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=r&&r.easing||t.easing;t.isEmptyStep?i.applyEmptyStep(o):i.setStyles(t.styles,o,n.errors,n.options),n.previousNode=t}visitKeyframes(t,n){const i=n.currentAnimateTimings,r=n.currentTimeline.duration,o=i.duration,a=n.createSubContext().currentTimeline;a.easing=i.easing,t.styles.forEach(l=>{a.forwardTime((l.offset||0)*o),a.setStyles(l.styles,l.easing,n.errors,n.options),a.applyStylesToKeyframe()}),n.currentTimeline.mergeTimelineCollectedStyles(a),n.transformIntoNewTimeline(r+o),n.previousNode=t}visitQuery(t,n){const i=n.currentTimeline.currentTime,r=t.options||{},o=r.delay?Tu(r.delay):0;o&&(n.previousNode.type===Xe.Style||0==i&&n.currentTimeline.hasCurrentStyleProperties())&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=XN);let s=i;const a=n.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,n.errors);n.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{n.currentQueryIndex=u;const d=n.createSubContext(t.options,c);o&&d.delayNextStep(o),c===n.element&&(l=d.currentTimeline),hs(this,t.animation,d),d.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,d.currentTimeline.currentTime)}),n.currentQueryIndex=0,n.currentQueryTotal=0,n.transformIntoNewTimeline(s),l&&(n.currentTimeline.mergeTimelineCollectedStyles(l),n.currentTimeline.snapshotCurrentStyles()),n.previousNode=t}visitStagger(t,n){const i=n.parentContext,r=n.currentTimeline,o=t.timings,s=Math.abs(o.duration),a=s*(n.currentQueryTotal-1);let l=s*n.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=n.currentTimeline;l&&u.delayNextStep(l);const d=u.currentTime;hs(this,t.animation,n),n.previousNode=t,i.currentStaggerTime=r.currentTime-d+(r.startTime-i.currentTimeline.startTime)}}const XN={};class bU{constructor(t,n,i,r,o,s,a,l){this._driver=t,this.element=n,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=XN,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new QN(this._driver,n,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,n){if(!t)return;const i=t;let r=this.options;null!=i.duration&&(r.duration=Tu(i.duration)),null!=i.delay&&(r.delay=Tu(i.delay));const o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!n||!s.hasOwnProperty(a))&&(s[a]=Iw(o[a],s,this.errors))})}}_copyOptions(){const t={};if(this.options){const n=this.options.params;if(n){const i=t.params={};Object.keys(n).forEach(r=>{i[r]=n[r]})}}return t}createSubContext(t=null,n,i){const r=n||this.element,o=new bU(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(t){return this.previousNode=XN,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,n,i){const r={duration:n??t.duration,delay:this.currentTimeline.currentTime+(i??0)+t.delay,easing:""},o=new z0t(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,n,i,r,o,s){let a=[];if(r&&a.push(this.element),t.length>0){t=(t=t.replace(B0t,"."+this._enterClassName)).replace(V0t,"."+this._leaveClassName);let c=this._driver.query(this.element,t,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!o&&0==a.length&&s.push(function Kyt(){return new q(3014,!1)}()),a}}class QN{constructor(t,n,i,r){this._driver=t,this.element=n,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(n),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(n,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const n=1===this._keyframes.size&&this._pendingStyles.size;this.duration||n?(this.forwardTime(this.currentTime+t),n&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,n){return this.applyStylesToKeyframe(),new QN(this._driver,t,n||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,n){this._localTimelineStyles.set(t,n),this._globalTimelineStyles.set(t,n),this._styleSummary.set(t,{time:this.currentTime,value:n})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&this._previousKeyframe.set("easing",t);for(let[n,i]of this._globalTimelineStyles)this._backFill.set(n,i||Bc),this._currentKeyframe.set(n,Bc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,n,i,r){n&&this._previousKeyframe.set("easing",n);const o=r&&r.params||{},s=function H0t(e,t){const n=new Map;let i;return e.forEach(r=>{if("*"===r){i??=t.keys();for(let o of i)n.set(o,Bc)}else for(let[o,s]of r)n.set(o,s)}),n}(t,this._globalTimelineStyles);for(let[a,l]of s){const c=Iw(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Bc),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((t,n)=>{this._currentKeyframe.set(n,t)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((t,n)=>{this._currentKeyframe.has(n)||this._currentKeyframe.set(n,t)}))}snapshotCurrentStyles(){for(let[t,n]of this._localTimelineStyles)this._pendingStyles.set(t,n),this._updateStyle(t,n)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let n in this._currentKeyframe)t.push(n);return t}mergeTimelineCollectedStyles(t){t._styleSummary.forEach((n,i)=>{const r=this._styleSummary.get(i);(!r||n.time>r.time)&&this._updateStyle(i,n.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,n=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=new Map([...this._backFill,...a]);c.forEach((u,d)=>{"!"===u?t.add(d):u===Bc&&n.add(d)}),i||c.set("offset",l/this.duration),r.push(c)});const o=[...t.values()],s=[...n.values()];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return yU(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}}class z0t extends QN{constructor(t,n,i,r,o,s,a=!1){super(t,n,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:n,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&n){const o=[],s=i+n,a=n/s,l=new Map(t[0]);l.set("offset",0),o.push(l);const c=new Map(t[0]);c.set("offset",dve(a)),o.push(c);const u=t.length-1;for(let d=1;d<=u;d++){let f=new Map(t[d]);const h=f.get("offset");f.set("offset",dve((n+h*i)/s)),o.push(f)}i=s,n=0,r="",t=o}return yU(this.element,t,this.preStyleProps,this.postStyleProps,i,n,r,!0)}}function dve(e,t=3){const n=Math.pow(10,t-1);return Math.round(e*n)/n}function fve(e,t,n,i,r,o,s,a,l,c,u,d,f){return{type:0,element:e,triggerName:t,isRemovalTransition:r,fromState:n,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:d,errors:f}}const wU={};class hve{constructor(t,n,i){this._triggerName=t,this.ast=n,this._stateStyles=i}match(t,n,i,r){return function G0t(e,t,n,i,r){return e.some(o=>o(t,n,i,r))}(this.ast.matchers,t,n,i,r)}buildStyles(t,n,i){let r=this._stateStyles.get("*");return void 0!==t&&(r=this._stateStyles.get(t?.toString())||r),r?r.buildStyles(n,i):new Map}build(t,n,i,r,o,s,a,l,c,u){const d=[],f=this.ast.options&&this.ast.options.params||wU,p=this.buildStyles(i,a&&a.params||wU,d),g=l&&l.params||wU,m=this.buildStyles(r,g,d),_=new Set,y=new Map,v=new Map,b="void"===r,w={params:pve(g,f),delay:this.ast.options?.delay},C=u?[]:vU(t,n,this.ast.animation,o,s,p,m,w,c,d);let E=0;return C.forEach(D=>{E=Math.max(D.duration+D.delay,E)}),d.length?fve(n,this._triggerName,i,r,b,p,m,[],[],y,v,E,d):(C.forEach(D=>{const M=D.element,k=fs(y,M,new Set);D.preStyleProps.forEach(F=>k.add(F));const R=fs(v,M,new Set);D.postStyleProps.forEach(F=>R.add(F)),M!==n&&_.add(M)}),fve(n,this._triggerName,i,r,b,p,m,C,[..._.values()],y,v,E))}}function pve(e,t){const n={...t};return Object.entries(e).forEach(([i,r])=>{null!=r&&(n[i]=r)}),n}class W0t{constructor(t,n,i){this.styles=t,this.defaultParams=n,this.normalizer=i}buildStyles(t,n){const i=new Map,r=pve(t,this.defaultParams);return this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=Iw(s,r,n));const l=this.normalizer.normalizePropertyName(a,n);s=this.normalizer.normalizeStyleValue(a,l,s,n),i.set(a,s)})}),i}}class Y0t{constructor(t,n,i){this.name=t,this.ast=n,this._normalizer=i,this.transitionFactories=[],this.states=new Map,n.states.forEach(r=>{this.states.set(r.name,new W0t(r.style,r.options&&r.options.params||{},i))}),gve(this.states,"true","1"),gve(this.states,"false","0"),n.transitions.forEach(r=>{this.transitionFactories.push(new hve(t,r,this.states))}),this.fallbackTransition=function K0t(e,t){return new hve(e,{type:Xe.Transition,animation:{type:Xe.Sequence,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},t)}(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,n,i,r){return this.transitionFactories.find(s=>s.match(t,n,i,r))||null}matchStyles(t,n,i){return this.fallbackTransition.buildStyles(t,n,i)}}function gve(e,t,n){e.has(t)?e.has(n)||e.set(n,e.get(t)):e.has(n)&&e.set(t,e.get(n))}const X0t=new KN;class Q0t{constructor(t,n,i){this.bodyNode=t,this._driver=n,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(t,n){const i=[],o=mU(this._driver,n,i,[]);if(i.length)throw function n0t(){return new q(3503,!1)}();this._animations.set(t,o)}_buildPlayer(t,n,i){const r=t.element,o=Z0e(this._normalizer,t.keyframes,n,i);return this._driver.animate(r,o,t.duration,t.delay,t.easing,[],!0)}create(t,n,i={}){const r=[],o=this._animations.get(t);let s;const a=new Map;if(o?(s=vU(this._driver,n,o,uU,UN,new Map,new Map,i,X0t,r),s.forEach(u=>{const d=fs(a,u.element,new Map);u.postStyleProps.forEach(f=>d.set(f,null))})):(r.push(function i0t(){return new q(3300,!1)}()),s=[]),r.length)throw function r0t(){return new q(3504,!1)}();a.forEach((u,d)=>{u.forEach((f,h)=>{u.set(h,this._driver.computeStyle(d,h,Bc))})});const c=vf(s.map(u=>{const d=a.get(u.element);return this._buildPlayer(u,new Map,d)}));return this._playersById.set(t,c),c.onDestroy(()=>this.destroy(t)),this.players.push(c),c}destroy(t){const n=this._getPlayer(t);n.destroy(),this._playersById.delete(t);const i=this.players.indexOf(n);i>=0&&this.players.splice(i,1)}_getPlayer(t){const n=this._playersById.get(t);if(!n)throw function o0t(){return new q(3301,!1)}();return n}listen(t,n,i,r){const o=oU(n,"","","");return iU(this._getPlayer(t),i,o,r),()=>{}}command(t,n,i,r){if("register"==i)return void this.register(t,r[0]);if("create"==i)return void this.create(t,n,r[0]||{});const o=this._getPlayer(t);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t)}}}const mve="ng-animate-queued",EU="ng-animate-disabled",nvt=[],_ve={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},ivt={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},tl="__ng_removed";class CU{get params(){return this.options.params}constructor(t,n=""){this.namespaceId=n;const i=t&&t.hasOwnProperty("value");if(this.value=function avt(e){return e??null}(i?t.value:t),i){const{value:o,...s}=t;this.options=s}else this.options={};this.options.params||(this.options.params={})}absorbOptions(t){const n=t.params;if(n){const i=this.options.params;Object.keys(n).forEach(r=>{null==i[r]&&(i[r]=n[r])})}}}const kw="void",DU=new CU(kw);class rvt{constructor(t,n,i){this.id=t,this.hostElement=n,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Js(n,this._hostClassName)}listen(t,n,i,r){if(!this._triggers.has(n))throw function s0t(){return new q(3302,!1)}();if(null==i||0==i.length)throw function a0t(){return new q(3303,!1)}();if(!function lvt(e){return"start"==e||"done"==e}(i))throw function l0t(){return new q(3400,!1)}();const o=fs(this._elementListeners,t,[]),s={name:n,phase:i,callback:r};o.push(s);const a=fs(this._engine.statesByElement,t,new Map);return a.has(n)||(Js(t,zN),Js(t,zN+"-"+n),a.set(n,DU)),()=>{this._engine.afterFlush(()=>{const l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(n)||a.delete(n)})}}register(t,n){return!this._triggers.has(t)&&(this._triggers.set(t,n),!0)}_getTrigger(t){const n=this._triggers.get(t);if(!n)throw function c0t(){return new q(3401,!1)}();return n}trigger(t,n,i,r=!0){const o=this._getTrigger(n),s=new SU(this.id,n,t);let a=this._engine.statesByElement.get(t);a||(Js(t,zN),Js(t,zN+"-"+n),this._engine.statesByElement.set(t,a=new Map));let l=a.get(n);const c=new CU(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(n,c),l||(l=DU),c.value!==kw&&l.value===c.value){if(!function dvt(e,t){const n=Object.keys(e),i=Object.keys(t);if(n.length!=i.length)return!1;for(let r=0;r{jp(t,m),mc(t,_)})}return}const f=fs(this._engine.playersByElement,t,[]);f.forEach(g=>{g.namespaceId==this.id&&g.triggerName==n&&g.queued&&g.destroy()});let h=o.matchTransition(l.value,c.value,t,c.params),p=!1;if(!h){if(!r)return;h=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:n,transition:h,fromState:l,toState:c,player:s,isFallbackTransition:p}),p||(Js(t,mve),s.onStart(()=>{xy(t,mve)})),s.onDone(()=>{let g=this.players.indexOf(s);g>=0&&this.players.splice(g,1);const m=this._engine.playersByElement.get(t);if(m){let _=m.indexOf(s);_>=0&&m.splice(_,1)}}),this.players.push(s),f.push(s),s}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(n=>n.delete(t)),this._elementListeners.forEach((n,i)=>{this._elementListeners.set(i,n.filter(r=>r.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const n=this._engine.playersByElement.get(t);n&&(n.forEach(i=>i.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,n){const i=this._engine.driver.query(t,HN,!0);i.forEach(r=>{if(r[tl])return;const o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,n,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(t,n,i,r){const o=this._engine.statesByElement.get(t),s=new Map;if(o){const a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){const u=this.trigger(t,c,kw,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,n,s),i&&vf(a).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const n=this._elementListeners.get(t),i=this._engine.statesByElement.get(t);if(n&&i){const r=new Set;n.forEach(o=>{const s=o.name;if(r.has(s))return;r.add(s);const l=this._triggers.get(s).fallbackTransition,c=i.get(s)||DU,u=new CU(kw),d=new SU(this.id,s,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:s,transition:l,fromState:c,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(t,n){const i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,n),this.triggerLeaveAnimation(t,n,!0))return;let r=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(t):[];if(o&&o.length)r=!0;else{let s=t;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(t),r)i.markElementAsRemoved(this.id,t,!1,n);else{const o=t[tl];(!o||o===_ve)&&(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,n))}}insertNode(t,n){Js(t,this._hostClassName)}drainQueuedTransitions(t){const n=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){const l=oU(o,i.triggerName,i.fromState.value,i.toState.value);l._data=t,iU(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):n.push(i)}),this._queue=[],n.sort((i,r)=>{const o=i.transition.ast.depCount,s=r.transition.ast.depCount;return 0==o||0==s?o-s:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(t){this.players.forEach(n=>n.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}}class ovt{_onRemovalComplete(t,n){this.onRemovalComplete(t,n)}constructor(t,n,i){this.bodyNode=t,this.driver=n,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){const t=[];return this._namespaceList.forEach(n=>{n.players.forEach(i=>{i.queued&&t.push(i)})}),t}createNamespace(t,n){const i=new rvt(t,n,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,n)?this._balanceNamespaceList(i,n):(this.newHostElements.set(n,i),this.collectEnterElement(n)),this._namespaceLookup[t]=i}_balanceNamespaceList(t,n){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(n);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,t),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(t)}else i.push(t);return r.set(n,t),t}register(t,n){let i=this._namespaceLookup[t];return i||(i=this.createNamespace(t,n)),i}registerTrigger(t,n,i){let r=this._namespaceLookup[t];r&&r.register(n,i)&&this.totalAnimations++}destroy(t,n){t&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{const i=this._fetchNamespace(t);this.namespacesByHostElement.delete(i.hostElement);const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1),i.destroy(n),delete this._namespaceLookup[t]}))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const n=new Set,i=this.statesByElement.get(t);if(i)for(let r of i.values())if(r.namespaceId){const o=this._fetchNamespace(r.namespaceId);o&&n.add(o)}return n}trigger(t,n,i,r){if(ZN(n)){const o=this._fetchNamespace(t);if(o)return o.trigger(n,i,r),!0}return!1}insertNode(t,n,i,r){if(!ZN(n))return;const o=n[tl];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const s=this.collectedLeaveElements.indexOf(n);s>=0&&this.collectedLeaveElements.splice(s,1)}if(t){const s=this._fetchNamespace(t);s&&s.insertNode(n,i)}r&&this.collectEnterElement(n)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,n){n?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Js(t,EU)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),xy(t,EU))}removeNode(t,n,i){if(ZN(n)){const r=t?this._fetchNamespace(t):null;r?r.removeNode(n,i):this.markElementAsRemoved(t,n,!1,i);const o=this.namespacesByHostElement.get(n);o&&o.id!==t&&o.removeNode(n,i)}else this._onRemovalComplete(n,i)}markElementAsRemoved(t,n,i,r,o){this.collectedLeaveElements.push(n),n[tl]={namespaceId:t,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(t,n,i,r,o){return ZN(n)?this._fetchNamespace(t).listen(n,i,r,o):()=>{}}_buildInstruction(t,n,i,r,o){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,i,r,t.fromState.options,t.toState.options,n,o)}destroyInnerAnimations(t){let n=this.driver.query(t,HN,!0);n.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(n=this.driver.query(t,dU,!0),n.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(t){const n=this.playersByElement.get(t);n&&n.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(t){const n=this.playersByQueriedElement.get(t);n&&n.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return vf(this.players).onDone(()=>t());t()})}processLeaveNode(t){const n=t[tl];if(n&&n.setForRemoval){if(t[tl]=_ve,n.namespaceId){this.destroyInnerAnimations(t);const i=this._fetchNamespace(n.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,n.setForRemoval)}t.classList?.contains(EU)&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(t=-1){let n=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],n.length?vf(n).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(t){throw function u0t(){return new q(3402,!1)}()}_flushAnimations(t,n){const i=new KN,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(x=>{u.add(x);const I=this.driver.query(x,".ng-animate-queued",!0);for(let A=0;A{const A=uU+g++;p.set(I,A),x.forEach(N=>Js(N,A))});const m=[],_=new Set,y=new Set;for(let x=0;x_.add(N)):y.add(I))}const v=new Map,b=bve(f,Array.from(_));b.forEach((x,I)=>{const A=UN+g++;v.set(I,A),x.forEach(N=>Js(N,A))}),t.push(()=>{h.forEach((x,I)=>{const A=p.get(I);x.forEach(N=>xy(N,A))}),b.forEach((x,I)=>{const A=v.get(I);x.forEach(N=>xy(N,A))}),m.forEach(x=>{this.processLeaveNode(x)})});const w=[],C=[];for(let x=this._namespaceList.length-1;x>=0;x--)this._namespaceList[x].drainQueuedTransitions(n).forEach(A=>{const N=A.player,O=A.element;if(w.push(N),this.collectedEnterElements.length){const Y=O[tl];if(Y&&Y.setForMove){if(Y.previousTriggersValues&&Y.previousTriggersValues.has(A.triggerName)){const ue=Y.previousTriggersValues.get(A.triggerName),W=this.statesByElement.get(A.element);if(W&&W.has(A.triggerName)){const ne=W.get(A.triggerName);ne.value=ue,W.set(A.triggerName,ne)}}return void N.destroy()}}const $=!d||!this.driver.containsElement(d,O),B=v.get(O),V=p.get(O),j=this._buildInstruction(A,i,V,B,$);if(j.errors&&j.errors.length)return void C.push(j);if($)return N.onStart(()=>jp(O,j.fromStyles)),N.onDestroy(()=>mc(O,j.toStyles)),void r.push(N);if(A.isFallbackTransition)return N.onStart(()=>jp(O,j.fromStyles)),N.onDestroy(()=>mc(O,j.toStyles)),void r.push(N);const H=[];j.timelines.forEach(Y=>{Y.stretchStartingKeyframe=!0,this.disabledNodes.has(Y.element)||H.push(Y)}),j.timelines=H,i.append(O,j.timelines),s.push({instruction:j,player:N,element:O}),j.queriedElements.forEach(Y=>fs(a,Y,[]).push(N)),j.preStyleProps.forEach((Y,ue)=>{if(Y.size){let W=l.get(ue);W||l.set(ue,W=new Set),Y.forEach((ne,ie)=>W.add(ie))}}),j.postStyleProps.forEach((Y,ue)=>{let W=c.get(ue);W||c.set(ue,W=new Set),Y.forEach((ne,ie)=>W.add(ie))})});if(C.length){const x=[];C.forEach(I=>{x.push(function d0t(){return new q(3505,!1)}())}),w.forEach(I=>I.destroy()),this.reportError(x)}const E=new Map,D=new Map;s.forEach(x=>{const I=x.element;i.has(I)&&(D.set(I,I),this._beforeAnimationBuild(x.player.namespaceId,x.instruction,E))}),r.forEach(x=>{const I=x.element;this._getPreviousPlayers(I,!1,x.namespaceId,x.triggerName,null).forEach(N=>{fs(E,I,[]).push(N),N.destroy()})});const M=m.filter(x=>Eve(x,l,c)),k=new Map;vve(k,this.driver,y,c,Bc).forEach(x=>{Eve(x,l,c)&&M.push(x)});const F=new Map;h.forEach((x,I)=>{vve(F,this.driver,new Set(x),l,"!")}),M.forEach(x=>{const I=k.get(x),A=F.get(x);k.set(x,new Map([...I?.entries()??[],...A?.entries()??[]]))});const P=[],T=[],S={};s.forEach(x=>{const{element:I,player:A,instruction:N}=x;if(i.has(I)){if(u.has(I))return A.onDestroy(()=>mc(I,N.toStyles)),A.disabled=!0,A.overrideTotalTime(N.totalTime),void r.push(A);let O=S;if(D.size>1){let B=I;const V=[];for(;B=B.parentNode;){const j=D.get(B);if(j){O=j;break}V.push(B)}V.forEach(j=>D.set(j,O))}const $=this._buildAnimation(A.namespaceId,N,E,o,F,k);if(A.setRealPlayer($),O===S)P.push(A);else{const B=this.playersByElement.get(O);B&&B.length&&(A.parentPlayer=vf(B)),r.push(A)}}else jp(I,N.fromStyles),A.onDestroy(()=>mc(I,N.toStyles)),T.push(A),u.has(I)&&r.push(A)}),T.forEach(x=>{const I=o.get(x.element);if(I&&I.length){const A=vf(I);x.setRealPlayer(A)}}),r.forEach(x=>{x.parentPlayer?x.syncPlayerEvents(x.parentPlayer):x.destroy()});for(let x=0;x!$.destroyed);O.length?cvt(this,I,O):this.processLeaveNode(I)}return m.length=0,P.forEach(x=>{this.players.push(x),x.onDone(()=>{x.destroy();const I=this.players.indexOf(x);this.players.splice(I,1)}),x.play()}),P}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,n,i,r,o){let s=[];if(n){const a=this.playersByQueriedElement.get(t);a&&(s=a)}else{const a=this.playersByElement.get(t);if(a){const l=!o||o==kw;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(t,n,i){const o=n.element,s=n.isRemovalTransition?void 0:t,a=n.isRemovalTransition?void 0:n.triggerName;for(const l of n.timelines){const c=l.element,u=c!==o,d=fs(i,c,[]);this._getPreviousPlayers(c,u,s,a,n.toState).forEach(h=>{const p=h.getRealPlayer();p.beforeDestroy&&p.beforeDestroy(),h.destroy(),d.push(h)})}jp(o,n.fromStyles)}_buildAnimation(t,n,i,r,o,s){const a=n.triggerName,l=n.element,c=[],u=new Set,d=new Set,f=n.timelines.map(p=>{const g=p.element;u.add(g);const m=g[tl];if(m&&m.removedBeforeQueried)return new Dv(p.duration,p.delay);const _=g!==l,y=function uvt(e){const t=[];return wve(e,t),t}((i.get(g)||nvt).map(E=>E.getRealPlayer())).filter(E=>!!E.element&&E.element===g),v=o.get(g),b=s.get(g),w=Z0e(this._normalizer,p.keyframes,v,b),C=this._buildPlayer(p,w,y);if(p.subTimeline&&r&&d.add(g),_){const E=new SU(t,a,g);E.setRealPlayer(C),c.push(E)}return C});c.forEach(p=>{fs(this.playersByQueriedElement,p.element,[]).push(p),p.onDone(()=>function svt(e,t,n){let i=e.get(t);if(i){if(i.length){const r=i.indexOf(n);i.splice(r,1)}0==i.length&&e.delete(t)}return i}(this.playersByQueriedElement,p.element,p))}),u.forEach(p=>Js(p,rve));const h=vf(f);return h.onDestroy(()=>{u.forEach(p=>xy(p,rve)),mc(l,n.toStyles)}),d.forEach(p=>{fs(r,p,[]).push(h)}),h}_buildPlayer(t,n,i){return n.length>0?this.driver.animate(t.element,n,t.duration,t.delay,t.easing,i):new Dv(t.duration,t.delay)}}class SU{constructor(t,n,i){this.namespaceId=t,this.triggerName=n,this.element=i,this._player=new Dv,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((n,i)=>{n.forEach(r=>iU(t,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const n=this._player;n.triggerCallback&&t.onStart(()=>n.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,n){fs(this._queuedCallbacks,t,[]).push(n)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const n=this._player;n.triggerCallback&&n.triggerCallback(t)}}function ZN(e){return e&&1===e.nodeType}function yve(e,t){const n=e.style.display;return e.style.display=t??"none",n}function vve(e,t,n,i,r){const o=[];n.forEach(l=>o.push(yve(l)));const s=[];i.forEach((l,c)=>{const u=new Map;l.forEach(d=>{const f=t.computeStyle(c,d,r);u.set(d,f),(!f||0==f.length)&&(c[tl]=ivt,s.push(c))}),e.set(c,u)});let a=0;return n.forEach(l=>yve(l,o[a++])),s}function bve(e,t){const n=new Map;if(e.forEach(a=>n.set(a,[])),0==t.length)return n;const r=new Set(t),o=new Map;function s(a){if(!a)return 1;let l=o.get(a);if(l)return l;const c=a.parentNode;return l=n.has(c)?c:r.has(c)?1:s(c),o.set(a,l),l}return t.forEach(a=>{const l=s(a);1!==l&&n.get(l).push(a)}),n}function Js(e,t){e.classList?.add(t)}function xy(e,t){e.classList?.remove(t)}function cvt(e,t,n){vf(n).onDone(()=>e.processLeaveNode(t))}function wve(e,t){for(let n=0;nr.add(o)):t.set(e,i),n.delete(e),!0}class Ow{constructor(t,n,i){this._driver=n,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new ovt(t.body,n,i),this._timelineEngine=new Q0t(t.body,n,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(t,n,i,r,o){const s=t+"-"+r;let a=this._triggerCache[s];if(!a){const l=[],u=mU(this._driver,o,l,[]);if(l.length)throw function e0t(){return new q(3404,!1)}();a=function q0t(e,t,n){return new Y0t(e,t,n)}(r,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(n,r,a)}register(t,n){this._transitionEngine.register(t,n)}destroy(t,n){this._transitionEngine.destroy(t,n)}onInsert(t,n,i,r){this._transitionEngine.insertNode(t,n,i,r)}onRemove(t,n,i){this._transitionEngine.removeNode(t,n,i)}disableAnimations(t,n){this._transitionEngine.markElementAsDisabled(t,n)}process(t,n,i,r){if("@"==i.charAt(0)){const[o,s]=J0e(i);this._timelineEngine.command(o,n,s,r)}else this._transitionEngine.trigger(t,n,i,r)}listen(t,n,i,r,o){if("@"==i.charAt(0)){const[s,a]=J0e(i);return this._timelineEngine.listen(s,n,a,o)}return this._transitionEngine.listen(t,n,i,r,o)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(t){this._transitionEngine.afterFlushAnimationsDone(t)}}class Rw{static{this.initialStylesByElement=new WeakMap}constructor(t,n,i){this._element=t,this._startStyles=n,this._endStyles=i,this._state=0;let r=Rw.initialStylesByElement.get(t);r||Rw.initialStylesByElement.set(t,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&mc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(mc(this._element,this._initialStyles),this._endStyles&&(mc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(Rw.initialStylesByElement.delete(this._element),this._startStyles&&(jp(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(jp(this._element,this._endStyles),this._endStyles=null),mc(this._element,this._initialStyles),this._state=3)}}function TU(e){let t=null;return e.forEach((n,i)=>{(function hvt(e){return"display"===e||"position"===e})(i)&&(t=t||new Map,t.set(i,n))}),t}class Cve{constructor(t,n,i,r){this.element=t,this.keyframes=n,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:new Map;const n=()=>this._onFinish();this.domPlayer.addEventListener("finish",n),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",n)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(t){const n=[];return t.forEach(i=>{n.push(Object.fromEntries(i))}),n}_triggerWebAnimation(t,n,i){return t.animate(this._convertKeyframesToObject(n),i)}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&t.set(r,this._finished?i:gU(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const n="start"===t?this._onStartFns:this._onDoneFns;n.forEach(i=>i()),n.length=0}}class Dve{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}containsElement(t,n){return tve(t,n)}getParentElement(t){return sU(t)}query(t,n,i){return nve(t,n,i)}computeStyle(t,n,i){return gU(t,n)}animate(t,n,i,r,o,s=[]){const l={duration:i,delay:r,fill:0==r?"both":"forwards"};o&&(l.easing=o);const c=new Map,u=s.filter(h=>h instanceof Cve);(function D0t(e,t){return 0===e||0===t})(i,r)&&u.forEach(h=>{h.currentSnapshot.forEach((p,g)=>c.set(g,p))});let d=function w0t(e){return e.length?e[0]instanceof Map?e:e.map(t=>new Map(Object.entries(t))):[]}(n).map(h=>new Map(h));d=function S0t(e,t,n){if(n.size&&t.length){let i=t[0],r=[];if(n.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;os.set(a,gU(e,a)))}}return t}(t,d,c);const f=function fvt(e,t){let n=null,i=null;return Array.isArray(t)&&t.length?(n=TU(t[0]),t.length>1&&(i=TU(t[t.length-1]))):t instanceof Map&&(n=TU(t)),n||i?new Rw(e,n,i):null}(t,d);return new Cve(t,d,l,f)}}const Sve="@.disabled";class Tve{constructor(t,n,i,r){this.namespaceId=t,this.delegate=n,this.engine=i,this._onDestroy=r,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(t){this.delegate.destroyNode?.(t)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(t,n){return this.delegate.createElement(t,n)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,n){this.delegate.appendChild(t,n),this.engine.onInsert(this.namespaceId,n,t,!1)}insertBefore(t,n,i,r=!0){this.delegate.insertBefore(t,n,i),this.engine.onInsert(this.namespaceId,n,t,r)}removeChild(t,n,i){this.parentNode(n)&&this.engine.onRemove(this.namespaceId,n,this.delegate)}selectRootElement(t,n){return this.delegate.selectRootElement(t,n)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,n,i,r){this.delegate.setAttribute(t,n,i,r)}removeAttribute(t,n,i){this.delegate.removeAttribute(t,n,i)}addClass(t,n){this.delegate.addClass(t,n)}removeClass(t,n){this.delegate.removeClass(t,n)}setStyle(t,n,i,r){this.delegate.setStyle(t,n,i,r)}removeStyle(t,n,i){this.delegate.removeStyle(t,n,i)}setProperty(t,n,i){"@"==n.charAt(0)&&n==Sve?this.disableAnimations(t,!!i):this.delegate.setProperty(t,n,i)}setValue(t,n){this.delegate.setValue(t,n)}listen(t,n,i){return this.delegate.listen(t,n,i)}disableAnimations(t,n){this.engine.disableAnimations(t,n)}}class pvt extends Tve{constructor(t,n,i,r,o){super(n,i,r,o),this.factory=t,this.namespaceId=n}setProperty(t,n,i){"@"==n.charAt(0)?"."==n.charAt(1)&&n==Sve?this.disableAnimations(t,i=void 0===i||!!i):this.engine.process(this.namespaceId,t,n.slice(1),i):this.delegate.setProperty(t,n,i)}listen(t,n,i){if("@"==n.charAt(0)){const r=function gvt(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(t);let o=n.slice(1),s="";return"@"!=o.charAt(0)&&([o,s]=function mvt(e){const t=e.indexOf(".");return[e.substring(0,t),e.slice(t+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(t,n,i)}}class _vt{constructor(t,n,i){this.delegate=t,this.engine=n,this._zone=i,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,n.onRemovalComplete=(r,o)=>{o?.removeChild(null,r)}}createRenderer(t,n){const r=this.delegate.createRenderer(t,n);if(!t||!n?.data?.animation){const c=this._rendererCache;let u=c.get(r);return u||(u=new Tve("",r,this.engine,()=>c.delete(r)),c.set(r,u)),u}const o=n.id,s=n.id+"-"+this._currentId;this._currentId++,this.engine.register(s,t);const a=c=>{Array.isArray(c)?c.forEach(a):this.engine.registerTrigger(o,s,t,c.name,c)};return n.data.animation.forEach(a),new pvt(this,s,r,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(t,n,i){if(t>=0&&tn(i));const r=this._animationCallbacksBuffer;0==r.length&&queueMicrotask(()=>{this._zone.run(()=>{r.forEach(o=>{const[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),r.push([n,i])}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}const xve=[{provide:cU,useFactory:function vvt(){return new ave}},{provide:Ow,useClass:(()=>{class e extends Ow{constructor(n,i,r){super(n,i,r)}ngOnDestroy(){this.flush()}static{this.\u0275fac=function(i){return new(i||e)(Ne(Ln),Ne(lU),Ne(cU))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})()},{provide:lC,useFactory:function bvt(e,t,n){return new _vt(e,t,n)},deps:[TR,Ow,ct]}],xU=[{provide:lU,useFactory:()=>new Dve},{provide:Z7,useValue:"BrowserAnimations"},...xve],Ave=[{provide:lU,useClass:aU},{provide:Z7,useValue:"NoopAnimations"},...xve];let wvt=(()=>{class e{static withConfig(n){return{ngModule:e,providers:n.disableAnimations?Ave:xU}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({providers:xU,imports:[WK]})}}return e})(),Evt=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e,bootstrap:[Iyt]})}static{this.\u0275inj=Lt({providers:[sm,kyt,Hht(Rp(ff.LegacyInterceptors,[{provide:Lye,useFactory:Oht},{provide:Ew,useExisting:Lye,multi:!0}]))],imports:[YPe,WK,Tyt,dF,ABe,wvt]})}}return e})();YIe().bootstrapModule(Evt).catch(e=>console.error(e))}},e2=>{e2(e2.s=394)}]); \ No newline at end of file +"use strict";(self.webpackChunkapparel_top100_showcase=self.webpackChunkapparel_top100_showcase||[]).push([[792],{394:(e2,AU,Ct)=>{var Ay={};Ct.r(Ay),Ct.d(Ay,{aggregate:()=>cd,bin:()=>GL,collect:()=>WL,compare:()=>Une,countpattern:()=>qL,cross:()=>YL,density:()=>KL,dotbin:()=>QL,expression:()=>Kne,extent:()=>ZL,facet:()=>qS,field:()=>Xne,filter:()=>e3,flatten:()=>t3,fold:()=>n3,formula:()=>i3,generate:()=>Qne,impute:()=>r3,joinaggregate:()=>o3,kde:()=>s3,key:()=>Zne,load:()=>Jne,lookup:()=>l3,multiextent:()=>eie,multivalues:()=>tie,params:()=>nie,pivot:()=>c3,prefacet:()=>iie,project:()=>u3,proxy:()=>rie,quantile:()=>d3,relay:()=>oie,sample:()=>f3,sequence:()=>h3,sieve:()=>sie,subflow:()=>JL,timeunit:()=>p3,tupleindex:()=>lie,values:()=>cie,window:()=>g3});var t2={};Ct.r(t2),Ct.d(t2,{interpolate:()=>gd,interpolateArray:()=>Kje,interpolateBasis:()=>Yie,interpolateBasisClosed:()=>Kie,interpolateCubehelix:()=>LVe,interpolateCubehelixLong:()=>$Ve,interpolateDate:()=>ere,interpolateDiscrete:()=>bVe,interpolateHcl:()=>RVe,interpolateHclLong:()=>FVe,interpolateHsl:()=>NVe,interpolateHslLong:()=>IVe,interpolateHue:()=>wVe,interpolateLab:()=>OVe,interpolateNumber:()=>Ea,interpolateNumberArray:()=>N3,interpolateObject:()=>tre,interpolateRgb:()=>M3,interpolateRgbBasis:()=>qje,interpolateRgbBasisClosed:()=>Yje,interpolateRound:()=>p1,interpolateString:()=>nre,interpolateTransformCss:()=>DVe,interpolateTransformSvg:()=>SVe,interpolateZoom:()=>MVe,piecewise:()=>U3,quantize:()=>BVe});var n2={};Ct.r(n2),Ct.d(n2,{bound:()=>oae,identifier:()=>hB,mark:()=>aae,overlap:()=>lae,render:()=>pae,viewlayout:()=>bae});var i2={};Ct.r(i2),Ct.d(i2,{axisticks:()=>Eae,datajoin:()=>Cae,encode:()=>Dae,legendentries:()=>Sae,linkpath:()=>pB,pie:()=>gB,scale:()=>Iae,sortitems:()=>Rae,stack:()=>_B});var r2={};Ct.r(r2),Ct.d(r2,{contour:()=>KB,geojson:()=>ZB,geopath:()=>JB,geopoint:()=>e5,geoshape:()=>t5,graticule:()=>n5,heatmap:()=>i5,isocontour:()=>WB,kde2d:()=>YB,projection:()=>Jle});var o2={};Ct.r(o2),Ct.d(o2,{force:()=>c5});var s2={};Ct.r(s2),Ct.d(s2,{nest:()=>y5,pack:()=>b5,partition:()=>E5,stratify:()=>C5,tree:()=>S5,treelinks:()=>T5,treemap:()=>A5});var a2={};Ct.r(a2),Ct.d(a2,{label:()=>$5});var l2={};Ct.r(l2),Ct.d(l2,{loess:()=>B5,regression:()=>V5});var c2={};Ct.r(c2),Ct.d(c2,{voronoi:()=>m8});var u2={};Ct.r(u2),Ct.d(u2,{wordcloud:()=>y8});var d2={};Ct.r(d2),Ct.d(d2,{crossfilter:()=>v8,resolvefilter:()=>b8});var f2={};Ct.r(f2),Ct.d(f2,{Bounds:()=>li,CanvasHandler:()=>F1,CanvasRenderer:()=>tx,DATE:()=>ho,DAY:()=>_r,DAYOFYEAR:()=>Il,Dataflow:()=>Vm,Debug:()=>yee,Error:()=>bP,EventStream:()=>$S,Gradient:()=>Coe,GroupItem:()=>IT,HOURS:()=>Wo,Handler:()=>H$,HybridHandler:()=>$se,HybridRenderer:()=>nB,Info:()=>_ee,Item:()=>NT,MILLISECONDS:()=>ba,MINUTES:()=>qo,MONTH:()=>mr,Marks:()=>Xo,MultiPulse:()=>vL,None:()=>mee,Operator:()=>ln,Parameters:()=>LS,Pulse:()=>ld,QUARTER:()=>fo,RenderType:()=>Td,Renderer:()=>O1,ResourceLoader:()=>Roe,SECONDS:()=>Is,SVGHandler:()=>vse,SVGRenderer:()=>tB,SVGStringRenderer:()=>Lse,Scenegraph:()=>ase,TIME_UNITS:()=>zP,Transform:()=>K,View:()=>Rde,WEEK:()=>bi,Warn:()=>wP,YEAR:()=>Xi,accessor:()=>co,accessorFields:()=>fr,accessorName:()=>$n,array:()=>Ee,ascending:()=>gS,bandwidthNRD:()=>xL,bin:()=>Cne,bootstrapCI:()=>Dne,boundClip:()=>Yse,boundContext:()=>T1,boundItem:()=>U$,boundMark:()=>ise,boundStroke:()=>Zc,changeset:()=>hh,clampRange:()=>Nee,codegenExpression:()=>Mue,compare:()=>TP,constant:()=>gr,cumulativeLogNormal:()=>OL,cumulativeNormal:()=>zS,cumulativeUniform:()=>LL,dayofyear:()=>rte,debounce:()=>xP,defaultLocale:()=>oL,definition:()=>gne,densityLogNormal:()=>kL,densityNormal:()=>AL,densityUniform:()=>PL,domChild:()=>Ei,domClear:()=>Ls,domCreate:()=>Dd,domFind:()=>z$,dotbin:()=>Sne,error:()=>J,expressionFunction:()=>Kn,extend:()=>rt,extent:()=>Al,extentIndex:()=>Iee,falsy:()=>ed,fastmap:()=>xm,field:()=>As,flush:()=>kee,font:()=>HT,fontFamily:()=>I1,fontSize:()=>jl,format:()=>NS,formatLocale:()=>AS,formats:()=>hL,hasOwnProperty:()=>De,id:()=>Pv,identity:()=>hr,inferType:()=>Qte,inferTypes:()=>Zte,ingest:()=>Ft,inherits:()=>me,inrange:()=>Am,interpolate:()=>c$,interpolateColors:()=>ST,interpolateRange:()=>soe,intersect:()=>Hse,intersectBoxLine:()=>n_,intersectPath:()=>x$,intersectPoint:()=>A$,intersectRule:()=>Uoe,isArray:()=>te,isBoolean:()=>td,isDate:()=>nd,isFunction:()=>it,isIterable:()=>Oee,isNumber:()=>At,isObject:()=>we,isRegExp:()=>Ree,isString:()=>Ce,isTuple:()=>RS,key:()=>AP,lerp:()=>Fee,lineHeight:()=>Ed,loader:()=>IS,locale:()=>Yte,logger:()=>EP,lruCache:()=>Pee,markup:()=>eB,merge:()=>Lee,mergeConfig:()=>Sm,multiLineOffset:()=>B$,one:()=>Dm,pad:()=>$ee,panLinear:()=>Dee,panLog:()=>See,panPow:()=>Tee,panSymlog:()=>xee,parse:()=>ont,parseExpression:()=>M8,parseSelector:()=>Ud,path:()=>nT,pathCurves:()=>g$,pathEqual:()=>Kse,pathParse:()=>Jm,pathRectangle:()=>Noe,pathRender:()=>w1,pathSymbols:()=>Moe,pathTrail:()=>Ioe,peek:()=>yt,point:()=>WT,projection:()=>GB,quantileLogNormal:()=>RL,quantileNormal:()=>HS,quantileUniform:()=>$L,quantiles:()=>SL,quantizeInterpolator:()=>aoe,quarter:()=>Aee,quartiles:()=>TL,random:()=>ks,randomInteger:()=>U4e,randomKDE:()=>NL,randomLCG:()=>V4e,randomLogNormal:()=>xne,randomMixture:()=>Ane,randomNormal:()=>ML,randomUniform:()=>Mne,read:()=>nne,regressionConstant:()=>BL,regressionExp:()=>Ine,regressionLinear:()=>jL,regressionLoess:()=>Pne,regressionLog:()=>Nne,regressionPoly:()=>One,regressionPow:()=>kne,regressionQuad:()=>VL,renderModule:()=>ox,repeat:()=>Lv,resetDefaultLocale:()=>F8e,resetSVGClipId:()=>Ooe,resetSVGDefIds:()=>eze,responseType:()=>tne,runtimeContext:()=>pde,sampleCurve:()=>WS,sampleLogNormal:()=>IL,sampleNormal:()=>US,sampleUniform:()=>FL,scale:()=>Nt,sceneEqual:()=>rB,sceneFromJSON:()=>ose,scenePickVisit:()=>$T,sceneToJSON:()=>rse,sceneVisit:()=>Sa,sceneZOrder:()=>M$,scheme:()=>u$,serializeXML:()=>Nse,setHybridRendererOptions:()=>X7e,setRandom:()=>B4e,span:()=>$v,splitAccessPath:()=>xl,stringValue:()=>ge,textMetrics:()=>Ko,timeBin:()=>Cte,timeFloor:()=>dte,timeFormatLocale:()=>Jv,timeInterval:()=>Lm,timeOffset:()=>pte,timeSequence:()=>_te,timeUnitSpecifier:()=>ite,timeUnits:()=>GP,toBoolean:()=>MP,toDate:()=>NP,toNumber:()=>pr,toSet:()=>va,toString:()=>IP,transform:()=>mne,transforms:()=>Um,truncate:()=>Bee,truthy:()=>Ms,tupleid:()=>Fe,typeParsers:()=>uL,utcFloor:()=>fte,utcInterval:()=>$m,utcOffset:()=>gte,utcSequence:()=>yte,utcdayofyear:()=>ate,utcquarter:()=>Mee,utcweek:()=>lte,version:()=>snt,visitArray:()=>id,week:()=>ote,writeConfig:()=>Tm,zero:()=>Ju,zoomLinear:()=>CP,zoomLog:()=>DP,zoomPow:()=>pS,zoomSymlog:()=>SP});var h2={};Ct.r(h2),Ct.d(h2,{accessPathDepth:()=>j_,accessPathWithDatum:()=>z4,compile:()=>xut,contains:()=>pt,deepEqual:()=>as,deleteNestedProperty:()=>eM,duplicate:()=>Ze,entries:()=>Hd,every:()=>B4,fieldIntersection:()=>U4,flatAccessWithDatum:()=>Vfe,getFirstDefined:()=>Xn,hasIntersection:()=>j4,hasProperty:()=>ce,hash:()=>gt,internalField:()=>Hfe,isBoolean:()=>jb,isEmpty:()=>Zt,isEqual:()=>vnt,isInternalField:()=>Gfe,isNullOrFalse:()=>$4,isNumeric:()=>tM,keys:()=>se,logicalExpr:()=>Vb,mergeDeep:()=>Bfe,never:()=>$fe,normalize:()=>Tge,normalizeAngle:()=>zb,omit:()=>Co,pick:()=>L_,prefixGenerator:()=>V4,removePathFromField:()=>B_,replaceAll:()=>tp,replacePathInField:()=>zs,resetIdCounter:()=>wnt,setEqual:()=>jfe,some:()=>$_,stringify:()=>Jt,titleCase:()=>Ub,unique:()=>Jl,uniqueId:()=>zfe,vals:()=>nr,varName:()=>Nn,version:()=>Nut});var p2={};Ct.r(p2),Ct.d(p2,{carbong10:()=>Adt,carbong100:()=>Ndt,carbong90:()=>Mdt,carbonwhite:()=>xdt,dark:()=>Qut,excel:()=>Zut,fivethirtyeight:()=>tdt,ggplot2:()=>ndt,googlecharts:()=>pdt,latimes:()=>sdt,powerbi:()=>Cdt,quartz:()=>adt,urbaninstitute:()=>hdt,version:()=>Idt,vox:()=>ldt});var $w={};function MU(e,t){return Object.is(e,t)}Ct.r($w),Ct.d($w,{afterMain:()=>VZ,afterRead:()=>$Z,afterWrite:()=>HZ,applyStyles:()=>eP,arrow:()=>XF,auto:()=>qD,basePlacements:()=>hm,beforeMain:()=>BZ,beforeRead:()=>PZ,beforeWrite:()=>UZ,bottom:()=>zo,clippingParents:()=>RZ,computeStyles:()=>JF,createPopper:()=>kV,createPopperBase:()=>wLe,createPopperLite:()=>rJ,detectOverflow:()=>vm,end:()=>pm,eventListeners:()=>QF,flip:()=>qF,hide:()=>qye,left:()=>$r,main:()=>jZ,modifierPhases:()=>GZ,offset:()=>tP,placements:()=>BF,popper:()=>gm,popperGenerator:()=>XD,popperOffsets:()=>ZF,preventOverflow:()=>KF,read:()=>LZ,reference:()=>FZ,right:()=>Ho,start:()=>Jf,top:()=>Lr,variationPlacements:()=>$F,viewport:()=>LF,write:()=>zZ});let ui=null,My=!1,Bw=1;const ea=Symbol("SIGNAL");function st(e){const t=ui;return ui=e,t}const jw={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function m2(e){if(My)throw new Error("");if(null===ui)return;ui.consumerOnSignalRead(e);const t=ui.nextProducerIndex++;zw(ui),te.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function y2(e){zw(e);for(let t=0;t0}function zw(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function FU(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}function PU(e){return void 0!==e.producerNode}const b2=Symbol("UNSET"),w2=Symbol("COMPUTING"),Hw=Symbol("ERRORED"),Fve={...jw,value:b2,dirty:!0,error:null,equal:MU,producerMustRecompute:e=>e.value===b2||e.value===w2,producerRecomputeValue(e){if(e.value===w2)throw new Error("Detected cycle in computations.");const t=e.value;e.value=w2;const n=Vw(e);let i;try{i=e.computation()}catch(r){i=Hw,e.error=r}finally{_2(e,n)}t!==b2&&t!==Hw&&i!==Hw&&e.equal(t,i)?e.value=t:(e.value=i,e.version++)}};let LU=function Pve(){throw new Error};function $U(){LU()}let Gw=null;function BU(e,t){kU()||$U(),e.equal(e.value,t)||(e.value=t,function Vve(e){e.version++,function Ove(){Bw++}(),IU(e),Gw?.()}(e))}const jve={...jw,equal:MU,value:void 0};function Tt(e){return"function"==typeof e}function E2(e){const n=e(i=>{Error.call(i),i.stack=(new Error).stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}const C2=E2(e=>function(n){e(this),this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map((i,r)=>`${r+1}) ${i.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=n});function Ww(e,t){if(e){const n=e.indexOf(t);0<=n&&e.splice(n,1)}}class ar{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;const{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(const o of n)o.remove(this);else n.remove(this);const{initialTeardown:i}=this;if(Tt(i))try{i()}catch(o){t=o instanceof C2?o.errors:[o]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const o of r)try{zU(o)}catch(s){t=t??[],s instanceof C2?t=[...t,...s.errors]:t.push(s)}}if(t)throw new C2(t)}}add(t){var n;if(t&&t!==this)if(this.closed)zU(t);else{if(t instanceof ar){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}}_hasParent(t){const{_parentage:n}=this;return n===t||Array.isArray(n)&&n.includes(t)}_addParent(t){const{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t}_removeParent(t){const{_parentage:n}=this;n===t?this._parentage=null:Array.isArray(n)&&Ww(n,t)}remove(t){const{_finalizers:n}=this;n&&Ww(n,t),t instanceof ar&&t._removeParent(this)}}ar.EMPTY=(()=>{const e=new ar;return e.closed=!0,e})();const VU=ar.EMPTY;function UU(e){return e instanceof ar||e&&"closed"in e&&Tt(e.remove)&&Tt(e.add)&&Tt(e.unsubscribe)}function zU(e){Tt(e)?e():e.unsubscribe()}const bf={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},qw={setTimeout(e,t,...n){const{delegate:i}=qw;return i?.setTimeout?i.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){const{delegate:t}=qw;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function HU(e){qw.setTimeout(()=>{const{onUnhandledError:t}=bf;if(!t)throw e;t(e)})}function Iy(){}const zve=D2("C",void 0,void 0);function D2(e,t,n){return{kind:e,value:t,error:n}}let wf=null;function Yw(e){if(bf.useDeprecatedSynchronousErrorHandling){const t=!wf;if(t&&(wf={errorThrown:!1,error:null}),e(),t){const{errorThrown:n,error:i}=wf;if(wf=null,n)throw i}}else e()}class S2 extends ar{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,UU(t)&&t.add(this)):this.destination=Xve}static create(t,n,i){return new x2(t,n,i)}next(t){this.isStopped?A2(function Gve(e){return D2("N",e,void 0)}(t),this):this._next(t)}error(t){this.isStopped?A2(function Hve(e){return D2("E",void 0,e)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?A2(zve,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const qve=Function.prototype.bind;function T2(e,t){return qve.call(e,t)}class Yve{constructor(t){this.partialObserver=t}next(t){const{partialObserver:n}=this;if(n.next)try{n.next(t)}catch(i){Kw(i)}}error(t){const{partialObserver:n}=this;if(n.error)try{n.error(t)}catch(i){Kw(i)}else Kw(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(n){Kw(n)}}}class x2 extends S2{constructor(t,n,i){let r;if(super(),Tt(t)||!t)r={next:t??void 0,error:n??void 0,complete:i??void 0};else{let o;this&&bf.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&T2(t.next,o),error:t.error&&T2(t.error,o),complete:t.complete&&T2(t.complete,o)}):r=t}this.destination=new Yve(r)}}function Kw(e){bf.useDeprecatedSynchronousErrorHandling?function Wve(e){bf.useDeprecatedSynchronousErrorHandling&&wf&&(wf.errorThrown=!0,wf.error=e)}(e):HU(e)}function A2(e,t){const{onStoppedNotification:n}=bf;n&&qw.setTimeout(()=>n(e,t))}const Xve={closed:!0,next:Iy,error:function Kve(e){throw e},complete:Iy},M2="function"==typeof Symbol&&Symbol.observable||"@@observable";function _c(e){return e}function GU(e){return 0===e.length?_c:1===e.length?e[0]:function(n){return e.reduce((i,r)=>r(i),n)}}let cn=(()=>{class e{constructor(n){n&&(this._subscribe=n)}lift(n){const i=new e;return i.source=this,i.operator=n,i}subscribe(n,i,r){const o=function Jve(e){return e&&e instanceof S2||function Zve(e){return e&&Tt(e.next)&&Tt(e.error)&&Tt(e.complete)}(e)&&UU(e)}(n)?n:new x2(n,i,r);return Yw(()=>{const{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(n){try{return this._subscribe(n)}catch(i){n.error(i)}}forEach(n,i){return new(i=WU(i))((r,o)=>{const s=new x2({next:a=>{try{n(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(n){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(n)}[M2](){return this}pipe(...n){return GU(n)(this)}toPromise(n){return new(n=WU(n))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return e.create=t=>new e(t),e})();function WU(e){var t;return null!==(t=e??bf.Promise)&&void 0!==t?t:Promise}const e1e=E2(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let tn=(()=>{class e extends cn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){const i=new qU(this,this);return i.operator=n,i}_throwIfClosed(){if(this.closed)throw new e1e}next(n){Yw(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const i of this.currentObservers)i.next(n)}})}error(n){Yw(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;const{observers:i}=this;for(;i.length;)i.shift().error(n)}})}complete(){Yw(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return(null===(n=this.observers)||void 0===n?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){const{hasError:i,isStopped:r,observers:o}=this;return i||r?VU:(this.currentObservers=null,o.push(n),new ar(()=>{this.currentObservers=null,Ww(o,n)}))}_checkFinalizedStatuses(n){const{hasError:i,thrownError:r,isStopped:o}=this;i?n.error(r):o&&n.complete()}asObservable(){const n=new cn;return n.source=this,n}}return e.create=(t,n)=>new qU(t,n),e})();class qU extends tn{constructor(t,n){super(),this.destination=t,this.source=n}next(t){var n,i;null===(i=null===(n=this.destination)||void 0===n?void 0:n.next)||void 0===i||i.call(n,t)}error(t){var n,i;null===(i=null===(n=this.destination)||void 0===n?void 0:n.error)||void 0===i||i.call(n,t)}complete(){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===n||n.call(t)}_subscribe(t){var n,i;return null!==(i=null===(n=this.source)||void 0===n?void 0:n.subscribe(t))&&void 0!==i?i:VU}}class ps extends tn{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const n=super._subscribe(t);return!n.closed&&t.next(this._value),n}getValue(){const{hasError:t,thrownError:n,_value:i}=this;if(t)throw n;return this._throwIfClosed(),i}next(t){super.next(this._value=t)}}function YU(e){return Tt(e?.lift)}function ei(e){return t=>{if(YU(t))return t.lift(function(n){try{return e(n,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function yn(e,t,n,i,r){return new t1e(e,t,n,i,r)}class t1e extends S2{constructor(t,n,i,r,o,s){super(t),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=n?function(a){try{n(a)}catch(l){t.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){t.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:n}=this;super.unsubscribe(),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}}}function at(e,t){return ei((n,i)=>{let r=0;n.subscribe(yn(i,o=>{i.next(e.call(t,o,r++))}))})}const KU="https://g.co/ng/security#xss";class q extends Error{constructor(t,n){super(function zp(e,t){return`NG0${Math.abs(e)}${t?": "+t:""}`}(t,n)),this.code=t}}function yc(e){return{toString:e}.toString()}const Gp="__parameters__";function qp(e,t,n){return yc(()=>{const i=function N2(e){return function(...n){if(e){const i=e(...n);for(const r in i)this[r]=i[r]}}}(t);function r(...o){if(this instanceof r)return i.apply(this,o),this;const s=new r(...o);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(Gp)?l[Gp]:Object.defineProperty(l,Gp,{value:[]})[Gp];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return n&&(r.prototype=Object.create(n.prototype)),r.prototype.ngMetadataName=e,r.annotationCls=r,r})}const vn=globalThis;function Ut(e){for(let t in e)if(e[t]===Ut)return t;throw Error("Could not find renamed property on target object.")}function n1e(e,t){for(const n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function di(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(di).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;const t=e.toString();if(null==t)return""+t;const n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function I2(e,t){return null==e||""===e?null===t?"":t:null==t||""===t?e:e+" "+t}const i1e=Ut({__forward_ref__:Ut});function Pt(e){return e.__forward_ref__=Pt,e.toString=function(){return di(this())},e}function We(e){return Qw(e)?e():e}function Qw(e){return"function"==typeof e&&e.hasOwnProperty(i1e)&&e.__forward_ref__===Pt}function pe(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Lt(e){return{providers:e.providers||[],imports:e.imports||[]}}function Zw(e){return JU(e,eE)||JU(e,e9)}function JU(e,t){return e.hasOwnProperty(t)?e[t]:null}function Jw(e){return e&&(e.hasOwnProperty(k2)||e.hasOwnProperty(c1e))?e[k2]:null}const eE=Ut({\u0275prov:Ut}),k2=Ut({\u0275inj:Ut}),e9=Ut({ngInjectableDef:Ut}),c1e=Ut({ngInjectorDef:Ut});class _e{constructor(t,n){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof n?this.__NG_ELEMENT_ID__=n:void 0!==n&&(this.\u0275prov=pe({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function L2(e){return e&&!!e.\u0275providers}const ky=Ut({\u0275cmp:Ut}),$2=Ut({\u0275dir:Ut}),B2=Ut({\u0275pipe:Ut}),n9=Ut({\u0275mod:Ut}),vc=Ut({\u0275fac:Ut}),Oy=Ut({__NG_ELEMENT_ID__:Ut}),i9=Ut({__NG_ENV_ID__:Ut});function Je(e){return"string"==typeof e?e:null==e?"":String(e)}function j2(e,t){throw new q(-201,!1)}var ft=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(ft||{});let V2;function r9(){return V2}function no(e){const t=V2;return V2=e,t}function o9(e,t,n){const i=Zw(e);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:n&ft.Optional?null:void 0!==t?t:void j2()}const Ry={},U2="__NG_DI_FLAG__",tE="ngTempTokenPath",g1e=/\n/gm,s9="__source";let Yp;function Au(e){const t=Yp;return Yp=e,t}function y1e(e,t=ft.Default){if(void 0===Yp)throw new q(-203,!1);return null===Yp?o9(e,void 0,t):Yp.get(e,t&ft.Optional?null:void 0,t)}function Ne(e,t=ft.Default){return(r9()||y1e)(We(e),t)}function L(e,t=ft.Default){return Ne(e,nE(t))}function nE(e){return typeof e>"u"||"number"==typeof e?e:(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function z2(e){const t=[];for(let n=0;nArray.isArray(n)?Kp(n,t):t(n))}function l9(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function oE(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function Io(e,t,n){let i=Xp(e,t);return i>=0?e[1|i]=n:(i=~i,function c9(e,t,n,i){let r=e.length;if(r==t)e.push(n,i);else if(1===r)e.push(i,e[0]),e[0]=n;else{for(r--,e.push(e[r-1],e[r]);r>t;)e[r]=e[r-2],r--;e[t]=n,e[t+1]=i}}(e,i,t,n)),i}function G2(e,t){const n=Xp(e,t);if(n>=0)return e[1|n]}function Xp(e,t){return function u9(e,t,n){let i=0,r=e.length>>n;for(;r!==i;){const o=i+(r-i>>1),s=e[o<t?r=o:i=o+1}return~(r<t){s=o-1;break}}}for(;o-1){let o;for(;++ro?"":r[u+1].toLowerCase(),2&i&&c!==d){if(na(i))return!1;s=!0}}}}else{if(!s&&!na(i)&&!na(l))return!1;if(s&&na(l))continue;s=!1,i=l|1&i}}return na(i)||s}function na(e){return!(1&e)}function N1e(e,t,n,i){if(null===t)return-1;let r=0;if(i||!n){let o=!1;for(;r-1)for(n++;n0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!na(s)&&(t+=_9(o,r),r=""),i=s,o=o||!na(i);n++}return""!==r&&(t+=_9(o,r)),t}function Cn(e){return yc(()=>{const t=v9(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===lE.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||ta.Emulated,styles:e.styles||Dt,_:null,schemas:e.schemas||null,tView:null,id:""};b9(n);const i=e.dependencies;return n.directiveDefs=cE(i,!1),n.pipeDefs=cE(i,!0),n.id=function V1e(e){let t=0;const n=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,e.consts,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery].join("|");for(const r of n)t=Math.imul(31,t)+r.charCodeAt(0)|0;return t+=2147483648,"c"+t}(n),n})}function $1e(e){return ut(e)||fi(e)}function B1e(e){return null!==e}function zt(e){return yc(()=>({type:e.type,bootstrap:e.bootstrap||Dt,declarations:e.declarations||Dt,imports:e.imports||Dt,exports:e.exports||Dt,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function y9(e,t){if(null==e)return il;const n={};for(const i in e)if(e.hasOwnProperty(i)){const r=e[i];let o,s,a=Mu.None;Array.isArray(r)?(a=r[0],o=r[1],s=r[2]??o):(o=r,s=r),t?(n[o]=a!==Mu.None?[i,a]:i,t[o]=s):n[o]=i}return n}function be(e){return yc(()=>{const t=v9(e);return b9(t),t})}function lr(e){return{type:e.type,name:e.name,factory:null,pure:!1!==e.pure,standalone:!0===e.standalone,onDestroy:e.type.prototype.ngOnDestroy||null}}function ut(e){return e[ky]||null}function fi(e){return e[$2]||null}function Bi(e){return e[B2]||null}function cr(e,t){const n=e[n9]||null;if(!n&&!0===t)throw new Error(`Type ${di(e)} does not have '\u0275mod' property.`);return n}function v9(e){const t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputTransforms:null,inputConfig:e.inputs||il,exportAs:e.exportAs||null,standalone:!0===e.standalone,signals:!0===e.signals,selectors:e.selectors||Dt,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:y9(e.inputs,t),outputs:y9(e.outputs),debugInfo:null}}function b9(e){e.features?.forEach(t=>t(e))}function cE(e,t){if(!e)return null;const n=t?Bi:$1e;return()=>("function"==typeof e?e():e).map(i=>n(i)).filter(B1e)}function U1e(...e){return{\u0275providers:K2(0,e),\u0275fromNgModule:!0}}function K2(e,...t){const n=[],i=new Set;let r;const o=s=>{n.push(s)};return Kp(t,s=>{const a=s;uE(a,o,[],i)&&(r||=[],r.push(a))}),void 0!==r&&w9(r,o),n}function w9(e,t){for(let n=0;n{t(o,i)})}}function uE(e,t,n,i){if(!(e=We(e)))return!1;let r=null,o=Jw(e);const s=!o&&ut(e);if(o||s){if(s&&!s.standalone)return!1;r=e}else{const l=e.ngModule;if(o=Jw(l),!o)return!1;r=l}const a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){const l="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const c of l)uE(c,t,n,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;i.add(r);try{Kp(o.imports,u=>{uE(u,t,n,i)&&(c||=[],c.push(u))})}finally{}void 0!==c&&w9(c,t)}if(!a){const c=Ef(r)||(()=>new r);t({provide:r,useFactory:c,deps:Dt},r),t({provide:W2,useValue:r,multi:!0},r),t({provide:rl,useValue:()=>Ne(r),multi:!0},r)}const l=o.providers;if(null!=l&&!a){const c=e;X2(l,u=>{t(u,c)})}}}return r!==e&&void 0!==e.providers}function X2(e,t){for(let n of e)L2(n)&&(n=n.\u0275providers),Array.isArray(n)?X2(n,t):t(n)}const z1e=Ut({provide:String,useValue:Ut});function Q2(e){return null!==e&&"object"==typeof e&&z1e in e}function Cf(e){return"function"==typeof e}const Z2=new _e(""),dE={},G1e={};let J2;function fE(){return void 0===J2&&(J2=new aE),J2}class ji{}class Qp extends ji{get destroyed(){return this._destroyed}constructor(t,n,i,r){super(),this.parent=n,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,tI(t,s=>this.processProvider(s)),this.records.set(d9,Zp(void 0,this)),r.has("environment")&&this.records.set(ji,Zp(void 0,this));const o=this.records.get(Z2);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(W2,Dt,ft.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;const t=st(null);try{for(const i of this._ngOnDestroyHooks)i.ngOnDestroy();const n=this._onDestroyHooks;this._onDestroyHooks=[];for(const i of n)i()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),st(t)}}onDestroy(t){return this.assertNotDestroyed(),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){this.assertNotDestroyed();const n=Au(this),i=no(void 0);try{return t()}finally{Au(n),no(i)}}get(t,n=Ry,i=ft.Default){if(this.assertNotDestroyed(),t.hasOwnProperty(i9))return t[i9](this);i=nE(i);const o=Au(this),s=no(void 0);try{if(!(i&ft.SkipSelf)){let l=this.records.get(t);if(void 0===l){const c=function X1e(e){return"function"==typeof e||"object"==typeof e&&e instanceof _e}(t)&&Zw(t);l=c&&this.injectableDefInScope(c)?Zp(eI(t),dE):null,this.records.set(t,l)}if(null!=l)return this.hydrate(t,l)}return(i&ft.Self?fE():this.parent).get(t,n=i&ft.Optional&&n===Ry?null:n)}catch(a){if("NullInjectorError"===a.name){if((a[tE]=a[tE]||[]).unshift(di(t)),o)throw a;return function b1e(e,t,n,i){const r=e[tE];throw t[s9]&&r.unshift(t[s9]),e.message=function w1e(e,t,n,i=null){e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.slice(2):e;let r=di(t);if(Array.isArray(t))r=t.map(di).join(" -> ");else if("object"==typeof t){let o=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):di(a)))}r=`{${o.join(", ")}}`}return`${n}${i?"("+i+")":""}[${r}]: ${e.replace(g1e,"\n ")}`}("\n"+e.message,r,n,i),e.ngTokenPath=r,e[tE]=null,e}(a,t,"R3InjectorError",this.source)}throw a}finally{no(s),Au(o)}}resolveInjectorInitializers(){const t=st(null),n=Au(this),i=no(void 0);try{const o=this.get(rl,Dt,ft.Self);for(const s of o)s()}finally{Au(n),no(i),st(t)}}toString(){const t=[],n=this.records;for(const i of n.keys())t.push(di(i));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new q(205,!1)}processProvider(t){let n=Cf(t=We(t))?t:We(t&&t.provide);const i=function q1e(e){return Q2(e)?Zp(void 0,e.useValue):Zp(D9(e),dE)}(t);if(!Cf(t)&&!0===t.multi){let r=this.records.get(n);r||(r=Zp(void 0,dE,!0),r.factory=()=>z2(r.multi),this.records.set(n,r)),n=t,r.multi.push(t)}this.records.set(n,i)}hydrate(t,n){const i=st(null);try{return n.value===dE&&(n.value=G1e,n.value=n.factory()),"object"==typeof n.value&&n.value&&function K1e(e){return null!==e&&"object"==typeof e&&"function"==typeof e.ngOnDestroy}(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}finally{st(i)}}injectableDefInScope(t){if(!t.providedIn)return!1;const n=We(t.providedIn);return"string"==typeof n?"any"===n||this.scopes.has(n):this.injectorDefTypes.has(n)}removeOnDestroy(t){const n=this._onDestroyHooks.indexOf(t);-1!==n&&this._onDestroyHooks.splice(n,1)}}function eI(e){const t=Zw(e),n=null!==t?t.factory:Ef(e);if(null!==n)return n;if(e instanceof _e)throw new q(204,!1);if(e instanceof Function)return function W1e(e){if(e.length>0)throw new q(204,!1);const n=function l1e(e){return e&&(e[eE]||e[e9])||null}(e);return null!==n?()=>n.factory(e):()=>new e}(e);throw new q(204,!1)}function D9(e,t,n){let i;if(Cf(e)){const r=We(e);return Ef(r)||eI(r)}if(Q2(e))i=()=>We(e.useValue);else if(function C9(e){return!(!e||!e.useFactory)}(e))i=()=>e.useFactory(...z2(e.deps||[]));else if(function E9(e){return!(!e||!e.useExisting)}(e))i=()=>Ne(We(e.useExisting));else{const r=We(e&&(e.useClass||e.provide));if(!function Y1e(e){return!!e.deps}(e))return Ef(r)||eI(r);i=()=>new r(...z2(e.deps))}return i}function Zp(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function tI(e,t){for(const n of e)Array.isArray(n)?tI(n,t):n&&L2(n)?tI(n.\u0275providers,t):t(n)}function ol(e,t){e instanceof Qp&&e.assertNotDestroyed();const i=Au(e),r=no(void 0);try{return t()}finally{Au(i),no(r)}}function S9(){return void 0!==r9()||null!=function _1e(){return Yp}()}const Dn=0,fe=1,Le=2,ti=3,ia=4,Vi=5,xr=6,eg=7,un=8,ni=9,sl=10,qe=11,By=12,x9=13,tg=14,Sn=15,Df=16,ng=17,bc=18,ig=19,A9=20,Iu=21,gE=22,gs=23,Ie=25,iI=1,al=7,rg=9,Un=10;var _E=function(e){return e[e.None=0]="None",e[e.HasTransplantedViews=2]="HasTransplantedViews",e}(_E||{});function pi(e){return Array.isArray(e)&&"object"==typeof e[iI]}function ur(e){return Array.isArray(e)&&!0===e[iI]}function rI(e){return!!(4&e.flags)}function Sf(e){return e.componentOffset>-1}function yE(e){return!(1&~e.flags)}function ra(e){return!!e.template}function Vy(e){return!!(512&e[Le])}class lbe{constructor(t,n,i){this.previousValue=t,this.currentValue=n,this.firstChange=i}isFirstChange(){return this.firstChange}}function O9(e,t,n,i){null!==t?t.applyValueToInputSignal(t,i):e[n]=i}function Ui(){return R9}function R9(e){return e.type.prototype.ngOnChanges&&(e.setInput=ube),cbe}function cbe(){const e=P9(this),t=e?.current;if(t){const n=e.previous;if(n===il)e.previous=t;else for(let i in t)n[i]=t[i];e.current=null,this.ngOnChanges(t)}}function ube(e,t,n,i,r){const o=this.declaredInputs[i],s=P9(e)||function dbe(e,t){return e[F9]=t}(e,{previous:il,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new lbe(c&&c.currentValue,n,l===il),O9(e,t,r,n)}Ui.ngInherit=!0;const F9="__ngSimpleChanges__";function P9(e){return e[F9]||null}const ll=function(e,t,n){};function St(e){for(;Array.isArray(e);)e=e[Dn];return e}function Uy(e,t){return St(t[e])}function Ar(e,t){return St(t[e.index])}function zy(e,t){return e.data[t]}function Tf(e,t){return e[t]}function ko(e,t){const n=t[e];return pi(n)?n:n[Dn]}function cI(e){return!(128&~e[Le])}function ms(e,t){return null==t?null:e[t]}function B9(e){e[ng]=0}function j9(e){1024&e[Le]||(e[Le]|=1024,cI(e)&&bE(e))}function vE(e){return!!(9216&e[Le]||e[gs]?.dirty)}function uI(e){e[sl].changeDetectionScheduler?.notify(8),64&e[Le]&&(e[Le]|=1024),vE(e)&&bE(e)}function bE(e){e[sl].changeDetectionScheduler?.notify(0);let t=wc(e);for(;null!==t&&!(8192&t[Le])&&(t[Le]|=8192,cI(t));)t=wc(t)}function wE(e,t){if(!(256&~e[Le]))throw new q(911,!1);null===e[Iu]&&(e[Iu]=[]),e[Iu].push(t)}function wc(e){const t=e[ti];return ur(t)?t[ti]:t}const Ye={lFrame:J9(null),bindingsEnabled:!0,skipHydrationRootTNode:null};let U9=!1;function z9(){return Ye.bindingsEnabled}function xf(){return null!==Ye.skipHydrationRootTNode}function Q(){return Ye.lFrame.lView}function lt(){return Ye.lFrame.tView}function Fn(e){return Ye.lFrame.contextLView=e,e[un]}function Pn(e){return Ye.lFrame.contextLView=null,e}function Ht(){let e=H9();for(;null!==e&&64===e.type;)e=e.parent;return e}function H9(){return Ye.lFrame.currentTNode}function oa(e,t){const n=Ye.lFrame;n.currentTNode=e,n.isParent=t}function hI(){return Ye.lFrame.isParent}function pI(){Ye.lFrame.isParent=!1}function q9(){return U9}function Y9(e){U9=e}function Mr(){const e=Ye.lFrame;let t=e.bindingRootIndex;return-1===t&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function sa(){return Ye.lFrame.bindingIndex++}function Cc(e){const t=Ye.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function Sbe(e,t){const n=Ye.lFrame;n.bindingIndex=n.bindingRootIndex=e,gI(t)}function gI(e){Ye.lFrame.currentDirectiveIndex=e}function _I(){return Ye.lFrame.currentQueryIndex}function CE(e){Ye.lFrame.currentQueryIndex=e}function xbe(e){const t=e[fe];return 2===t.type?t.declTNode:1===t.type?e[Vi]:null}function Q9(e,t,n){if(n&ft.SkipSelf){let r=t,o=e;for(;!(r=r.parent,null!==r||n&ft.Host||(r=xbe(o),null===r||(o=o[tg],10&r.type))););if(null===r)return!1;t=r,e=o}const i=Ye.lFrame=Z9();return i.currentTNode=t,i.lView=e,!0}function yI(e){const t=Z9(),n=e[fe];Ye.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function Z9(){const e=Ye.lFrame,t=null===e?null:e.child;return null===t?J9(e):t}function J9(e){const t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return null!==e&&(e.child=t),t}function e7(){const e=Ye.lFrame;return Ye.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}const t7=e7;function vI(){const e=e7();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function zi(){return Ye.lFrame.selectedIndex}function Af(e){Ye.lFrame.selectedIndex=e}function dn(){const e=Ye.lFrame;return zy(e.tView,e.selectedIndex)}let i7=!0;function Gy(){return i7}function cl(e){i7=e}function DE(e,t){for(let n=t.directiveStart,i=t.directiveEnd;n=i)break}else t[l]<0&&(e[ng]+=65536),(a>14>16&&(3&e[Le])===t&&(e[Le]+=16384,o7(a,o)):o7(a,o)}const og=-1;class Wy{constructor(t,n,i){this.factory=t,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=i}}const EI={};class Mf{constructor(t,n){this.injector=t,this.parentInjector=n}get(t,n,i){i=nE(i);const r=this.injector.get(t,EI,i);return r!==EI||n===EI?r:this.parentInjector.get(t,n,i)}}function CI(e){return e!==og}function qy(e){return 32767&e}function Yy(e,t){let n=function Bbe(e){return e>>16}(e),i=t;for(;n>0;)i=i[tg],n--;return i}let DI=!0;function xE(e){const t=DI;return DI=e,t}const a7=255,l7=5;let Vbe=0;const ul={};function AE(e,t){const n=c7(e,t);if(-1!==n)return n;const i=t[fe];i.firstCreatePass&&(e.injectorIndex=t.length,SI(i.data,e),SI(t,null),SI(i.blueprint,null));const r=ME(e,t),o=e.injectorIndex;if(CI(r)){const s=qy(r),a=Yy(r,t),l=a[fe].data;for(let c=0;c<8;c++)t[o+c]=a[s+c]|l[s+c]}return t[o+8]=r,o}function SI(e,t){e.push(0,0,0,0,0,0,0,0,t)}function c7(e,t){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===t[e.injectorIndex+8]?-1:e.injectorIndex}function ME(e,t){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;let n=0,i=null,r=t;for(;null!==r;){if(i=m7(r),null===i)return og;if(n++,r=r[tg],-1!==i.injectorIndex)return i.injectorIndex|n<<16}return og}function TI(e,t,n){!function Ube(e,t,n){let i;"string"==typeof n?i=n.charCodeAt(0)||0:n.hasOwnProperty(Oy)&&(i=n[Oy]),null==i&&(i=n[Oy]=Vbe++);const r=i&a7;t.data[e+(r>>l7)]|=1<=0?t&a7:Wbe:t}(n);if("function"==typeof o){if(!Q9(t,e,i))return i&ft.Host?u7(r,0,i):d7(t,n,i,r);try{let s;if(s=o(i),null!=s||i&ft.Optional)return s;j2()}finally{t7()}}else if("number"==typeof o){let s=null,a=c7(e,t),l=og,c=i&ft.Host?t[Sn][Vi]:null;for((-1===a||i&ft.SkipSelf)&&(l=-1===a?ME(e,t):t[a+8],l!==og&&g7(i,!1)?(s=t[fe],a=qy(l),t=Yy(l,t)):a=-1);-1!==a;){const u=t[fe];if(p7(o,a,u.data)){const d=Hbe(a,t,n,s,i,c);if(d!==ul)return d}l=t[a+8],l!==og&&g7(i,t[fe].data[a+8]===c)&&p7(o,a,t)?(s=u,a=qy(l),t=Yy(l,t)):a=-1}}return r}function Hbe(e,t,n,i,r,o){const s=t[fe],a=s.data[e+8],u=NE(a,s,n,null==i?Sf(a)&&DI:i!=s&&!!(3&a.type),r&ft.Host&&o===a);return null!==u?Nf(t,s,u,a):ul}function NE(e,t,n,i,r){const o=e.providerIndexes,s=t.data,a=1048575&o,l=e.directiveStart,u=o>>20,f=r?a+u:e.directiveEnd;for(let h=i?a:a+u;h=l&&p.type===n)return h}if(r){const h=s[l];if(h&&ra(h)&&h.type===n)return l}return null}function Nf(e,t,n,i){let r=e[n];const o=t.data;if(function Fbe(e){return e instanceof Wy}(r)){const s=r;s.resolving&&function f1e(e,t){throw t&&t.join(" > "),new q(-200,e)}(function kt(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():Je(e)}(o[n]));const a=xE(s.canSeeViewProviders);s.resolving=!0;const c=s.injectImpl?no(s.injectImpl):null;Q9(e,i,ft.Default);try{r=e[n]=s.factory(void 0,o,e,i),t.firstCreatePass&&n>=i.directiveStart&&function Obe(e,t,n){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=t.type.prototype;if(i){const s=R9(t);(n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s)}r&&(n.preOrderHooks??=[]).push(0-e,r),o&&((n.preOrderHooks??=[]).push(e,o),(n.preOrderCheckHooks??=[]).push(e,o))}(n,o[n],t)}finally{null!==c&&no(c),xE(a),s.resolving=!1,t7()}}return r}function p7(e,t,n){return!!(n[t+(e>>l7)]&1<{const t=e.prototype.constructor,n=t[vc]||xI(t),i=Object.prototype;let r=Object.getPrototypeOf(e.prototype).constructor;for(;r&&r!==i;){const o=r[vc]||xI(r);if(o&&o!==n)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function xI(e){return Qw(e)?()=>{const t=xI(We(e));return t&&t()}:Ef(e)}function m7(e){const t=e[fe],n=t.type;return 2===n?t.declTNode:1===n?e[Vi]:null}function w7(e,t=null,n=null,i){const r=E7(e,t,n,i);return r.resolveInjectorInitializers(),r}function E7(e,t=null,n=null,i,r=new Set){const o=[n||Dt,U1e(e)];return i=i||("object"==typeof e?void 0:di(e)),new Qp(o,t||fE(),i||null,r)}class nn{static{this.THROW_IF_NOT_FOUND=Ry}static{this.NULL=new aE}static create(t,n){if(Array.isArray(t))return w7({name:""},n,t,"");{const i=t.name??"";return w7({name:i},t.parent,t.providers,i)}}static{this.\u0275prov=pe({token:nn,providedIn:"any",factory:()=>Ne(d9)})}static{this.__NG_ELEMENT_ID__=-1}}new _e("").__NG_ELEMENT_ID__=e=>{const t=Ht();if(null===t)throw new q(204,!1);if(2&t.type)return t.value;if(e&ft.Optional)return null;throw new q(204,!1)};function MI(e){return e.ngOriginalError}const D7=!0;let Dc=(()=>{class e{static{this.__NG_ELEMENT_ID__=iwe}static{this.__NG_ENV_ID__=n=>n}}return e})();class nwe extends Dc{constructor(t){super(),this._lView=t}onDestroy(t){return wE(this._lView,t),()=>function dI(e,t){if(null===e[Iu])return;const n=e[Iu].indexOf(t);-1!==n&&e[Iu].splice(n,1)}(this._lView,t)}}function iwe(){return new nwe(Q())}let Sc=(()=>{class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new ps(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);const n=this.taskId++;return this.pendingTasks.add(n),n}remove(n){this.pendingTasks.delete(n),0===this.pendingTasks.size&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static{this.\u0275prov=pe({token:e,providedIn:"root",factory:()=>new e})}}return e})();const ze=class rwe extends tn{constructor(t=!1){super(),this.destroyRef=void 0,this.pendingTasks=void 0,this.__isAsync=t,S9()&&(this.destroyRef=L(Dc,{optional:!0})??void 0,this.pendingTasks=L(Sc,{optional:!0})??void 0)}emit(t){const n=st(null);try{super.next(t)}finally{st(n)}}subscribe(t,n,i){let r=t,o=n||(()=>null),s=i;if(t&&"object"==typeof t){const l=t;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=this.wrapInTimeout(o),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));const a=super.subscribe({next:r,error:o,complete:s});return t instanceof ar&&t.add(a),a}wrapInTimeout(t){return n=>{const i=this.pendingTasks?.add();setTimeout(()=>{t(n),void 0!==i&&this.pendingTasks?.remove(i)})}}};function kE(...e){}function S7(e){let t,n;function i(){e=kE;try{void 0!==n&&"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(n),void 0!==t&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),i()}),"function"==typeof requestAnimationFrame&&(n=requestAnimationFrame(()=>{e(),i()})),()=>i()}function T7(e){return queueMicrotask(()=>e()),()=>{e=kE}}const NI="isAngularZone",OE=NI+"_ID";let owe=0;class ct{constructor(t){this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new ze(!1),this.onMicrotaskEmpty=new ze(!1),this.onStable=new ze(!1),this.onError=new ze(!1);const{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:i=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=D7}=t;if(typeof Zone>"u")throw new q(908,!1);Zone.assertZonePatched();const s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!r&&i,s.shouldCoalesceRunChangeDetection=r,s.callbackScheduled=!1,s.scheduleInRootZone=o,function lwe(e){const t=()=>{!function awe(e){function t(){S7(()=>{e.callbackScheduled=!1,kI(e),e.isCheckStableRunning=!0,II(e),e.isCheckStableRunning=!1})}e.isCheckStableRunning||e.callbackScheduled||(e.callbackScheduled=!0,e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),kI(e))}(e)},n=owe++;e._inner=e._inner.fork({name:"angular",properties:{[NI]:!0,[OE]:n,[OE+n]:!0},onInvokeTask:(i,r,o,s,a,l)=>{if(function cwe(e){return M7(e,"__ignore_ng_zone__")}(l))return i.invokeTask(o,s,a,l);try{return x7(e),i.invokeTask(o,s,a,l)}finally{(e.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||e.shouldCoalesceRunChangeDetection)&&t(),A7(e)}},onInvoke:(i,r,o,s,a,l,c)=>{try{return x7(e),i.invoke(o,s,a,l,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!function uwe(e){return M7(e,"__scheduler_tick__")}(l)&&t(),A7(e)}},onHasTask:(i,r,o,s)=>{i.hasTask(o,s),r===o&&("microTask"==s.change?(e._hasPendingMicrotasks=s.microTask,kI(e),II(e)):"macroTask"==s.change&&(e.hasPendingMacrotasks=s.macroTask))},onHandleError:(i,r,o,s)=>(i.handleError(o,s),e.runOutsideAngular(()=>e.onError.emit(s)),!1)})}(s)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get(NI)}static assertInAngularZone(){if(!ct.isInAngularZone())throw new q(909,!1)}static assertNotInAngularZone(){if(ct.isInAngularZone())throw new q(909,!1)}run(t,n,i){return this._inner.run(t,n,i)}runTask(t,n,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,t,swe,kE,kE);try{return o.runTask(s,n,i)}finally{o.cancelTask(s)}}runGuarded(t,n,i){return this._inner.runGuarded(t,n,i)}runOutsideAngular(t){return this._outer.run(t)}}const swe={};function II(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function kI(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&!0===e.callbackScheduled)}function x7(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function A7(e){e._nesting--,II(e)}class OI{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new ze,this.onMicrotaskEmpty=new ze,this.onStable=new ze,this.onError=new ze}run(t,n,i){return t.apply(n,i)}runGuarded(t,n,i){return t.apply(n,i)}runOutsideAngular(t){return t()}runTask(t,n,i,r){return t.apply(n,i)}}function M7(e,t){return!(!Array.isArray(e)||1!==e.length)&&!0===e[0]?.data?.[t]}class dl{constructor(){this._console=console}handleError(t){const n=this._findOriginalError(t);this._console.error("ERROR",t),n&&this._console.error("ORIGINAL ERROR",n)}_findOriginalError(t){let n=t&&MI(t);for(;n&&MI(n);)n=MI(n);return n||null}}const fwe=new _e("",{providedIn:"root",factory:()=>{const e=L(ct),t=L(dl);return n=>e.runOutsideAngular(()=>t.handleError(n))}});function hwe(){return lg(Ht(),Q())}function lg(e,t){return new Gt(Ar(e,t))}let Gt=(()=>{class e{constructor(n){this.nativeElement=n}static{this.__NG_ELEMENT_ID__=hwe}}return e})();function I7(e){return e instanceof Gt?e.nativeElement:e}function pwe(){return this._results[Symbol.iterator]()}class RI{get changes(){return this._changes??=new ze}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;const n=RI.prototype;n[Symbol.iterator]||(n[Symbol.iterator]=pwe)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,n){return this._results.reduce(t,n)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,n){this.dirty=!1;const i=function io(e){return e.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function S1e(e,t,n){if(e.length!==t.length)return!1;for(let i=0;iFwe}),Fwe="ng",Q7=new _e(""),Tc=new _e("",{providedIn:"platform",factory:()=>"unknown"}),Z7=new _e(""),J7=new _e("",{providedIn:"root",factory:()=>function Ou(){if(void 0!==BI)return BI;if(typeof document<"u")return document;throw new q(210,!1)}().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});let ez=()=>null;function WI(e,t,n=!1){return ez(e,t,n)}const lz=new _e("",{providedIn:"root",factory:()=>!1});let zE;function hz(e){return function ZI(){if(void 0===zE&&(zE=null,vn.trustedTypes))try{zE=vn.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return zE}()?.createScriptURL(e)||e}class pz{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${KU})`}}function Ru(e){return e instanceof pz?e.changingThisBreaksApplicationSecurity:e}function r0(e,t){const n=function eEe(e){return e instanceof pz&&e.getTypeName()||null}(e);if(null!=n&&n!==t){if("ResourceURL"===n&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${KU})`)}return n===t}const rEe=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;var pg=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(pg||{});function Oo(e){const t=s0();return t?t.sanitize(pg.URL,e)||"":r0(e,"URL")?Ru(e):function JI(e){return(e=String(e)).match(rEe)?e:"unsafe:"+e}(Je(e))}function Cz(e){const t=s0();if(t)return hz(t.sanitize(pg.RESOURCE_URL,e)||"");if(r0(e,"ResourceURL"))return hz(Ru(e));throw new q(904,!1)}function s0(){const e=Q();return e&&e[sl].sanitizer}function Mz(e){return e.ownerDocument.defaultView}function Ro(e){return e instanceof Function?e():e}var Fu=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Fu||{});let ok;function sk(e,t){return ok(e,t)}function mg(e,t,n,i,r){if(null!=i){let o,s=!1;ur(i)?o=i:pi(i)&&(s=!0,i=i[Dn]);const a=St(i);0===e&&null!==n?null==r?$z(t,n,a):kf(t,n,a,r||null,!0):1===e&&null!==n?kf(t,n,a,r||null,!0):2===e?function l0(e,t,n){e.removeChild(null,t,n)}(t,a,s):3===e&&t.destroyNode(a),null!=o&&function VEe(e,t,n,i,r){const o=n[al];o!==St(n)&&mg(t,e,i,o,r);for(let a=Un;a0&&(e[n-1][ia]=i[ia]);const o=oE(e,Un+t);!function OEe(e,t){Fz(e,t),t[Dn]=null,t[Vi]=null}(i[fe],i);const s=o[bc];null!==s&&s.detachView(o[fe]),i[ti]=null,i[ia]=null,i[Le]&=-129}return i}function YE(e,t){if(!(256&t[Le])){const n=t[qe];n.destroyNode&&XE(e,t,n,3,null,null),function FEe(e){let t=e[By];if(!t)return uk(e[fe],e);for(;t;){let n=null;if(pi(t))n=t[By];else{const i=t[Un];i&&(n=i)}if(!n){for(;t&&!t[ia]&&t!==e;)pi(t)&&uk(t[fe],t),t=t[ti];null===t&&(t=e),pi(t)&&uk(t[fe],t),n=t&&t[ia]}t=n}}(t)}}function uk(e,t){if(256&t[Le])return;const n=st(null);try{t[Le]&=-129,t[Le]|=256,t[gs]&&v2(t[gs]),function $Ee(e,t){let n;if(null!=e&&null!=(n=e.destroyHooks))for(let i=0;i=0?i[s]():i[-s].unsubscribe(),o+=2}else n[o].call(i[n[o+1]]);null!==i&&(t[eg]=null);const r=t[Iu];if(null!==r){t[Iu]=null;for(let o=0;o-1){const{encapsulation:o}=e.data[i.directiveStart+r];if(o===ta.None||o===ta.Emulated)return null}return Ar(i,n)}}(e,t.parent,n)}function kf(e,t,n,i,r){e.insertBefore(t,n,i,r)}function $z(e,t,n){e.appendChild(t,n)}function Bz(e,t,n,i,r){null!==i?kf(e,t,n,i,r):$z(e,t,n)}function fk(e,t){return e.parentNode(t)}function jz(e,t,n){return Uz(e,t,n)}let hk,Uz=function Vz(e,t,n){return 40&e.type?Ar(e,n):null};function KE(e,t,n,i){const r=dk(e,i,t),o=t[qe],a=jz(i.parent||t[Vi],i,t);if(null!=r)if(Array.isArray(n))for(let l=0;lIe&&Kz(e,t,Ie,!1),ll(s?2:0,r),n(i,r)}finally{Af(o),ll(s?3:1,r)}}function _k(e,t,n){if(rI(t)){const i=st(null);try{const o=t.directiveEnd;for(let s=t.directiveStart;snull;function tH(e,t,n,i,r){for(let o in t){if(!t.hasOwnProperty(o))continue;const s=t[o];if(void 0===s)continue;i??={};let a,l=Mu.None;Array.isArray(s)?(a=s[0],l=s[1]):a=s;let c=o;if(null!==r){if(!r.hasOwnProperty(o))continue;c=r[o]}0===e?nH(i,n,c,a,l):nH(i,n,c,a)}return i}function nH(e,t,n,i,r){let o;e.hasOwnProperty(n)?(o=e[n]).push(t,i):o=e[n]=[t,i],void 0!==r&&o.push(r)}function oo(e,t,n,i,r,o,s,a){const l=Ar(t,n);let u,c=t.inputs;!a&&null!=c&&(u=c[i])?(Sk(e,n,u,i,r),Sf(t)&&function eCe(e,t){const n=ko(t,e);16&n[Le]||(n[Le]|=64)}(n,t.index)):3&t.type&&(i=function JEe(e){return"class"===e?"className":"for"===e?"htmlFor":"formaction"===e?"formAction":"innerHtml"===e?"innerHTML":"readonly"===e?"readOnly":"tabindex"===e?"tabIndex":e}(i),r=null!=s?s(r,t.value||"",i):r,o.setProperty(l,i,r))}function wk(e,t,n,i){if(z9()){const r=null===i?null:{"":-1},o=function sCe(e,t){const n=e.directiveRegistry;let i=null,r=null;if(n)for(let o=0;o0;){const n=e[--t];if("number"==typeof n&&n<0)return n}return 0})(s)!=a&&s.push(a),s.push(n,i,o)}}(e,t,i,c0(e,n,r.hostVars,et),r)}function fl(e,t,n,i,r,o){const s=Ar(e,t);!function Ck(e,t,n,i,r,o,s){if(null==o)e.removeAttribute(t,r,n);else{const a=null==s?Je(o):s(o,i||"",r);e.setAttribute(t,r,a,n)}}(t[qe],s,o,e.value,n,i,r)}function fCe(e,t,n,i,r,o){const s=o[t];if(null!==s)for(let a=0;a0&&(n[r-1][ia]=t),i{bE(e.lView)},consumerOnSignalRead(){this.lView[gs]=this}},ECe={...jw,consumerIsAlwaysLive:!0,consumerMarkedDirty:e=>{let t=wc(e.lView);for(;t&&!hH(t[fe]);)t=wc(t);t&&j9(t)},consumerOnSignalRead(){this.lView[gs]=this}};function hH(e){return 2!==e.type}const CCe=100;function eC(e,t=!0,n=0){const i=e[sl],r=i.rendererFactory;r.begin?.();try{!function DCe(e,t){const n=q9();try{Y9(!0),Ak(e,t);let i=0;for(;vE(e);){if(i===CCe)throw new q(103,!1);i++,Ak(e,1)}}finally{Y9(n)}}(e,n)}catch(s){throw t&&JE(e,s),s}finally{r.end?.(),i.inlineEffectRunner?.flush()}}function SCe(e,t,n,i){const r=t[Le];if(!(256&~r))return;t[sl].inlineEffectRunner?.flush(),yI(t);let a=!0,l=null,c=null;hH(e)?(c=function _Ce(e){return e[gs]??function yCe(e){const t=fH.pop()??Object.create(bCe);return t.lView=e,t}(e)}(t),l=Vw(c)):null===function g2(){return ui}()?(a=!1,c=function wCe(e){const t=e[gs]??Object.create(ECe);return t.lView=e,t}(t),l=Vw(c)):t[gs]&&(v2(t[gs]),t[gs]=null);try{B9(t),function K9(e){return Ye.lFrame.bindingIndex=e}(e.bindingStartIndex),null!==n&&Zz(e,t,n,2,i);const u=!(3&~r);if(u){const h=e.preOrderCheckHooks;null!==h&&SE(t,h,null)}else{const h=e.preOrderHooks;null!==h&&TE(t,h,0,null),bI(t,0)}if(function TCe(e){for(let t=V7(e);null!==t;t=U7(t)){if(!(t[Le]&_E.HasTransplantedViews))continue;const n=t[rg];for(let i=0;i-1&&(a0(t,i),oE(n,i))}this._attachedToViewContainer=!1}YE(this._lView[fe],this._lView)}onDestroy(t){wE(this._lView,t)}markForCheck(){d0(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[Le]&=-129}reattach(){uI(this._lView),this._lView[Le]|=128}detectChanges(){this._lView[Le]|=1024,eC(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new q(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;const t=Vy(this._lView),n=this._lView[Df];null!==n&&!t&&ck(n,this._lView),Fz(this._lView[fe],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new q(902,!1);this._appRef=t;const n=Vy(this._lView),i=this._lView[Df];null!==i&&!n&&Pz(i,this._lView),uI(this._lView)}}let ii=(()=>{class e{static{this.__NG_ELEMENT_ID__=NCe}}return e})();const ACe=ii,MCe=class extends ACe{constructor(t,n,i){super(),this._declarationLView=t,this._declarationTContainer=n,this.elementRef=i}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,n){return this.createEmbeddedViewImpl(t,n)}createEmbeddedViewImpl(t,n,i){const r=_g(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:n,dehydratedView:i});return new f0(r)}};function NCe(){return tC(Ht(),Q())}function tC(e,t){return 4&e.type?new MCe(t,e,lg(e,t)):null}let $H=()=>null;function Lf(e,t){return $H(e,t)}class bg{}const b0=new _e("",{providedIn:"root",factory:()=>!1}),BH=new _e(""),Bk=new _e("");class EDe{}class jH{}class DDe{resolveComponentFactory(t){throw function CDe(e){const t=Error(`No component factory found for ${di(e)}.`);return t.ngComponent=e,t}(t)}}class aC{static{this.NULL=new DDe}}class lC{}let aa=(()=>{class e{constructor(){this.destroyNode=null}static{this.__NG_ELEMENT_ID__=()=>function SDe(){const e=Q(),n=ko(Ht().index,e);return(pi(n)?n:e)[qe]}()}}return e})(),TDe=(()=>{class e{static{this.\u0275prov=pe({token:e,providedIn:"root",factory:()=>null})}}return e})();function uC(e,t,n){let i=n?e.styles:null,r=n?e.classes:null,o=0;if(null!==t)for(let s=0;s0&&qz(e,n,o.join(" "))}}(f,C,p,i),void 0!==n&&function PDe(e,t,n){const i=e.projection=[];for(let r=0;r{class e{static{this.__NG_ELEMENT_ID__=$De}}return e})();function $De(){return YH(Ht(),Q())}const BDe=Po,WH=class extends BDe{constructor(t,n,i){super(),this._lContainer=t,this._hostTNode=n,this._hostLView=i}get element(){return lg(this._hostTNode,this._hostLView)}get injector(){return new gi(this._hostTNode,this._hostLView)}get parentInjector(){const t=ME(this._hostTNode,this._hostLView);if(CI(t)){const n=Yy(t,this._hostLView),i=qy(t);return new gi(n[fe].data[i+8],n)}return new gi(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const n=qH(this._lContainer);return null!==n&&n[t]||null}get length(){return this._lContainer.length-Un}createEmbeddedView(t,n,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);const s=Lf(this._lContainer,t.ssrId),a=t.createEmbeddedViewImpl(n||{},o,s);return this.insertImpl(a,r,Ff(this._hostTNode,s)),a}createComponent(t,n,i,r,o){const s=t&&!function $y(e){return"function"==typeof e}(t);let a;if(s)a=n;else{const p=n||{};a=p.index,i=p.injector,r=p.projectableNodes,o=p.environmentInjector||p.ngModuleRef}const l=s?t:new C0(ut(t)),c=i||this.parentInjector;if(!o&&null==l.ngModule){const g=(s?c:this.parentInjector).get(ji,null);g&&(o=g)}const u=ut(l.componentType??{}),d=Lf(this._lContainer,u?.id??null),h=l.create(c,r,d?.firstChild??null,o);return this.insertImpl(h.hostView,a,Ff(this._hostTNode,d)),h}insert(t,n){return this.insertImpl(t,n,!0)}insertImpl(t,n,i){const r=t._lView;if(function gbe(e){return ur(e[ti])}(r)){const a=this.indexOf(t);if(-1!==a)this.detach(a);else{const l=r[ti],c=new WH(l,l[Vi],l[ti]);c.detach(c.indexOf(t))}}const o=this._adjustIndex(n),s=this._lContainer;return yg(s,r,o,i),t.attachToViewContainerRef(),l9(Uk(s),o,t),t}move(t,n){return this.insert(t,n)}indexOf(t){const n=qH(this._lContainer);return null!==n?n.indexOf(t):-1}remove(t){const n=this._adjustIndex(t,-1),i=a0(this._lContainer,n);i&&(oE(Uk(this._lContainer),n),YE(i[fe],i))}detach(t){const n=this._adjustIndex(t,-1),i=a0(this._lContainer,n);return i&&null!=oE(Uk(this._lContainer),n)?new f0(i):null}_adjustIndex(t,n=0){return t??this.length+n}};function qH(e){return e[8]}function Uk(e){return e[8]||(e[8]=[])}function YH(e,t){let n;const i=t[e.index];return ur(i)?n=i:(n=oH(i,t,null,e),t[e.index]=n,ZE(t,n)),KH(n,t,e,i),new WH(n,e,t)}let KH=function QH(e,t,n,i){if(e[al])return;let r;r=8&n.type?St(i):function jDe(e,t){const n=e[qe],i=n.createComment(""),r=Ar(t,e);return kf(n,fk(n,r),i,function BEe(e,t){return e.nextSibling(t)}(n,r),!1),i}(t,n),e[al]=r},zk=()=>!1;class Hk{constructor(t){this.queryList=t,this.matches=null}clone(){return new Hk(this.queryList)}setDirty(){this.queryList.setDirty()}}class Gk{constructor(t=[]){this.queries=t}createEmbeddedView(t){const n=t.queries;if(null!==n){const i=null!==t.contentQueries?t.contentQueries[0]:n.length,r=[];for(let o=0;ot.trim())}(t):t}}class Wk{constructor(t=[]){this.queries=t}elementStart(t,n){for(let i=0;i0)i.push(s[a/2]);else{const c=o[a+1],u=t[-l];for(let d=Un;d(m2(t),t.value);return n[ea]=t,n}(e),i=n[ea];return t?.equal&&(i.equal=t.equal),n.set=r=>BU(i,r),n.update=r=>function Bve(e,t){kU()||$U(),BU(e,t(e.value))}(i,r),n.asReadonly=aG.bind(n),n}function aG(){const e=this[ea];if(void 0===e.readonlyFn){const t=()=>this();t[ea]=e,e.readonlyFn=t}return e.readonlyFn}function lG(e){return function sG(e){return"function"==typeof e&&void 0!==e[ea]}(e)&&"function"==typeof e.set}function xt(e){let t=function vG(e){return Object.getPrototypeOf(e.prototype).constructor}(e.type),n=!0;const i=[e];for(;t;){let r;if(ra(e))r=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new q(903,!1);r=t.\u0275dir}if(r){if(n){i.push(r);const s=e;s.inputs=fC(e.inputs),s.inputTransforms=fC(e.inputTransforms),s.declaredInputs=fC(e.declaredInputs),s.outputs=fC(e.outputs);const a=r.hostBindings;a&&cSe(e,a);const l=r.viewQuery,c=r.contentQueries;if(l&&aSe(e,l),c&&lSe(e,c),oSe(e,r),n1e(e.outputs,r.outputs),ra(r)&&r.data.animation){const u=e.data;u.animation=(u.animation||[]).concat(r.data.animation)}}const o=r.features;if(o)for(let s=0;s=0;i--){const r=e[i];r.hostVars=t+=r.hostVars,r.hostAttrs=Py(r.hostAttrs,n=Py(n,r.hostAttrs))}}(i)}function oSe(e,t){for(const n in t.inputs){if(!t.inputs.hasOwnProperty(n)||e.inputs.hasOwnProperty(n))continue;const i=t.inputs[n];if(void 0!==i&&(e.inputs[n]=i,e.declaredInputs[n]=t.declaredInputs[n],null!==t.inputTransforms)){const r=Array.isArray(i)?i[0]:i;if(!t.inputTransforms.hasOwnProperty(r))continue;e.inputTransforms??={},e.inputTransforms[r]=t.inputTransforms[r]}}}function fC(e){return e===il?{}:e===Dt?[]:e}function aSe(e,t){const n=e.viewQuery;e.viewQuery=n?(i,r)=>{t(i,r),n(i,r)}:t}function lSe(e,t){const n=e.contentQueries;e.contentQueries=n?(i,r,o)=>{t(i,r,o),n(i,r,o)}:t}function cSe(e,t){const n=e.hostBindings;e.hostBindings=n?(i,r)=>{t(i,r),n(i,r)}:t}function DG(e){const t=e.inputConfig,n={};for(const i in t)if(t.hasOwnProperty(i)){const r=t[i];Array.isArray(r)&&r[3]&&(n[i]=r[3])}e.inputTransforms=n}class $f{}class SG{}class eO extends $f{constructor(t,n,i,r=!0){super(),this.ngModuleType=t,this._parent=n,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new HH(this);const o=cr(t);this._bootstrapComponents=Ro(o.bootstrap),this._r3Injector=E7(t,n,[{provide:$f,useValue:this},{provide:aC,useValue:this.componentFactoryResolver},...i],di(t),new Set(["environment"])),r&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(n=>n()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class tO extends SG{constructor(t){super(),this.moduleType=t}create(t){return new eO(this.moduleType,t,[])}}class TG extends $f{constructor(t){super(),this.componentFactoryResolver=new HH(this),this.instance=null;const n=new Qp([...t.providers,{provide:$f,useValue:this},{provide:aC,useValue:this.componentFactoryResolver}],t.parent||fE(),t.debugName,new Set(["environment"]));this.injector=n,t.runEnvironmentInitializers&&n.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function hC(e,t,n=null){return new TG({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}function pC(e){return!!nO(e)&&(Array.isArray(e)||!(e instanceof Map)&&Symbol.iterator in e)}function nO(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function hl(e,t,n){return e[t]=n}function zn(e,t,n){return!Object.is(e[t],n)&&(e[t]=n,!0)}function T0(e,t,n,i,r,o,s,a,l,c){const u=n+Ie,d=t.firstCreatePass?function bSe(e,t,n,i,r,o,s,a,l){const c=t.consts,u=Rf(t,e,4,s||null,a||null);wk(t,n,u,ms(c,l)),DE(t,u);const d=u.tView=bk(2,u,i,r,o,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c,null);return null!==t.queries&&(t.queries.template(t,u),d.queries=t.queries.embeddedTView(u)),u}(u,t,e,i,r,o,s,a,l):t.data[u];oa(d,!1);const f=xG(t,e,d,n);Gy()&&KE(t,e,f,d),dr(f,e);const h=oH(f,e,f,d);return e[u]=h,ZE(e,h),function XH(e,t,n){return zk(e,t,n)}(h,d,e),yE(d)&&yk(t,e,d),null!=l&&vk(e,d,c),d}function mt(e,t,n,i,r,o,s,a){const l=Q(),c=lt();return T0(l,c,e,t,n,i,r,ms(c.consts,o),s,a),mt}let xG=function AG(e,t,n,i){return cl(!0),t[qe].createComment("")};var ys=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(ys||{});let RG=(()=>{class e{constructor(){this.impl=null}execute(){this.impl?.execute()}static{this.\u0275prov=pe({token:e,providedIn:"root",factory:()=>new e})}}return e})();class M0{constructor(){this.ngZone=L(ct),this.scheduler=L(bg),this.errorHandler=L(dl,{optional:!0}),this.sequences=new Set,this.deferredRegistrations=new Set,this.executing=!1}static{this.PHASES=[ys.EarlyRead,ys.Write,ys.MixedReadWrite,ys.Read]}execute(){this.executing=!0;for(const t of M0.PHASES)for(const n of this.sequences)if(!n.erroredOrDestroyed&&n.hooks[t])try{n.pipelinedValue=this.ngZone.runOutsideAngular(()=>n.hooks[t](n.pipelinedValue))}catch(i){n.erroredOrDestroyed=!0,this.errorHandler?.handleError(i)}this.executing=!1;for(const t of this.sequences)t.afterRun(),t.once&&(this.sequences.delete(t),t.destroy());for(const t of this.deferredRegistrations)this.sequences.add(t);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear()}register(t){this.executing?this.deferredRegistrations.add(t):(this.sequences.add(t),this.scheduler.notify(6))}unregister(t){this.executing&&this.sequences.has(t)?(t.erroredOrDestroyed=!0,t.pipelinedValue=void 0,t.once=!0):(this.sequences.delete(t),this.deferredRegistrations.delete(t))}static{this.\u0275prov=pe({token:M0,providedIn:"root",factory:()=>new M0})}}class DSe{constructor(t,n,i,r){this.impl=t,this.hooks=n,this.once=i,this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.unregisterOnDestroy=r?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.()}}function $u(e,t){!t?.injector&&function hE(e){if(!S9())throw new q(-203,!1)}();const n=t?.injector??L(nn);return function Fo(e){return"browser"===(e??L(nn)).get(Tc)}(n)?(Nr("NgAfterNextRender"),function FG(e,t,n,i){const r=t.get(RG);r.impl??=t.get(M0);const o=n?.phase??ys.MixedReadWrite,s=!0!==n?.manualCleanup?t.get(Dc):null,a=new DSe(r.impl,function SSe(e,t){if(e instanceof Function){const n=[void 0,void 0,void 0,void 0];return n[t]=e,n}return[e.earlyRead,e.write,e.mixedReadWrite,e.read]}(e,o),i,s);return r.impl.register(a),a}(e,n,t,!0)):PG}const PG={destroy(){}};function rn(e,t,n,i){const r=Q();return zn(r,sa(),t)&&(lt(),fl(dn(),r,e,t,n,i)),rn}function Ig(e,t,n,i){return zn(e,sa(),n)?t+Je(n)+i:et}function wC(e,t){return e<<17|t<<2}function ju(e){return e>>17&32767}function pO(e){return 2|e}function Vf(e){return(131068&e)>>2}function gO(e,t){return-131069&e|t<<2}function mO(e){return 1|e}function lW(e,t,n,i){const r=e[n+1],o=null===t;let s=i?ju(r):Vf(r),a=!1;for(;0!==s&&(!1===a||o);){const c=e[s+1];aTe(e[s],t)&&(a=!0,e[s+1]=i?mO(c):pO(c)),s=i?ju(c):Vf(c)}a&&(e[n+1]=i?pO(r):mO(r))}function aTe(e,t){return null===e||null==t||(Array.isArray(e)?e[1]:e)===t||!(!Array.isArray(e)||"string"!=typeof t)&&Xp(e,t)>=0}const mi={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function cW(e){return e.substring(mi.key,mi.keyEnd)}function uW(e,t){const n=mi.textEnd;return n===t?-1:(t=mi.keyEnd=function dTe(e,t,n){for(;t32;)t++;return t}(e,mi.key=t,n),Bg(e,t,n))}function Bg(e,t,n){for(;t=0;n=uW(t,n))Io(e,cW(t),!0)}function mW(e,t){return t>=e.expandoStartIndex}function _W(e,t,n,i){const r=e.data;if(null===r[n+1]){const o=r[zi()],s=mW(e,n);wW(o,i)&&null===t&&!s&&(t=!1),t=function gTe(e,t,n,i){const r=function mI(e){const t=Ye.lFrame.currentDirectiveIndex;return-1===t?null:e[t]}(e);let o=i?t.residualClasses:t.residualStyles;if(null===r)0===(i?t.classBindings:t.styleBindings)&&(n=k0(n=yO(null,e,t,n,i),t.attrs,i),o=null);else{const s=t.directiveStylingLast;if(-1===s||e[s]!==r)if(n=yO(r,e,t,n,i),null===o){let l=function mTe(e,t,n){const i=n?t.classBindings:t.styleBindings;if(0!==Vf(i))return e[ju(i)]}(e,t,i);void 0!==l&&Array.isArray(l)&&(l=yO(null,e,t,l[1],i),l=k0(l,t.attrs,i),function _Te(e,t,n,i){e[ju(n?t.classBindings:t.styleBindings)]=i}(e,t,i,l))}else o=function yTe(e,t,n){let i;const r=t.directiveEnd;for(let o=1+t.directiveStylingLast;o0)&&(c=!0)):u=n,r)if(0!==l){const f=ju(e[a+1]);e[i+1]=wC(f,a),0!==f&&(e[f+1]=gO(e[f+1],i)),e[a+1]=function iTe(e,t){return 131071&e|t<<17}(e[a+1],i)}else e[i+1]=wC(a,0),0!==a&&(e[a+1]=gO(e[a+1],i)),a=i;else e[i+1]=wC(l,0),0===a?a=i:e[l+1]=gO(e[l+1],i),l=i;c&&(e[i+1]=pO(e[i+1])),lW(e,u,i,!0),lW(e,u,i,!1),function sTe(e,t,n,i,r){const o=r?e.residualClasses:e.residualStyles;null!=o&&"string"==typeof t&&Xp(o,t)>=0&&(n[i+1]=mO(n[i+1]))}(t,u,e,i,o),s=wC(a,l),o?t.classBindings=s:t.styleBindings=s}(r,o,t,n,s,i)}}function yO(e,t,n,i,r){let o=null;const s=n.directiveEnd;let a=n.directiveStylingLast;for(-1===a?a=n.directiveStart:a++;a0;){const l=e[r],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let f=n[r+1];f===et&&(f=d?Dt:void 0);let h=d?G2(f,i):u===i?f:void 0;if(c&&!EC(h)&&(h=G2(l,i)),EC(h)&&(a=h,s))return a;const p=e[r+1];r=s?ju(p):Vf(p)}if(null!==t){let l=o?t.residualClasses:t.residualStyles;null!=l&&(a=G2(l,i))}return a}function EC(e){return void 0!==e}function wW(e,t){return!!(e.flags&(t?8:16))}function U(e,t,n,i){const r=Q(),o=lt(),s=Ie+e,a=r[qe],l=o.firstCreatePass?function jTe(e,t,n,i,r,o){const s=t.consts,l=Rf(t,e,2,i,ms(s,r));return wk(t,n,l,ms(s,o)),null!==l.attrs&&uC(l,l.attrs,!1),null!==l.mergedAttrs&&uC(l,l.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,l),l}(s,o,r,t,n,i):o.data[s],c=SW(o,r,l,a,t,e);r[s]=c;const u=yE(l);return oa(l,!0),Yz(a,c,l),!function Cg(e){return!(32&~e.flags)}(l)&&Gy()&&KE(o,r,c,l),0===function mbe(){return Ye.lFrame.elementDepthCount}()&&dr(c,r),function _be(){Ye.lFrame.elementDepthCount++}(),u&&(yk(o,r,l),_k(o,l,r)),null!==i&&vk(r,l),U}function z(){let e=Ht();hI()?pI():(e=e.parent,oa(e,!1));const t=e;(function vbe(e){return Ye.skipHydrationRootTNode===e})(t)&&function Cbe(){Ye.skipHydrationRootTNode=null}(),function ybe(){Ye.lFrame.elementDepthCount--}();const n=lt();return n.firstCreatePass&&(DE(n,e),rI(e)&&n.queries.elementEnd(e)),null!=t.classesWithoutHost&&function Lbe(e){return!!(8&e.flags)}(t)&&_O(n,t,Q(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function $be(e){return!!(16&e.flags)}(t)&&_O(n,t,Q(),t.stylesWithoutHost,!1),z}function Ke(e,t,n,i){return U(e,t,n,i),z(),Ke}let SW=(e,t,n,i,r,o)=>(cl(!0),qE(i,r,function n7(){return Ye.lFrame.currentNamespace}()));function $o(){return Q()}const DC="en-US";let IW=DC,KW=(e,t,n)=>{};function nt(e,t,n,i){const r=Q(),o=lt(),s=Ht();return xO(o,r,r[qe],s,e,t,i),nt}function xO(e,t,n,i,r,o,s){const a=yE(i),c=e.firstCreatePass&&lH(e),u=t[un],d=aH(t);let f=!0;if(3&i.type||s){const g=Ar(i,t),m=s?s(g):g,_=d.length,y=s?b=>s(St(b[i.index])):i.index;let v=null;if(!s&&a&&(v=function Fxe(e,t,n,i){const r=e.cleanup;if(null!=r)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(e,t,r,i.index)),null!==v)(v.__ngLastListenerFn__||v).__ngNextListenerFn__=o,v.__ngLastListenerFn__=o,f=!1;else{o=JW(i,t,u,o),KW(g,r,o);const b=n.listen(m,r,o);d.push(o,b),c&&c.push(r,y,_,_+1)}}else o=JW(i,t,u,o);const h=i.outputs;let p;if(f&&null!==h&&(p=h[r])){const g=p.length;if(g)for(let m=0;m-1?ko(e.index,t):t,5);let a=ZW(t,n,i,o),l=r.__ngNextListenerFn__;for(;l;)a=ZW(t,n,l,o)&&a,l=l.__ngNextListenerFn__;return a}}function Qe(e=1){return function Abe(e){return(Ye.lFrame.contextLView=function V9(e,t){for(;e>0;)t=t[tg],e--;return t}(e,Ye.lFrame.contextLView))[un]}(e)}function Pxe(e,t){let n=null;const i=function I1e(e){const t=e.attrs;if(null!=t){const n=t.indexOf(5);if(!(1&n))return t[n+1]}return null}(e);for(let r=0;r(cl(!0),function ak(e,t){return e.createText(t)}(t[qe],i));function kr(e){return Or("",e,""),kr}function Or(e,t,n){const i=Q(),r=Ig(i,e,t,n);return r!==et&&function Ac(e,t,n){const i=Uy(t,e);!function Rz(e,t,n){e.setValue(t,n)}(e[qe],i,n)}(i,zi(),r),Or}function Ic(e,t,n){lG(t)&&(t=t());const i=Q();return zn(i,sa(),t)&&oo(lt(),dn(),i,e,t,i[qe],n,!1),Ic}function zu(e,t){const n=lG(e);return n&&e.set(t),n}function kc(e,t){const n=Q(),i=lt(),r=Ht();return xO(i,n,n[qe],r,e,t),kc}function MO(e,t,n,i,r){if(e=We(e),Array.isArray(e))for(let o=0;o>20;if(Cf(e)||!e.multi){const h=new Wy(c,r,ee),p=IO(l,t,r?u:u+f,d);-1===p?(TI(AE(a,s),o,l),NO(o,e,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),n.push(h),s.push(h)):(n[p]=h,s[p]=h)}else{const h=IO(l,t,u+f,d),p=IO(l,t,u,u+f),m=p>=0&&n[p];if(r&&!m||!r&&!(h>=0&&n[h])){TI(AE(a,s),o,l);const _=function iAe(e,t,n,i,r){const o=new Wy(e,n,ee);return o.multi=[],o.index=t,o.componentProviders=0,Nq(o,r,i&&!n),o}(r?nAe:tAe,n.length,r,i,c);!r&&m&&(n[p].providerFactory=_),NO(o,e,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),n.push(_),s.push(_)}else NO(o,e,h>-1?h:p,Nq(n[r?p:h],c,!r&&i));!r&&i&&m&&n[p].componentProviders++}}}function NO(e,t,n,i){const r=Cf(t),o=function H1e(e){return!!e.useClass}(t);if(r||o){const l=(o?We(t.useClass):t).prototype.ngOnDestroy;if(l){const c=e.destroyHooks||(e.destroyHooks=[]);if(!r&&t.multi){const u=c.indexOf(n);-1===u?c.push(n,[i,l]):c[u+1].push(i,l)}else c.push(n,l)}}}function Nq(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function IO(e,t,n,i){for(let r=n;r{n.providersResolver=(i,r)=>function eAe(e,t,n){const i=lt();if(i.firstCreatePass){const r=ra(e);MO(n,i.data,i.blueprint,r,!0),MO(t,i.data,i.blueprint,r,!1)}}(i,r?r(e):e,t)}}let rAe=(()=>{class e{constructor(n){this._injector=n,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){const i=K2(0,n.type),r=i.length>0?hC([i],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,r)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(const n of this.cachedInjectors.values())null!==n&&n.destroy()}finally{this.cachedInjectors.clear()}}static{this.\u0275prov=pe({token:e,providedIn:"environment",factory:()=>new e(Ne(ji))})}}return e})();function da(e){Nr("NgStandalone"),e.getStandaloneInjector=t=>t.get(rAe).getOrCreateStandaloneInjector(e)}function B0(e,t){const n=e[t];return n===et?void 0:n}function Oq(e,t,n,i,r,o){const s=t+n;return zn(e,s,r)?hl(e,s+1,o?i.call(o,r):i(r)):B0(e,s+1)}function Rq(e,t,n,i,r,o,s){const a=t+n;return function Bf(e,t,n,i){const r=zn(e,t,n);return zn(e,t+1,i)||r}(e,a,r,o)?hl(e,a+2,s?i.call(s,r,o):i(r,o)):B0(e,a+2)}function Ug(e,t){const n=lt();let i;const r=e+Ie;n.firstCreatePass?(i=function gAe(e,t){if(t)for(let n=t.length-1;n>=0;n--){const i=t[n];if(e===i.name)return i}}(t,n.pipeRegistry),n.data[r]=i,i.onDestroy&&(n.destroyHooks??=[]).push(r,i.onDestroy)):i=n.data[r];const o=i.factory||(i.factory=Ef(i.type)),a=no(ee);try{const l=xE(!1),c=o();return xE(l),function AO(e,t,n,i){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=i}(n,Q(),r,c),c}finally{no(a)}}function j0(e,t,n,i){const r=e+Ie,o=Q(),s=Tf(o,r);return V0(o,r)?Rq(o,Mr(),t,s.transform,n,i,s):s.transform(n,i)}function V0(e,t){return e[fe].data[t].pure}let eY=(()=>{class e{log(n){console.log(n)}warn(n){console.warn(n)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"platform"})}}return e})();const oY=new _e(""),OC=new _e("");let VO,BO=(()=>{class e{constructor(n,i,r){this._ngZone=n,this.registry=i,this._isZoneStable=!0,this._callbacks=[],this.taskTrackingZone=null,VO||(function dMe(e){VO=e}(r),r.addToWindow(i)),this._watchAngularEvents(),n.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{ct.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}isStable(){return this._isZoneStable&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;0!==this._callbacks.length;){let n=this._callbacks.pop();clearTimeout(n.timeoutId),n.doneCb()}});else{let n=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(n)||(clearTimeout(i.timeoutId),!1))}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(n=>({source:n.source,creationLocation:n.creationLocation,data:n.data})):[]}addCallback(n,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),n()},i)),this._callbacks.push({doneCb:n,timeoutId:o,updateCb:r})}whenStable(n,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(n,i,r),this._runCallbacksIfReady()}registerApplication(n){this.registry.registerApplication(n,this)}unregisterApplication(n){this.registry.unregisterApplication(n)}findProviders(n,i,r){return[]}static{this.\u0275fac=function(i){return new(i||e)(Ne(ct),Ne(jO),Ne(OC))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})(),jO=(()=>{class e{constructor(){this._applications=new Map}registerApplication(n,i){this._applications.set(n,i)}unregisterApplication(n){this._applications.delete(n)}unregisterAllApplications(){this._applications.clear()}getTestability(n){return this._applications.get(n)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(n,i=!0){return VO?.findTestabilityInTree(this,n,i)??null}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"platform"})}}return e})();function G0(e){return!!e&&"function"==typeof e.then}function sY(e){return!!e&&"function"==typeof e.subscribe}const UO=new _e("");let aY=(()=>{class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,i)=>{this.resolve=n,this.reject=i}),this.appInits=L(UO,{optional:!0})??[]}runInitializers(){if(this.initialized)return;const n=[];for(const r of this.appInits){const o=r();if(G0(o))n.push(o);else if(sY(o)){const s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});n.push(s)}}const i=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{i()}).catch(r=>{this.reject(r)}),0===n.length&&i(),this.initialized=!0}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const RC=new _e("");function cY(e,t){return Array.isArray(t)?t.reduce(cY,e):{...e,...t}}let fa=(()=>{class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=L(fwe),this.afterRenderManager=L(RG),this.zonelessEnabled=L(b0),this.dirtyFlags=0,this.deferredDirtyFlags=0,this.externalTestViews=new Set,this.beforeRender=new tn,this.afterTick=new tn,this.componentTypes=[],this.components=[],this.isStable=L(Sc).hasPendingTasks.pipe(at(n=>!n)),this._injector=L(ji)}get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}whenStable(){let n;return new Promise(i=>{n=this.isStable.subscribe({next:r=>{r&&i()}})}).finally(()=>{n.unsubscribe()})}get injector(){return this._injector}bootstrap(n,i){const r=n instanceof jH;if(!this._injector.get(aY).done)throw!r&&function Nu(e){const t=ut(e)||fi(e)||Bi(e);return null!==t&&t.standalone}(n),new q(405,!1);let s;s=r?n:this._injector.get(aC).resolveComponentFactory(n),this.componentTypes.push(s.componentType);const a=function fMe(e){return e.isBoundToModule}(s)?void 0:this._injector.get($f),c=s.create(nn.NULL,[],i||s.selector,a),u=c.location.nativeElement,d=c.injector.get(oY,null);return d?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),FC(this.components,c),d?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){if(this._runningTick)throw new q(101,!1);const n=st(null);try{this._runningTick=!0,this.synchronize()}catch(i){this.internalErrorHandler(i)}finally{this._runningTick=!1,st(n),this.afterTick.next()}}synchronize(){let n=null;this._injector.destroyed||(n=this._injector.get(lC,null,{optional:!0})),this.dirtyFlags|=this.deferredDirtyFlags,this.deferredDirtyFlags=0;let i=0;for(;0!==this.dirtyFlags&&i++<10;)this.synchronizeOnce(n)}synchronizeOnce(n){if(this.dirtyFlags|=this.deferredDirtyFlags,this.deferredDirtyFlags=0,7&this.dirtyFlags){const i=!!(1&this.dirtyFlags);this.dirtyFlags&=-8,this.dirtyFlags|=8,this.beforeRender.next(i);for(let{_lView:r,notifyErrorHandler:o}of this._views)gMe(r,o,i,this.zonelessEnabled);if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),7&this.dirtyFlags)return}else n?.begin?.(),n?.end?.();8&this.dirtyFlags&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){this.allViews.some(({_lView:n})=>vE(n))?this.dirtyFlags|=2:this.dirtyFlags&=-8}attachView(n){const i=n;this._views.push(i),i.attachToAppRef(this)}detachView(n){const i=n;FC(this._views,i),i.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n);const i=this._injector.get(RC,[]);[...this._bootstrapListeners,...i].forEach(r=>r(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>FC(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new q(406,!1);const n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function FC(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function gMe(e,t,n,i){(n||vE(e))&&eC(e,t,n&&!i?0:1)}class mMe{constructor(t,n){this.ngModuleFactory=t,this.componentFactories=n}}let dY=(()=>{class e{compileModuleSync(n){return new tO(n)}compileModuleAsync(n){return Promise.resolve(this.compileModuleSync(n))}compileModuleAndAllComponentsSync(n){const i=this.compileModuleSync(n),o=Ro(cr(n).declarations).reduce((s,a)=>{const l=ut(a);return l&&s.push(new C0(l)),s},[]);return new mMe(i,o)}compileModuleAndAllComponentsAsync(n){return Promise.resolve(this.compileModuleAndAllComponentsSync(n))}clearCache(){}clearCacheFor(n){}getModuleId(n){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),vMe=(()=>{class e{constructor(){this.zone=L(ct),this.changeDetectionScheduler=L(bg),this.applicationRef=L(fa)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function zO({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:n}){return e??=()=>new ct({...HO(),scheduleInRootZone:n}),[{provide:ct,useFactory:e},{provide:rl,multi:!0,useFactory:()=>{const i=L(vMe,{optional:!0});return()=>i.initialize()}},{provide:rl,multi:!0,useFactory:()=>{const i=L(wMe);return()=>{i.initialize()}}},!0===t?{provide:BH,useValue:!0}:[],{provide:Bk,useValue:n??D7}]}function HO(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}let wMe=(()=>{class e{constructor(){this.subscription=new ar,this.initialized=!1,this.zone=L(ct),this.pendingTasks=L(Sc)}initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{ct.assertNotInAngularZone(),queueMicrotask(()=>{null!==n&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{ct.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),W0=(()=>{class e{constructor(){this.appRef=L(fa),this.taskService=L(Sc),this.ngZone=L(ct),this.zonelessEnabled=L(b0),this.disableScheduling=L(BH,{optional:!0})??!1,this.zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run,this.schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}],this.subscriptions=new ar,this.angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(OE):null,this.scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(L(Bk,{optional:!0})??!1),this.cancelScheduledCallback=null,this.useMicrotaskScheduler=!1,this.runningTick=!1,this.pendingRenderTaskId=null,this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof OI||!this.zoneIsDefined)}notify(n){if(!this.zonelessEnabled&&5===n)return;switch(n){case 0:this.appRef.dirtyFlags|=2;break;case 3:case 2:case 4:case 5:case 1:this.appRef.dirtyFlags|=4;break;case 7:this.appRef.deferredDirtyFlags|=8;break;default:this.appRef.dirtyFlags|=8}if(!this.shouldScheduleTick())return;const i=this.useMicrotaskScheduler?T7:S7;this.pendingRenderTaskId=this.taskService.add(),this.cancelScheduledCallback=this.scheduleInRootZone?Zone.root.run(()=>i(()=>this.tick())):this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(){return!(this.disableScheduling||null!==this.pendingRenderTaskId||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(OE+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;!this.zonelessEnabled&&7&this.appRef.dirtyFlags&&(this.appRef.dirtyFlags|=1);const n=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(i){throw this.taskService.remove(n),i}finally{this.cleanup()}this.useMicrotaskScheduler=!0,T7(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,null!==this.pendingRenderTaskId){const n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const Oc=new _e("",{providedIn:"root",factory:()=>L(Oc,ft.Optional|ft.SkipSelf)||function EMe(){return typeof $localize<"u"&&$localize.locale||DC}()}),LC=new _e("");function $C(e){return!e.moduleRef}let _Y=(()=>{class e{constructor(n){this._injector=n,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(n,i){const r=i?.scheduleInRootZone,s=i?.ignoreChangesOutsideZone,a=[zO({ngZoneFactory:()=>function dwe(e="zone.js",t){return"noop"===e?new OI:"zone.js"===e?new ct(t):e}(i?.ngZone,{...HO({eventCoalescing:i?.ngZoneEventCoalescing,runCoalescing:i?.ngZoneRunCoalescing}),scheduleInRootZone:r}),ignoreChangesOutsideZone:s}),{provide:bg,useExisting:W0}],l=function gSe(e,t,n){return new eO(e,t,n,!1)}(n.moduleType,this.injector,a);return function mY(e){const t=$C(e)?e.r3Injector:e.moduleRef.injector,n=t.get(ct);return n.run(()=>{$C(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();const i=t.get(dl,null);let r;if(n.runOutsideAngular(()=>{r=n.onError.subscribe({next:o=>{i.handleError(o)}})}),$C(e)){const o=()=>t.destroy(),s=e.platformInjector.get(LC);s.add(o),t.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else{const o=()=>e.moduleRef.destroy(),s=e.platformInjector.get(LC);s.add(o),e.moduleRef.onDestroy(()=>{FC(e.allPlatformModules,e.moduleRef),r.unsubscribe(),s.delete(o)})}return function pMe(e,t,n){try{const i=n();return G0(i)?i.catch(r=>{throw t.runOutsideAngular(()=>e.handleError(r)),r}):i}catch(i){throw t.runOutsideAngular(()=>e.handleError(i)),i}}(i,n,()=>{const o=t.get(aY);return o.runInitializers(),o.donePromise.then(()=>{if(function ZTe(e){"string"==typeof e&&(IW=e.toLowerCase().replace(/_/g,"-"))}(t.get(Oc,DC)||DC),$C(e)){const a=t.get(fa);return void 0!==e.rootComponent&&a.bootstrap(e.rootComponent),a}return function AMe(e,t){const n=e.injector.get(fa);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(i=>n.bootstrap(i));else{if(!e.instance.ngDoBootstrap)throw new q(-403,!1);e.instance.ngDoBootstrap(n)}t.push(e)}(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}({moduleRef:l,allPlatformModules:this._modules,platformInjector:this.injector})}bootstrapModule(n,i=[]){const r=cY({},i);return function yMe(e,t,n){const i=new tO(n);return Promise.resolve(i)}(0,0,n).then(o=>this.bootstrapModuleFactory(o,r))}onDestroy(n){this._destroyListeners.push(n)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new q(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const n=this._injector.get(LC,null);n&&(n.forEach(i=>i()),n.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static{this.\u0275fac=function(i){return new(i||e)(Ne(nn))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"platform"})}}return e})(),Hu=null;const yY=new _e("");function vY(e,t,n=[]){const i=`Platform: ${t}`,r=new _e(i);return(o=[])=>{let s=WO();if(!s||s.injector.get(yY,!1)){const a=[...n,...o,{provide:r,useValue:!0}];e?e(a):function MMe(e){if(Hu&&!Hu.get(yY,!1))throw new q(400,!1);(function lY(){!function Lve(e){LU=e}(()=>{throw new q(600,!1)})})(),Hu=e;const t=e.get(_Y);(function wY(e){e.get(Q7,null)?.forEach(n=>n())})(e)}(function bY(e=[],t){return nn.create({name:t,providers:[{provide:Z2,useValue:"platform"},{provide:LC,useValue:new Set([()=>Hu=null])},...e]})}(a,i))}return function NMe(){const t=WO();if(!t)throw new q(401,!1);return t}()}}function WO(){return Hu?.get(_Y)??null}let ha=(()=>{class e{static{this.__NG_ELEMENT_ID__=kMe}}return e})();function kMe(e){return function OMe(e,t,n){if(Sf(e)&&!n){const i=ko(e.index,t);return new f0(i,i)}return 175&e.type?new f0(t[Sn],t):null}(Ht(),Q(),!(16&~e))}class TY{constructor(){}supports(t){return pC(t)}create(t){return new $Me(t)}}const LMe=(e,t)=>t;class $Me{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||LMe}forEachItem(t){let n;for(n=this._itHead;null!==n;n=n._next)t(n)}forEachOperation(t){let n=this._itHead,i=this._removalsHead,r=0,o=null;for(;n||i;){const s=!i||n&&n.currentIndex{s=this._trackByFn(r,a),null!==n&&Object.is(n.trackById,s)?(i&&(n=this._verifyReinsertion(n,a,s,r)),Object.is(n.item,a)||this._addIdentityChange(n,a)):(n=this._mismatch(n,a,s,r),i=!0),n=n._next,r++}),this.length=r;return this._truncate(n),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,n,i,r){let o;return null===t?o=this._itTail:(o=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(t.item,n)||this._addIdentityChange(t,n),this._reinsertAfter(t,o,r)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(t.item,n)||this._addIdentityChange(t,n),this._moveAfter(t,o,r)):t=this._addAfter(new BMe(n,i),o,r),t}_verifyReinsertion(t,n,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?t=this._reinsertAfter(o,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;null!==t;){const n=t._next;this._addToRemovals(this._unlink(t)),t=n}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,n,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const r=t._prevRemoved,o=t._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(t,n,i),this._addToMoves(t,i),t}_moveAfter(t,n,i){return this._unlink(t),this._insertAfter(t,n,i),this._addToMoves(t,i),t}_addAfter(t,n,i){return this._insertAfter(t,n,i),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,n,i){const r=null===n?this._itHead:n._next;return t._next=r,t._prev=n,null===r?this._itTail=t:r._prev=t,null===n?this._itHead=t:n._next=t,null===this._linkedRecords&&(this._linkedRecords=new xY),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const n=t._prev,i=t._next;return null===n?this._itHead=i:n._next=i,null===i?this._itTail=n:i._prev=n,t}_addToMoves(t,n){return t.previousIndex===n||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new xY),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,n){return t.item=n,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class BMe{constructor(t,n){this.item=t,this.trackById=n,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class jMe{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,n){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===n||n<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){const n=t._prevDup,i=t._nextDup;return null===n?this._head=i:n._nextDup=i,null===i?this._tail=n:i._prevDup=n,null===this._head}}class xY{constructor(){this.map=new Map}put(t){const n=t.trackById;let i=this.map.get(n);i||(i=new jMe,this.map.set(n,i)),i.add(t)}get(t,n){const r=this.map.get(t);return r?r.get(t,n):null}remove(t){const n=t.trackById;return this.map.get(n).remove(t)&&this.map.delete(n),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function AY(e,t,n){const i=e.previousIndex;if(null===i)return i;let r=0;return n&&i{if(n&&n.key===r)this._maybeAddToChanges(n,i),this._appendAfter=n,n=n._next;else{const o=this._getOrCreateRecordForKey(r,i);n=this._insertBeforeOrAppend(n,o)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(let i=n;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,n){if(t){const i=t._prev;return n._next=t,n._prev=i,t._prev=n,i&&(i._next=n),t===this._mapHead&&(this._mapHead=n),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=n,n._prev=this._appendAfter):this._mapHead=n,this._appendAfter=n,null}_getOrCreateRecordForKey(t,n){if(this._records.has(t)){const r=this._records.get(t);this._maybeAddToChanges(r,n);const o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}const i=new UMe(t);return this._records.set(t,i),i.currentValue=n,this._addToAdditions(i),i}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,n){Object.is(n,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=n,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,n){t instanceof Map?t.forEach(n):Object.keys(t).forEach(i=>n(t[i],i))}}class UMe{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function NY(){return new QO([new TY])}let QO=(()=>{class e{static{this.\u0275prov=pe({token:e,providedIn:"root",factory:NY})}constructor(n){this.factories=n}static create(n,i){if(null!=i){const r=i.factories.slice();n=n.concat(r)}return new e(n)}static extend(n){return{provide:e,useFactory:i=>e.create(n,i||NY()),deps:[[e,new rE,new iE]]}}find(n){const i=this.factories.find(r=>r.supports(n));if(null!=i)return i;throw new q(901,!1)}}return e})();function IY(){return new VC([new MY])}let VC=(()=>{class e{static{this.\u0275prov=pe({token:e,providedIn:"root",factory:IY})}constructor(n){this.factories=n}static create(n,i){if(i){const r=i.factories.slice();n=n.concat(r)}return new e(n)}static extend(n){return{provide:e,useFactory:i=>e.create(n,i||IY()),deps:[[e,new rE,new iE]]}}find(n){const i=this.factories.find(r=>r.supports(n));if(i)return i;throw new q(901,!1)}}return e})();const GMe=vY(null,"core",[]);let WMe=(()=>{class e{constructor(n){}static{this.\u0275fac=function(i){return new(i||e)(Ne(fa))}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})();function Gg(e){return"boolean"==typeof e?e:null!=e&&"false"!==e}function X0(e,t){Nr("NgSignals");const n=function Rve(e){const t=Object.create(Fve);t.computation=e;const n=()=>{if(NU(t),m2(t),t.value===Hw)throw t.error;return t.value};return n[ea]=t,n}(e);return t?.equal&&(n[ea].equal=t.equal),n}function vl(e){const t=st(null);try{return e()}finally{st(t)}}function eR(e,t){const n=ut(e),i=t.elementInjector||fE();return new C0(n).create(i,t.projectableNodes,t.hostElement,t.environmentInjector)}let eK=null;function Rc(){return eK}class INe{}const Ln=new _e("");let tR=(()=>{class e{historyGo(n){throw new Error("")}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:()=>L(ONe),providedIn:"platform"})}}return e})();const kNe=new _e("");let ONe=(()=>{class e extends tR{constructor(){super(),this._doc=L(Ln),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Rc().getBaseHref(this._doc)}onPopState(n){const i=Rc().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",n,!1),()=>i.removeEventListener("popstate",n)}onHashChange(n){const i=Rc().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",n,!1),()=>i.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,i,r){this._history.pushState(n,i,r)}replaceState(n,i,r){this._history.replaceState(n,i,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:()=>new e,providedIn:"platform"})}}return e})();function nR(e,t){if(0==e.length)return t;if(0==t.length)return e;let n=0;return e.endsWith("/")&&n++,t.startsWith("/")&&n++,2==n?e+t.substring(1):1==n?e+t:e+"/"+t}function tK(e){const t=e.match(/#|\?|$/),n=t&&t.index||e.length;return e.slice(0,n-("/"===e[n-1]?1:0))+e.slice(n)}function Fc(e){return e&&"?"!==e[0]?"?"+e:e}let Gu=(()=>{class e{historyGo(n){throw new Error("")}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:()=>L(iR),providedIn:"root"})}}return e})();const nK=new _e("");let iR=(()=>{class e extends Gu{constructor(n,i){super(),this._platformLocation=n,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??L(Ln).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return nR(this._baseHref,n)}path(n=!1){const i=this._platformLocation.pathname+Fc(this._platformLocation.search),r=this._platformLocation.hash;return r&&n?`${i}${r}`:i}pushState(n,i,r,o){const s=this.prepareExternalUrl(r+Fc(o));this._platformLocation.pushState(n,i,s)}replaceState(n,i,r,o){const s=this.prepareExternalUrl(r+Fc(o));this._platformLocation.replaceState(n,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static{this.\u0275fac=function(i){return new(i||e)(Ne(tR),Ne(nK,8))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),RNe=(()=>{class e extends Gu{constructor(n,i){super(),this._platformLocation=n,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}path(n=!1){const i=this._platformLocation.hash??"#";return i.length>0?i.substring(1):i}prepareExternalUrl(n){const i=nR(this._baseHref,n);return i.length>0?"#"+i:i}pushState(n,i,r,o){let s=this.prepareExternalUrl(r+Fc(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(n,i,s)}replaceState(n,i,r,o){let s=this.prepareExternalUrl(r+Fc(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(n,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static{this.\u0275fac=function(i){return new(i||e)(Ne(tR),Ne(nK,8))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})(),Q0=(()=>{class e{constructor(n){this._subject=new ze,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=n;const i=this._locationStrategy.getBaseHref();this._basePath=function LNe(e){if(new RegExp("^(https?:)?//").test(e)){const[,n]=e.split(/\/\/[^\/]+/);return n}return e}(tK(iK(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,i=""){return this.path()==this.normalize(n+Fc(i))}normalize(n){return e.stripTrailingSlash(function PNe(e,t){if(!e||!t.startsWith(e))return t;const n=t.substring(e.length);return""===n||["/",";","?","#"].includes(n[0])?n:t}(this._basePath,iK(n)))}prepareExternalUrl(n){return n&&"/"!==n[0]&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,i="",r=null){this._locationStrategy.pushState(r,"",n,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Fc(i)),r)}replaceState(n,i="",r=null){this._locationStrategy.replaceState(r,"",n,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Fc(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)}),()=>{const i=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",i){this._urlChangeListeners.forEach(r=>r(n,i))}subscribe(n,i,r){return this._subject.subscribe({next:n,error:i,complete:r})}static{this.normalizeQueryParams=Fc}static{this.joinWithSlash=nR}static{this.stripTrailingSlash=tK}static{this.\u0275fac=function(i){return new(i||e)(Ne(Gu))}}static{this.\u0275prov=pe({token:e,factory:()=>function FNe(){return new Q0(Ne(Gu))}(),providedIn:"root"})}}return e})();function iK(e){return e.replace(/\/index.html$/,"")}function hK(e,t){t=encodeURIComponent(t);for(const n of e.split(";")){const i=n.indexOf("="),[r,o]=-1==i?[n,""]:[n.slice(0,i),n.slice(i+1)];if(r.trim()===t)return decodeURIComponent(o)}return null}class E2e{constructor(t,n,i,r){this.$implicit=t,this.ngForOf=n,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let oD=(()=>{class e{set ngForOf(n){this._ngForOf=n,this._ngForOfDirty=!0}set ngForTrackBy(n){this._trackByFn=n}get ngForTrackBy(){return this._trackByFn}constructor(n,i,r){this._viewContainer=n,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(n){n&&(this._template=n)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const n=this._ngForOf;!this._differ&&n&&(this._differ=this._differs.find(n).create(this.ngForTrackBy))}if(this._differ){const n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}_applyChanges(n){const i=this._viewContainer;n.forEachOperation((r,o,s)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new E2e(r.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)i.remove(null===o?void 0:o);else if(null!==o){const a=i.get(o);i.move(a,s),mK(a,r)}});for(let r=0,o=i.length;r{mK(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(n,i){return!0}static{this.\u0275fac=function(i){return new(i||e)(ee(Po),ee(ii),ee(QO))}}static{this.\u0275dir=be({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0})}}return e})();function mK(e,t){e.context.$implicit=t.item}let J0=(()=>{class e{constructor(n,i){this._viewContainer=n,this._context=new C2e,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(n){this._context.$implicit=this._context.ngIf=n,this._updateView()}set ngIfThen(n){_K("ngIfThen",n),this._thenTemplateRef=n,this._thenViewRef=null,this._updateView()}set ngIfElse(n){_K("ngIfElse",n),this._elseTemplateRef=n,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(n,i){return!0}static{this.\u0275fac=function(i){return new(i||e)(ee(Po),ee(ii))}}static{this.\u0275dir=be({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}}return e})();class C2e{constructor(){this.$implicit=null,this.ngIf=null}}function _K(e,t){if(t&&!t.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${di(t)}'.`)}let vK=(()=>{class e{constructor(n,i,r){this._ngEl=n,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(n){this._ngStyle=n,!this._differ&&n&&(this._differ=this._differs.find(n).create())}ngDoCheck(){if(this._differ){const n=this._differ.diff(this._ngStyle);n&&this._applyChanges(n)}}_setStyle(n,i){const[r,o]=n.split("."),s=-1===r.indexOf("-")?void 0:Fu.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_applyChanges(n){n.forEachRemovedItem(i=>this._setStyle(i.key,null)),n.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),n.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}static{this.\u0275fac=function(i){return new(i||e)(ee(Gt),ee(VC),ee(aa))}}static{this.\u0275dir=be({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0})}}return e})(),K2e=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})();const wK="browser";function EK(e){return"server"===e}let tv=(()=>{class e{static{this.\u0275prov=pe({token:e,providedIn:"root",factory:()=>function Q2e(e){return e===wK}(L(Tc))?new Z2e(L(Ln),window):new eIe})}}return e})();class Z2e{constructor(t,n){this.document=t,this.window=n,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(t){this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){const n=function J2e(e,t){const n=e.getElementById(t)||e.getElementsByName(t)[0];if(n)return n;if("function"==typeof e.createTreeWalker&&e.body&&"function"==typeof e.body.attachShadow){const i=e.createTreeWalker(e.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const o=r.shadowRoot;if(o){const s=o.getElementById(t)||o.querySelector(`[name="${t}"]`);if(s)return s}r=i.nextNode()}}return null}(this.document,t);n&&(this.scrollToElement(n),n.focus())}setHistoryScrollRestoration(t){this.window.history.scrollRestoration=t}scrollToElement(t){const n=t.getBoundingClientRect(),i=n.left+this.window.pageXOffset,r=n.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}}class eIe{setOffset(t){}getScrollPosition(){return[0,0]}scrollToPosition(t){}scrollToAnchor(t){}setHistoryScrollRestoration(t){}}class CK{}class AIe extends INe{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class wR extends AIe{static makeCurrent(){!function NNe(e){eK??=e}(new wR)}onAndCancel(t,n,i){return t.addEventListener(n,i),()=>{t.removeEventListener(n,i)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.remove()}createElement(t,n){return(n=n||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return"window"===n?window:"document"===n?t:"body"===n?t.body:null}getBaseHref(t){const n=function MIe(){return rv=rv||document.querySelector("base"),rv?rv.getAttribute("href"):null}();return null==n?null:function NIe(e){return new URL(e,document.baseURI).pathname}(n)}resetBaseElement(){rv=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return hK(document.cookie,t)}}let rv=null,kIe=(()=>{class e{build(){return new XMLHttpRequest}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();const ER=new _e("");let RK=(()=>{class e{constructor(n,i){this._zone=i,this._eventNameToPlugin=new Map,n.forEach(r=>{r.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,i,r){return this._findPluginFor(i).addEventListener(n,i,r)}getZone(){return this._zone}_findPluginFor(n){let i=this._eventNameToPlugin.get(n);if(i)return i;if(i=this._plugins.find(o=>o.supports(n)),!i)throw new q(5101,!1);return this._eventNameToPlugin.set(n,i),i}static{this.\u0275fac=function(i){return new(i||e)(Ne(ER),Ne(ct))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();class FK{constructor(t){this._doc=t}}const CR="ng-app-id";let PK=(()=>{class e{constructor(n,i,r,o={}){this.doc=n,this.appId=i,this.nonce=r,this.platformId=o,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=EK(o),this.resetHostNodes()}addStyles(n){for(const i of n)1===this.changeUsageCount(i,1)&&this.onStyleAdded(i)}removeStyles(n){for(const i of n)this.changeUsageCount(i,-1)<=0&&this.onStyleRemoved(i)}ngOnDestroy(){const n=this.styleNodesInDOM;n&&(n.forEach(i=>i.remove()),n.clear());for(const i of this.getAllStyles())this.onStyleRemoved(i);this.resetHostNodes()}addHost(n){this.hostNodes.add(n);for(const i of this.getAllStyles())this.addStyleToHost(n,i)}removeHost(n){this.hostNodes.delete(n)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(n){for(const i of this.hostNodes)this.addStyleToHost(i,n)}onStyleRemoved(n){const i=this.styleRef;i.get(n)?.elements?.forEach(r=>r.remove()),i.delete(n)}collectServerRenderedStyles(){const n=this.doc.head?.querySelectorAll(`style[${CR}="${this.appId}"]`);if(n?.length){const i=new Map;return n.forEach(r=>{null!=r.textContent&&i.set(r.textContent,r)}),i}return null}changeUsageCount(n,i){const r=this.styleRef;if(r.has(n)){const o=r.get(n);return o.usage+=i,o.usage}return r.set(n,{usage:i,elements:[]}),i}getStyleElement(n,i){const r=this.styleNodesInDOM,o=r?.get(i);if(o?.parentNode===n)return r.delete(i),o.removeAttribute(CR),o;{const s=this.doc.createElement("style");return this.nonce&&s.setAttribute("nonce",this.nonce),s.textContent=i,this.platformIsServer&&s.setAttribute(CR,this.appId),n.appendChild(s),s}}addStyleToHost(n,i){const r=this.getStyleElement(n,i),o=this.styleRef,s=o.get(i)?.elements;s?s.push(r):o.set(i,{elements:[r],usage:1})}resetHostNodes(){const n=this.hostNodes;n.clear(),n.add(this.doc.head)}static{this.\u0275fac=function(i){return new(i||e)(Ne(Ln),Ne(ug),Ne(J7,8),Ne(Tc))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();const DR={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},SR=/%COMP%/g,PIe=new _e("",{providedIn:"root",factory:()=>!0});function $K(e,t){return t.map(n=>n.replace(SR,e))}let TR=(()=>{class e{constructor(n,i,r,o,s,a,l,c=null){this.eventManager=n,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=s,this.platformId=a,this.ngZone=l,this.nonce=c,this.rendererByCompId=new Map,this.platformIsServer=EK(a),this.defaultRenderer=new xR(n,s,l,this.platformIsServer)}createRenderer(n,i){if(!n||!i)return this.defaultRenderer;this.platformIsServer&&i.encapsulation===ta.ShadowDom&&(i={...i,encapsulation:ta.Emulated});const r=this.getOrCreateRenderer(n,i);return r instanceof jK?r.applyToHost(n):r instanceof AR&&r.applyStyles(),r}getOrCreateRenderer(n,i){const r=this.rendererByCompId;let o=r.get(i.id);if(!o){const s=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,u=this.removeStylesOnCompDestroy,d=this.platformIsServer;switch(i.encapsulation){case ta.Emulated:o=new jK(l,c,i,this.appId,u,s,a,d);break;case ta.ShadowDom:return new jIe(l,c,n,i,s,a,this.nonce,d);default:o=new AR(l,c,i,u,s,a,d)}r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}static{this.\u0275fac=function(i){return new(i||e)(Ne(RK),Ne(PK),Ne(ug),Ne(PIe),Ne(Ln),Ne(Tc),Ne(ct),Ne(J7))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();class xR{constructor(t,n,i,r){this.eventManager=t,this.doc=n,this.ngZone=i,this.platformIsServer=r,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(t,n){return n?this.doc.createElementNS(DR[n]||n,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,n){(BK(t)?t.content:t).appendChild(n)}insertBefore(t,n,i){t&&(BK(t)?t.content:t).insertBefore(n,i)}removeChild(t,n){n.remove()}selectRootElement(t,n){let i="string"==typeof t?this.doc.querySelector(t):t;if(!i)throw new q(-5104,!1);return n||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,n,i,r){if(r){n=r+":"+n;const o=DR[r];o?t.setAttributeNS(o,n,i):t.setAttribute(n,i)}else t.setAttribute(n,i)}removeAttribute(t,n,i){if(i){const r=DR[i];r?t.removeAttributeNS(r,n):t.removeAttribute(`${i}:${n}`)}else t.removeAttribute(n)}addClass(t,n){t.classList.add(n)}removeClass(t,n){t.classList.remove(n)}setStyle(t,n,i,r){r&(Fu.DashCase|Fu.Important)?t.style.setProperty(n,i,r&Fu.Important?"important":""):t.style[n]=i}removeStyle(t,n,i){i&Fu.DashCase?t.style.removeProperty(n):t.style[n]=""}setProperty(t,n,i){null!=t&&(t[n]=i)}setValue(t,n){t.nodeValue=n}listen(t,n,i){if("string"==typeof t&&!(t=Rc().getGlobalEventTarget(this.doc,t)))throw new Error(`Unsupported event target ${t} for event ${n}`);return this.eventManager.addEventListener(t,n,this.decoratePreventDefault(i))}decoratePreventDefault(t){return n=>{if("__ngUnwrap__"===n)return t;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>t(n)):t(n))&&n.preventDefault()}}}function BK(e){return"TEMPLATE"===e.tagName&&void 0!==e.content}class jIe extends xR{constructor(t,n,i,r,o,s,a,l){super(t,o,s,l),this.sharedStylesHost=n,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const c=$K(r.id,r.styles);for(const u of c){const d=document.createElement("style");a&&d.setAttribute("nonce",a),d.textContent=u,this.shadowRoot.appendChild(d)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,n){return super.appendChild(this.nodeOrShadowRoot(t),n)}insertBefore(t,n,i){return super.insertBefore(this.nodeOrShadowRoot(t),n,i)}removeChild(t,n){return super.removeChild(null,n)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class AR extends xR{constructor(t,n,i,r,o,s,a,l){super(t,o,s,a),this.sharedStylesHost=n,this.removeStylesOnCompDestroy=r,this.styles=l?$K(l,i.styles):i.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class jK extends AR{constructor(t,n,i,r,o,s,a,l){const c=r+"-"+i.id;super(t,n,i,o,s,a,l,c),this.contentAttr=function LIe(e){return"_ngcontent-%COMP%".replace(SR,e)}(c),this.hostAttr=function $Ie(e){return"_nghost-%COMP%".replace(SR,e)}(c)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,n){const i=super.createElement(t,n);return super.setAttribute(i,this.contentAttr,""),i}}let VIe=(()=>{class e extends FK{constructor(n){super(n)}supports(n){return!0}addEventListener(n,i,r){return n.addEventListener(i,r,!1),()=>this.removeEventListener(n,i,r)}removeEventListener(n,i,r){return n.removeEventListener(i,r)}static{this.\u0275fac=function(i){return new(i||e)(Ne(Ln))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();const VK=["alt","control","meta","shift"],UIe={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},zIe={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};let HIe=(()=>{class e extends FK{constructor(n){super(n)}supports(n){return null!=e.parseEventName(n)}addEventListener(n,i,r){const o=e.parseEventName(i),s=e.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Rc().onAndCancel(n,o.domEventName,s))}static parseEventName(n){const i=n.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const o=e._normalizeKey(i.pop());let s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),VK.forEach(c=>{const u=i.indexOf(c);u>-1&&(i.splice(u,1),s+=c+".")}),s+=o,0!=i.length||0===o.length)return null;const l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(n,i){let r=UIe[n.key]||n.key,o="";return i.indexOf("code.")>-1&&(r=n.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),VK.forEach(s=>{s!==r&&(0,zIe[s])(n)&&(o+=s+".")}),o+=r,o===i)}static eventCallback(n,i,r){return o=>{e.matchEventFullKeyCode(o,n)&&r.runGuarded(()=>i(o))}}static _normalizeKey(n){return"esc"===n?"escape":n}static{this.\u0275fac=function(i){return new(i||e)(Ne(Ln))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();const YIe=vY(GMe,"browser",[{provide:Tc,useValue:wK},{provide:Q7,useValue:function GIe(){wR.makeCurrent()},multi:!0},{provide:Ln,useFactory:function qIe(){return function Rwe(e){BI=e}(document),document},deps:[]}]),KIe=new _e(""),HK=[{provide:OC,useClass:class IIe{addToWindow(t){vn.getAngularTestability=(i,r=!0)=>{const o=t.findTestabilityInTree(i,r);if(null==o)throw new q(5103,!1);return o},vn.getAllAngularTestabilities=()=>t.getAllTestabilities(),vn.getAllAngularRootElements=()=>t.getAllRootElements(),vn.frameworkStabilizers||(vn.frameworkStabilizers=[]),vn.frameworkStabilizers.push(i=>{const r=vn.getAllAngularTestabilities();let o=r.length;const s=function(){o--,0==o&&i()};r.forEach(a=>{a.whenStable(s)})})}findTestabilityInTree(t,n,i){return null==n?null:t.getTestability(n)??(i?Rc().isShadowRoot(n)?this.findTestabilityInTree(t,n.host,!0):this.findTestabilityInTree(t,n.parentElement,!0):null)}},deps:[]},{provide:oY,useClass:BO,deps:[ct,jO,OC]},{provide:BO,useClass:BO,deps:[ct,jO,OC]}],GK=[{provide:Z2,useValue:"root"},{provide:dl,useFactory:function WIe(){return new dl},deps:[]},{provide:ER,useClass:VIe,multi:!0,deps:[Ln,ct,Tc]},{provide:ER,useClass:HIe,multi:!0,deps:[Ln]},TR,PK,RK,{provide:lC,useExisting:TR},{provide:CK,useClass:kIe,deps:[]},[]];let WK=(()=>{class e{constructor(n){}static withServerTransition(n){return{ngModule:e,providers:[{provide:ug,useValue:n.appId}]}}static{this.\u0275fac=function(i){return new(i||e)(Ne(KIe,12))}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({providers:[...GK,...HK],imports:[K2e,WMe]})}}return e})(),qK=(()=>{class e{constructor(n){this._doc=n,this._dom=Rc()}addTag(n,i=!1){return n?this._getOrCreateElement(n,i):null}addTags(n,i=!1){return n?n.reduce((r,o)=>(o&&r.push(this._getOrCreateElement(o,i)),r),[]):[]}getTag(n){return n&&this._doc.querySelector(`meta[${n}]`)||null}getTags(n){if(!n)return[];const i=this._doc.querySelectorAll(`meta[${n}]`);return i?[].slice.call(i):[]}updateTag(n,i){if(!n)return null;i=i||this._parseSelector(n);const r=this.getTag(i);return r?this._setMetaElementAttributes(n,r):this._getOrCreateElement(n,!0)}removeTag(n){this.removeTagElement(this.getTag(n))}removeTagElement(n){n&&this._dom.remove(n)}_getOrCreateElement(n,i=!1){if(!i){const s=this._parseSelector(n),a=this.getTags(s).filter(l=>this._containsAttributes(n,l))[0];if(void 0!==a)return a}const r=this._dom.createElement("meta");return this._setMetaElementAttributes(n,r),this._doc.getElementsByTagName("head")[0].appendChild(r),r}_setMetaElementAttributes(n,i){return Object.keys(n).forEach(r=>i.setAttribute(this._getMetaKeyMap(r),n[r])),i}_parseSelector(n){const i=n.name?"name":"property";return`${i}="${n[i]}"`}_containsAttributes(n,i){return Object.keys(n).every(r=>i.getAttribute(this._getMetaKeyMap(r))===n[r])}_getMetaKeyMap(n){return XIe[n]||n}static{this.\u0275fac=function(i){return new(i||e)(Ne(Ln))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const XIe={httpEquiv:"http-equiv"};let MR=(()=>{class e{constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}static{this.\u0275fac=function(i){return new(i||e)(Ne(Ln))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Wu(e){return this instanceof Wu?(this.v=e,this):new Wu(e)}function JK(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,t=e[Symbol.asyncIterator];return t?t.call(e):(e=function OR(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n);function i(o){n[o]=e[o]&&function(s){return new Promise(function(a,l){!function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}(a,l,(s=e[o](s)).done,s.value)})}}}"function"==typeof SuppressedError&&SuppressedError;const FR=e=>e&&"number"==typeof e.length&&"function"!=typeof e;function eX(e){return Tt(e?.then)}function tX(e){return Tt(e[M2])}function nX(e){return Symbol.asyncIterator&&Tt(e?.[Symbol.asyncIterator])}function iX(e){return new TypeError(`You provided ${null!==e&&"object"==typeof e?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const rX=function xke(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function oX(e){return Tt(e?.[rX])}function sX(e){return function ZK(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function s(h){return function(p){return Promise.resolve(p).then(h,d)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(h,p){i[h]&&(r[h]=function(g){return new Promise(function(m,_){o.push([h,g,m,_])>1||l(h,g)})},p&&(r[h]=p(r[h])))}function l(h,p){try{!function c(h){h.value instanceof Wu?Promise.resolve(h.value.v).then(u,d):f(o[0][2],h)}(i[h](p))}catch(g){f(o[0][3],g)}}function u(h){l("next",h)}function d(h){l("throw",h)}function f(h,p){h(p),o.shift(),o.length&&l(o[0][0],o[0][1])}}(this,arguments,function*(){const n=e.getReader();try{for(;;){const{value:i,done:r}=yield Wu(n.read());if(r)return yield Wu(void 0);yield yield Wu(i)}}finally{n.releaseLock()}})}function aX(e){return Tt(e?.getReader)}function Hi(e){if(e instanceof cn)return e;if(null!=e){if(tX(e))return function Ake(e){return new cn(t=>{const n=e[M2]();if(Tt(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(e);if(FR(e))return function Mke(e){return new cn(t=>{for(let n=0;n{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,HU)})}(e);if(nX(e))return lX(e);if(oX(e))return function Ike(e){return new cn(t=>{for(const n of e)if(t.next(n),t.closed)return;t.complete()})}(e);if(aX(e))return function kke(e){return lX(sX(e))}(e)}throw iX(e)}function lX(e){return new cn(t=>{(function Oke(e,t){var n,i,r,o;return function XK(e,t,n,i){return new(n||(n=Promise))(function(o,s){function a(u){try{c(i.next(u))}catch(d){s(d)}}function l(u){try{c(i.throw(u))}catch(d){s(d)}}function c(u){u.done?o(u.value):function r(o){return o instanceof n?o:new n(function(s){s(o)})}(u.value).then(a,l)}c((i=i.apply(e,t||[])).next())})}(this,void 0,void 0,function*(){try{for(n=JK(e);!(i=yield n.next()).done;)if(t.next(i.value),t.closed)return}catch(s){r={error:s}}finally{try{i&&!i.done&&(o=n.return)&&(yield o.call(n))}finally{if(r)throw r.error}}t.complete()})})(e,t).catch(n=>t.error(n))})}function $c(e,t,n,i=0,r=!1){const o=t.schedule(function(){n(),r?e.add(this.schedule(null,i)):this.unsubscribe()},i);if(e.add(o),!r)return o}function cX(e,t=0){return ei((n,i)=>{n.subscribe(yn(i,r=>$c(i,e,()=>i.next(r),t),()=>$c(i,e,()=>i.complete(),t),r=>$c(i,e,()=>i.error(r),t)))})}function uX(e,t=0){return ei((n,i)=>{i.add(e.schedule(()=>n.subscribe(i),t))})}function dX(e,t){if(!e)throw new Error("Iterable cannot be null");return new cn(n=>{$c(n,t,()=>{const i=e[Symbol.asyncIterator]();$c(n,t,()=>{i.next().then(r=>{r.done?n.complete():n.next(r.value)})},0,!0)})})}function si(e,t){return t?function Bke(e,t){if(null!=e){if(tX(e))return function Rke(e,t){return Hi(e).pipe(uX(t),cX(t))}(e,t);if(FR(e))return function Pke(e,t){return new cn(n=>{let i=0;return t.schedule(function(){i===e.length?n.complete():(n.next(e[i++]),n.closed||this.schedule())})})}(e,t);if(eX(e))return function Fke(e,t){return Hi(e).pipe(uX(t),cX(t))}(e,t);if(nX(e))return dX(e,t);if(oX(e))return function Lke(e,t){return new cn(n=>{let i;return $c(n,t,()=>{i=e[rX](),$c(n,t,()=>{let r,o;try{({value:r,done:o}=i.next())}catch(s){return void n.error(s)}o?n.complete():n.next(r)},0,!0)}),()=>Tt(i?.return)&&i.return()})}(e,t);if(aX(e))return function $ke(e,t){return dX(sX(e),t)}(e,t)}throw iX(e)}(e,t):Hi(e)}function fX(e){return e&&Tt(e.schedule)}function PR(e){return e[e.length-1]}function uD(e){return Tt(PR(e))?e.pop():void 0}function ov(e){return fX(PR(e))?e.pop():void 0}function Ge(...e){return si(e,ov(e))}const{isArray:Vke}=Array,{getPrototypeOf:Uke,prototype:zke,keys:Hke}=Object;function hX(e){if(1===e.length){const t=e[0];if(Vke(t))return{args:t,keys:null};if(function Gke(e){return e&&"object"==typeof e&&Uke(e)===zke}(t)){const n=Hke(t);return{args:n.map(i=>t[i]),keys:n}}}return{args:e,keys:null}}const{isArray:Wke}=Array;function LR(e){return at(t=>function qke(e,t){return Wke(t)?e(...t):e(t)}(e,t))}function pX(e,t){return e.reduce((n,i,r)=>(n[i]=t[r],n),{})}function $R(...e){const t=ov(e),n=uD(e),{args:i,keys:r}=hX(e);if(0===i.length)return si([],t);const o=new cn(function Yke(e,t,n=_c){return i=>{gX(t,()=>{const{length:r}=e,o=new Array(r);let s=r,a=r;for(let l=0;l{const c=si(e[l],t);let u=!1;c.subscribe(yn(i,d=>{o[l]=d,u||(u=!0,a--),a||i.next(n(o.slice()))},()=>{--s||i.complete()}))},i)},i)}}(i,t,r?s=>pX(r,s):_c));return n?o.pipe(LR(n)):o}function gX(e,t,n){e?$c(n,e,t):t()}const dD=E2(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function Ai(e,t,n=1/0){return Tt(t)?Ai((i,r)=>at((o,s)=>t(i,o,r,s))(Hi(e(i,r))),n):("number"==typeof t&&(n=t),ei((i,r)=>function Kke(e,t,n,i,r,o,s,a){const l=[];let c=0,u=0,d=!1;const f=()=>{d&&!l.length&&!c&&t.complete()},h=g=>c{o&&t.next(g),c++;let m=!1;Hi(n(g,u++)).subscribe(yn(t,_=>{r?.(_),o?h(_):t.next(_)},()=>{m=!0},void 0,()=>{if(m)try{for(c--;l.length&&cp(_)):p(_)}f()}catch(_){t.error(_)}}))};return e.subscribe(yn(t,h,()=>{d=!0,f()})),()=>{a?.()}}(i,r,e,n)))}function Yg(e=1/0){return Ai(_c,e)}function sv(...e){return function Xke(){return Yg(1)}()(si(e,ov(e)))}function mX(e){return new cn(t=>{Hi(e()).subscribe(t)})}function fD(e,t){const n=Tt(e)?e:()=>e,i=r=>r.error(n());return new cn(t?r=>t.schedule(i,0,r):i)}const jo=new cn(e=>e.complete());function BR(){return ei((e,t)=>{let n=null;e._refCount++;const i=yn(t,void 0,void 0,void 0,()=>{if(!e||e._refCount<=0||0<--e._refCount)return void(n=null);const r=e._connection,o=n;n=null,r&&(!o||r===o)&&r.unsubscribe(),t.unsubscribe()});e.subscribe(i),i.closed||(n=e.connect())})}class _X extends cn{constructor(t,n){super(),this.source=t,this.subjectFactory=n,this._subject=null,this._refCount=0,this._connection=null,YU(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:t}=this;this._subject=this._connection=null,t?.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new ar;const n=this.getSubject();t.add(this.source.subscribe(yn(n,void 0,()=>{this._teardown(),n.complete()},i=>{this._teardown(),n.error(i)},()=>this._teardown()))),t.closed&&(this._connection=null,t=ar.EMPTY)}return t}refCount(){return BR()(this)}}function Es(e,t){return ei((n,i)=>{let r=null,o=0,s=!1;const a=()=>s&&!r&&i.complete();n.subscribe(yn(i,l=>{r?.unsubscribe();let c=0;const u=o++;Hi(e(l,u)).subscribe(r=yn(i,d=>i.next(t?t(l,d,u,c++):d),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function Cs(e){return e<=0?()=>jo:ei((t,n)=>{let i=0;t.subscribe(yn(n,r=>{++i<=e&&(n.next(r),e<=i&&n.complete())}))})}function Wn(e,t){return ei((n,i)=>{let r=0;n.subscribe(yn(i,o=>e.call(t,o,r++)&&i.next(o)))})}function hD(e){return ei((t,n)=>{let i=!1;t.subscribe(yn(n,r=>{i=!0,n.next(r)},()=>{i||n.next(e),n.complete()}))})}function vX(e=Zke){return ei((t,n)=>{let i=!1;t.subscribe(yn(n,r=>{i=!0,n.next(r)},()=>i?n.complete():n.error(e())))})}function Zke(){return new dD}function Gf(e,t){const n=arguments.length>=2;return i=>i.pipe(e?Wn((r,o)=>e(r,o,i)):_c,Cs(1),n?hD(t):vX(()=>new dD))}function Kg(e,t){return Tt(t)?Ai(e,t,1):Ai(e,1)}function Gi(e,t,n){const i=Tt(e)||t||n?{next:e,error:t,complete:n}:e;return i?ei((r,o)=>{var s;null===(s=i.subscribe)||void 0===s||s.call(i);let a=!0;r.subscribe(yn(o,l=>{var c;null===(c=i.next)||void 0===c||c.call(i,l),o.next(l)},()=>{var l;a=!1,null===(l=i.complete)||void 0===l||l.call(i),o.complete()},l=>{var c;a=!1,null===(c=i.error)||void 0===c||c.call(i,l),o.error(l)},()=>{var l,c;a&&(null===(l=i.unsubscribe)||void 0===l||l.call(i)),null===(c=i.finalize)||void 0===c||c.call(i)}))}):_c}function Xg(e){return ei((t,n)=>{let o,i=null,r=!1;i=t.subscribe(yn(n,void 0,void 0,s=>{o=Hi(e(s,Xg(e)(t))),i?(i.unsubscribe(),i=null,o.subscribe(n)):r=!0})),r&&(i.unsubscribe(),i=null,o.subscribe(n))})}function jR(e){return e<=0?()=>jo:ei((t,n)=>{let i=[];t.subscribe(yn(n,r=>{i.push(r),e{for(const r of i)n.next(r);n.complete()},void 0,()=>{i=null}))})}function av(e){return ei((t,n)=>{try{t.subscribe(n)}finally{n.add(e)}})}function Wi(e){return ei((t,n)=>{Hi(e).subscribe(yn(n,()=>n.complete(),Iy)),!n.closed&&t.subscribe(n)})}const ot="primary",lv=Symbol("RouteTitle");class nOe{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const n=this.params[t];return Array.isArray(n)?n[0]:n}return null}getAll(t){if(this.has(t)){const n=this.params[t];return Array.isArray(n)?n:[n]}return[]}get keys(){return Object.keys(this.params)}}function Qg(e){return new nOe(e)}function iOe(e,t,n){const i=n.path.split("/");if(i.length>e.length||"full"===n.pathMatch&&(t.hasChildren()||i.lengthi[o]===r)}return e===t}function EX(e){return e.length>0?e[e.length-1]:null}function qu(e){return function eke(e){return!!e&&(e instanceof cn||Tt(e.lift)&&Tt(e.subscribe))}(e)?e:G0(e)?si(Promise.resolve(e)):Ge(e)}const oOe={exact:function SX(e,t,n){if(!qf(e.segments,t.segments)||!pD(e.segments,t.segments,n)||e.numberOfChildren!==t.numberOfChildren)return!1;for(const i in t.children)if(!e.children[i]||!SX(e.children[i],t.children[i],n))return!1;return!0},subset:TX},CX={exact:function sOe(e,t){return bl(e,t)},subset:function aOe(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(n=>wX(e[n],t[n]))},ignored:()=>!0};function DX(e,t,n){return oOe[n.paths](e.root,t.root,n.matrixParams)&&CX[n.queryParams](e.queryParams,t.queryParams)&&!("exact"===n.fragment&&e.fragment!==t.fragment)}function TX(e,t,n){return xX(e,t,t.segments,n)}function xX(e,t,n,i){if(e.segments.length>n.length){const r=e.segments.slice(0,n.length);return!(!qf(r,n)||t.hasChildren()||!pD(r,n,i))}if(e.segments.length===n.length){if(!qf(e.segments,n)||!pD(e.segments,n,i))return!1;for(const r in t.children)if(!e.children[r]||!TX(e.children[r],t.children[r],i))return!1;return!0}{const r=n.slice(0,e.segments.length),o=n.slice(e.segments.length);return!!(qf(e.segments,r)&&pD(e.segments,r,i)&&e.children[ot])&&xX(e.children[ot],t,o,i)}}function pD(e,t,n){return t.every((i,r)=>CX[n](e[r].parameters,i.parameters))}class Wf{constructor(t=new Xt([],{}),n={},i=null){this.root=t,this.queryParams=n,this.fragment=i}get queryParamMap(){return this._queryParamMap??=Qg(this.queryParams),this._queryParamMap}toString(){return uOe.serialize(this)}}class Xt{constructor(t,n){this.segments=t,this.children=n,this.parent=null,Object.values(n).forEach(i=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return mD(this)}}class cv{constructor(t,n){this.path=t,this.parameters=n}get parameterMap(){return this._parameterMap??=Qg(this.parameters),this._parameterMap}toString(){return NX(this)}}function qf(e,t){return e.length===t.length&&e.every((n,i)=>n.path===t[i].path)}let Zg=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:()=>new gD,providedIn:"root"})}}return e})();class gD{parse(t){const n=new wOe(t);return new Wf(n.parseRootSegment(),n.parseQueryParams(),n.parseFragment())}serialize(t){const n=`/${uv(t.root,!0)}`,i=function hOe(e){const t=Object.entries(e).map(([n,i])=>Array.isArray(i)?i.map(r=>`${_D(n)}=${_D(r)}`).join("&"):`${_D(n)}=${_D(i)}`).filter(n=>n);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${n}${i}${"string"==typeof t.fragment?`#${function dOe(e){return encodeURI(e)}(t.fragment)}`:""}`}}const uOe=new gD;function mD(e){return e.segments.map(t=>NX(t)).join("/")}function uv(e,t){if(!e.hasChildren())return mD(e);if(t){const n=e.children[ot]?uv(e.children[ot],!1):"",i=[];return Object.entries(e.children).forEach(([r,o])=>{r!==ot&&i.push(`${r}:${uv(o,!1)}`)}),i.length>0?`${n}(${i.join("//")})`:n}{const n=function cOe(e,t){let n=[];return Object.entries(e.children).forEach(([i,r])=>{i===ot&&(n=n.concat(t(r,i)))}),Object.entries(e.children).forEach(([i,r])=>{i!==ot&&(n=n.concat(t(r,i)))}),n}(e,(i,r)=>r===ot?[uv(e.children[ot],!1)]:[`${r}:${uv(i,!1)}`]);return 1===Object.keys(e.children).length&&null!=e.children[ot]?`${mD(e)}/${n[0]}`:`${mD(e)}/(${n.join("//")})`}}function AX(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function _D(e){return AX(e).replace(/%3B/gi,";")}function UR(e){return AX(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function yD(e){return decodeURIComponent(e)}function MX(e){return yD(e.replace(/\+/g,"%20"))}function NX(e){return`${UR(e.path)}${function fOe(e){return Object.entries(e).map(([t,n])=>`;${UR(t)}=${UR(n)}`).join("")}(e.parameters)}`}const pOe=/^[^\/()?;#]+/;function zR(e){const t=e.match(pOe);return t?t[0]:""}const gOe=/^[^\/()?;=#]+/,_Oe=/^[^=?&#]+/,vOe=/^[^&#]+/;class wOe{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Xt([],{}):new Xt([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let n={};this.peekStartsWith("/(")&&(this.capture("/"),n=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(t.length>0||Object.keys(n).length>0)&&(i[ot]=new Xt(t,n)),i}parseSegment(){const t=zR(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new q(4009,!1);return this.capture(t),new cv(yD(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const n=function mOe(e){const t=e.match(gOe);return t?t[0]:""}(this.remaining);if(!n)return;this.capture(n);let i="";if(this.consumeOptional("=")){const r=zR(this.remaining);r&&(i=r,this.capture(i))}t[yD(n)]=yD(i)}parseQueryParam(t){const n=function yOe(e){const t=e.match(_Oe);return t?t[0]:""}(this.remaining);if(!n)return;this.capture(n);let i="";if(this.consumeOptional("=")){const s=function bOe(e){const t=e.match(vOe);return t?t[0]:""}(this.remaining);s&&(i=s,this.capture(i))}const r=MX(n),o=MX(i);if(t.hasOwnProperty(r)){let s=t[r];Array.isArray(s)||(s=[s],t[r]=s),s.push(o)}else t[r]=o}parseParens(t){const n={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=zR(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new q(4010,!1);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):t&&(o=ot);const s=this.parseChildren();n[o]=1===Object.keys(s).length?s[ot]:new Xt([],s),this.consumeOptional("//")}return n}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new q(4011,!1)}}function IX(e){return e.segments.length>0?new Xt([],{[ot]:e}):e}function kX(e){const t={};for(const[i,r]of Object.entries(e.children)){const o=kX(r);if(i===ot&&0===o.segments.length&&o.hasChildren())for(const[s,a]of Object.entries(o.children))t[s]=a;else(o.segments.length>0||o.hasChildren())&&(t[i]=o)}return function EOe(e){if(1===e.numberOfChildren&&e.children[ot]){const t=e.children[ot];return new Xt(e.segments.concat(t.segments),t.children)}return e}(new Xt(e.segments,t))}function Yf(e){return e instanceof Wf}function OX(e){let t;const r=IX(function n(o){const s={};for(const l of o.children){const c=n(l);s[l.outlet]=c}const a=new Xt(o.url,s);return o===e&&(t=a),a}(e.root));return t??r}function RX(e,t,n,i){let r=e;for(;r.parent;)r=r.parent;if(0===t.length)return HR(r,r,r,n,i);const o=function DOe(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new PX(!0,0,e);let t=0,n=!1;const i=e.reduce((r,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Object.entries(o.outlets).forEach(([l,c])=>{a[l]="string"==typeof c?c.split("/"):c}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return"string"!=typeof o?[...r,o]:0===s?(o.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?n=!0:".."===a?t++:""!=a&&r.push(a))}),r):[...r,o]},[]);return new PX(n,t,i)}(t);if(o.toRoot())return HR(r,r,new Xt([],{}),n,i);const s=function SOe(e,t,n){if(e.isAbsolute)return new bD(t,!0,0);if(!n)return new bD(t,!1,NaN);if(null===n.parent)return new bD(n,!0,0);const i=vD(e.commands[0])?0:1;return function TOe(e,t,n){let i=e,r=t,o=n;for(;o>r;){if(o-=r,i=i.parent,!i)throw new q(4005,!1);r=i.segments.length}return new bD(i,!1,r-o)}(n,n.segments.length-1+i,e.numberOfDoubleDots)}(o,r,e),a=s.processChildren?fv(s.segmentGroup,s.index,o.commands):LX(s.segmentGroup,s.index,o.commands);return HR(r,s.segmentGroup,a,n,i)}function vD(e){return"object"==typeof e&&null!=e&&!e.outlets&&!e.segmentPath}function dv(e){return"object"==typeof e&&null!=e&&e.outlets}function HR(e,t,n,i,r){let s,o={};i&&Object.entries(i).forEach(([l,c])=>{o[l]=Array.isArray(c)?c.map(u=>`${u}`):`${c}`}),s=e===t?n:FX(e,t,n);const a=IX(kX(s));return new Wf(a,o,r)}function FX(e,t,n){const i={};return Object.entries(e.children).forEach(([r,o])=>{i[r]=o===t?n:FX(o,t,n)}),new Xt(e.segments,i)}class PX{constructor(t,n,i){if(this.isAbsolute=t,this.numberOfDoubleDots=n,this.commands=i,t&&i.length>0&&vD(i[0]))throw new q(4003,!1);const r=i.find(dv);if(r&&r!==EX(i))throw new q(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class bD{constructor(t,n,i){this.segmentGroup=t,this.processChildren=n,this.index=i}}function LX(e,t,n){if(e??=new Xt([],{}),0===e.segments.length&&e.hasChildren())return fv(e,t,n);const i=function AOe(e,t,n){let i=0,r=t;const o={match:!1,pathIndex:0,commandIndex:0};for(;r=n.length)return o;const s=e.segments[r],a=n[i];if(dv(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!BX(l,c,s))return o;i+=2}else{if(!BX(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(e,t,n),r=n.slice(i.commandIndex);if(i.match&&i.pathIndexo!==ot)&&e.children[ot]&&1===e.numberOfChildren&&0===e.children[ot].segments.length){const o=fv(e.children[ot],t,n);return new Xt(e.segments,o.children)}return Object.entries(i).forEach(([o,s])=>{"string"==typeof s&&(s=[s]),null!==s&&(r[o]=LX(e.children[o],t,s))}),Object.entries(e.children).forEach(([o,s])=>{void 0===i[o]&&(r[o]=s)}),new Xt(e.segments,r)}}function GR(e,t,n){const i=e.segments.slice(0,t);let r=0;for(;r{"string"==typeof i&&(i=[i]),null!==i&&(t[n]=GR(new Xt([],{}),0,i))}),t}function $X(e){const t={};return Object.entries(e).forEach(([n,i])=>t[n]=`${i}`),t}function BX(e,t,n){return e==n.path&&bl(t,n.parameters)}const hv="imperative";var _t=function(e){return e[e.NavigationStart=0]="NavigationStart",e[e.NavigationEnd=1]="NavigationEnd",e[e.NavigationCancel=2]="NavigationCancel",e[e.NavigationError=3]="NavigationError",e[e.RoutesRecognized=4]="RoutesRecognized",e[e.ResolveStart=5]="ResolveStart",e[e.ResolveEnd=6]="ResolveEnd",e[e.GuardsCheckStart=7]="GuardsCheckStart",e[e.GuardsCheckEnd=8]="GuardsCheckEnd",e[e.RouteConfigLoadStart=9]="RouteConfigLoadStart",e[e.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",e[e.ChildActivationStart=11]="ChildActivationStart",e[e.ChildActivationEnd=12]="ChildActivationEnd",e[e.ActivationStart=13]="ActivationStart",e[e.ActivationEnd=14]="ActivationEnd",e[e.Scroll=15]="Scroll",e[e.NavigationSkipped=16]="NavigationSkipped",e}(_t||{});class wl{constructor(t,n){this.id=t,this.url=n}}class wD extends wl{constructor(t,n,i="imperative",r=null){super(t,n),this.type=_t.NavigationStart,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class El extends wl{constructor(t,n,i){super(t,n),this.urlAfterRedirects=i,this.type=_t.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}var Vo=function(e){return e[e.Redirect=0]="Redirect",e[e.SupersededByNewNavigation=1]="SupersededByNewNavigation",e[e.NoDataFromResolver=2]="NoDataFromResolver",e[e.GuardRejected=3]="GuardRejected",e}(Vo||{}),ED=function(e){return e[e.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",e[e.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",e}(ED||{});class Kf extends wl{constructor(t,n,i,r){super(t,n),this.reason=i,this.code=r,this.type=_t.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Jg extends wl{constructor(t,n,i,r){super(t,n),this.reason=i,this.code=r,this.type=_t.NavigationSkipped}}class WR extends wl{constructor(t,n,i,r){super(t,n),this.error=i,this.target=r,this.type=_t.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class jX extends wl{constructor(t,n,i,r){super(t,n),this.urlAfterRedirects=i,this.state=r,this.type=_t.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class NOe extends wl{constructor(t,n,i,r){super(t,n),this.urlAfterRedirects=i,this.state=r,this.type=_t.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class IOe extends wl{constructor(t,n,i,r,o){super(t,n),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o,this.type=_t.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class kOe extends wl{constructor(t,n,i,r){super(t,n),this.urlAfterRedirects=i,this.state=r,this.type=_t.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class OOe extends wl{constructor(t,n,i,r){super(t,n),this.urlAfterRedirects=i,this.state=r,this.type=_t.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class ROe{constructor(t){this.route=t,this.type=_t.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class FOe{constructor(t){this.route=t,this.type=_t.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class POe{constructor(t){this.snapshot=t,this.type=_t.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class LOe{constructor(t){this.snapshot=t,this.type=_t.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class $Oe{constructor(t){this.snapshot=t,this.type=_t.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class qR{constructor(t){this.snapshot=t,this.type=_t.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class VX{constructor(t,n,i){this.routerEvent=t,this.position=n,this.anchor=i,this.type=_t.Scroll}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class YR{}class CD{constructor(t,n){this.url=t,this.navigationBehaviorOptions=n}}function ma(e){return e.outlet||ot}function pv(e){if(!e)return null;if(e.routeConfig?._injector)return e.routeConfig._injector;for(let t=e.parent;t;t=t.parent){const n=t.routeConfig;if(n?._loadedInjector)return n._loadedInjector;if(n?._injector)return n._injector}return null}class HOe{get injector(){return pv(this.route?.snapshot)??this.rootInjector}set injector(t){}constructor(t){this.rootInjector=t,this.outlet=null,this.route=null,this.children=new gv(this.rootInjector),this.attachRef=null}}let gv=(()=>{class e{constructor(n){this.rootInjector=n,this.contexts=new Map}onChildOutletCreated(n,i){const r=this.getOrCreateContext(n);r.outlet=i,this.contexts.set(n,r)}onChildOutletDestroyed(n){const i=this.getContext(n);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let i=this.getContext(n);return i||(i=new HOe(this.rootInjector),this.contexts.set(n,i)),i}getContext(n){return this.contexts.get(n)||null}static{this.\u0275fac=function(i){return new(i||e)(Ne(ji))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();class UX{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const n=this.pathFromRoot(t);return n.length>1?n[n.length-2]:null}children(t){const n=KR(t,this._root);return n?n.children.map(i=>i.value):[]}firstChild(t){const n=KR(t,this._root);return n&&n.children.length>0?n.children[0].value:null}siblings(t){const n=XR(t,this._root);return n.length<2?[]:n[n.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return XR(t,this._root).map(n=>n.value)}}function KR(e,t){if(e===t.value)return t;for(const n of t.children){const i=KR(e,n);if(i)return i}return null}function XR(e,t){if(e===t.value)return[t];for(const n of t.children){const i=XR(e,n);if(i.length)return i.unshift(t),i}return[]}class _a{constructor(t,n){this.value=t,this.children=n}toString(){return`TreeNode(${this.value})`}}function em(e){const t={};return e&&e.children.forEach(n=>t[n.value.outlet]=n),t}class zX extends UX{constructor(t,n){super(t),this.snapshot=n,QR(this,t)}toString(){return this.snapshot.toString()}}function HX(e){const t=function GOe(e){const o=new SD([],{},{},"",{},ot,e,null,{});return new GX("",new _a(o,[]))}(e),n=new ps([new cv("",{})]),i=new ps({}),r=new ps({}),o=new ps({}),s=new ps(""),a=new Cl(n,i,o,s,r,ot,e,t.root);return a.snapshot=t.root,new zX(new _a(a,[]),t)}class Cl{constructor(t,n,i,r,o,s,a,l){this.urlSubject=t,this.paramsSubject=n,this.queryParamsSubject=i,this.fragmentSubject=r,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=l,this.title=this.dataSubject?.pipe(at(c=>c[lv]))??Ge(void 0),this.url=t,this.params=n,this.queryParams=i,this.fragment=r,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(at(t=>Qg(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(at(t=>Qg(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function DD(e,t,n="emptyOnly"){let i;const{routeConfig:r}=e;return i=null===t||"always"!==n&&""!==r?.path&&(t.component||t.routeConfig?.loadComponent)?{params:{...e.params},data:{...e.data},resolve:{...e.data,...e._resolvedData??{}}}:{params:{...t.params,...e.params},data:{...t.data,...e.data},resolve:{...e.data,...t.data,...r?.data,...e._resolvedData}},r&&qX(r)&&(i.resolve[lv]=r.title),i}class SD{get title(){return this.data?.[lv]}constructor(t,n,i,r,o,s,a,l,c){this.url=t,this.params=n,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=Qg(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Qg(this.queryParams),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class GX extends UX{constructor(t,n){super(n),this.url=t,QR(this,n)}toString(){return WX(this._root)}}function QR(e,t){t.value._routerState=e,t.children.forEach(n=>QR(e,n))}function WX(e){const t=e.children.length>0?` { ${e.children.map(WX).join(", ")} } `:"";return`${e.value}${t}`}function ZR(e){if(e.snapshot){const t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,bl(t.queryParams,n.queryParams)||e.queryParamsSubject.next(n.queryParams),t.fragment!==n.fragment&&e.fragmentSubject.next(n.fragment),bl(t.params,n.params)||e.paramsSubject.next(n.params),function rOe(e,t){if(e.length!==t.length)return!1;for(let n=0;nbl(n.parameters,t[i].parameters))}(e.url,t.url);return n&&!(!e.parent!=!t.parent)&&(!e.parent||JR(e.parent,t.parent))}function qX(e){return"string"==typeof e.title||null===e.title}let eF=(()=>{class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=ot,this.activateEvents=new ze,this.deactivateEvents=new ze,this.attachEvents=new ze,this.detachEvents=new ze,this.parentContexts=L(gv),this.location=L(Po),this.changeDetector=L(ha),this.inputBinder=L(TD,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(n){if(n.name){const{firstChange:i,previousValue:r}=n.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new q(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new q(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new q(4012,!1);this.location.detach();const n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,i){this.activated=n,this._activatedRoute=i,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){const n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,i){if(this.isActivated)throw new q(4013,!1);this._activatedRoute=n;const r=this.location,s=n.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new tF(n,a,r.injector);this.activated=r.createComponent(s,{index:r.length,injector:l,environmentInjector:i}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=be({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Ui]})}}return e})();class tF{__ngOutletInjector(t){return new tF(this.route,this.childContexts,t)}constructor(t,n,i){this.route=t,this.childContexts=n,this.parent=i}get(t,n){return t===Cl?this.route:t===gv?this.childContexts:this.parent.get(t,n)}}const TD=new _e("");let YX=(()=>{class e{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(n){this.unsubscribeFromRouteData(n),this.subscribeToRouteData(n)}unsubscribeFromRouteData(n){this.outletDataSubscriptions.get(n)?.unsubscribe(),this.outletDataSubscriptions.delete(n)}subscribeToRouteData(n){const{activatedRoute:i}=n,r=$R([i.queryParams,i.params,i.data]).pipe(Es(([o,s,a],l)=>(a={...o,...s,...a},0===l?Ge(a):Promise.resolve(a)))).subscribe(o=>{if(!n.isActivated||!n.activatedComponentRef||n.activatedRoute!==i||null===i.component)return void this.unsubscribeFromRouteData(n);const s=function MNe(e){const t=ut(e);if(!t)return null;const n=new C0(t);return{get selector(){return n.selector},get type(){return n.componentType},get inputs(){return n.inputs},get outputs(){return n.outputs},get ngContentSelectors(){return n.ngContentSelectors},get isStandalone(){return t.standalone},get isSignal(){return t.signals}}}(i.component);if(s)for(const{templateName:a}of s.inputs)n.activatedComponentRef.setInput(a,o[a]);else this.unsubscribeFromRouteData(n)});this.outletDataSubscriptions.set(n,r)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();function mv(e,t,n){if(n&&e.shouldReuseRoute(t.value,n.value.snapshot)){const i=n.value;i._futureSnapshot=t.value;const r=function qOe(e,t,n){return t.children.map(i=>{for(const r of n.children)if(e.shouldReuseRoute(i.value,r.value.snapshot))return mv(e,i,r);return mv(e,i)})}(e,t,n);return new _a(i,r)}{if(e.shouldAttach(t.value)){const o=e.retrieve(t.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=t.value,s.children=t.children.map(a=>mv(e,a)),s}}const i=function YOe(e){return new Cl(new ps(e.url),new ps(e.params),new ps(e.queryParams),new ps(e.fragment),new ps(e.data),e.outlet,e.component,e)}(t.value),r=t.children.map(o=>mv(e,o));return new _a(i,r)}}class nF{constructor(t,n){this.redirectTo=t,this.navigationBehaviorOptions=n}}const KX="ngNavigationCancelingError";function xD(e,t){const{redirectTo:n,navigationBehaviorOptions:i}=Yf(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=XX(!1,Vo.Redirect);return r.url=n,r.navigationBehaviorOptions=i,r}function XX(e,t){const n=new Error(`NavigationCancelingError: ${e||""}`);return n[KX]=!0,n.cancellationCode=t,n}function QX(e){return!!e&&e[KX]}class QOe{constructor(t,n,i,r,o){this.routeReuseStrategy=t,this.futureState=n,this.currState=i,this.forwardEvent=r,this.inputBindingEnabled=o}activate(t){const n=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(n,i,t),ZR(this.futureState.root),this.activateChildRoutes(n,i,t)}deactivateChildRoutes(t,n,i){const r=em(n);t.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Object.values(r).forEach(o=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(t,n,i){const r=t.value,o=n?n.value:null;if(r===o)if(r.component){const s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(t,n,s.children)}else this.deactivateChildRoutes(t,n,i);else o&&this.deactivateRouteAndItsChildren(n,i)}deactivateRouteAndItsChildren(t,n){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,n):this.deactivateRouteAndOutlet(t,n)}detachAndStoreRouteSubtree(t,n){const i=n.getContext(t.value.outlet),r=i&&t.value.component?i.children:n,o=em(t);for(const s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);if(i&&i.outlet){const s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,n){const i=n.getContext(t.value.outlet),r=i&&t.value.component?i.children:n,o=em(t);for(const s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.route=null)}activateChildRoutes(t,n,i){const r=em(n);t.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new qR(o.value.snapshot))}),t.children.length&&this.forwardEvent(new LOe(t.value.snapshot))}activateRoutes(t,n,i){const r=t.value,o=n?n.value:null;if(ZR(r),r===o)if(r.component){const s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(t,n,s.children)}else this.activateChildRoutes(t,n,i);else if(r.component){const s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),ZR(a.route.value),this.activateChildRoutes(t,null,s.children)}else s.attachRef=null,s.route=r,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(t,null,s.children)}else this.activateChildRoutes(t,null,i)}}class ZX{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class AD{constructor(t,n){this.component=t,this.route=n}}function ZOe(e,t,n){const i=e._root;return _v(i,t?t._root:null,n,[i.value])}function tm(e,t){const n=Symbol(),i=t.get(e,n);return i===n?"function"!=typeof e||function a1e(e){return null!==Zw(e)}(e)?t.get(e):e:i}function _v(e,t,n,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=em(t);return e.children.forEach(s=>{(function eRe(e,t,n,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=e.value,s=t?t.value:null,a=n?n.getContext(e.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function tRe(e,t,n){if("function"==typeof n)return n(e,t);switch(n){case"pathParamsChange":return!qf(e.url,t.url);case"pathParamsOrQueryParamsChange":return!qf(e.url,t.url)||!bl(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!JR(e,t)||!bl(e.queryParams,t.queryParams);default:return!JR(e,t)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new ZX(i)):(o.data=s.data,o._resolvedData=s._resolvedData),_v(e,t,o.component?a?a.children:null:n,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new AD(a.outlet.component,s))}else s&&yv(t,a,r),r.canActivateChecks.push(new ZX(i)),_v(e,null,o.component?a?a.children:null:n,i,r)})(s,o[s.value.outlet],n,i.concat([s.value]),r),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>yv(a,n.getContext(s),r)),r}function yv(e,t,n){const i=em(e),r=e.value;Object.entries(i).forEach(([o,s])=>{yv(s,r.component?t?t.children.getContext(o):null:t,n)}),n.canDeactivateChecks.push(new AD(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function vv(e){return"function"==typeof e}function JX(e){return e instanceof dD||"EmptyError"===e?.name}const MD=Symbol("INITIAL_VALUE");function nm(){return Es(e=>$R(e.map(t=>t.pipe(Cs(1),function yX(...e){const t=ov(e);return ei((n,i)=>{(t?sv(e,n,t):sv(e,n)).subscribe(i)})}(MD)))).pipe(at(t=>{for(const n of t)if(!0!==n){if(n===MD)return MD;if(!1===n||lRe(n))return n}return!0}),Wn(t=>t!==MD),Cs(1)))}function lRe(e){return Yf(e)||e instanceof nF}function eQ(e){return function Qve(...e){return GU(e)}(Gi(t=>{if("boolean"!=typeof t)throw xD(0,t)}),at(t=>!0===t))}class iF{constructor(t){this.segmentGroup=t||null}}class ND extends Error{constructor(t){super(),this.urlTree=t}}function im(e){return fD(new iF(e))}class wRe{constructor(t,n){this.urlSerializer=t,this.urlTree=n}lineralizeSegments(t,n){let i=[],r=n.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return Ge(i);if(r.numberOfChildren>1||!r.children[ot])return fD(new q(4e3,!1));r=r.children[ot]}}applyRedirectCommands(t,n,i,r,o){if("string"!=typeof n){const a=n,{queryParams:l,fragment:c,routeConfig:u,url:d,outlet:f,params:h,data:p,title:g}=r,m=ol(o,()=>a({params:h,data:p,queryParams:l,fragment:c,routeConfig:u,url:d,outlet:f,title:g}));if(m instanceof Wf)throw new ND(m);n=m}const s=this.applyRedirectCreateUrlTree(n,this.urlSerializer.parse(n),t,i);if("/"===n[0])throw new ND(s);return s}applyRedirectCreateUrlTree(t,n,i,r){const o=this.createSegmentGroup(t,n.root,i,r);return new Wf(o,this.createQueryParams(n.queryParams,this.urlTree.queryParams),n.fragment)}createQueryParams(t,n){const i={};return Object.entries(t).forEach(([r,o])=>{if("string"==typeof o&&":"===o[0]){const a=o.substring(1);i[r]=n[a]}else i[r]=o}),i}createSegmentGroup(t,n,i,r){const o=this.createSegments(t,n.segments,i,r);let s={};return Object.entries(n.children).forEach(([a,l])=>{s[a]=this.createSegmentGroup(t,l,i,r)}),new Xt(o,s)}createSegments(t,n,i,r){return n.map(o=>":"===o.path[0]?this.findPosParam(t,o,r):this.findOrReturn(o,i))}findPosParam(t,n,i){const r=i[n.path.substring(1)];if(!r)throw new q(4001,!1);return r}findOrReturn(t,n){let i=0;for(const r of n){if(r.path===t.path)return n.splice(i),r;i++}return t}}const rF={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function ERe(e,t,n,i,r){const o=tQ(e,t,n);return o.matched?(i=function BOe(e,t){return e.providers&&!e._injector&&(e._injector=hC(e.providers,t,`Route: ${e.path}`)),e._injector??t}(t,i),function yRe(e,t,n,i){const r=t.canMatch;return r&&0!==r.length?Ge(r.map(s=>{const a=tm(s,e);return qu(function aRe(e){return e&&vv(e.canMatch)}(a)?a.canMatch(t,n):ol(e,()=>a(t,n)))})).pipe(nm(),eQ()):Ge(!0)}(i,t,n).pipe(at(s=>!0===s?o:{...rF}))):Ge(o)}function tQ(e,t,n){if("**"===t.path)return function CRe(e){return{matched:!0,parameters:e.length>0?EX(e).parameters:{},consumedSegments:e,remainingSegments:[],positionalParamSegments:{}}}(n);if(""===t.path)return"full"===t.pathMatch&&(e.hasChildren()||n.length>0)?{...rF}:{matched:!0,consumedSegments:[],remainingSegments:n,parameters:{},positionalParamSegments:{}};const r=(t.matcher||iOe)(n,e,t);if(!r)return{...rF};const o={};Object.entries(r.posParams??{}).forEach(([a,l])=>{o[a]=l.path});const s=r.consumed.length>0?{...o,...r.consumed[r.consumed.length-1].parameters}:o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:n.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function nQ(e,t,n,i){return n.length>0&&function TRe(e,t,n){return n.some(i=>ID(e,t,i)&&ma(i)!==ot)}(e,n,i)?{segmentGroup:new Xt(t,SRe(i,new Xt(n,e.children))),slicedSegments:[]}:0===n.length&&function xRe(e,t,n){return n.some(i=>ID(e,t,i))}(e,n,i)?{segmentGroup:new Xt(e.segments,DRe(e,n,i,e.children)),slicedSegments:n}:{segmentGroup:new Xt(e.segments,e.children),slicedSegments:n}}function DRe(e,t,n,i){const r={};for(const o of n)if(ID(e,t,o)&&!i[ma(o)]){const s=new Xt([],{});r[ma(o)]=s}return{...i,...r}}function SRe(e,t){const n={};n[ot]=t;for(const i of e)if(""===i.path&&ma(i)!==ot){const r=new Xt([],{});n[ma(i)]=r}return n}function ID(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path}class MRe{}class kRe{constructor(t,n,i,r,o,s,a){this.injector=t,this.configLoader=n,this.rootComponentType=i,this.config=r,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new wRe(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(t){return new q(4002,`'${t.segmentGroup}'`)}recognize(){const t=nQ(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe(at(({children:n,rootSnapshot:i})=>{const r=new _a(i,n),o=new GX("",r),s=function COe(e,t,n=null,i=null){return RX(OX(e),t,n,i)}(i,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(t){const n=new SD([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,Object.freeze({}),ot,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,t,ot,n).pipe(at(i=>({children:i,rootSnapshot:n})),Xg(i=>{if(i instanceof ND)return this.urlTree=i.urlTree,this.match(i.urlTree.root);throw i instanceof iF?this.noMatchError(i):i}))}processSegmentGroup(t,n,i,r,o){return 0===i.segments.length&&i.hasChildren()?this.processChildren(t,n,i,o):this.processSegment(t,n,i,i.segments,r,!0,o).pipe(at(s=>s instanceof _a?[s]:[]))}processChildren(t,n,i,r){const o=[];for(const s of Object.keys(i.children))"primary"===s?o.unshift(s):o.push(s);return si(o).pipe(Kg(s=>{const a=i.children[s],l=function zOe(e,t){const n=e.filter(i=>ma(i)===t);return n.push(...e.filter(i=>ma(i)!==t)),n}(n,s);return this.processSegmentGroup(t,l,a,s,r)}),function eOe(e,t){return ei(function Jke(e,t,n,i,r){return(o,s)=>{let a=n,l=t,c=0;o.subscribe(yn(s,u=>{const d=c++;l=a?e(l,u,d):(a=!0,u),i&&s.next(l)},r&&(()=>{a&&s.next(l),s.complete()})))}}(e,t,arguments.length>=2,!0))}((s,a)=>(s.push(...a),s)),hD(null),function tOe(e,t){const n=arguments.length>=2;return i=>i.pipe(e?Wn((r,o)=>e(r,o,i)):_c,jR(1),n?hD(t):vX(()=>new dD))}(),Ai(s=>{if(null===s)return im(i);const a=iQ(s);return function ORe(e){e.sort((t,n)=>t.value.outlet===ot?-1:n.value.outlet===ot?1:t.value.outlet.localeCompare(n.value.outlet))}(a),Ge(a)}))}processSegment(t,n,i,r,o,s,a){return si(n).pipe(Kg(l=>this.processSegmentAgainstRoute(l._injector??t,n,l,i,r,o,s,a).pipe(Xg(c=>{if(c instanceof iF)return Ge(null);throw c}))),Gf(l=>!!l),Xg(l=>{if(JX(l))return function ARe(e,t,n){return 0===t.length&&!e.children[n]}(i,r,o)?Ge(new MRe):im(i);throw l}))}processSegmentAgainstRoute(t,n,i,r,o,s,a,l){return ma(i)===s||s!==ot&&ID(r,o,i)?void 0===i.redirectTo?this.matchSegmentAgainstRoute(t,r,i,o,s,l):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(t,r,n,i,o,s,l):im(r):im(r)}expandSegmentAgainstRouteUsingRedirect(t,n,i,r,o,s,a){const{matched:l,parameters:c,consumedSegments:u,positionalParamSegments:d,remainingSegments:f}=tQ(n,r,o);if(!l)return im(n);"string"==typeof r.redirectTo&&"/"===r.redirectTo[0]&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>31&&(this.allowRedirects=!1));const h=new SD(o,c,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,rQ(r),ma(r),r.component??r._loadedComponent??null,r,oQ(r)),p=DD(h,a,this.paramsInheritanceStrategy);h.params=Object.freeze(p.params),h.data=Object.freeze(p.data);const g=this.applyRedirects.applyRedirectCommands(u,r.redirectTo,d,h,t);return this.applyRedirects.lineralizeSegments(r,g).pipe(Ai(m=>this.processSegment(t,i,n,m.concat(f),s,!1,a)))}matchSegmentAgainstRoute(t,n,i,r,o,s){const a=ERe(n,i,r,t);return"**"===i.path&&(n.children={}),a.pipe(Es(l=>l.matched?this.getChildConfig(t=i._injector??t,i,r).pipe(Es(({routes:c})=>{const u=i._loadedInjector??t,{parameters:d,consumedSegments:f,remainingSegments:h}=l,p=new SD(f,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,rQ(i),ma(i),i.component??i._loadedComponent??null,i,oQ(i)),g=DD(p,s,this.paramsInheritanceStrategy);p.params=Object.freeze(g.params),p.data=Object.freeze(g.data);const{segmentGroup:m,slicedSegments:_}=nQ(n,f,h,c);if(0===_.length&&m.hasChildren())return this.processChildren(u,c,m,p).pipe(at(v=>new _a(p,v)));if(0===c.length&&0===_.length)return Ge(new _a(p,[]));const y=ma(i)===o;return this.processSegment(u,c,m,_,y?ot:o,!0,p).pipe(at(v=>new _a(p,v instanceof _a?[v]:[])))})):im(n)))}getChildConfig(t,n,i){return n.children?Ge({routes:n.children,injector:t}):n.loadChildren?void 0!==n._loadedRoutes?Ge({routes:n._loadedRoutes,injector:n._loadedInjector}):function _Re(e,t,n,i){const r=t.canLoad;return void 0===r||0===r.length?Ge(!0):Ge(r.map(s=>{const a=tm(s,e);return qu(function iRe(e){return e&&vv(e.canLoad)}(a)?a.canLoad(t,n):ol(e,()=>a(t,n)))})).pipe(nm(),eQ())}(t,n,i).pipe(Ai(r=>r?this.configLoader.loadChildren(t,n).pipe(Gi(o=>{n._loadedRoutes=o.routes,n._loadedInjector=o.injector})):function bRe(){return fD(XX(!1,Vo.GuardRejected))}())):Ge({routes:[],injector:t})}}function RRe(e){const t=e.value.routeConfig;return t&&""===t.path}function iQ(e){const t=[],n=new Set;for(const i of e){if(!RRe(i)){t.push(i);continue}const r=t.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==r?(r.children.push(...i.children),n.add(r)):t.push(i)}for(const i of n){const r=iQ(i.children);t.push(new _a(i.value,r))}return t.filter(i=>!n.has(i))}function rQ(e){return e.data||{}}function oQ(e){return e.resolve||{}}function PRe(e,t){return Ai(n=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=n;if(!r.length)return Ge(n);const o=new Set(r.map(l=>l.route)),s=new Set;for(const l of o)if(!s.has(l))for(const c of sQ(l))s.add(c);let a=0;return si(s).pipe(Kg(l=>o.has(l)?function LRe(e,t,n,i){const r=e.routeConfig,o=e._resolve;return void 0!==r?.title&&!qX(r)&&(o[lv]=r.title),function $Re(e,t,n,i){const r=VR(e);if(0===r.length)return Ge({});const o={};return si(r).pipe(Ai(s=>function BRe(e,t,n,i){const r=pv(t)??i,o=tm(e,r);return qu(o.resolve?o.resolve(t,n):ol(r,()=>o(t,n)))}(e[s],t,n,i).pipe(Gf(),Gi(a=>{if(a instanceof nF)throw xD(new gD,a);o[s]=a}))),jR(1),function bX(e){return at(()=>e)}(o),Xg(s=>JX(s)?jo:fD(s)))}(o,e,t,i).pipe(at(s=>(e._resolvedData=s,e.data=DD(e,e.parent,n).resolve,null)))}(l,i,e,t):(l.data=DD(l,l.parent,e).resolve,Ge(void 0))),Gi(()=>a++),jR(1),Ai(l=>a===s.size?Ge(n):jo))})}function sQ(e){const t=e.children.map(n=>sQ(n)).flat();return[e,...t]}function oF(e){return Es(t=>{const n=e(t);return n?si(n).pipe(at(()=>t)):Ge(t)})}let aQ=(()=>{class e{buildTitle(n){let i,r=n.root;for(;void 0!==r;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(o=>o.outlet===ot);return i}getResolvedTitleForRoute(n){return n.data[lv]}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:()=>L(jRe),providedIn:"root"})}}return e})(),jRe=(()=>{class e extends aQ{constructor(n){super(),this.title=n}updateTitle(n){const i=this.buildTitle(n);void 0!==i&&this.title.setTitle(i)}static{this.\u0275fac=function(i){return new(i||e)(Ne(MR))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const rm=new _e("",{providedIn:"root",factory:()=>({})});let lQ=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=Cn({type:e,selectors:[["ng-component"]],standalone:!0,features:[da],decls:1,vars:0,template:function(i,r){1&i&&Ke(0,"router-outlet")},dependencies:[eF],encapsulation:2})}}return e})();function sF(e){const t=e.children&&e.children.map(sF),n=t?{...e,children:t}:{...e};return!n.component&&!n.loadComponent&&(t||n.loadChildren)&&n.outlet&&n.outlet!==ot&&(n.component=lQ),n}const om=new _e("");let aF=(()=>{class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=L(dY)}loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return Ge(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);const i=qu(n.loadComponent()).pipe(at(cQ),Gi(o=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=o}),av(()=>{this.componentLoaders.delete(n)})),r=new _X(i,()=>new tn).pipe(BR());return this.componentLoaders.set(n,r),r}loadChildren(n,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return Ge({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const o=function VRe(e,t,n,i){return qu(e.loadChildren()).pipe(at(cQ),Ai(r=>r instanceof SG||Array.isArray(r)?Ge(r):si(t.compileModuleAsync(r))),at(r=>{i&&i(e);let o,s,a=!1;return Array.isArray(r)?(s=r,!0):(o=r.create(n).injector,s=o.get(om,[],{optional:!0,self:!0}).flat()),{routes:s.map(sF),injector:o}}))}(i,this.compiler,n,this.onLoadEndListener).pipe(av(()=>{this.childrenLoaders.delete(i)})),s=new _X(o,()=>new tn).pipe(BR());return this.childrenLoaders.set(i,s),s}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function cQ(e){return function URe(e){return e&&"object"==typeof e&&"default"in e}(e)?e.default:e}let lF=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:()=>L(zRe),providedIn:"root"})}}return e})(),zRe=(()=>{class e{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,i){return n}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const uQ=new _e(""),dQ=new _e("");function HRe(e,t,n){const i=e.get(dQ),r=e.get(Ln);return e.get(ct).runOutsideAngular(()=>{if(!r.startViewTransition||i.skipNextTransition)return i.skipNextTransition=!1,new Promise(c=>setTimeout(c));let o;const s=new Promise(c=>{o=c}),a=r.startViewTransition(()=>(o(),function GRe(e){return new Promise(t=>{$u({read:()=>setTimeout(t)},{injector:e})})}(e))),{onViewTransitionCreated:l}=i;return l&&ol(e,()=>l({transition:a,from:t,to:n})),s})}const fQ=new _e("");let kD=(()=>{class e{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new tn,this.transitionAbortSubject=new tn,this.configLoader=L(aF),this.environmentInjector=L(ji),this.urlSerializer=L(Zg),this.rootContexts=L(gv),this.location=L(Q0),this.inputBindingEnabled=null!==L(TD,{optional:!0}),this.titleStrategy=L(aQ),this.options=L(rm,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=L(lF),this.createViewTransition=L(uQ,{optional:!0}),this.navigationErrorHandler=L(fQ,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>Ge(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new FOe(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new ROe(r))}complete(){this.transitions?.complete()}handleNavigationRequest(n){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...n,id:i})}setupNavigations(n,i,r){return this.transitions=new ps({id:0,currentUrlTree:i,currentRawUrl:i,extractedUrl:this.urlHandlingStrategy.extract(i),urlAfterRedirects:this.urlHandlingStrategy.extract(i),rawUrl:i,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:hv,restoredState:null,currentSnapshot:r.snapshot,targetSnapshot:null,currentRouterState:r,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(Wn(o=>0!==o.id),at(o=>({...o,extractedUrl:this.urlHandlingStrategy.extract(o.rawUrl)})),Es(o=>{let s=!1,a=!1;return Ge(o).pipe(Es(l=>{if(this.navigationId>o.id)return this.cancelNavigationTransition(o,"",Vo.SupersededByNewNavigation),jo;this.currentTransition=o,this.currentNavigation={id:l.id,initialUrl:l.rawUrl,extractedUrl:l.extractedUrl,targetBrowserUrl:"string"==typeof l.extras.browserUrl?this.urlSerializer.parse(l.extras.browserUrl):l.extras.browserUrl,trigger:l.source,extras:l.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null};const c=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl();if(!c&&"reload"!==(l.extras.onSameUrlNavigation??n.onSameUrlNavigation)){const d="";return this.events.next(new Jg(l.id,this.urlSerializer.serialize(l.rawUrl),d,ED.IgnoredSameUrlNavigation)),l.resolve(!1),jo}if(this.urlHandlingStrategy.shouldProcessUrl(l.rawUrl))return Ge(l).pipe(Es(d=>{const f=this.transitions?.getValue();return this.events.next(new wD(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),f!==this.transitions?.getValue()?jo:Promise.resolve(d)}),function FRe(e,t,n,i,r,o){return Ai(s=>function NRe(e,t,n,i,r,o,s="emptyOnly"){return new kRe(e,t,n,i,r,s,o).recognize()}(e,t,n,i,s.extractedUrl,r,o).pipe(at(({state:a,tree:l})=>({...s,targetSnapshot:a,urlAfterRedirects:l}))))}(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy),Gi(d=>{o.targetSnapshot=d.targetSnapshot,o.urlAfterRedirects=d.urlAfterRedirects,this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects};const f=new jX(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(f)}));if(c&&this.urlHandlingStrategy.shouldProcessUrl(l.currentRawUrl)){const{id:d,extractedUrl:f,source:h,restoredState:p,extras:g}=l,m=new wD(d,this.urlSerializer.serialize(f),h,p);this.events.next(m);const _=HX(this.rootComponentType).snapshot;return this.currentTransition=o={...l,targetSnapshot:_,urlAfterRedirects:f,extras:{...g,skipLocationChange:!1,replaceUrl:!1}},this.currentNavigation.finalUrl=f,Ge(o)}{const d="";return this.events.next(new Jg(l.id,this.urlSerializer.serialize(l.extractedUrl),d,ED.IgnoredByUrlHandlingStrategy)),l.resolve(!1),jo}}),Gi(l=>{const c=new NOe(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(c)}),at(l=>(this.currentTransition=o={...l,guards:ZOe(l.targetSnapshot,l.currentSnapshot,this.rootContexts)},o)),function cRe(e,t){return Ai(n=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=n;return 0===s.length&&0===o.length?Ge({...n,guardsResult:!0}):function uRe(e,t,n,i){return si(e).pipe(Ai(r=>function mRe(e,t,n,i,r){const o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return o&&0!==o.length?Ge(o.map(a=>{const l=pv(t)??r,c=tm(a,l);return qu(function sRe(e){return e&&vv(e.canDeactivate)}(c)?c.canDeactivate(e,t,n,i):ol(l,()=>c(e,t,n,i))).pipe(Gf())})).pipe(nm()):Ge(!0)}(r.component,r.route,n,t,i)),Gf(r=>!0!==r,!0))}(s,i,r,e).pipe(Ai(a=>a&&function nRe(e){return"boolean"==typeof e}(a)?function dRe(e,t,n,i){return si(t).pipe(Kg(r=>sv(function hRe(e,t){return null!==e&&t&&t(new POe(e)),Ge(!0)}(r.route.parent,i),function fRe(e,t){return null!==e&&t&&t(new $Oe(e)),Ge(!0)}(r.route,i),function gRe(e,t,n){const i=t[t.length-1],o=t.slice(0,t.length-1).reverse().map(s=>function JOe(e){const t=e.routeConfig?e.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:e,guards:t}:null}(s)).filter(s=>null!==s).map(s=>mX(()=>Ge(s.guards.map(l=>{const c=pv(s.node)??n,u=tm(l,c);return qu(function oRe(e){return e&&vv(e.canActivateChild)}(u)?u.canActivateChild(i,e):ol(c,()=>u(i,e))).pipe(Gf())})).pipe(nm())));return Ge(o).pipe(nm())}(e,r.path,n),function pRe(e,t,n){const i=t.routeConfig?t.routeConfig.canActivate:null;if(!i||0===i.length)return Ge(!0);const r=i.map(o=>mX(()=>{const s=pv(t)??n,a=tm(o,s);return qu(function rRe(e){return e&&vv(e.canActivate)}(a)?a.canActivate(t,e):ol(s,()=>a(t,e))).pipe(Gf())}));return Ge(r).pipe(nm())}(e,r.route,n))),Gf(r=>!0!==r,!0))}(i,o,e,t):Ge(a)),at(a=>({...n,guardsResult:a})))})}(this.environmentInjector,l=>this.events.next(l)),Gi(l=>{if(o.guardsResult=l.guardsResult,l.guardsResult&&"boolean"!=typeof l.guardsResult)throw xD(0,l.guardsResult);const c=new IOe(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot,!!l.guardsResult);this.events.next(c)}),Wn(l=>!!l.guardsResult||(this.cancelNavigationTransition(l,"",Vo.GuardRejected),!1)),oF(l=>{if(l.guards.canActivateChecks.length)return Ge(l).pipe(Gi(c=>{const u=new kOe(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(u)}),Es(c=>{let u=!1;return Ge(c).pipe(PRe(this.paramsInheritanceStrategy,this.environmentInjector),Gi({next:()=>u=!0,complete:()=>{u||this.cancelNavigationTransition(c,"",Vo.NoDataFromResolver)}}))}),Gi(c=>{const u=new OOe(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(u)}))}),oF(l=>{const c=u=>{const d=[];u.routeConfig?.loadComponent&&!u.routeConfig._loadedComponent&&d.push(this.configLoader.loadComponent(u.routeConfig).pipe(Gi(f=>{u.component=f}),at(()=>{})));for(const f of u.children)d.push(...c(f));return d};return $R(c(l.targetSnapshot.root)).pipe(hD(null),Cs(1))}),oF(()=>this.afterPreactivation()),Es(()=>{const{currentSnapshot:l,targetSnapshot:c}=o,u=this.createViewTransition?.(this.environmentInjector,l.root,c.root);return u?si(u).pipe(at(()=>o)):Ge(o)}),at(l=>{const c=function WOe(e,t,n){const i=mv(e,t._root,n?n._root:void 0);return new zX(i,t)}(n.routeReuseStrategy,l.targetSnapshot,l.currentRouterState);return this.currentTransition=o={...l,targetRouterState:c},this.currentNavigation.targetRouterState=c,o}),Gi(()=>{this.events.next(new YR)}),((e,t,n,i)=>at(r=>(new QOe(t,r.targetRouterState,r.currentRouterState,n,i).activate(e),r)))(this.rootContexts,n.routeReuseStrategy,l=>this.events.next(l),this.inputBindingEnabled),Cs(1),Gi({next:l=>{s=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new El(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects))),this.titleStrategy?.updateTitle(l.targetRouterState.snapshot),l.resolve(!0)},complete:()=>{s=!0}}),Wi(this.transitionAbortSubject.pipe(Gi(l=>{throw l}))),av(()=>{!s&&!a&&this.cancelNavigationTransition(o,"",Vo.SupersededByNewNavigation),this.currentTransition?.id===o.id&&(this.currentNavigation=null,this.currentTransition=null)}),Xg(l=>{if(a=!0,QX(l))this.events.next(new Kf(o.id,this.urlSerializer.serialize(o.extractedUrl),l.message,l.cancellationCode)),function KOe(e){return QX(e)&&Yf(e.url)}(l)?this.events.next(new CD(l.url,l.navigationBehaviorOptions)):o.resolve(!1);else{const c=new WR(o.id,this.urlSerializer.serialize(o.extractedUrl),l,o.targetSnapshot??void 0);try{const u=ol(this.environmentInjector,()=>this.navigationErrorHandler?.(c));if(u instanceof nF){const{message:d,cancellationCode:f}=xD(0,u);this.events.next(new Kf(o.id,this.urlSerializer.serialize(o.extractedUrl),d,f)),this.events.next(new CD(u.redirectTo,u.navigationBehaviorOptions))}else{this.events.next(c);const d=n.errorHandler(l);o.resolve(!!d)}}catch(u){this.options.resolveNavigationPromiseOnError?o.resolve(!1):o.reject(u)}}return jo}))}))}cancelNavigationTransition(n,i,r){const o=new Kf(n.id,this.urlSerializer.serialize(n.extractedUrl),i,r);this.events.next(o),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){const n=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),i=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return n.toString()!==i?.toString()&&!this.currentNavigation?.extras.skipLocationChange}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function WRe(e){return e!==hv}let qRe=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:()=>L(KRe),providedIn:"root"})}}return e})();class YRe{shouldDetach(t){return!1}store(t,n){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,n){return t.routeConfig===n.routeConfig}}let KRe=(()=>{class e extends YRe{static{this.\u0275fac=(()=>{let n;return function(r){return(n||(n=fn(e)))(r||e)}})()}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),hQ=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:()=>L(XRe),providedIn:"root"})}}return e})(),XRe=(()=>{class e extends hQ{constructor(){super(...arguments),this.location=L(Q0),this.urlSerializer=L(Zg),this.options=L(rm,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=L(lF),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Wf,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=HX(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return"computed"!==this.canceledNavigationResolution?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(i=>{"popstate"===i.type&&n(i.url,i.state)})}handleRouterEvent(n,i){if(n instanceof wD)this.stateMemento=this.createStateMemento();else if(n instanceof Jg)this.rawUrlTree=i.initialUrl;else if(n instanceof jX){if("eager"===this.urlUpdateStrategy&&!i.extras.skipLocationChange){const r=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl);this.setBrowserUrl(i.targetBrowserUrl??r,i)}}else n instanceof YR?(this.currentUrlTree=i.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl),this.routerState=i.targetRouterState,"deferred"===this.urlUpdateStrategy&&!i.extras.skipLocationChange&&this.setBrowserUrl(i.targetBrowserUrl??this.rawUrlTree,i)):n instanceof Kf&&(n.code===Vo.GuardRejected||n.code===Vo.NoDataFromResolver)?this.restoreHistory(i):n instanceof WR?this.restoreHistory(i,!0):n instanceof El&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,i){const r=n instanceof Wf?this.urlSerializer.serialize(n):n;if(this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl){const s={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId)};this.location.replaceState(r,"",s)}else{const o={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId+1)};this.location.go(r,"",o)}}restoreHistory(n,i=!1){if("computed"===this.canceledNavigationResolution){const o=this.currentPageId-this.browserPageId;0!==o?this.location.historyGo(o):this.currentUrlTree===n.finalUrl&&0===o&&(this.resetState(n),this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(n),this.resetUrlToCurrentUrlTree())}resetState(n){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,i){return"computed"===this.canceledNavigationResolution?{navigationId:n,\u0275routerPageId:i}:{navigationId:n}}static{this.\u0275fac=(()=>{let n;return function(r){return(n||(n=fn(e)))(r||e)}})()}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var bv=function(e){return e[e.COMPLETE=0]="COMPLETE",e[e.FAILED=1]="FAILED",e[e.REDIRECTING=2]="REDIRECTING",e}(bv||{});function pQ(e,t){e.events.pipe(Wn(n=>n instanceof El||n instanceof Kf||n instanceof WR||n instanceof Jg),at(n=>n instanceof El||n instanceof Jg?bv.COMPLETE:n instanceof Kf&&(n.code===Vo.Redirect||n.code===Vo.SupersededByNewNavigation)?bv.REDIRECTING:bv.FAILED),Wn(n=>n!==bv.REDIRECTING),Cs(1)).subscribe(()=>{t()})}function QRe(e){throw e}const ZRe={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},JRe={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Uo=(()=>{class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.console=L(eY),this.stateManager=L(hQ),this.options=L(rm,{optional:!0})||{},this.pendingTasks=L(Sc),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=L(kD),this.urlSerializer=L(Zg),this.location=L(Q0),this.urlHandlingStrategy=L(lF),this._events=new tn,this.errorHandler=this.options.errorHandler||QRe,this.navigated=!1,this.routeReuseStrategy=L(qRe),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=L(om,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!L(TD,{optional:!0}),this.eventsSubscription=new ar,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:n=>{this.console.warn(n)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){const n=this.navigationTransitions.events.subscribe(i=>{try{const r=this.navigationTransitions.currentTransition,o=this.navigationTransitions.currentNavigation;if(null!==r&&null!==o)if(this.stateManager.handleRouterEvent(i,o),i instanceof Kf&&i.code!==Vo.Redirect&&i.code!==Vo.SupersededByNewNavigation)this.navigated=!0;else if(i instanceof El)this.navigated=!0;else if(i instanceof CD){const s=i.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(i.url,r.currentRawUrl),l={browserUrl:r.extras.browserUrl,info:r.extras.info,skipLocationChange:r.extras.skipLocationChange,replaceUrl:r.extras.replaceUrl||"eager"===this.urlUpdateStrategy||WRe(r.source),...s};this.scheduleNavigation(a,hv,null,l,{resolve:r.resolve,reject:r.reject,promise:r.promise})}(function tFe(e){return!(e instanceof YR||e instanceof CD)})(i)&&this._events.next(i)}catch(r){this.navigationTransitions.transitionAbortSubject.next(r)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),hv,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,i)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(n,"popstate",i)},0)})}navigateToSyncWithBrowser(n,i,r){const o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){const l={...r};delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(o.state=l)}const a=this.parseUrl(n);this.scheduleNavigation(a,i,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(sF),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,i={}){const{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=i,c=l?this.currentUrlTree.fragment:s;let d,u=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":u={...this.currentUrlTree.queryParams,...o};break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=o||null}null!==u&&(u=this.removeEmptyProps(u));try{d=OX(r?r.snapshot:this.routerState.snapshot.root)}catch{("string"!=typeof n[0]||"/"!==n[0][0])&&(n=[]),d=this.currentUrlTree.root}return RX(d,n,u,c??null)}navigateByUrl(n,i={skipLocationChange:!1}){const r=Yf(n)?n:this.parseUrl(n),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,hv,null,i)}navigate(n,i={skipLocationChange:!1}){return function eFe(e){for(let t=0;t(null!=o&&(i[r]=o),i),{})}scheduleNavigation(n,i,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,l,c;s?(a=s.resolve,l=s.reject,c=s.promise):c=new Promise((d,f)=>{a=d,l=f});const u=this.pendingTasks.add();return pQ(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(u))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(d=>Promise.reject(d))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),OD=(()=>{class e{constructor(n,i,r,o,s,a){this.router=n,this.route=i,this.tabIndexAttribute=r,this.renderer=o,this.el=s,this.locationStrategy=a,this.href=null,this.onChanges=new tn,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1,this.routerLinkInput=null;const l=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===l||"area"===l,this.isAnchorElement?this.subscription=n.events.subscribe(c=>{c instanceof El&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(n){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",n)}ngOnChanges(n){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(n){null==n?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(this.routerLinkInput=Yf(n)||Array.isArray(n)?n:[n],this.setTabIndexIfNotOnNativeEl("0"))}onClick(n,i,r,o,s){const a=this.urlTree;return!!(null===a||this.isAnchorElement&&(0!==n||i||r||o||s||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(a,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){const n=this.urlTree;this.href=null!==n&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(n)):null;const i=null===this.href?null:function Dz(e,t,n){return function vEe(e,t){return"src"===t&&("embed"===e||"frame"===e||"iframe"===e||"media"===e||"script"===e)||"href"===t&&("base"===e||"link"===e)?Cz:Oo}(t,n)(e)}(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",i)}applyAttributeValue(n,i){const r=this.renderer,o=this.el.nativeElement;null!==i?r.setAttribute(o,n,i):r.removeAttribute(o,n)}get urlTree(){return null===this.routerLinkInput?null:Yf(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static{this.\u0275fac=function(i){return new(i||e)(ee(Uo),ee(Cl),function ku(e){return function zbe(e,t){if("class"===t)return e.classes;if("style"===t)return e.styles;const n=e.attrs;if(n){const i=n.length;let r=0;for(;r{class e{constructor(n,i,r,o,s){this.router=n,this.injector=r,this.preloadingStrategy=o,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(Wn(n=>n instanceof El),Kg(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(n,i){const r=[];for(const o of i){o.providers&&!o._injector&&(o._injector=hC(o.providers,n,`Route: ${o.path}`));const s=o._injector??n,a=o._loadedInjector??s;(o.loadChildren&&!o._loadedRoutes&&void 0===o.canLoad||o.loadComponent&&!o._loadedComponent)&&r.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return si(r).pipe(Yg())}preloadConfig(n,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(n,i):Ge(null);const o=r.pipe(Ai(s=>null===s?Ge(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??n,s.routes))));return i.loadComponent&&!i._loadedComponent?si([o,this.loader.loadComponent(i)]).pipe(Yg()):o})}static{this.\u0275fac=function(i){return new(i||e)(Ne(Uo),Ne(dY),Ne(ji),Ne(gQ),Ne(aF))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const cF=new _e("");let mQ=(()=>{class e{constructor(n,i,r,o,s={}){this.urlSerializer=n,this.transitions=i,this.viewportScroller=r,this.zone=o,this.options=s,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},s.scrollPositionRestoration||="disabled",s.anchorScrolling||="disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof wD?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=n.navigationTrigger,this.restoredId=n.restoredState?n.restoredState.navigationId:0):n instanceof El?(this.lastId=n.id,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.urlAfterRedirects).fragment)):n instanceof Jg&&n.code===ED.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof VX&&(n.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(n.position):n.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(n.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(n,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new VX(n,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static{this.\u0275fac=function(i){!function Xz(){throw new Error("invalid")}()}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();function Dl(e,t){return{\u0275kind:e,\u0275providers:t}}function yQ(){const e=L(nn);return t=>{const n=e.get(fa);if(t!==n.components[0])return;const i=e.get(Uo),r=e.get(vQ);1===e.get(uF)&&i.initialNavigation(),e.get(bQ,null,ft.Optional)?.setUpPreloading(),e.get(cF,null,ft.Optional)?.init(),i.resetRootComponentType(n.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const vQ=new _e("",{factory:()=>new tn}),uF=new _e("",{providedIn:"root",factory:()=>1}),bQ=new _e("");function lFe(e){return Dl(0,[{provide:bQ,useExisting:rFe},{provide:gQ,useExisting:e}])}function uFe(e){return Dl(9,[{provide:uQ,useValue:HRe},{provide:dQ,useValue:{skipNextTransition:!!e?.skipInitialTransition,...e}}])}const wQ=new _e("ROUTER_FORROOT_GUARD"),dFe=[Q0,{provide:Zg,useClass:gD},Uo,gv,{provide:Cl,useFactory:function _Q(e){return e.routerState.root},deps:[Uo]},aF,[]];let dF=(()=>{class e{constructor(n){}static forRoot(n,i){return{ngModule:e,providers:[dFe,[],{provide:om,multi:!0,useValue:n},{provide:wQ,useFactory:gFe,deps:[[Uo,new iE,new rE]]},{provide:rm,useValue:i||{}},i?.useHash?{provide:Gu,useClass:RNe}:{provide:Gu,useClass:iR},{provide:cF,useFactory:()=>{const e=L(tv),t=L(ct),n=L(rm),i=L(kD),r=L(Zg);return n.scrollOffset&&e.setOffset(n.scrollOffset),new mQ(r,i,e,t,n)}},i?.preloadingStrategy?lFe(i.preloadingStrategy).\u0275providers:[],i?.initialNavigation?mFe(i):[],i?.bindToComponentInputs?Dl(8,[YX,{provide:TD,useExisting:YX}]).\u0275providers:[],i?.enableViewTransitions?uFe().\u0275providers:[],[{provide:EQ,useFactory:yQ},{provide:RC,multi:!0,useExisting:EQ}]]}}static forChild(n){return{ngModule:e,providers:[{provide:om,multi:!0,useValue:n}]}}static{this.\u0275fac=function(i){return new(i||e)(Ne(wQ,8))}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})();function gFe(e){return"guarded"}function mFe(e){return["disabled"===e.initialNavigation?Dl(3,[{provide:UO,multi:!0,useFactory:()=>{const t=L(Uo);return()=>{t.setUpLocationChangeListener()}}},{provide:uF,useValue:2}]).\u0275providers:[],"enabledBlocking"===e.initialNavigation?Dl(2,[{provide:uF,useValue:0},{provide:UO,multi:!0,deps:[nn],useFactory:t=>{const n=t.get(kNe,Promise.resolve());return()=>n.then(()=>new Promise(i=>{const r=t.get(Uo),o=t.get(vQ);pQ(r,()=>{i(!0)}),t.get(kD).afterPreactivation=()=>(i(!0),o.closed?Ge(void 0):o),r.initialNavigation()}))}}]).\u0275providers:[]]}const EQ=new _e("");var Xe=function(e){return e[e.State=0]="State",e[e.Transition=1]="Transition",e[e.Sequence=2]="Sequence",e[e.Group=3]="Group",e[e.Animate=4]="Animate",e[e.Keyframes=5]="Keyframes",e[e.Style=6]="Style",e[e.Trigger=7]="Trigger",e[e.Reference=8]="Reference",e[e.AnimateChild=9]="AnimateChild",e[e.AnimateRef=10]="AnimateRef",e[e.Query=11]="Query",e[e.Stagger=12]="Stagger",e}(Xe||{});const Bc="*";function wv(e,t){return{type:Xe.Trigger,name:e,definitions:t,options:{}}}function Ev(e,t=null){return{type:Xe.Animate,styles:t,timings:e}}function Ds(e){return{type:Xe.Style,styles:e,offset:null}}function Cv(e,t,n=null){return{type:Xe.Transition,expr:e,animation:t,options:n}}class Dv{constructor(t=0,n=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+n}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){const n="start"==t?this._onStartFns:this._onDoneFns;n.forEach(i=>i()),n.length=0}}class CQ{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let n=0,i=0,r=0;const o=this.players.length;0==o?queueMicrotask(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++n==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const n=t*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,n/i.totalTime):1;i.setPosition(r)})}getPosition(){const t=this.players.reduce((n,i)=>null===n||i.totalTime>n.totalTime?i:n,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const n="start"==t?this._onStartFns:this._onDoneFns;n.forEach(i=>i()),n.length=0}}const CFe=JSON.parse('{"r":["assets/logos/abercrombieandfitch.jpg","assets/logos/adidas.png","assets/logos/Aditya.jpg","assets/logos/arvind.png","assets/logos/asics.png","assets/logos/asos.png","assets/logos/boohoo.jpg","assets/logos/buckle.svg","assets/logos/burberry.jpg","assets/logos/burlington.png","assets/logos/canada-goose.png","assets/logos/capri_holdings.png","assets/logos/esprit.png","assets/logos/fast-retail.png","assets/logos/footlocker.jpg","assets/logos/gap.png","assets/logos/havaianas.png","assets/logos/nike.png","assets/logos/vf.svg","assets/logos/zalando.png"]}'),DFe=JSON.parse('[{"id":0,"name":"All Companies"},{"id":5590,"name":"H&M","url":"https://wikirate.org/H_M","headquarters":"Sweden"},{"id":5505,"name":"Gap inc.","url":"https://wikirate.org/Gap_inc","headquarters":"California (United States)"},{"id":5301,"name":"Inditex","url":"https://wikirate.org/Inditex","headquarters":"Spain"},{"id":9269,"name":"Marks and Spencer Group plc","url":"https://wikirate.org/Marks_and_Spencer_Group_plc","headquarters":"United Kingdom"},{"id":7217,"name":"Adidas AG","url":"https://wikirate.org/Adidas_AG","headquarters":"Germany"},{"id":1829050,"name":"Asos","url":"https://wikirate.org/Asos","headquarters":"United Kingdom"},{"id":9139,"name":"Burberry Group plc","url":"https://wikirate.org/Burberry_Group_plc","headquarters":"United Kingdom"},{"id":8979,"name":"Louis Vuitton Malletier SA (LVMH)","url":"https://wikirate.org/Louis_Vuitton_Malletier_SA_LVMH","headquarters":"France"},{"id":5800,"name":"Nike Inc.","url":"https://wikirate.org/Nike_Inc","headquarters":"Oregon (United States)"},{"id":49386,"name":"Tapestry Inc","url":"https://wikirate.org/Tapestry_Inc","headquarters":"New York (United States)"},{"id":18109,"name":"Puma","url":"https://wikirate.org/Puma","headquarters":"Germany"},{"id":776737,"name":"Tiffany & Co.","url":"https://wikirate.org/Tiffany_Co","headquarters":"New York (United States)"},{"id":56584,"name":"Fast Retailing","url":"https://wikirate.org/Fast_Retailing","headquarters":"Japan"},{"id":61104,"name":"VF","url":"https://wikirate.org/VF","headquarters":"North Carolina (United States)"},{"id":61050,"name":"PVH","url":"https://wikirate.org/PVH","headquarters":"New York (United States)"},{"id":2608717,"name":"Zalando SE","url":"https://wikirate.org/Zalando_SE","headquarters":"Germany"},{"id":866194,"name":"Guess? Inc","url":"https://wikirate.org/Guess_Inc","headquarters":"California (United States)"},{"id":116498,"name":"Under Armour","url":"https://wikirate.org/Under_Armour","headquarters":"Maryland (United States)"},{"id":8362,"name":"Kering","url":"https://wikirate.org/Kering","headquarters":"France"},{"id":61065,"name":"Prada","url":"https://wikirate.org/Prada","headquarters":"Italy"},{"id":56597,"name":"L Brands","url":"https://wikirate.org/L_Brands","headquarters":"Ohio (United States)"},{"id":42714,"name":"Hugo Boss AG","url":"https://wikirate.org/Hugo_Boss_AG","headquarters":"Germany"},{"id":56618,"name":"Nordstrom","url":"https://wikirate.org/Nordstrom","headquarters":"Washington (United States)"},{"id":861862,"name":"Columbia Sportswear","url":"https://wikirate.org/Columbia_Sportswear","headquarters":"Oregon (United States)"},{"id":859389,"name":"Urban Outfitters","url":"https://wikirate.org/Urban_Outfitters","headquarters":"Pennsylvania (United States)"},{"id":2265395,"name":"Ralph Lauren Corporation","url":"https://wikirate.org/Ralph_Lauren_Corporation","headquarters":"New York (United States)"},{"id":858415,"name":"Fossil Group, Inc.","url":"https://wikirate.org/Fossil_Group_Inc","headquarters":"Texas (United States)"},{"id":866417,"name":"Skechers USA Inc","url":"https://wikirate.org/Skechers_USA_Inc","headquarters":"California (United States)"},{"id":862441,"name":"American Eagle Outfitters","url":"https://wikirate.org/American_Eagle_Outfitters","headquarters":"Pennsylvania (United States)"},{"id":60982,"name":"Hanesbrands","url":"https://wikirate.org/Hanesbrands","headquarters":"North Carolina (United States)"},{"id":945115,"name":"Lojas Renner S.A.","url":"https://wikirate.org/Lojas_Renner_S_A","headquarters":"Brazil"},{"id":58500,"name":"Foot Locker Inc.","url":"https://wikirate.org/Foot_Locker_Inc","headquarters":"New York (United States)"},{"id":957395,"name":"TJX","url":"https://wikirate.org/TJX","headquarters":"Massachusetts (United States)"},{"id":776749,"name":"G-III Apparel Group, LTD.","url":"https://wikirate.org/G_III_Apparel_Group_LTD","headquarters":"New York (United States)"},{"id":866117,"name":"Deckers Outdoor Corporation","url":"https://wikirate.org/Deckers_Outdoor_Corporation","headquarters":"California (United States)"},{"id":57653,"name":"Ross Stores","url":"https://wikirate.org/Ross_Stores","headquarters":"California (United States)"},{"id":861719,"name":"Wolverine World Wide","url":"https://wikirate.org/Wolverine_World_Wide","headquarters":"Michigan (United States)"},{"id":865187,"name":"Caleres Inc","url":"https://wikirate.org/Caleres_Inc","headquarters":"Missouri (United States)"},{"id":49209,"name":"Next","url":"https://wikirate.org/Next","headquarters":"United Kingdom"},{"id":866341,"name":"Oxford Industries Inc","url":"https://wikirate.org/Oxford_Industries_Inc","headquarters":"Georgia (United States)"},{"id":2274181,"name":"Genesco Inc.","url":"https://wikirate.org/Genesco_Inc","headquarters":"Tennessee (United States)"},{"id":2632311,"name":"Chico\'s FAS Inc","url":"https://wikirate.org/Chico_s_FAS_Inc","headquarters":"Florida (United States)"},{"id":61176,"name":"Macy\'s","url":"https://wikirate.org/Macy_s","headquarters":"Ohio (United States)"},{"id":792992,"name":"Moncler","url":"https://wikirate.org/Moncler","headquarters":"Italy"},{"id":2241782,"name":"DSW Inc.","url":"https://wikirate.org/DSW_Inc","headquarters":"Ohio (United States)"},{"id":60914,"name":"Abercrombie & Fitch","url":"https://wikirate.org/Abercrombie_Fitch","headquarters":"New York (United States)"},{"id":57485,"name":"Luxottica Group SpA","url":"https://wikirate.org/Luxottica_Group_SpA","headquarters":"Italy"},{"id":2632233,"name":"Ascena Retail Group Inc","url":"https://wikirate.org/Ascena_Retail_Group_Inc","headquarters":"New Jersey (United States)"},{"id":776665,"name":"Dillard\'s, Inc.","url":"https://wikirate.org/Dillard_s_Inc","headquarters":"Arkansas (United States)"},{"id":50638,"name":"Dick\'s Sporting Goods","url":"https://wikirate.org/Dick_s_Sporting_Goods","headquarters":"Pennsylvania (United States)"},{"id":2605005,"name":"Carter\'s Inc","url":"https://wikirate.org/Carter_s_Inc","headquarters":"Georgia (United States)"},{"id":2632164,"name":"Express Inc","url":"https://wikirate.org/Express_Inc","headquarters":"Ohio (United States)"},{"id":2979682,"name":"Vera Bradley Inc.","url":"https://wikirate.org/Vera_Bradley_Inc","headquarters":"Indiana (United States)"},{"id":170564,"name":"Asics Corporation","url":"https://wikirate.org/Asics_Corporation","headquarters":"Japan"},{"id":116138,"name":"Gildan Activewear Inc.","url":"https://wikirate.org/Gildan_Activewear_Inc","headquarters":"Canada"},{"id":2632287,"name":"Burlington Stores Inc","url":"https://wikirate.org/Burlington_Stores_Inc","headquarters":"New Jersey (United States)"},{"id":2980808,"name":"Buckle Inc","url":"https://wikirate.org/Buckle_Inc","headquarters":"Nebraska (United States)"},{"id":1825510,"name":"lululemon athletica","url":"https://wikirate.org/lululemon_athletica","headquarters":"Quebec (Canada)"},{"id":2632400,"name":"Francesca\'s","url":"https://wikirate.org/Francesca_s","headquarters":"Texas (United States)"},{"id":9127,"name":"Esprit Holdings Limited","url":"https://wikirate.org/Esprit_Holdings_Limited","headquarters":"Hong Kong"},{"id":3052157,"name":"Cato Corp","url":"https://wikirate.org/Cato_Corp","headquarters":"North Carolina (United States)"},{"id":48305,"name":"Christian Dior","url":"https://wikirate.org/Christian_Dior","headquarters":"France"},{"id":2931751,"name":"Arvind Limited","url":"https://wikirate.org/Arvind_Limited","headquarters":"India"},{"id":3081310,"name":"Mulberry Group Plc","url":"https://wikirate.org/Mulberry_Group_Plc","headquarters":"United Kingdom"},{"id":3151635,"name":"Ted Baker","url":"https://wikirate.org/Ted_Baker","headquarters":"United Kingdom"},{"id":3152073,"name":"Capri Holdings Ltd (formerly Michael Kors)","url":"https://wikirate.org/Capri_Holdings_Ltd_formerly_Michael_Kors","headquarters":"United Kingdom"},{"id":48284,"name":"Hermes International","url":"https://wikirate.org/Hermes_International","headquarters":"France"},{"id":2608722,"name":"Salvatore Ferragamo SpA","url":"https://wikirate.org/Salvatore_Ferragamo_SpA","headquarters":"Italy"},{"id":56413,"name":"Richemont","url":"https://wikirate.org/Richemont","headquarters":"Switzerland"},{"id":3075761,"name":"Boot Barn Holdings Inc.","url":"https://wikirate.org/Boot_Barn_Holdings_Inc","headquarters":"California (United States)"},{"id":2624117,"name":"Geox SpA","url":"https://wikirate.org/Geox_SpA","headquarters":"Italy"},{"id":3098198,"name":"Hudson\'s Bay Company","url":"https://wikirate.org/Hudson_s_Bay_Company","headquarters":"Ontario, Canada"},{"id":57272,"name":"Swatch Group","url":"https://wikirate.org/Swatch_Group","headquarters":"Switzerland"},{"id":3624592,"name":"JD Sports Fashion plc","url":"https://wikirate.org/JD_Sports_Fashion_plc","headquarters":"United Kingdom"},{"id":44618,"name":"Sports Direct","url":"https://wikirate.org/Sports_Direct","headquarters":"United Kingdom"},{"id":3624482,"name":"Superdry plc","url":"https://wikirate.org/Superdry_plc","headquarters":"United Kingdom"},{"id":2632436,"name":"Children\'s Place Inc","url":"https://wikirate.org/Children_s_Place_Inc","headquarters":"New Jersey (United States)"},{"id":2623713,"name":"YOOX NET-A-PORTER Group SpA","url":"https://wikirate.org/YOOX_NET_A_PORTER_Group_SpA","headquarters":"Italy"},{"id":3624475,"name":"Brunello Cucinelli","url":"https://wikirate.org/Brunello_Cucinelli","headquarters":"Italy"},{"id":1173485,"name":"Li-Ning","url":"https://wikirate.org/Li_Ning","headquarters":"Beijing (China)"},{"id":3624461,"name":"TOD\'S","url":"https://wikirate.org/TOD_S","headquarters":"Italy"},{"id":3624440,"name":"Boohoo.com","url":"https://wikirate.org/Boohoo_com","headquarters":"United Kingdom"},{"id":3624468,"name":"Alpargatas - Havaianas","url":"https://wikirate.org/Alpargatas_Havaianas","headquarters":"Brazil"},{"id":3624718,"name":"Gerry Weber","url":"https://wikirate.org/Gerry_Weber","headquarters":"Germany"},{"id":3624454,"name":"Grendene","url":"https://wikirate.org/Grendene","headquarters":"Brazil"},{"id":48991,"name":"Chow Tai Fook","url":"https://wikirate.org/Chow_Tai_Fook","headquarters":"Hong Kong"},{"id":3624510,"name":"Cia Hering","url":"https://wikirate.org/Cia_Hering","headquarters":"Brazil"},{"id":3624496,"name":"United Arrows","url":"https://wikirate.org/United_Arrows","headquarters":"Japan"},{"id":3624517,"name":"Van de Velde","url":"https://wikirate.org/Van_de_Velde","headquarters":"Belgium"},{"id":2631100,"name":"Vipshop Holdings","url":"https://wikirate.org/Vipshop_Holdings","headquarters":"Guangdong (China)"},{"id":51397,"name":"JC Penney","url":"https://wikirate.org/JC_Penney","headquarters":"Texas (United States)"},{"id":3624433,"name":"Lao Feng Xiang Jewelry","url":"https://wikirate.org/Lao_Feng_Xiang_Jewelry","headquarters":"China"},{"id":3624447,"name":"Steve Madden","url":"https://wikirate.org/Steve_Madden","headquarters":"New York (United States)"},{"id":5294114,"name":"Onward Holdings","url":"https://wikirate.org/Onward_Holdings","headquarters":"Japan"},{"id":3624503,"name":"Metersbonwe","url":"https://wikirate.org/Metersbonwe","headquarters":"Shanghai (China)"},{"id":3624489,"name":"Aditya Birla Fashion & Retail Ltd","url":"https://wikirate.org/Aditya_Birla_Fashion_Retail_Ltd","headquarters":"India"},{"id":3624425,"name":"Semir","url":"https://wikirate.org/Semir","headquarters":"China"},{"id":5294189,"name":"Bosideng International Holdings Limited","url":"https://wikirate.org/Bosideng_International_Holdings_Limited","headquarters":"Shanghai (China)"},{"id":5408890,"name":"Canada Goose","url":"https://wikirate.org/Canada_Goose","headquarters":"Ontario, Canada"},{"id":5424735,"name":"Anta Sports Products","url":"https://wikirate.org/Anta_Sports_Products","headquarters":"Fujian (China)"}]');let sm=(()=>{class e{constructor(){this.companies=DFe,this.exploreMore=new ze(!1)}getCompany(n){return this.companies.find(r=>r.id===n)}getCompanies(){return this.companies.slice().sort((n,i)=>this.compare(n,i))}compare(n,i){return"All Companies"==n.name?-1:"All Companies"==i.name?1:n.name.localeCompare(i.name)}setExploreMore(){this.exploreMore.emit(!0),setTimeout(()=>{this.unsetExploreMore()},3e3)}unsetExploreMore(){this.exploreMore.emit(!1)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();const MFe=["addListener","removeListener"],NFe=["addEventListener","removeEventListener"],IFe=["on","off"];function qi(e,t,n,i){if(Tt(n)&&(i=n,n=void 0),i)return qi(e,t,n).pipe(LR(i));const[r,o]=function RFe(e){return Tt(e.addEventListener)&&Tt(e.removeEventListener)}(e)?NFe.map(s=>a=>e[s](t,a,n)):function kFe(e){return Tt(e.addListener)&&Tt(e.removeListener)}(e)?MFe.map(DQ(e,t)):function OFe(e){return Tt(e.on)&&Tt(e.off)}(e)?IFe.map(DQ(e,t)):[];if(!r&&FR(e))return Ai(s=>qi(s,t,n))(Hi(e));if(!r)throw new TypeError("Invalid event target");return new cn(s=>{const a=(...l)=>s.next(1o(a)})}function DQ(e,t){return n=>i=>e[n](t,i)}class FFe extends ar{constructor(t,n){super()}schedule(t,n=0){return this}}const RD={setInterval(e,t,...n){const{delegate:i}=RD;return i?.setInterval?i.setInterval(e,t,...n):setInterval(e,t,...n)},clearInterval(e){const{delegate:t}=RD;return(t?.clearInterval||clearInterval)(e)},delegate:void 0},SQ={now:()=>(SQ.delegate||Date).now(),delegate:void 0};class Sv{constructor(t,n=Sv.now){this.schedulerActionCtor=t,this.now=n}schedule(t,n=0,i){return new this.schedulerActionCtor(this,t).schedule(i,n)}}Sv.now=SQ.now;const $Fe=new class LFe extends Sv{constructor(t,n=Sv.now){super(t,n),this.actions=[],this._active=!1}flush(t){const{actions:n}=this;if(this._active)return void n.push(t);let i;this._active=!0;do{if(i=t.execute(t.state,t.delay))break}while(t=n.shift());if(this._active=!1,i){for(;t=n.shift();)t.unsubscribe();throw i}}}(class PFe extends FFe{constructor(t,n){super(t,n),this.scheduler=t,this.work=n,this.pending=!1}schedule(t,n=0){var i;if(this.closed)return this;this.state=t;const r=this.id,o=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(o,r,n)),this.pending=!0,this.delay=n,this.id=null!==(i=this.id)&&void 0!==i?i:this.requestAsyncId(o,this.id,n),this}requestAsyncId(t,n,i=0){return RD.setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,n,i=0){if(null!=i&&this.delay===i&&!1===this.pending)return n;null!=n&&RD.clearInterval(n)}execute(t,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(t,n);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,n){let r,i=!1;try{this.work(t)}catch(o){i=!0,r=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){const{id:t,scheduler:n}=this,{actions:i}=n;this.work=this.state=this.scheduler=null,this.pending=!1,Ww(i,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,super.unsubscribe()}}});const{isArray:jFe}=Array;function AQ(e){return 1===e.length&&jFe(e[0])?e[0]:e}function hF(...e){const t=uD(e),n=AQ(e);return n.length?new cn(i=>{let r=n.map(()=>[]),o=n.map(()=>!1);i.add(()=>{r=o=null});for(let s=0;!i.closed&&s{if(r[s].push(a),r.every(l=>l.length)){const l=r.map(c=>c.shift());i.next(t?t(...l):l),r.some((c,u)=>!c.length&&o[u])&&i.complete()}},()=>{o[s]=!0,!r[s].length&&i.complete()}));return()=>{r=o=null}}):jo}function pF(...e){const t=uD(e);return ei((n,i)=>{const r=e.length,o=new Array(r);let s=e.map(()=>!1),a=!1;for(let l=0;l{o[l]=c,!a&&!s[l]&&(s[l]=!0,(a=s.every(_c))&&(s=null))},Iy));n.subscribe(yn(i,l=>{if(a){const c=[l,...o];i.next(t?t(...c):c)}}))})}let IQ=(()=>{class e{constructor(n,i){this._renderer=n,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(n,i){this._renderer.setProperty(this._elementRef.nativeElement,n,i)}registerOnTouched(n){this.onTouched=n}registerOnChange(n){this.onChange=n}setDisabledState(n){this.setProperty("disabled",n)}static{this.\u0275fac=function(i){return new(i||e)(ee(aa),ee(Gt))}}static{this.\u0275dir=be({type:e})}}return e})(),Xf=(()=>{class e extends IQ{static{this.\u0275fac=(()=>{let n;return function(r){return(n||(n=fn(e)))(r||e)}})()}static{this.\u0275dir=be({type:e,features:[xt]})}}return e})();const Ss=new _e(""),QFe={provide:Ss,useExisting:Pt(()=>gF),multi:!0},JFe=new _e("");let gF=(()=>{class e extends IQ{constructor(n,i,r){super(n,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function ZFe(){const e=Rc()?Rc().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}())}writeValue(n){this.setProperty("value",n??"")}_handleInput(n){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(n)}_compositionStart(){this._composing=!0}_compositionEnd(n){this._composing=!1,this._compositionMode&&this.onChange(n)}static{this.\u0275fac=function(i){return new(i||e)(ee(aa),ee(Gt),ee(JFe,8))}}static{this.\u0275dir=be({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){1&i&&nt("input",function(s){return r._handleInput(s.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(s){return r._compositionEnd(s.target.value)})},features:[on([QFe]),xt]})}}return e})();const Yi=new _e(""),Ku=new _e("");function UQ(e){return null!=e}function zQ(e){return G0(e)?si(e):e}function HQ(e){let t={};return e.forEach(n=>{t=null!=n?{...t,...n}:t}),0===Object.keys(t).length?null:t}function GQ(e,t){return t.map(n=>n(e))}function WQ(e){return e.map(t=>function tPe(e){return!e.validate}(t)?t:n=>t.validate(n))}function mF(e){return null!=e?function qQ(e){if(!e)return null;const t=e.filter(UQ);return 0==t.length?null:function(n){return HQ(GQ(n,t))}}(WQ(e)):null}function _F(e){return null!=e?function YQ(e){if(!e)return null;const t=e.filter(UQ);return 0==t.length?null:function(n){return function KFe(...e){const t=uD(e),{args:n,keys:i}=hX(e),r=new cn(o=>{const{length:s}=n;if(!s)return void o.complete();const a=new Array(s);let l=s,c=s;for(let u=0;u{d||(d=!0,c--),a[u]=f},()=>l--,void 0,()=>{(!l||!d)&&(c||o.next(i?pX(i,a):a),o.complete())}))}});return t?r.pipe(LR(t)):r}(GQ(n,t).map(zQ)).pipe(at(HQ))}}(WQ(e)):null}function KQ(e,t){return null===e?[t]:Array.isArray(e)?[...e,t]:[e,t]}function yF(e){return e?Array.isArray(e)?e:[e]:[]}function PD(e,t){return Array.isArray(e)?e.includes(t):e===t}function ZQ(e,t){const n=yF(t);return yF(e).forEach(r=>{PD(n,r)||n.push(r)}),n}function JQ(e,t){return yF(t).filter(n=>!PD(e,n))}class eZ{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=mF(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=_F(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,n){return!!this.control&&this.control.hasError(t,n)}getError(t,n){return this.control?this.control.getError(t,n):null}}class Pr extends eZ{get formDirective(){return null}get path(){return null}}class Xu extends eZ{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class tZ{constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}}let am=(()=>{class e extends tZ{constructor(n){super(n)}static{this.\u0275fac=function(i){return new(i||e)(ee(Xu,2))}}static{this.\u0275dir=be({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){2&i&&hn("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[xt]})}}return e})();const Tv="VALID",$D="INVALID",lm="PENDING",xv="DISABLED";class cm{}class iZ extends cm{constructor(t,n){super(),this.value=t,this.source=n}}class wF extends cm{constructor(t,n){super(),this.pristine=t,this.source=n}}class EF extends cm{constructor(t,n){super(),this.touched=t,this.source=n}}class BD extends cm{constructor(t,n){super(),this.status=t,this.source=n}}function jD(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}class SF{constructor(t,n){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=X0(()=>this.statusReactive()),this.statusReactive=wg(void 0),this._pristine=X0(()=>this.pristineReactive()),this.pristineReactive=wg(!0),this._touched=X0(()=>this.touchedReactive()),this.touchedReactive=wg(!1),this._events=new tn,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(n)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return vl(this.statusReactive)}set status(t){vl(()=>this.statusReactive.set(t))}get valid(){return this.status===Tv}get invalid(){return this.status===$D}get pending(){return this.status==lm}get disabled(){return this.status===xv}get enabled(){return this.status!==xv}get pristine(){return vl(this.pristineReactive)}set pristine(t){vl(()=>this.pristineReactive.set(t))}get dirty(){return!this.pristine}get touched(){return vl(this.touchedReactive)}set touched(t){vl(()=>this.touchedReactive.set(t))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(ZQ(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(ZQ(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(JQ(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(JQ(t,this._rawAsyncValidators))}hasValidator(t){return PD(this._rawValidators,t)}hasAsyncValidator(t){return PD(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){const n=!1===this.touched;this.touched=!0;const i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched({...t,sourceControl:i}),n&&!1!==t.emitEvent&&this._events.next(new EF(!0,i))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(n=>n.markAllAsTouched(t))}markAsUntouched(t={}){const n=!0===this.touched;this.touched=!1,this._pendingTouched=!1;const i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),n&&!1!==t.emitEvent&&this._events.next(new EF(!1,i))}markAsDirty(t={}){const n=!0===this.pristine;this.pristine=!1;const i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty({...t,sourceControl:i}),n&&!1!==t.emitEvent&&this._events.next(new wF(!1,i))}markAsPristine(t={}){const n=!1===this.pristine;this.pristine=!0,this._pendingDirty=!1;const i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),n&&!1!==t.emitEvent&&this._events.next(new wF(!0,i))}markAsPending(t={}){this.status=lm;const n=t.sourceControl??this;!1!==t.emitEvent&&(this._events.next(new BD(this.status,n)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending({...t,sourceControl:n})}disable(t={}){const n=this._parentMarkedDirty(t.onlySelf);this.status=xv,this.errors=null,this._forEachChild(r=>{r.disable({...t,onlySelf:!0})}),this._updateValue();const i=t.sourceControl??this;!1!==t.emitEvent&&(this._events.next(new iZ(this.value,i)),this._events.next(new BD(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...t,skipPristineCheck:n},this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){const n=this._parentMarkedDirty(t.onlySelf);this.status=Tv,this._forEachChild(i=>{i.enable({...t,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors({...t,skipPristineCheck:n},this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,n){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},n),this._parent._updateTouched({},n))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){const i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Tv||this.status===lm)&&this._runAsyncValidator(i,t.emitEvent)}const n=t.sourceControl??this;!1!==t.emitEvent&&(this._events.next(new iZ(this.value,n)),this._events.next(new BD(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity({...t,sourceControl:n})}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(n=>n._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?xv:Tv}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,n){if(this.asyncValidator){this.status=lm,this._hasOwnPendingAsyncValidator={emitEvent:!1!==n};const i=zQ(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:n,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();const t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,n={}){this.errors=t,this._updateControlsErrors(!1!==n.emitEvent,this,n.shouldHaveEmitted)}get(t){let n=t;return null==n||(Array.isArray(n)||(n=n.split(".")),0===n.length)?null:n.reduce((i,r)=>i&&i._find(r),this)}getError(t,n){const i=n?this.get(n):this;return i&&i.errors?i.errors[t]:null}hasError(t,n){return!!this.getError(t,n)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,n,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new BD(this.status,n)),this._parent&&this._parent._updateControlsErrors(t,n,i)}_initObservables(){this.valueChanges=new ze,this.statusChanges=new ze}_calculateStatus(){return this._allControlsDisabled()?xv:this.errors?$D:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(lm)?lm:this._anyControlsHaveStatus($D)?$D:Tv}_anyControlsHaveStatus(t){return this._anyControls(n=>n.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,n){const i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,n),r&&this._events.next(new wF(this.pristine,n))}_updateTouched(t={},n){this.touched=this._anyControlsTouched(),this._events.next(new EF(this.touched,n)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,n)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){jD(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=function cPe(e){return Array.isArray(e)?mF(e):e||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function uPe(e){return Array.isArray(e)?_F(e):e||null}(this._rawAsyncValidators)}}const um=new _e("CallSetDisabledState",{providedIn:"root",factory:()=>VD}),VD="always";function Av(e,t,n=VD){(function xF(e,t){const n=function XQ(e){return e._rawValidators}(e);null!==t.validator?e.setValidators(KQ(n,t.validator)):"function"==typeof n&&e.setValidators([n]);const i=function QQ(e){return e._rawAsyncValidators}(e);null!==t.asyncValidator?e.setAsyncValidators(KQ(i,t.asyncValidator)):"function"==typeof i&&e.setAsyncValidators([i]);const r=()=>e.updateValueAndValidity();HD(t._rawValidators,r),HD(t._rawAsyncValidators,r)})(e,t),t.valueAccessor.writeValue(e.value),(e.disabled||"always"===n)&&t.valueAccessor.setDisabledState?.(e.disabled),function hPe(e,t){t.valueAccessor.registerOnChange(n=>{e._pendingValue=n,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&sZ(e,t)})}(e,t),function gPe(e,t){const n=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};e.registerOnChange(n),t._registerOnDestroy(()=>{e._unregisterOnChange(n)})}(e,t),function pPe(e,t){t.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&sZ(e,t),"submit"!==e.updateOn&&e.markAsTouched()})}(e,t),function fPe(e,t){if(t.valueAccessor.setDisabledState){const n=i=>{t.valueAccessor.setDisabledState(i)};e.registerOnDisabledChange(n),t._registerOnDestroy(()=>{e._unregisterOnDisabledChange(n)})}}(e,t)}function HD(e,t){e.forEach(n=>{n.registerOnValidatorChange&&n.registerOnValidatorChange(t)})}function sZ(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function cZ(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function uZ(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}Promise.resolve();const dZ=class extends SF{constructor(t=null,n,i){super(function CF(e){return(jD(e)?e.validators:e)||null}(n),function DF(e,t){return(jD(t)?t.asyncValidators:e)||null}(i,n)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(n),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),jD(n)&&(n.nonNullable||n.initialValueIsDefault)&&(this.defaultValue=uZ(t)?t.value:t)}setValue(t,n={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==n.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==n.emitViewToModelChange)),this.updateValueAndValidity(n)}patchValue(t,n={}){this.setValue(t,n)}reset(t=this.defaultValue,n={}){this._applyFormState(t),this.markAsPristine(n),this.markAsUntouched(n),this.setValue(this.value,n),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){cZ(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){cZ(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(t){uZ(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},CPe={provide:Xu,useExisting:Pt(()=>Qf)},pZ=Promise.resolve();let Qf=(()=>{class e extends Xu{constructor(n,i,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this.control=new dZ,this._registered=!1,this.name="",this.update=new ze,this._parent=n,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=function NF(e,t){if(!t)return null;let n,i,r;return Array.isArray(t),t.forEach(o=>{o.constructor===gF?n=o:function yPe(e){return Object.getPrototypeOf(e.constructor)===Xf}(o)?i=o:r=o}),r||i||n||null}(0,o)}ngOnChanges(n){if(this._checkForErrors(),!this._registered||"name"in n){if(this._registered&&(this._checkName(),this.formDirective)){const i=n.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in n&&this._updateDisabled(n),function MF(e,t){if(!e.hasOwnProperty("model"))return!1;const n=e.model;return!!n.isFirstChange()||!Object.is(t,n.currentValue)}(n,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Av(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(n){pZ.then(()=>{this.control.setValue(n,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(n){const i=n.isDisabled.currentValue,r=0!==i&&Gg(i);pZ.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(n){return this._parent?function UD(e,t){return[...t.path,e]}(n,this._parent):[n]}static{this.\u0275fac=function(i){return new(i||e)(ee(Pr,9),ee(Yi,10),ee(Ku,10),ee(Ss,10),ee(ha,8),ee(um,8))}}static{this.\u0275dir=be({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[on([CPe]),xt,Ui]})}}return e})();const RPe={provide:Ss,useExisting:Pt(()=>Qu),multi:!0};function EZ(e,t){return null==e?`${t}`:(t&&"object"==typeof t&&(t="Object"),`${e}: ${t}`.slice(0,50))}let Qu=(()=>{class e extends Xf{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(n){this._compareWith=n}writeValue(n){this.value=n;const r=EZ(this._getOptionId(n),n);this.setProperty("value",r)}registerOnChange(n){this.onChange=i=>{this.value=this._getOptionValue(i),n(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(n){for(const i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),n))return i;return null}_getOptionValue(n){const i=function FPe(e){return e.split(":")[0]}(n);return this._optionMap.has(i)?this._optionMap.get(i):n}static{this.\u0275fac=(()=>{let n;return function(r){return(n||(n=fn(e)))(r||e)}})()}static{this.\u0275dir=be({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){1&i&&nt("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[on([RPe]),xt]})}}return e})(),dm=(()=>{class e{constructor(n,i,r){this._element=n,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(n){null!=this._select&&(this._select._optionMap.set(this.id,n),this._setElementValue(EZ(this.id,n)),this._select.writeValue(this._select.value))}set value(n){this._setElementValue(n),this._select&&this._select.writeValue(this._select.value)}_setElementValue(n){this._renderer.setProperty(this._element.nativeElement,"value",n)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static{this.\u0275fac=function(i){return new(i||e)(ee(Gt),ee(aa),ee(Qu,9))}}static{this.\u0275dir=be({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}}return e})();const PPe={provide:Ss,useExisting:Pt(()=>FF),multi:!0};function CZ(e,t){return null==e?`${t}`:("string"==typeof t&&(t=`'${t}'`),t&&"object"==typeof t&&(t="Object"),`${e}: ${t}`.slice(0,50))}let FF=(()=>{class e extends Xf{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(n){this._compareWith=n}writeValue(n){let i;if(this.value=n,Array.isArray(n)){const r=n.map(o=>this._getOptionId(o));i=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(n){this.onChange=i=>{const r=[],o=i.selectedOptions;if(void 0!==o){const s=o;for(let a=0;a{let n;return function(r){return(n||(n=fn(e)))(r||e)}})()}static{this.\u0275dir=be({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){1&i&&nt("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[on([PPe]),xt]})}}return e})(),fm=(()=>{class e{constructor(n,i,r){this._element=n,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(n){null!=this._select&&(this._value=n,this._setElementValue(CZ(this.id,n)),this._select.writeValue(this._select.value))}set value(n){this._select?(this._value=n,this._setElementValue(CZ(this.id,n)),this._select.writeValue(this._select.value)):this._setElementValue(n)}_setElementValue(n){this._renderer.setProperty(this._element.nativeElement,"value",n)}_setSelected(n){this._renderer.setProperty(this._element.nativeElement,"selected",n)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static{this.\u0275fac=function(i){return new(i||e)(ee(Gt),ee(aa),ee(FF,9))}}static{this.\u0275dir=be({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}}return e})(),WPe=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),YPe=(()=>{class e{static withConfig(n){return{ngModule:e,providers:[{provide:um,useValue:n.callSetDisabledState??VD}]}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({imports:[WPe]})}}return e})();var KPe={left:"right",right:"left",bottom:"top",top:"bottom"};function WD(e){return e.replace(/left|right|bottom|top/g,function(t){return KPe[t]})}function Sl(e){return e.split("-")[0]}var XPe={start:"end",end:"start"};function OZ(e){return e.replace(/start|end/g,function(t){return XPe[t]})}var Lr="top",zo="bottom",Ho="right",$r="left",qD="auto",hm=[Lr,zo,Ho,$r],Jf="start",pm="end",RZ="clippingParents",LF="viewport",gm="popper",FZ="reference",$F=hm.reduce(function(e,t){return e.concat([t+"-"+Jf,t+"-"+pm])},[]),BF=[].concat(hm,[qD]).reduce(function(e,t){return e.concat([t,t+"-"+Jf,t+"-"+pm])},[]),PZ="beforeRead",LZ="read",$Z="afterRead",BZ="beforeMain",jZ="main",VZ="afterMain",UZ="beforeWrite",zZ="write",HZ="afterWrite",GZ=[PZ,LZ,$Z,BZ,jZ,VZ,UZ,zZ,HZ];function Go(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function eh(e){return e instanceof Go(e).Element||e instanceof Element}function Ts(e){return e instanceof Go(e).HTMLElement||e instanceof HTMLElement}function jF(e){return!(typeof ShadowRoot>"u")&&(e instanceof Go(e).ShadowRoot||e instanceof ShadowRoot)}function Zu(e){return((eh(e)?e.ownerDocument:e.document)||window.document).documentElement}var th=Math.max,YD=Math.min,mm=Math.round;function VF(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function WZ(){return!/^((?!chrome|android).)*safari/i.test(VF())}function _m(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var i=e.getBoundingClientRect(),r=1,o=1;t&&Ts(e)&&(r=e.offsetWidth>0&&mm(i.width)/e.offsetWidth||1,o=e.offsetHeight>0&&mm(i.height)/e.offsetHeight||1);var a=(eh(e)?Go(e):window).visualViewport,l=!WZ()&&n,c=(i.left+(l&&a?a.offsetLeft:0))/r,u=(i.top+(l&&a?a.offsetTop:0))/o,d=i.width/r,f=i.height/o;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function UF(e){var t=Go(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function zF(e){return _m(Zu(e)).left+UF(e).scrollLeft}function Vc(e){return Go(e).getComputedStyle(e)}function Tl(e){return e?(e.nodeName||"").toLowerCase():null}function KD(e){return"html"===Tl(e)?e:e.assignedSlot||e.parentNode||(jF(e)?e.host:null)||Zu(e)}function HF(e){var t=Vc(e);return/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function qZ(e){return["html","body","#document"].indexOf(Tl(e))>=0?e.ownerDocument.body:Ts(e)&&HF(e)?e:qZ(KD(e))}function Nv(e,t){var n;void 0===t&&(t=[]);var i=qZ(e),r=i===(null==(n=e.ownerDocument)?void 0:n.body),o=Go(i),s=r?[o].concat(o.visualViewport||[],HF(i)?i:[]):i,a=t.concat(s);return r?a:a.concat(Nv(KD(s)))}function JPe(e){return["table","td","th"].indexOf(Tl(e))>=0}function YZ(e){return Ts(e)&&"fixed"!==Vc(e).position?e.offsetParent:null}function Iv(e){for(var t=Go(e),n=YZ(e);n&&JPe(n)&&"static"===Vc(n).position;)n=YZ(n);return n&&("html"===Tl(n)||"body"===Tl(n)&&"static"===Vc(n).position)?t:n||function eLe(e){var t=/firefox/i.test(VF());if(/Trident/i.test(VF())&&Ts(e)&&"fixed"===Vc(e).position)return null;var r=KD(e);for(jF(r)&&(r=r.host);Ts(r)&&["html","body"].indexOf(Tl(r))<0;){var o=Vc(r);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return r;r=r.parentNode}return null}(e)||t}function KZ(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&jF(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function GF(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function XZ(e,t,n){return t===LF?GF(function QPe(e,t){var n=Go(e),i=Zu(e),r=n.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=WZ();(c||!c&&"fixed"===t)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+zF(e),y:l}}(e,n)):eh(t)?function tLe(e,t){var n=_m(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):GF(function ZPe(e){var t,n=Zu(e),i=UF(e),r=null==(t=e.ownerDocument)?void 0:t.body,o=th(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=th(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+zF(e),l=-i.scrollTop;return"rtl"===Vc(r||n).direction&&(a+=th(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(Zu(e)))}function ym(e){return e.split("-")[1]}function WF(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function QZ(e){var l,t=e.reference,n=e.element,i=e.placement,r=i?Sl(i):null,o=i?ym(i):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2;switch(r){case Lr:l={x:s,y:t.y-n.height};break;case zo:l={x:s,y:t.y+t.height};break;case Ho:l={x:t.x+t.width,y:a};break;case $r:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=r?WF(r):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case Jf:l[c]=l[c]-(t[u]/2-n[u]/2);break;case pm:l[c]=l[c]+(t[u]/2-n[u]/2)}}return l}function JZ(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function eJ(e,t){return t.reduce(function(n,i){return n[i]=e,n},{})}function vm(e,t){void 0===t&&(t={});var i=t.placement,r=void 0===i?e.placement:i,o=t.strategy,s=void 0===o?e.strategy:o,a=t.boundary,l=void 0===a?RZ:a,c=t.rootBoundary,u=void 0===c?LF:c,d=t.elementContext,f=void 0===d?gm:d,h=t.altBoundary,p=void 0!==h&&h,g=t.padding,m=void 0===g?0:g,_=JZ("number"!=typeof m?m:eJ(m,hm)),v=e.rects.popper,b=e.elements[p?f===gm?FZ:gm:f],w=function iLe(e,t,n,i){var r="clippingParents"===t?function nLe(e){var t=Nv(KD(e)),i=["absolute","fixed"].indexOf(Vc(e).position)>=0&&Ts(e)?Iv(e):e;return eh(i)?t.filter(function(r){return eh(r)&&KZ(r,i)&&"body"!==Tl(r)}):[]}(e):[].concat(t),o=[].concat(r,[n]),a=o.reduce(function(l,c){var u=XZ(e,c,i);return l.top=th(u.top,l.top),l.right=YD(u.right,l.right),l.bottom=YD(u.bottom,l.bottom),l.left=th(u.left,l.left),l},XZ(e,o[0],i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(eh(b)?b:b.contextElement||Zu(e.elements.popper),l,u,s),C=_m(e.elements.reference),E=QZ({reference:C,element:v,strategy:"absolute",placement:r}),D=GF(Object.assign({},v,E)),M=f===gm?D:C,k={top:w.top-M.top+_.top,bottom:M.bottom-w.bottom+_.bottom,left:w.left-M.left+_.left,right:M.right-w.right+_.right},R=e.modifiersData.offset;if(f===gm&&R){var F=R[r];Object.keys(k).forEach(function(P){var T=[Ho,zo].indexOf(P)>=0?1:-1,S=[Lr,zo].indexOf(P)>=0?"y":"x";k[P]+=F[S]*T})}return k}const qF={name:"flip",enabled:!0,phase:"main",fn:function sLe(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var r=n.mainAxis,o=void 0===r||r,s=n.altAxis,a=void 0===s||s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,p=void 0===h||h,g=n.allowedAutoPlacements,m=t.options.placement,_=Sl(m),v=l||(_!==m&&p?function oLe(e){if(Sl(e)===qD)return[];var t=WD(e);return[OZ(e),t,OZ(t)]}(m):[WD(m)]),b=[m].concat(v).reduce(function(j,H){return j.concat(Sl(H)===qD?function rLe(e,t){void 0===t&&(t={});var r=t.boundary,o=t.rootBoundary,s=t.padding,a=t.flipVariations,l=t.allowedAutoPlacements,c=void 0===l?BF:l,u=ym(t.placement),d=u?a?$F:$F.filter(function(p){return ym(p)===u}):hm,f=d.filter(function(p){return c.indexOf(p)>=0});0===f.length&&(f=d);var h=f.reduce(function(p,g){return p[g]=vm(e,{placement:g,boundary:r,rootBoundary:o,padding:s})[Sl(g)],p},{});return Object.keys(h).sort(function(p,g){return h[p]-h[g]})}(t,{placement:H,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:g}):H)},[]),w=t.rects.reference,C=t.rects.popper,E=new Map,D=!0,M=b[0],k=0;k=0,S=T?"width":"height",x=vm(t,{placement:R,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),I=T?P?Ho:$r:P?zo:Lr;w[S]>C[S]&&(I=WD(I));var A=WD(I),N=[];if(o&&N.push(x[F]<=0),a&&N.push(x[I]<=0,x[A]<=0),N.every(function(j){return j})){M=R,D=!1;break}E.set(R,N)}if(D)for(var $=function(H){var oe=b.find(function(Y){var ue=E.get(Y);if(ue)return ue.slice(0,H).every(function(W){return W})});if(oe)return M=oe,"break"},B=p?3:1;B>0&&"break"!==$(B);B--);t.placement!==M&&(t.modifiersData[i]._skip=!0,t.placement=M,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function kv(e,t,n){return th(e,YD(t,n))}function YF(e){var t=_m(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}const KF={name:"preventOverflow",enabled:!0,phase:"main",fn:function cLe(e){var t=e.state,n=e.options,i=e.name,r=n.mainAxis,o=void 0===r||r,s=n.altAxis,a=void 0!==s&&s,f=n.tether,h=void 0===f||f,p=n.tetherOffset,g=void 0===p?0:p,m=vm(t,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),_=Sl(t.placement),y=ym(t.placement),v=!y,b=WF(_),w=function aLe(e){return"x"===e?"y":"x"}(b),C=t.modifiersData.popperOffsets,E=t.rects.reference,D=t.rects.popper,M="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,k="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(C){if(o){var P,T="y"===b?Lr:$r,S="y"===b?zo:Ho,x="y"===b?"height":"width",I=C[b],A=I+m[T],N=I-m[S],O=h?-D[x]/2:0,$=y===Jf?E[x]:D[x],B=y===Jf?-D[x]:-E[x],V=t.elements.arrow,j=h&&V?YF(V):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},oe=H[T],Y=H[S],ue=kv(0,E[x],j[x]),W=v?E[x]/2-O-ue-oe-k.mainAxis:$-ue-oe-k.mainAxis,ne=v?-E[x]/2+O+ue+Y+k.mainAxis:B+ue+Y+k.mainAxis,ie=t.elements.arrow&&Iv(t.elements.arrow),G=ie?"y"===b?ie.clientTop||0:ie.clientLeft||0:0,ye=null!=(P=R?.[b])?P:0,Ue=I+ne-ye,Te=kv(h?YD(A,I+W-ye-G):A,I,h?th(N,Ue):N);C[b]=Te,F[b]=Te-I}if(a){var Oe,_n=C[w],Rn="y"===w?"height":"width",Jn=_n+m["x"===b?Lr:$r],Up=_n-m["x"===b?zo:Ho],Tr=-1!==[Lr,$r].indexOf(_),nl=null!=(Oe=R?.[w])?Oe:0,Fw=Tr?Jn:_n-E[Rn]-D[Rn]-nl+k.altAxis,Pw=Tr?_n+E[Rn]+D[Rn]-nl-k.altAxis:Up,Lw=h&&Tr?function lLe(e,t,n){var i=kv(e,t,n);return i>n?n:i}(Fw,_n,Pw):kv(h?Fw:Jn,_n,h?Pw:Up);C[w]=Lw,F[w]=Lw-_n}t.modifiersData[i]=F}},requiresIfExists:["offset"]},XF={name:"arrow",enabled:!0,phase:"main",fn:function dLe(e){var t,n=e.state,i=e.name,r=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Sl(n.placement),l=WF(a),u=[$r,Ho].indexOf(a)>=0?"height":"width";if(o&&s){var d=function(t,n){return JZ("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:eJ(t,hm))}(r.padding,n),f=YF(o),h="y"===l?Lr:$r,p="y"===l?zo:Ho,g=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],m=s[l]-n.rects.reference[l],_=Iv(o),y=_?"y"===l?_.clientHeight||0:_.clientWidth||0:0,C=y/2-f[u]/2+(g/2-m/2),E=kv(d[h],C,y-f[u]-d[p]);n.modifiersData[i]=((t={})[l]=E,t.centerOffset=E-C,t)}},effect:function fLe(e){var t=e.state,i=e.options.element,r=void 0===i?"[data-popper-arrow]":i;null!=r&&("string"==typeof r&&!(r=t.elements.popper.querySelector(r))||KZ(t.elements.popper,r)&&(t.elements.arrow=r))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function mLe(e,t,n){void 0===n&&(n=!1);var i=Ts(t),r=Ts(t)&&function gLe(e){var t=e.getBoundingClientRect(),n=mm(t.width)/e.offsetWidth||1,i=mm(t.height)/e.offsetHeight||1;return 1!==n||1!==i}(t),o=Zu(t),s=_m(e,r,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&(("body"!==Tl(t)||HF(o))&&(a=function pLe(e){return e!==Go(e)&&Ts(e)?function hLe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}(e):UF(e)}(t)),Ts(t)?((l=_m(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=zF(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function _Le(e){var t=new Map,n=new Set,i=[];function r(o){n.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&r(l)}}),i.push(o)}return e.forEach(function(o){t.set(o.name,o)}),e.forEach(function(o){n.has(o.name)||r(o)}),i}function vLe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}var tJ={placement:"bottom",modifiers:[],strategy:"absolute"};function nJ(){for(var e=arguments.length,t=new Array(e),n=0;n=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[$r,Ho].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(d,t.rects,o),u},{}),a=s[t.placement],c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=a.x,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=s}},kLe=["*"],l3e=["dialog"],sJ={animation:!0,transitionTimerDelayMs:5};let ZD=(()=>{class e{constructor(){this.animation=sJ.animation}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function bm(e){return"string"==typeof e}function nh(e){return null!=e}function wm(e){return(e||document.body).getBoundingClientRect()}const t$e=()=>{},{transitionTimerDelayMs:n$e}=sJ,Ov=new Map,xs=(e,t,n,i)=>{let r=i.context||{};const o=Ov.get(t);if(o)switch(i.runningTransition){case"continue":return jo;case"stop":e.run(()=>o.transition$.complete()),r=Object.assign(o.context,r),Ov.delete(t)}const s=n(t,i.animation,r)||t$e;if(!i.animation||"none"===window.getComputedStyle(t).transitionProperty)return e.run(()=>s()),Ge(void 0).pipe(function e$e(e){return t=>new cn(n=>t.subscribe({next:s=>e.run(()=>n.next(s)),error:s=>e.run(()=>n.error(s)),complete:()=>e.run(()=>n.complete())}))}(e));const a=new tn,l=new tn,c=a.pipe(function zFe(...e){return t=>sv(t,Ge(...e))}(!0));Ov.set(t,{transition$:a,complete:()=>{l.next(),l.complete()},context:r});const u=function Q3e(e){const{transitionDelay:t,transitionDuration:n}=window.getComputedStyle(e);return 1e3*(parseFloat(t)+parseFloat(n))}(t);return e.runOutsideAngular(()=>{const d=qi(t,"transitionend").pipe(Wi(c),Wn(({target:h})=>h===t));(function MQ(...e){return 1===(e=AQ(e)).length?Hi(e[0]):new cn(function VFe(e){return t=>{let n=[];for(let i=0;n&&!t.closed&&i{if(n){for(let o=0;o{let o=function BFe(e){return e instanceof Date&&!isNaN(e)}(e)?+e-n.now():e;o<0&&(o=0);let s=0;return n.schedule(function(){r.closed||(r.next(s++),0<=i?this.schedule(void 0,i):r.complete())},o)})}(u+n$e).pipe(Wi(c)),d,l).pipe(Wi(c)).subscribe(()=>{Ov.delete(t),e.run(()=>{s(),a.next(),a.complete()})})}),a.asObservable()};let hJ=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),pJ=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),_J=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),yJ=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})();typeof navigator<"u"&&navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent));const SJ=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function TJ(e){const t=Array.from(e.querySelectorAll(SJ)).filter(n=>-1!==n.tabIndex);return[t[0],t[t.length-1]]}new Date(1882,10,12),new Date(2174,10,25);let UJ=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),HJ=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),oBe=(()=>{class e{constructor(){this._ngbConfig=L(ZD),this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(n){this._animation=n}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();class ah{constructor(t,n,i){this.nodes=t,this.viewRef=n,this.componentRef=i}}let sBe=(()=>{class e{constructor(){this._document=L(Ln)}hide(){const n=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),i=this._document.body,r=i.style,{overflow:o,paddingRight:s}=r;if(n>0){const a=parseFloat(window.getComputedStyle(i).paddingRight);r.paddingRight=`${a+n}px`}return r.overflow="hidden",()=>{n>0&&(r.paddingRight=s),r.overflow=o}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),aBe=(()=>{class e{constructor(){this._nativeElement=L(Gt).nativeElement,this._zone=L(ct),this._injector=L(nn)}ngOnInit(){$u(()=>xs(this._zone,this._nativeElement,(n,i)=>{i&&wm(n),n.classList.add("show")},{animation:this.animation,runningTransition:"continue"}),{injector:this._injector,phase:ys.MixedReadWrite})}hide(){return xs(this._zone,this._nativeElement,({classList:n})=>n.remove("show"),{animation:this.animation,runningTransition:"stop"})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=Cn({type:e,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1055"],hostVars:6,hostBindings:function(i,r){2&i&&(I0("modal-backdrop"+(r.backdropClass?" "+r.backdropClass:"")),hn("show",!r.animation)("fade",r.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},standalone:!0,features:[da],decls:0,vars:0,template:function(i,r){},encapsulation:2})}}return e})();class GJ{update(t){}close(t){}dismiss(t){}}const lBe=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","scrollable","size","windowClass","modalDialogClass"],cBe=["animation","backdropClass"];class uBe{_applyWindowOptions(t,n){lBe.forEach(i=>{nh(n[i])&&(t[i]=n[i])})}_applyBackdropOptions(t,n){cBe.forEach(i=>{nh(n[i])&&(t[i]=n[i])})}update(t){this._applyWindowOptions(this._windowCmptRef.instance,t),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._applyBackdropOptions(this._backdropCmptRef.instance,t)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(Wi(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(Wi(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}constructor(t,n,i,r){this._windowCmptRef=t,this._contentRef=n,this._backdropCmptRef=i,this._beforeDismiss=r,this._closed=new tn,this._dismissed=new tn,this._hidden=new tn,t.instance.dismissEvent.subscribe(o=>{this.dismiss(o)}),this.result=new Promise((o,s)=>{this._resolve=o,this._reject=s}),this.result.then(null,()=>{})}close(t){this._windowCmptRef&&(this._closed.next(t),this._resolve(t),this._removeModalElements())}_dismiss(t){this._dismissed.next(t),this._reject(t),this._removeModalElements()}dismiss(t){if(this._windowCmptRef)if(this._beforeDismiss){const n=this._beforeDismiss();!function aJ(e){return e&&e.then}(n)?!1!==n&&this._dismiss(t):n.then(i=>{!1!==i&&this._dismiss(t)},()=>{})}else this._dismiss(t)}_removeModalElements(){const t=this._windowCmptRef.instance.hide(),n=this._backdropCmptRef?this._backdropCmptRef.instance.hide():Ge(void 0);t.subscribe(()=>{const{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),this._contentRef?.viewRef?.destroy(),this._windowCmptRef=null,this._contentRef=null}),n.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),hF(t,n).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var mP=function(e){return e[e.BACKDROP_CLICK=0]="BACKDROP_CLICK",e[e.ESC=1]="ESC",e}(mP||{});let dBe=(()=>{class e{constructor(){this._document=L(Ln),this._elRef=L(Gt),this._zone=L(ct),this._injector=L(nn),this._closed$=new tn,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new ze,this.shown=new tn,this.hidden=new tn}get fullscreenClass(){return!0===this.fullscreen?" modal-fullscreen":bm(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(n){this.dismissEvent.emit(n)}ngOnInit(){this._elWithFocus=this._document.activeElement,$u(()=>this._show(),{injector:this._injector,phase:ys.MixedReadWrite})}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:n}=this._elRef,i={animation:this.animation,runningTransition:"stop"},s=hF(xs(this._zone,n,()=>n.classList.remove("show"),i),xs(this._zone,this._dialogEl.nativeElement,()=>{},i));return s.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),s}_show(){const n={animation:this.animation,runningTransition:"continue"};hF(xs(this._zone,this._elRef.nativeElement,(o,s)=>{s&&wm(o),o.classList.add("show")},n),xs(this._zone,this._dialogEl.nativeElement,()=>{},n)).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:n}=this._elRef;this._zone.runOutsideAngular(()=>{qi(n,"keydown").pipe(Wi(this._closed$),Wn(r=>"Escape"===r.key)).subscribe(r=>{this.keyboard?requestAnimationFrame(()=>{r.defaultPrevented||this._zone.run(()=>this.dismiss(mP.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let i=!1;qi(this._dialogEl.nativeElement,"mousedown").pipe(Wi(this._closed$),Gi(()=>i=!1),Es(()=>qi(n,"mouseup").pipe(Wi(this._closed$),Cs(1))),Wn(({target:r})=>n===r)).subscribe(()=>{i=!0}),qi(n,"click").pipe(Wi(this._closed$)).subscribe(({target:r})=>{n===r&&("static"===this.backdrop?this._bumpBackdrop():!0===this.backdrop&&!i&&this._zone.run(()=>this.dismiss(mP.BACKDROP_CLICK))),i=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:n}=this._elRef;if(!n.contains(document.activeElement)){const i=n.querySelector("[ngbAutofocus]"),r=TJ(n)[0];(i||r||n).focus()}}_restoreFocus(){const n=this._document.body,i=this._elWithFocus;let r;r=i&&i.focus&&n.contains(i)?i:n,this._zone.runOutsideAngular(()=>{setTimeout(()=>r.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&xs(this._zone,this._elRef.nativeElement,({classList:n})=>(n.add("modal-static"),()=>n.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=Cn({type:e,selectors:[["ngb-modal-window"]],viewQuery:function(i,r){if(1&i&&ua(l3e,7),2&i){let o;Wt(o=qt())&&(r._dialogEl=o.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(i,r){2&i&&(rn("aria-modal",!0)("aria-labelledby",r.ariaLabelledBy)("aria-describedby",r.ariaDescribedBy),I0("modal d-block"+(r.windowClass?" "+r.windowClass:"")),hn("fade",r.animation))},inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",fullscreen:"fullscreen",keyboard:"keyboard",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},standalone:!0,features:[da],ngContentSelectors:kLe,decls:4,vars:2,consts:[["dialog",""],["role","document"],[1,"modal-content"]],template:function(i,r){1&i&&(function eq(e){const t=Q()[Sn][Vi];if(!t.projection){const i=t.projection=function sE(e,t){const n=[];for(let i=0;i{class e{constructor(){this._applicationRef=L(fa),this._injector=L(nn),this._environmentInjector=L(ji),this._document=L(Ln),this._scrollBar=L(sBe),this._activeWindowCmptHasChanged=new tn,this._ariaHiddenValues=new Map,this._scrollBarRestoreFn=null,this._modalRefs=[],this._windowCmpts=[],this._activeInstances=new ze;const n=L(ct);this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const i=this._windowCmpts[this._windowCmpts.length-1];((e,t,n,i=!1)=>{e.runOutsideAngular(()=>{const r=qi(t,"focusin").pipe(Wi(n),at(o=>o.target));qi(t,"keydown").pipe(Wi(n),Wn(o=>"Tab"===o.key),pF(r)).subscribe(([o,s])=>{const[a,l]=TJ(t);(s===a||s===t)&&o.shiftKey&&(l.focus(),o.preventDefault()),s===l&&!o.shiftKey&&(a.focus(),o.preventDefault())}),i&&qi(t,"click").pipe(Wi(n),pF(r),at(o=>o[1])).subscribe(o=>o.focus())})})(n,i.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(i.location.nativeElement)}})}_restoreScrollBar(){const n=this._scrollBarRestoreFn;n&&(this._scrollBarRestoreFn=null,n())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(n,i,r){const o=r.container instanceof HTMLElement?r.container:nh(r.container)?this._document.querySelector(r.container):this._document.body;if(!o)throw new Error(`The specified modal container "${r.container||"body"}" was not found in the DOM.`);this._hideScrollBar();const s=new GJ,a=(n=r.injector||n).get(ji,null)||this._environmentInjector,l=this._getContentRef(n,a,i,s,r);let c=!1!==r.backdrop?this._attachBackdrop(o):void 0,u=this._attachWindowComponent(o,l.nodes),d=new uBe(u,l,c,r.beforeDismiss);return this._registerModalRef(d),this._registerWindowCmpt(u),d.hidden.pipe(Cs(1)).subscribe(()=>Promise.resolve(!0).then(()=>{this._modalRefs.length||(this._document.body.classList.remove("modal-open"),this._restoreScrollBar(),this._revertAriaHidden())})),s.close=f=>{d.close(f)},s.dismiss=f=>{d.dismiss(f)},s.update=f=>{d.update(f)},d.update(r),1===this._modalRefs.length&&this._document.body.classList.add("modal-open"),c&&c.instance&&c.changeDetectorRef.detectChanges(),u.changeDetectorRef.detectChanges(),d}get activeInstances(){return this._activeInstances}dismissAll(n){this._modalRefs.forEach(i=>i.dismiss(n))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(n){let i=eR(aBe,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(i.hostView),n.appendChild(i.location.nativeElement),i}_attachWindowComponent(n,i){let r=eR(dBe,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:i});return this._applicationRef.attachView(r.hostView),n.appendChild(r.location.nativeElement),r}_getContentRef(n,i,r,o,s){return r?r instanceof ii?this._createFromTemplateRef(r,o):bm(r)?this._createFromString(r):this._createFromComponent(n,i,r,o,s):new ah([])}_createFromTemplateRef(n,i){const o=n.createEmbeddedView({$implicit:i,close(s){i.close(s)},dismiss(s){i.dismiss(s)}});return this._applicationRef.attachView(o),new ah([o.rootNodes],o)}_createFromString(n){const i=this._document.createTextNode(`${n}`);return new ah([[i]])}_createFromComponent(n,i,r,o,s){const l=eR(r,{environmentInjector:i,elementInjector:nn.create({providers:[{provide:GJ,useValue:o}],parent:n})}),c=l.location.nativeElement;return s.scrollable&&c.classList.add("component-host-scrollable"),this._applicationRef.attachView(l.hostView),new ah([[c]],l.hostView,l)}_setAriaHidden(n){const i=n.parentElement;i&&n!==this._document.body&&(Array.from(i.children).forEach(r=>{r!==n&&"SCRIPT"!==r.nodeName&&(this._ariaHiddenValues.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}),this._setAriaHidden(i))}_revertAriaHidden(){this._ariaHiddenValues.forEach((n,i)=>{n?i.setAttribute("aria-hidden",n):i.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(n){const i=()=>{const r=this._modalRefs.indexOf(n);r>-1&&(this._modalRefs.splice(r,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(n),this._activeInstances.emit(this._modalRefs),n.result.then(i,i)}_registerWindowCmpt(n){this._windowCmpts.push(n),this._activeWindowCmptHasChanged.next(),n.onDestroy(()=>{const i=this._windowCmpts.indexOf(n);i>-1&&(this._windowCmpts.splice(i,1),this._activeWindowCmptHasChanged.next())})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),WJ=(()=>{class e{constructor(){this._injector=L(nn),this._modalStack=L(fBe),this._config=L(oBe)}open(n,i={}){const r={...this._config,animation:this._config.animation,...i};return this._modalStack.open(this._injector,n,r)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(n){this._modalStack.dismissAll(n)}hasOpenModals(){return this._modalStack.hasOpenModals()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),qJ=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({providers:[WJ]})}}return e})(),XJ=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),ree=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),oee=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),see=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),aee=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),lee=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),cee=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),uee=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),dee=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})();new _e("live announcer delay",{providedIn:"root",factory:()=>100});let fee=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})(),hee=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({})}}return e})();const xBe=[hJ,pJ,_J,yJ,UJ,HJ,qJ,XJ,hee,ree,oee,see,aee,lee,cee,uee,dee,fee];let ABe=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({imports:[xBe,hJ,pJ,_J,yJ,UJ,HJ,qJ,XJ,hee,ree,oee,see,aee,lee,cee,uee,dee,fee]})}}return e})(),MBe=(()=>{class e{constructor(n,i,r){this.apparelService=n,this.modalService=i,this.viewportScroller=r,this.logos=CFe.r,this.selectedLogos=[]}ngOnInit(){this.selectedLogos=[];for(var n=0;n<=5;n++){let i="";do{i=this.logos[this.getRandomInt(20)]}while(this.selectedLogos.includes(i));this.selectedLogos.push(i)}}open(n){this.modalService.open(n)}onExploreMore(){this.apparelService.setExploreMore()}getRandomInt(n){return Math.floor(Math.random()*n)}onClick(n){this.viewportScroller.scrollToAnchor(n)}static{this.\u0275fac=function(i){return new(i||e)(ee(sm),ee(WJ),ee(tv))}}static{this.\u0275cmp=Cn({type:e,selectors:[["intro"]],decls:32,vars:10,consts:[[1,"intro","wikirate-box"],[1,"wikirate-container"],[1,"row","mt-5","mb-3"],[1,"col-md-8","nopadding"],[1,"showcase-main-title","call-to-action-title"],[1,"highlight-text"],[1,"main-text"],[1,"col-md-4"],[1,"row"],[1,"scroll",3,"click"],[1,"bi","bi-chevron-down"],[1,"ml-2"],[1,"animation","d-none","d-md-block"],[1,"logo-1","d-block","corporate-logo-xl","rounded-circle","p-3","bg-white","shadow-lg","ml-auto"],[1,"logo-img",3,"src"],[1,"logo-2","d-block","corporate-logo-xl","bg-white","rounded-circle","shadow-lg","p-3","ms-auto"],[1,"logo-3","d-block","corporate-logo-xl","rounded-circle","p-3","bg-white","shadow-lg","ml-auto"],[1,"logo-4","d-block","corporate-logo-xl","rounded-circle","p-3","bg-white","shadow-lg","ml-auto"],[1,"logo-5","d-block","corporate-logo-xl","bg-white","rounded-circle","shadow-lg","p-3","ms-auto"]],template:function(i,r){1&i&&(U(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h1",4)(5,"span",5),X(6,"Apparel 100"),z(),Ke(7,"br"),X(8," an ESG data and supply chain transparency showcase "),z(),Ke(9,"br"),U(10,"div",6)(11,"p"),X(12,"Discover what we do and don't know about the top 100 apparel companies through interactive maps and infographics. "),z(),U(13,"p"),X(14,"Wikirate's biggest data showcase unearths; who the top 100 are, how much we know about their environmental, social and governance performance, and where their suppliers are located."),z()()(),Ke(15,"div",7),z(),U(16,"div",8)(17,"a",9),nt("click",function(){return r.onClick("market-cap-map")}),Ke(18,"i",10),U(19,"span",11),X(20,"Scroll down"),z()()()()(),U(21,"div",12)(22,"div",13),Ke(23,"img",14),z(),U(24,"div",15),Ke(25,"img",14),z(),U(26,"div",16),Ke(27,"img",14),z(),U(28,"div",17),Ke(29,"img",14),z(),U(30,"div",18),Ke(31,"img",14),z()()),2&i&&(re(22),Ae("@slide-in",void 0),re(),Mc("src",r.selectedLogos[0],Oo),re(),Ae("@slide-in-delay-sm",void 0),re(),Mc("src",r.selectedLogos[1],Oo),re(),Ae("@slide-in-delay-md",void 0),re(),Mc("src",r.selectedLogos[2],Oo),re(),Ae("@slide-in-delay-lg",void 0),re(),Mc("src",r.selectedLogos[3],Oo),re(),Ae("@slide-in-delay-xl",void 0),re(),Mc("src",r.selectedLogos[4],Oo))},styles:[".intro[_ngcontent-%COMP%]{min-height:450px;display:flex;align-items:center}h1.showcase-main-title[_ngcontent-%COMP%]{font-style:normal;font-weight:400!important;font-size:2.6rem;line-height:135%;color:#484c9d;max-width:600px}.main-text[_ngcontent-%COMP%]{font-style:normal;font-weight:400;font-size:1.25rem;color:#34343b;line-height:155%;margin-bottom:30px;max-width:600px}.corporate-logo-xl[_ngcontent-%COMP%]{height:5.25rem;width:5.25rem;position:relative}.corporate-logo-sm[_ngcontent-%COMP%]{height:4.25rem;width:4.25rem;position:relative}.logo-1[_ngcontent-%COMP%]{position:absolute;left:85%;right:15%;top:7em}.logo-2[_ngcontent-%COMP%]{position:absolute;left:65%;right:35%;top:17em}.logo-3[_ngcontent-%COMP%]{position:absolute;left:93%;right:7%;top:23em}.logo-4[_ngcontent-%COMP%]{position:absolute;left:80%;right:20%;top:30em}.logo-5[_ngcontent-%COMP%]{position:absolute;left:64%;right:36%;top:39em}a.scroll[_ngcontent-%COMP%]{color:#f7733d;cursor:pointer;text-decoration:inherit}"],data:{animation:[wv("slide-in",[Cv(":enter",[Ds({opacity:0,transform:"translateY(50px)"}),Ev("600ms 50ms",Ds({opacity:1,transform:"translateY(0)"}))])]),wv("slide-in-delay-sm",[Cv(":enter",[Ds({opacity:0,transform:"translateY(50px)"}),Ev("600ms 150ms",Ds({opacity:1,transform:"translateY(0)"}))])]),wv("slide-in-delay-md",[Cv(":enter",[Ds({opacity:0,transform:"translateY(50px)"}),Ev("600ms 250ms",Ds({opacity:1,transform:"translateY(0)"}))])]),wv("slide-in-delay-lg",[Cv(":enter",[Ds({opacity:0,transform:"translateY(50px)"}),Ev("600ms 350ms",Ds({opacity:1,transform:"translateY(0)"}))])]),wv("slide-in-delay-xl",[Cv(":enter",[Ds({opacity:0,transform:"translateY(50px)"}),Ev("600ms 450ms",Ds({opacity:1,transform:"translateY(0)"}))])])]}})}}return e})();function pee(e,t,n,i,r,o,s){try{var a=e[o](s),l=a.value}catch(c){return void n(c)}a.done?t(l):Promise.resolve(l).then(i,r)}function qn(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function s(l){pee(o,i,r,s,a,"next",l)}function a(l){pee(o,i,r,s,a,"throw",l)}s(void 0)})}}const NBe=/("(?:[^\\"]|\\.)*")|[:,]/g;function vP(e,t={}){const n=JSON.stringify([1],void 0,void 0===t.indent?2:t.indent).slice(2,-3),i=""===n?1/0:void 0===t.maxLength?80:t.maxLength;let{replacer:r}=t;return function o(s,a,l){s&&"function"==typeof s.toJSON&&(s=s.toJSON());const c=JSON.stringify(s,r);if(void 0===c)return c;const u=i-a.length-l;if(c.length<=u){const d=c.replace(NBe,(f,h)=>h||`${f} `);if(d.length<=u)return d}if(null!=r&&(s=JSON.parse(c),r=void 0),"object"==typeof s&&null!==s){const d=a+n,f=[];let p,g,h=0;if(Array.isArray(s)){p="[",g="]";const{length:m}=s;for(;h0)return[p,n+f.join(`,\n${d}`),g].join(`\n${a}`)}return c}(e,"",0)}function co(e,t,n){return e.fields=t||[],e.fname=n,e}function $n(e){return null==e?null:e.fname}function fr(e){return null==e?null:e.fields}function gee(e){return 1===e.length?IBe(e[0]):kBe(e)}const IBe=e=>function(t){return t[e]},kBe=e=>{const t=e.length;return function(n){for(let i=0;is&&c(),r=s=a+1):"]"===l&&(r||J("Access path missing open bracket: "+e),r>0&&c(),r=0,s=a+1):a>s?c():s=a+1}return r&&J("Access path missing closing bracket: "+e),i&&J("Access path missing closing quote: "+e),a>s&&(a++,c()),t}function As(e,t,n){const i=xl(e);return e=1===i.length?i[0]:e,co((n&&n.get||gee)(i),[e],t||e)}const Pv=As("id"),hr=co(e=>e,[],"identity"),Ju=co(()=>0,[],"zero"),Dm=co(()=>1,[],"one"),Ms=co(()=>!0,[],"true"),ed=co(()=>!1,[],"false");function OBe(e,t,n){const i=[t].concat([].slice.call(n));console[e].apply(console,i)}const mee=0,bP=1,wP=2,_ee=3,yee=4;function EP(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:OBe,i=e||mee;return{level(r){return arguments.length?(i=+r,this):i},error(){return i>=bP&&n(t||"error","ERROR",arguments),this},warn(){return i>=wP&&n(t||"warn","WARN",arguments),this},info(){return i>=_ee&&n(t||"log","INFO",arguments),this},debug(){return i>=yee&&n(t||"log","DEBUG",arguments),this}}}var te=Array.isArray;function we(e){return e===Object(e)}const vee=e=>"__proto__"!==e;function Sm(){for(var e=arguments.length,t=new Array(e),n=0;n{for(const o in r)"signals"===o?i.signals=RBe(i.signals,r.signals):Tm(i,o,r[o],"legend"===o?{layout:1}:"style"===o||null);return i},{})}function Tm(e,t,n,i){if(!vee(t))return;let r,o;if(we(n)&&!te(n))for(r in o=we(e[t])?e[t]:e[t]={},n)i&&(!0===i||i[r])?Tm(o,r,n[r]):vee(r)&&(o[r]=n[r]);else e[t]=n}function RBe(e,t){if(null==e)return t;const n={},i=[];function r(o){n[o.name]||(n[o.name]=1,i.push(o))}return t.forEach(r),e.forEach(r),i}function yt(e){return e[e.length-1]}function pr(e){return null==e||""===e?null:+e}const bee=e=>t=>e*Math.exp(t),wee=e=>t=>Math.log(e*t),Eee=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),Cee=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,dS=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function fS(e,t,n,i){const r=n(e[0]),o=n(yt(e)),s=(o-r)*t;return[i(r-s),i(o-s)]}function Dee(e,t){return fS(e,t,pr,hr)}function See(e,t){var n=Math.sign(e[0]);return fS(e,t,wee(n),bee(n))}function Tee(e,t,n){return fS(e,t,dS(n),dS(1/n))}function xee(e,t,n){return fS(e,t,Eee(n),Cee(n))}function hS(e,t,n,i,r){const o=i(e[0]),s=i(yt(e)),a=null!=t?i(t):(o+s)/2;return[r(a+(o-a)*n),r(a+(s-a)*n)]}function CP(e,t,n){return hS(e,t,n,pr,hr)}function DP(e,t,n){const i=Math.sign(e[0]);return hS(e,t,n,wee(i),bee(i))}function pS(e,t,n,i){return hS(e,t,n,dS(i),dS(1/i))}function SP(e,t,n,i){return hS(e,t,n,Eee(i),Cee(i))}function Aee(e){return 1+~~(new Date(e).getMonth()/3)}function Mee(e){return 1+~~(new Date(e).getUTCMonth()/3)}function Ee(e){return null!=e?te(e)?e:[e]:[]}function Nee(e,t,n){let o,i=e[0],r=e[1];return r=n-t?[t,n]:[i=Math.min(Math.max(i,t),n-o),i+o]}function it(e){return"function"==typeof e}const FBe="descending";function TP(e,t,n){n=n||{},t=Ee(t)||[];const i=[],r=[],o={},s=n.comparator||PBe;return Ee(e).forEach((a,l)=>{null!=a&&(i.push(t[l]===FBe?-1:1),r.push(a=it(a)?a:As(a,null,n)),(fr(a)||[]).forEach(c=>o[c]=1))}),0===r.length?null:co(s(r,i),Object.keys(o))}const gS=(e,t)=>(et||null==t)&&null!=e?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t==t?-1:t!=t&&e==e?1:0),PBe=(e,t)=>1===e.length?LBe(e[0],t[0]):$Be(e,t,e.length),LBe=(e,t)=>function(n,i){return gS(e(n),e(i))*t},$Be=(e,t,n)=>(t.push(0),function(i,r){let o,s=0,a=-1;for(;0===s&&++ae}function xP(e,t){let n;return i=>{n&&clearTimeout(n),n=setTimeout(()=>(t(i),n=null),e)}}function rt(e){for(let t,n,i=1,r=arguments.length;is&&(s=r))}else{for(r=t(e[n]);ns&&(s=r))}return[o,s]}function Iee(e,t){const n=e.length;let r,o,s,a,l,i=-1;if(null==t){for(;++i=o){r=s=o;break}if(i===n)return[-1,-1];for(a=l=i;++io&&(r=o,a=i),s=o){r=s=o;break}if(i===n)return[-1,-1];for(a=l=i;++io&&(r=o,a=i),si(o)?t[o]:void 0,set(o,s){return i(o)||(++r.size,t[o]===mS&&--r.empty),t[o]=s,this},delete(o){return i(o)&&(--r.size,++r.empty,t[o]=mS),this},clear(){r.size=r.empty=0,r.object=t={}},test(o){return arguments.length?(n=o,r):n},clean(){const o={};let s=0;for(const a in t){const l=t[a];l!==mS&&(!n||!n(l))&&(o[a]=l,++s)}r.size=s,r.empty=0,r.object=t=o}};return e&&Object.keys(e).forEach(o=>{r.set(o,e[o])}),r}function kee(e,t,n,i,r,o){if(!n&&0!==n)return o;const s=+n;let c,a=e[0],l=yt(e);lo&&(s=r,r=o,o=s),i=void 0===i||i,((n=void 0===n||n)?r<=e:ra.replace(/\\(.)/g,"$1")):Ee(e));const i=e&&e.length,r=n&&n.get||gee,o=a=>r(t?[a]:xl(a));let s;if(i)if(1===i){const a=o(e[0]);s=function(l){return""+a(l)}}else{const a=e.map(o);s=function(l){let c=""+a[0](l),u=0;for(;++u{t={},n={},i=0},o=(s,a)=>(++i>e&&(n=t,t={},i=1),t[s]=a);return r(),{clear:r,has:s=>De(t,s)||De(n,s),get:s=>De(t,s)?t[s]:De(n,s)?o(s,n[s]):void 0,set:(s,a)=>De(t,s)?t[s]=a:o(s,a)}}function Lee(e,t,n,i){const r=t.length,o=n.length;if(!o)return t;if(!r)return n;const s=i||new t.constructor(r+o);let a=0,l=0,c=0;for(;a0?n[l++]:t[a++];for(;a=0;)n+=e;return n}function $ee(e,t,n,i){const r=n||" ",o=e+"",s=t-o.length;return s<=0?o:"left"===i?Lv(r,s)+o:"center"===i?Lv(r,~~(s/2))+o+Lv(r,Math.ceil(s/2)):o+Lv(r,s)}function $v(e){return e&&yt(e)-e[0]||0}function ge(e){return te(e)?"["+e.map(ge)+"]":we(e)||Ce(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function MP(e){return null==e||""===e?null:!(!e||"false"===e||"0"===e||!e)}const VBe=e=>At(e)||nd(e)?e:Date.parse(e);function NP(e,t){return t=t||VBe,null==e||""===e?null:t(e)}function IP(e){return null==e||""===e?null:e+""}function va(e){const t={},n=e.length;for(let i=0;i=p?y=!0:(D=d.charCodeAt(g++))===Bv?v=!0:D===RP&&(v=!0,d.charCodeAt(g)===Bv&&++g),d.slice(E+1,C-1).replace(/""/g,'"')}for(;g9999?"+"+uo(e,6):uo(e,4)}(e.getUTCFullYear())+"-"+uo(e.getUTCMonth()+1,2)+"-"+uo(e.getUTCDate(),2)+(r?"T"+uo(t,2)+":"+uo(n,2)+":"+uo(i,2)+"."+uo(r,3)+"Z":i?"T"+uo(t,2)+":"+uo(n,2)+":"+uo(i,2)+"Z":n||t?"T"+uo(t,2)+":"+uo(n,2)+"Z":"")}(d):t.test(d+="")?'"'+d.replace(/"/g,'""')+'"':d}return{parse:function i(d,f){var h,p,g=r(d,function(m,_){if(h)return h(m,_-1);p=m,h=f?function UBe(e,t){var n=Vee(e);return function(i,r){return t(n(i),r,e)}}(m,f):Vee(m)});return g.columns=p||[],g},parseRows:r,format:function s(d,f){return null==f&&(f=Uee(d)),[f.map(u).join(e)].concat(o(d,f)).join("\n")},formatBody:function a(d,f){return null==f&&(f=Uee(d)),o(d,f).join("\n")},formatRows:function l(d){return d.map(c).join("\n")},formatRow:c,formatValue:u}}function qBe(e){return e}function KBe(e,t){return"string"==typeof t&&(t=e.objects[t]),"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map(function(n){return zee(e,n)})}:zee(e,t)}function zee(e,t){var n=t.id,i=t.bbox,r=null==t.properties?{}:t.properties,o=Hee(e,t);return null==n&&null==i?{type:"Feature",properties:r,geometry:o}:null==i?{type:"Feature",id:n,properties:r,geometry:o}:{type:"Feature",id:n,bbox:i,properties:r,geometry:o}}function Hee(e,t){var n=function YBe(e){if(null==e)return qBe;var t,n,i=e.scale[0],r=e.scale[1],o=e.translate[0],s=e.translate[1];return function(a,l){l||(t=n=0);var c=2,u=a.length,d=new Array(u);for(d[0]=(t+=a[0])*i+o,d[1]=(n+=a[1])*r+s;c1)i=function JBe(e,t,n){var o,i=[],r=[];function s(d){var f=d<0?~d:d;(r[f]||(r[f]=[])).push({i:d,g:o})}function a(d){d.forEach(s)}function l(d){d.forEach(a)}return function u(d){switch(o=d,d.type){case"GeometryCollection":d.geometries.forEach(u);break;case"LineString":a(d.arcs);break;case"MultiLineString":case"Polygon":l(d.arcs);break;case"MultiPolygon":!function c(d){d.forEach(l)}(d.arcs)}}(t),r.forEach(null==n?function(d){i.push(d[0].i)}:function(d){n(d[0].g,d[d.length-1].g)&&i.push(d[0].i)}),i}(0,t,n);else for(r=0,i=new Array(o=e.arcs.length);r=e5e?10:o>=t5e?5:o>=n5e?2:1;let a,l,c;return r<0?(c=Math.pow(10,-r)/s,a=Math.round(e*c),l=Math.round(t*c),a/ct&&--l,c=-c):(c=Math.pow(10,r)*s,a=Math.round(e/c),l=Math.round(t/c),a*ct&&--l),l0))return[];if((e=+e)==(t=+t))return[e];const i=t=r))return[];const a=o-r+1,l=new Array(a);if(i)if(s<0)for(let c=0;c=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function lh(e){if(!(t=i5e.exec(e)))throw new Error("invalid format: "+e);var t;return new LP({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function LP(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function yS(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,i=e.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function Mm(e){return(e=yS(Math.abs(e)))?e[1]:NaN}function Gee(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Mm(t)/3)))-Mm(Math.abs(e)))}function Wee(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Mm(t)-Mm(e))+1}function qee(e){return Math.max(0,-Mm(Math.abs(e)))}function Kee(e,t){var n=yS(e,t);if(!n)return e+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}lh.prototype=LP.prototype,LP.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Xee={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function r5e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Kee(100*e,t),r:Kee,s:function l5e(e,t){var n=yS(e,t);if(!n)return e+"";var i=n[0],r=n[1],o=r-(Yee=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+yS(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Qee(e){return e}var vS,bS,$P,Zee=Array.prototype.map,Jee=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function ete(e){var t=void 0===e.grouping||void 0===e.thousands?Qee:function o5e(e,t){return function(n,i){for(var r=n.length,o=[],s=0,a=e[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(n.substring(r-=a,r+a)),!((l+=a+1)>i));)a=e[s=(s+1)%e.length];return o.reverse().join(t)}}(Zee.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",r=void 0===e.decimal?".":e.decimal+"",o=void 0===e.numerals?Qee:function s5e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}(Zee.call(e.numerals,String)),s=void 0===e.percent?"%":e.percent+"",a=void 0===e.minus?"\u2212":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(d){var f=(d=lh(d)).fill,h=d.align,p=d.sign,g=d.symbol,m=d.zero,_=d.width,y=d.comma,v=d.precision,b=d.trim,w=d.type;"n"===w?(y=!0,w="g"):Xee[w]||(void 0===v&&(v=12),b=!0,w="g"),(m||"0"===f&&"="===h)&&(m=!0,f="0",h="=");var C="$"===g?n:"#"===g&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",E="$"===g?i:/[%p]/.test(w)?s:"",D=Xee[w],M=/[defgprs%]/.test(w);function k(R){var T,S,x,F=C,P=E;if("c"===w)P=D(R)+P,R="";else{var I=(R=+R)<0||1/R<0;if(R=isNaN(R)?l:D(Math.abs(R),v),b&&(R=function a5e(e){e:for(var r,t=e.length,n=1,i=-1;n0&&(i=0)}return i>0?e.slice(0,i)+e.slice(r+1):e}(R)),I&&0==+R&&"+"!==p&&(I=!1),F=(I?"("===p?p:a:"-"===p||"("===p?"":p)+F,P=("s"===w?Jee[8+Yee/3]:"")+P+(I&&"("===p?")":""),M)for(T=-1,S=R.length;++T(x=R.charCodeAt(T))||x>57){P=(46===x?r+R.slice(T+1):R.slice(T))+P,R=R.slice(0,T);break}}y&&!m&&(R=t(R,1/0));var A=F.length+R.length+P.length,N=A<_?new Array(_-A+1).join(f):"";switch(y&&m&&(R=t(N+R,N.length?_-P.length:1/0),N=""),h){case"<":R=F+R+P+N;break;case"=":R=F+N+R+P;break;case"^":R=N.slice(0,A=N.length>>1)+F+R+P+N.slice(A);break;default:R=N+F+R+P}return o(R)}return v=void 0===v?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),k.toString=function(){return d+""},k}return{format:c,formatPrefix:function u(d,f){var h=c(((d=lh(d)).type="f",d)),p=3*Math.max(-8,Math.min(8,Math.floor(Mm(f)/3))),g=Math.pow(10,-p),m=Jee[8+p/3];return function(_){return h(g*_)+m}}}}!function c5e(e){vS=ete(e),bS=vS.format,$P=vS.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const BP=new Date,jP=new Date;function vi(e,t,n,i){function r(o){return e(o=0===arguments.length?new Date:new Date(+o)),o}return r.floor=o=>(e(o=new Date(+o)),o),r.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),r.round=o=>{const s=r(o),a=r.ceil(o);return o-s(t(o=new Date(+o),null==s?1:Math.floor(s)),o),r.range=(o,s,a)=>{const l=[];if(o=r.ceil(o),a=null==a?1:Math.floor(a),!(o0))return l;let c;do{l.push(c=new Date(+o)),t(o,a),e(o)}while(cvi(s=>{if(s>=s)for(;e(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;t(s,-1),!o(s););else for(;--a>=0;)for(;t(s,1),!o(s););}),n&&(r.count=(o,s)=>(BP.setTime(+o),jP.setTime(+s),e(BP),e(jP),Math.floor(n(BP,jP))),r.every=o=>(o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?s=>i(s)%o==0:s=>r.count(0,s)%o==0):r:null)),r}const Uc=1e3,Ns=6e4,zc=60*Ns,Hc=24*zc,VP=7*Hc,tte=30*Hc,UP=365*Hc,Gc=vi(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ns)/Hc,e=>e.getDate()-1),od=vi(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Hc,e=>e.getUTCDate()-1),nte=vi(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Hc,e=>Math.floor(e/Hc));function ch(e){return vi(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+7*n)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Ns)/VP)}const Nm=ch(0),wS=ch(1),Im=(ch(2),ch(3),ch(4));function uh(e){return vi(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+7*n)},(t,n)=>(n-t)/VP)}ch(5),ch(6);const km=uh(0),ES=uh(1),Om=(uh(2),uh(3),uh(4)),Ml=(uh(5),uh(6),vi(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear()));Ml.every=e=>isFinite(e=Math.floor(e))&&e>0?vi(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null;const Nl=vi(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Nl.every=e=>isFinite(e=Math.floor(e))&&e>0?vi(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null;const jv=vi(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth()),Vv=vi(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth()),CS=vi(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Uc-e.getMinutes()*Ns)},(e,t)=>{e.setTime(+e+t*zc)},(e,t)=>(t-e)/zc,e=>e.getHours()),DS=vi(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*zc)},(e,t)=>(t-e)/zc,e=>e.getUTCHours()),SS=vi(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Uc)},(e,t)=>{e.setTime(+e+t*Ns)},(e,t)=>(t-e)/Ns,e=>e.getMinutes()),TS=vi(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ns)},(e,t)=>(t-e)/Ns,e=>e.getUTCMinutes()),Wc=vi(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Uc)},(e,t)=>(t-e)/Uc,e=>e.getUTCSeconds()),Rm=vi(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);function qc(e,t){return null==e||null==t?NaN:et?1:e>=t?0:NaN}function y5e(e,t){return null==e||null==t?NaN:te?1:t>=e?0:NaN}function Fm(e){let t,n,i;function r(a,l,c=0,u=a.length){if(c>>1;n(a[d],l)<0?c=d+1:u=d}while(cqc(e(a),l),i=(a,l)=>e(a)-l):(t=e===qc||e===y5e?e:v5e,n=e,i=e),{left:r,center:function s(a,l,c=0,u=a.length){const d=r(a,l,c,u-1);return d>c&&i(a[d-1],l)>-i(a[d],l)?d-1:d},right:function o(a,l,c=0,u=a.length){if(c>>1;n(a[d],l)<=0?c=d+1:u=d}while(c(e=Math.floor(e),isFinite(e)&&e>0?e>1?vi(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Rm:null);const Xi="year",fo="quarter",mr="month",bi="week",ho="date",_r="day",Il="dayofyear",Wo="hours",qo="minutes",Is="seconds",ba="milliseconds",zP=[Xi,fo,mr,bi,ho,_r,Il,Wo,qo,Is,ba],HP=zP.reduce((e,t,n)=>(e[t]=1+n,e),{});function GP(e){const t=Ee(e).slice(),n={};return t.length||J("Missing time unit."),t.forEach(r=>{De(HP,r)?n[r]=1:J(`Invalid time unit: ${r}.`)}),(n[bi]||n[_r]?1:0)+(n[fo]||n[mr]||n[ho]?1:0)+(n[Il]?1:0)>1&&J(`Incompatible time units: ${e}`),t.sort((r,o)=>HP[r]-HP[o]),t}const b5e={[Xi]:"%Y ",[fo]:"Q%q ",[mr]:"%b ",[ho]:"%d ",[bi]:"W%U ",[_r]:"%a ",[Il]:"%j ",[Wo]:"%H:00",[qo]:"00:%M",[Is]:":%S",[ba]:".%L",[`${Xi}-${mr}`]:"%Y-%m ",[`${Xi}-${mr}-${ho}`]:"%Y-%m-%d ",[`${Wo}-${qo}`]:"%H:%M"};function ite(e,t){const n=rt({},b5e,t),i=GP(e),r=i.length;let a,l,o="",s=0;for(s=0;ss;--a)if(l=i.slice(s,a).join("-"),null!=n[l]){o+=n[l],s=a;break}return o.trim()}const dh=new Date;function WP(e){return dh.setFullYear(e),dh.setMonth(0),dh.setDate(1),dh.setHours(0,0,0,0),dh}function rte(e){return ste(new Date(e))}function ote(e){return qP(new Date(e))}function ste(e){return Gc.count(WP(e.getFullYear())-1,e)}function qP(e){return Nm.count(WP(e.getFullYear())-1,e)}function YP(e){return WP(e).getDay()}function w5e(e,t,n,i,r,o,s){if(0<=e&&e<100){const a=new Date(-1,t,n,i,r,o,s);return a.setFullYear(e),a}return new Date(e,t,n,i,r,o,s)}function ate(e){return cte(new Date(e))}function lte(e){return KP(new Date(e))}function cte(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return od.count(t-1,e)}function KP(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return km.count(t-1,e)}function XP(e){return dh.setTime(Date.UTC(e,0,1)),dh.getUTCDay()}function E5e(e,t,n,i,r,o,s){if(0<=e&&e<100){const a=new Date(Date.UTC(-1,t,n,i,r,o,s));return a.setUTCFullYear(n.y),a}return new Date(Date.UTC(e,t,n,i,r,o,s))}function ute(e,t,n,i,r){const o=t||1,s=yt(e),a=(_,y,v)=>function C5e(e,t,n,i){const r=n<=1?e:i?(o,s)=>i+n*Math.floor((e(o,s)-i)/n):(o,s)=>n*Math.floor(e(o,s)/n);return t?(o,s)=>t(r(o,s),s):r}(n[v=v||_],i[v],_===s&&o,y),l=new Date,c=va(e),u=c[Xi]?a(Xi):gr(2012),d=c[mr]?a(mr):c[fo]?a(fo):Ju,f=c[bi]&&c[_r]?a(_r,1,bi+_r):c[bi]?a(bi,1):c[_r]?a(_r,1):c[ho]?a(ho,1):c[Il]?a(Il,1):Dm,h=c[Wo]?a(Wo):Ju,p=c[qo]?a(qo):Ju,g=c[Is]?a(Is):Ju,m=c[ba]?a(ba):Ju;return function(_){l.setTime(+_);const y=u(l);return r(y,d(l),f(l,y),h(l),p(l),g(l),m(l))}}function Pm(e,t,n){return t+7*e-(n+6)%7}const D5e={[Xi]:e=>e.getFullYear(),[fo]:e=>Math.floor(e.getMonth()/3),[mr]:e=>e.getMonth(),[ho]:e=>e.getDate(),[Wo]:e=>e.getHours(),[qo]:e=>e.getMinutes(),[Is]:e=>e.getSeconds(),[ba]:e=>e.getMilliseconds(),[Il]:e=>ste(e),[bi]:e=>qP(e),[bi+_r]:(e,t)=>Pm(qP(e),e.getDay(),YP(t)),[_r]:(e,t)=>Pm(1,e.getDay(),YP(t))},S5e={[fo]:e=>3*e,[bi]:(e,t)=>Pm(e,0,YP(t))};function dte(e,t){return ute(e,t||1,D5e,S5e,w5e)}const T5e={[Xi]:e=>e.getUTCFullYear(),[fo]:e=>Math.floor(e.getUTCMonth()/3),[mr]:e=>e.getUTCMonth(),[ho]:e=>e.getUTCDate(),[Wo]:e=>e.getUTCHours(),[qo]:e=>e.getUTCMinutes(),[Is]:e=>e.getUTCSeconds(),[ba]:e=>e.getUTCMilliseconds(),[Il]:e=>cte(e),[bi]:e=>KP(e),[_r]:(e,t)=>Pm(1,e.getUTCDay(),XP(t)),[bi+_r]:(e,t)=>Pm(KP(e),e.getUTCDay(),XP(t))},x5e={[fo]:e=>3*e,[bi]:(e,t)=>Pm(e,0,XP(t))};function fte(e,t){return ute(e,t||1,T5e,x5e,E5e)}const A5e={[Xi]:Ml,[fo]:jv.every(3),[mr]:jv,[bi]:Nm,[ho]:Gc,[_r]:Gc,[Il]:Gc,[Wo]:CS,[qo]:SS,[Is]:Wc,[ba]:Rm},M5e={[Xi]:Nl,[fo]:Vv.every(3),[mr]:Vv,[bi]:km,[ho]:od,[_r]:od,[Il]:od,[Wo]:DS,[qo]:TS,[Is]:Wc,[ba]:Rm};function Lm(e){return A5e[e]}function $m(e){return M5e[e]}function hte(e,t,n){return e?e.offset(t,n):void 0}function pte(e,t,n){return hte(Lm(e),t,n)}function gte(e,t,n){return hte($m(e),t,n)}function mte(e,t,n,i){return e?e.range(t,n,i):void 0}function _te(e,t,n,i){return mte(Lm(e),t,n,i)}function yte(e,t,n,i){return mte($m(e),t,n,i)}const zv=6e4,Hv=60*zv,xS=24*Hv,vte=30*xS,QP=365*xS,bte=[Xi,mr,ho,Wo,qo,Is,ba],Gv=bte.slice(0,-1),Wv=Gv.slice(0,-1),qv=Wv.slice(0,-1),I5e=qv.slice(0,-1),wte=[Xi,mr],Ete=[Xi],Yv=[[Gv,1,1e3],[Gv,5,5e3],[Gv,15,15e3],[Gv,30,3e4],[Wv,1,zv],[Wv,5,5*zv],[Wv,15,15*zv],[Wv,30,30*zv],[qv,1,Hv],[qv,3,3*Hv],[qv,6,6*Hv],[qv,12,12*Hv],[I5e,1,xS],[[Xi,bi],1,6048e5],[wte,1,vte],[wte,3,3*vte],[Ete,1,QP]];function Cte(e){const t=e.extent,n=e.maxbins||40,i=Math.abs($v(t))/n;let o,s,r=Fm(a=>a[2]).right(Yv,i);return r===Yv.length?(o=Ete,s=rd(t[0]/QP,t[1]/QP,n)):r?(r=Yv[i/Yv[r-1][2]=12)]},q:function B(W){return 1+~~(W.getMonth()/3)},Q:Lte,s:$te,S:r8e,u:o8e,U:s8e,V:a8e,w:l8e,W:c8e,x:null,X:null,y:u8e,Y:f8e,Z:p8e,"%":Pte},b={a:function V(W){return s[W.getUTCDay()]},A:function j(W){return o[W.getUTCDay()]},b:function H(W){return l[W.getUTCMonth()]},B:function oe(W){return a[W.getUTCMonth()]},c:null,d:Ote,e:Ote,f:y8e,g:A8e,G:N8e,H:g8e,I:m8e,j:_8e,L:Rte,m:v8e,M:b8e,p:function Y(W){return r[+(W.getUTCHours()>=12)]},q:function ue(W){return 1+~~(W.getUTCMonth()/3)},Q:Lte,s:$te,S:w8e,u:E8e,U:C8e,V:D8e,w:S8e,W:T8e,x:null,X:null,y:x8e,Y:M8e,Z:I8e,"%":Pte},w={a:function k(W,ne,ie){var G=h.exec(ne.slice(ie));return G?(W.w=p.get(G[0].toLowerCase()),ie+G[0].length):-1},A:function R(W,ne,ie){var G=d.exec(ne.slice(ie));return G?(W.w=f.get(G[0].toLowerCase()),ie+G[0].length):-1},b:function F(W,ne,ie){var G=_.exec(ne.slice(ie));return G?(W.m=y.get(G[0].toLowerCase()),ie+G[0].length):-1},B:function P(W,ne,ie){var G=g.exec(ne.slice(ie));return G?(W.m=m.get(G[0].toLowerCase()),ie+G[0].length):-1},c:function T(W,ne,ie){return D(W,t,ne,ie)},d:Ate,e:Ate,f:Y5e,g:xte,G:Tte,H:Mte,I:Mte,j:H5e,L:q5e,m:z5e,M:G5e,p:function M(W,ne,ie){var G=c.exec(ne.slice(ie));return G?(W.p=u.get(G[0].toLowerCase()),ie+G[0].length):-1},q:U5e,Q:X5e,s:Q5e,S:W5e,u:L5e,U:$5e,V:B5e,w:P5e,W:j5e,x:function S(W,ne,ie){return D(W,n,ne,ie)},X:function x(W,ne,ie){return D(W,i,ne,ie)},y:xte,Y:Tte,Z:V5e,"%":K5e};function C(W,ne){return function(ie){var Te,Oe,Et,G=[],ye=-1,Se=0,Ue=W.length;for(ie instanceof Date||(ie=new Date(+ie));++ye53)return null;"w"in G||(G.w=1),"Z"in G?(Ue=(Se=JP(Kv(G.y,0,1))).getUTCDay(),Se=Ue>4||0===Ue?ES.ceil(Se):ES(Se),Se=od.offset(Se,7*(G.V-1)),G.y=Se.getUTCFullYear(),G.m=Se.getUTCMonth(),G.d=Se.getUTCDate()+(G.w+6)%7):(Ue=(Se=ZP(Kv(G.y,0,1))).getDay(),Se=Ue>4||0===Ue?wS.ceil(Se):wS(Se),Se=Gc.offset(Se,7*(G.V-1)),G.y=Se.getFullYear(),G.m=Se.getMonth(),G.d=Se.getDate()+(G.w+6)%7)}else("W"in G||"U"in G)&&("w"in G||(G.w="u"in G?G.u%7:"W"in G?1:0),Ue="Z"in G?JP(Kv(G.y,0,1)).getUTCDay():ZP(Kv(G.y,0,1)).getDay(),G.m=0,G.d="W"in G?(G.w+6)%7+7*G.W-(Ue+5)%7:G.w+7*G.U-(Ue+6)%7);return"Z"in G?(G.H+=G.Z/100|0,G.M+=G.Z%100,JP(G)):ZP(G)}}function D(W,ne,ie,G){for(var Te,Oe,ye=0,Se=ne.length,Ue=ie.length;ye=Ue)return-1;if(37===(Te=ne.charCodeAt(ye++))){if(Te=ne.charAt(ye++),!(Oe=w[Te in Ste?ne.charAt(ye++):Te])||(G=Oe(W,ie,G))<0)return-1}else if(Te!=ie.charCodeAt(G++))return-1}return G}return v.x=C(n,v),v.X=C(i,v),v.c=C(t,v),b.x=C(n,b),b.X=C(i,b),b.c=C(t,b),{format:function(W){var ne=C(W+="",v);return ne.toString=function(){return W},ne},parse:function(W){var ne=E(W+="",!1);return ne.toString=function(){return W},ne},utcFormat:function(W){var ne=C(W+="",b);return ne.toString=function(){return W},ne},utcParse:function(W){var ne=E(W+="",!0);return ne.toString=function(){return W},ne}}}var Bm,eL,Bte,tL,jte,Ste={"-":"",_:" ",0:"0"},Mi=/^\s*\d+/,O5e=/^%/,R5e=/[\\^$*+?|[\]().{}]/g;function Mt(e,t,n){var i=e<0?"-":"",r=(i?-e:e)+"",o=r.length;return i+(o[t.toLowerCase(),n]))}function P5e(e,t,n){var i=Mi.exec(t.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function L5e(e,t,n){var i=Mi.exec(t.slice(n,n+1));return i?(e.u=+i[0],n+i[0].length):-1}function $5e(e,t,n){var i=Mi.exec(t.slice(n,n+2));return i?(e.U=+i[0],n+i[0].length):-1}function B5e(e,t,n){var i=Mi.exec(t.slice(n,n+2));return i?(e.V=+i[0],n+i[0].length):-1}function j5e(e,t,n){var i=Mi.exec(t.slice(n,n+2));return i?(e.W=+i[0],n+i[0].length):-1}function Tte(e,t,n){var i=Mi.exec(t.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function xte(e,t,n){var i=Mi.exec(t.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function V5e(e,t,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function U5e(e,t,n){var i=Mi.exec(t.slice(n,n+1));return i?(e.q=3*i[0]-3,n+i[0].length):-1}function z5e(e,t,n){var i=Mi.exec(t.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function Ate(e,t,n){var i=Mi.exec(t.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function H5e(e,t,n){var i=Mi.exec(t.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function Mte(e,t,n){var i=Mi.exec(t.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function G5e(e,t,n){var i=Mi.exec(t.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function W5e(e,t,n){var i=Mi.exec(t.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function q5e(e,t,n){var i=Mi.exec(t.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function Y5e(e,t,n){var i=Mi.exec(t.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function K5e(e,t,n){var i=O5e.exec(t.slice(n,n+1));return i?n+i[0].length:-1}function X5e(e,t,n){var i=Mi.exec(t.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function Q5e(e,t,n){var i=Mi.exec(t.slice(n));return i?(e.s=+i[0],n+i[0].length):-1}function Nte(e,t){return Mt(e.getDate(),t,2)}function Z5e(e,t){return Mt(e.getHours(),t,2)}function J5e(e,t){return Mt(e.getHours()%12||12,t,2)}function e8e(e,t){return Mt(1+Gc.count(Ml(e),e),t,3)}function Ite(e,t){return Mt(e.getMilliseconds(),t,3)}function t8e(e,t){return Ite(e,t)+"000"}function n8e(e,t){return Mt(e.getMonth()+1,t,2)}function i8e(e,t){return Mt(e.getMinutes(),t,2)}function r8e(e,t){return Mt(e.getSeconds(),t,2)}function o8e(e){var t=e.getDay();return 0===t?7:t}function s8e(e,t){return Mt(Nm.count(Ml(e)-1,e),t,2)}function kte(e){var t=e.getDay();return t>=4||0===t?Im(e):Im.ceil(e)}function a8e(e,t){return e=kte(e),Mt(Im.count(Ml(e),e)+(4===Ml(e).getDay()),t,2)}function l8e(e){return e.getDay()}function c8e(e,t){return Mt(wS.count(Ml(e)-1,e),t,2)}function u8e(e,t){return Mt(e.getFullYear()%100,t,2)}function d8e(e,t){return Mt((e=kte(e)).getFullYear()%100,t,2)}function f8e(e,t){return Mt(e.getFullYear()%1e4,t,4)}function h8e(e,t){var n=e.getDay();return Mt((e=n>=4||0===n?Im(e):Im.ceil(e)).getFullYear()%1e4,t,4)}function p8e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Mt(t/60|0,"0",2)+Mt(t%60,"0",2)}function Ote(e,t){return Mt(e.getUTCDate(),t,2)}function g8e(e,t){return Mt(e.getUTCHours(),t,2)}function m8e(e,t){return Mt(e.getUTCHours()%12||12,t,2)}function _8e(e,t){return Mt(1+od.count(Nl(e),e),t,3)}function Rte(e,t){return Mt(e.getUTCMilliseconds(),t,3)}function y8e(e,t){return Rte(e,t)+"000"}function v8e(e,t){return Mt(e.getUTCMonth()+1,t,2)}function b8e(e,t){return Mt(e.getUTCMinutes(),t,2)}function w8e(e,t){return Mt(e.getUTCSeconds(),t,2)}function E8e(e){var t=e.getUTCDay();return 0===t?7:t}function C8e(e,t){return Mt(km.count(Nl(e)-1,e),t,2)}function Fte(e){var t=e.getUTCDay();return t>=4||0===t?Om(e):Om.ceil(e)}function D8e(e,t){return e=Fte(e),Mt(Om.count(Nl(e),e)+(4===Nl(e).getUTCDay()),t,2)}function S8e(e){return e.getUTCDay()}function T8e(e,t){return Mt(ES.count(Nl(e)-1,e),t,2)}function x8e(e,t){return Mt(e.getUTCFullYear()%100,t,2)}function A8e(e,t){return Mt((e=Fte(e)).getUTCFullYear()%100,t,2)}function M8e(e,t){return Mt(e.getUTCFullYear()%1e4,t,4)}function N8e(e,t){var n=e.getUTCDay();return Mt((e=n>=4||0===n?Om(e):Om.ceil(e)).getUTCFullYear()%1e4,t,4)}function I8e(){return"+0000"}function Pte(){return"%"}function Lte(e){return+e}function $te(e){return Math.floor(+e/1e3)}function Zv(e){const t={};return n=>t[n]||(t[n]=e(n))}function Vte(e){const t=Zv(e.format),n=e.formatPrefix;return{format:t,formatPrefix:n,formatFloat(i){const r=lh(i||",");if(null==r.precision){switch(r.precision=12,r.type){case"%":r.precision-=2;break;case"e":r.precision-=1}return function O8e(e,t){return n=>{const i=e(n),r=i.indexOf(t);if(r<0)return i;let o=function R8e(e,t){let i,n=e.lastIndexOf("e");if(n>0)return n;for(n=e.length;--n>t;)if(i=e.charCodeAt(n),i>=48&&i<=57)return n+1}(i,r);const s=or;)if("0"!==i[o]){++o;break}return i.slice(0,o)+s}}(t(r),t(".1f")(1)[1])}return t(r)},formatSpan(i,r,o,s){s=lh(s??",f");const a=rd(i,r,o),l=Math.max(Math.abs(i),Math.abs(r));let c;if(null==s.precision)switch(s.type){case"s":return isNaN(c=Gee(a,l))||(s.precision=c),n(s,l);case"":case"e":case"g":case"p":case"r":isNaN(c=Wee(a,l))||(s.precision=c-("e"===s.type));break;case"f":case"%":isNaN(c=qee(a))||(s.precision=c-2*("%"===s.type))}return t(s)}}}let nL,iL;function Ute(){return nL=Vte({format:bS,formatPrefix:$P})}function zte(e){return Vte(ete(e))}function AS(e){return arguments.length?nL=zte(e):nL}function Hte(e,t,n){we(n=n||{})||J(`Invalid time multi-format specifier: ${n}`);const i=t(Is),r=t(qo),o=t(Wo),s=t(ho),a=t(bi),l=t(mr),c=t(fo),u=t(Xi),d=e(n[ba]||".%L"),f=e(n[Is]||":%S"),h=e(n[qo]||"%I:%M"),p=e(n[Wo]||"%I %p"),g=e(n[ho]||n[_r]||"%a %d"),m=e(n[bi]||"%b %d"),_=e(n[mr]||"%B"),y=e(n[fo]||"%B"),v=e(n[Xi]||"%Y");return b=>(i(b)Ce(i)?t(i):Hte(t,Lm,i),utcFormat:i=>Ce(i)?n(i):Hte(n,$m,i),timeParse:Zv(e.parse),utcParse:Zv(e.utcParse)}}function Wte(){return iL=Gte({format:eL,parse:Bte,utcFormat:tL,utcParse:jte})}function qte(e){return Gte(Dte(e))}function Jv(e){return arguments.length?iL=qte(e):iL}!function k8e(e){Bm=Dte(e),eL=Bm.format,Bte=Bm.parse,tL=Bm.utcFormat,jte=Bm.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Ute(),Wte();const rL=(e,t)=>rt({},e,t);function Yte(e,t){const n=e?zte(e):AS(),i=t?qte(t):Jv();return rL(n,i)}function oL(e,t){const n=arguments.length;return n&&2!==n&&J("defaultLocale expects either zero or two arguments."),n?rL(AS(e),Jv(t)):rL(AS(),Jv())}function F8e(){return Ute(),Wte(),oL()}const P8e=/^(data:|([A-Za-z]+:)?\/\/)/,L8e=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,$8e=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,Kte="file://";function j8e(e,t){return sL.apply(this,arguments)}function sL(){return(sL=qn(function*(e,t){const n=yield this.sanitize(e,t),i=n.href;return n.localFile?this.file(i):this.http(i,t)})).apply(this,arguments)}function V8e(e,t){return aL.apply(this,arguments)}function aL(){return(aL=qn(function*(e,t){t=rt({},this.options,t);const n=this.fileAccess,i={href:null};let r,o,s;const a=L8e.test(e.replace($8e,""));(null==e||"string"!=typeof e||!a)&&J("Sanitize failure, invalid URI: "+ge(e));const l=P8e.test(e);return(s=t.baseURL)&&!l&&(!e.startsWith("/")&&!s.endsWith("/")&&(e="/"+e),e=s+e),o=(r=e.startsWith(Kte))||"file"===t.mode||"http"!==t.mode&&!l&&n,r?e=e.slice(Kte.length):e.startsWith("//")&&("file"===t.defaultProtocol?(e=e.slice(2),o=!0):e=(t.defaultProtocol||"http")+":"+e),Object.defineProperty(i,"localFile",{value:!!o}),i.href=e,t.target&&(i.target=t.target+""),t.rel&&(i.rel=t.rel+""),"image"===t.context&&t.crossOrigin&&(i.crossOrigin=t.crossOrigin+""),i})).apply(this,arguments)}function U8e(e){return e?t=>new Promise((n,i)=>{e.readFile(t,(r,o)=>{r?i(r):n(o)})}):z8e}function z8e(){return lL.apply(this,arguments)}function lL(){return(lL=qn(function*(){J("No file system access.")})).apply(this,arguments)}function H8e(e){return e?function(){var t=qn(function*(n,i){const r=rt({},this.options.http,i),o=i&&i.response,s=yield e(n,r);return s.ok?it(s[o])?s[o]():s.text():J(s.status+""+s.statusText)});return function(n,i){return t.apply(this,arguments)}}():G8e}function G8e(){return cL.apply(this,arguments)}function cL(){return(cL=qn(function*(){J("No HTTP fetch method available.")})).apply(this,arguments)}const W8e=e=>null!=e&&e==e,Xte=e=>!(Number.isNaN(+e)||e instanceof Date),uL={boolean:MP,integer:pr,number:pr,date:NP,string:IP,unknown:hr},MS=[e=>"true"===e||"false"===e||!0===e||!1===e,e=>Xte(e)&&Number.isInteger(+e),Xte,e=>!Number.isNaN(Date.parse(e))],X8e=["boolean","integer","number","date"];function Qte(e,t){if(!e||!e.length)return"unknown";const n=e.length,i=MS.length,r=MS.map((o,s)=>s+1);for(let a,l,o=0,s=0;o0===o?s:o,0)-1]}function Zte(e,t){return t.reduce((n,i)=>(n[i]=Qte(e,i),n),{})}function Jte(e){const t=function(n,i){const r={delimiter:e};return dL(n,i?rt(i,r):r)};return t.responseType="text",t}function dL(e,t){return t.header&&(e=t.header.map(ge).join(t.delimiter)+"\n"+e),GBe(t.delimiter).parse(e+"")}function fL(e,t){const n=t&&t.property?As(t.property):hr;return we(e)&&!function Q8e(e){return!("function"!=typeof Buffer||!it(Buffer.isBuffer))&&Buffer.isBuffer(e)}(e)?function Z8e(e,t){return!te(e)&&Oee(e)&&(e=[...e]),t&&t.copy?JSON.parse(JSON.stringify(e)):e}(n(e),t):n(JSON.parse(e))}dL.responseType="text",fL.responseType="json";const J8e={interior:(e,t)=>e!==t,exterior:(e,t)=>e===t};function ene(e,t){let n,i,r,o;return e=fL(e,t),t&&t.feature?(n=KBe,r=t.feature):t&&t.mesh?(n=QBe,r=t.mesh,o=J8e[t.filter]):J("Missing TopoJSON feature or mesh parameter."),i=(i=e.objects[r])?n(e,i,o):J("Invalid TopoJSON object: "+r),i&&i.features||[i]}ene.responseType="json";const NS={dsv:dL,csv:Jte(","),tsv:Jte("\t"),json:fL,topojson:ene};function hL(e,t){return arguments.length>1?(NS[e]=t,this):De(NS,e)?NS[e]:null}function tne(e){const t=hL(e);return t&&t.responseType||"text"}function nne(e,t,n,i){const r=hL((t=t||{}).type||"json");return r||J("Unknown data format type: "+t.type),e=r(e,t),t.parse&&function e4e(e,t,n,i){if(!e.length)return;const r=Jv();n=n||r.timeParse,i=i||r.utcParse;let s,a,l,c,u,d,o=e.columns||Object.keys(e[0]);"auto"===t&&(t=Zte(e,o)),o=Object.keys(t);const f=o.map(h=>{const p=t[h];let g,m;if(p&&(p.startsWith("date:")||p.startsWith("utc:")))return g=p.split(/:(.+)?/,2),m=g[1],("'"===m[0]&&"'"===m[m.length-1]||'"'===m[0]&&'"'===m[m.length-1])&&(m=m.slice(1,-1)),("utc"===g[0]?i:n)(m);if(!uL[p])throw Error("Illegal format pattern: "+h+":"+p);return uL[p]});for(l=0,u=e.length,d=o.length;l({options:n||{},sanitize:V8e,load:j8e,fileAccess:!!t,file:U8e(t),http:H8e(e)})}(typeof fetch<"u"&&fetch,null);function kS(e){const t=e||hr,n=[],i={};return n.add=r=>{const o=t(r);return i[o]||(i[o]=1,n.push(r)),n},n.remove=r=>{const o=t(r);if(i[o]){i[o]=0;const s=n.indexOf(r);s>=0&&n.splice(s,1)}return n},n}function OS(e,t){return pL.apply(this,arguments)}function pL(){return(pL=qn(function*(e,t){try{yield t(e)}catch(n){e.error(n)}})).apply(this,arguments)}const ine=Symbol("vega_id");let t4e=1;function RS(e){return!(!e||!Fe(e))}function Fe(e){return e[ine]}function rne(e,t){return e[ine]=t,e}function Ft(e){const t=e===Object(e)?e:{data:e};return Fe(t)?t:rne(t,t4e++)}function gL(e){return FS(e,Ft({}))}function FS(e,t){for(const n in e)t[n]=e[n];return t}function one(e,t){return rne(t,Fe(e))}function fh(e,t){return e?t?(n,i)=>e(n,i)||Fe(t(n))-Fe(t(i)):(n,i)=>e(n,i)||Fe(n)-Fe(i):null}function sne(e){return e&&e.constructor===hh}function hh(){const e=[],t=[],n=[],i=[],r=[];let o=null,s=!1;return{constructor:hh,insert(a){const l=Ee(a),c=l.length;for(let u=0;u{p(y)&&(c[Fe(y)]=-1)});for(d=0,f=e.length;d0&&(_(g,p,h.value),a.modifies(p));for(d=0,f=r.length;d{p(y)&&c[Fe(y)]>0&&_(y,h.field,h.value)}),a.modifies(h.field);if(s)a.mod=t.length||i.length?l.filter(y=>c[Fe(y)]>0):l.slice();else for(m in u)a.mod.push(u[m]);return(o||null==o&&(t.length||i.length))&&a.clean(!0),a}}}const PS="_:mod:_";function LS(){Object.defineProperty(this,PS,{writable:!0,value:{}})}LS.prototype={set(e,t,n,i){const r=this,o=r[e],s=r[PS];return null!=t&&t>=0?(o[t]!==n||i)&&(o[t]=n,s[t+":"+e]=-1,s[e]=-1):(o!==n||i)&&(r[e]=n,s[e]=te(n)?1+n.length:-1),r},modified(e,t){const n=this[PS];if(!arguments.length){for(const i in n)if(n[i])return!0;return!1}if(te(e)){for(let i=0;i=0?t+1{h instanceof ln?(h!==this&&(t&&h.targets().add(this),o.push(h)),r.push({op:h,name:d,index:f})):i.set(d,f,h)};for(s in e)if(a=e[s],"pulse"===s)Ee(a).forEach(d=>{d instanceof ln?d!==this&&(d.targets().add(this),o.push(d)):J("Pulse parameters must be operator instances.")}),this.source=a;else if(te(a))for(i.set(s,-1,Array(l=a.length)),c=0;ct=i);return n.requests=0,n.done=()=>{0==--n.requests&&(e._pending=null,t(e))},e._pending=n}(i);r.requests+=1;const o=yield i.request(t,n);return i.pulse(e,i.changeset().remove(Ms).insert(o.data||[])),r.done(),o})).apply(this,arguments)}$S.prototype={_filter:Ms,_apply:hr,targets(){return this._targets||(this._targets=kS(Pv))},consume(e){return arguments.length?(this._consume=!!e,this):!!this._consume},receive(e){if(this._filter(e)){const t=this.value=this._apply(e),n=this._targets,i=n?n.length:0;for(let r=0;r{const n=Date.now();return n-t>e?(t=n,1):0})},debounce(e){const t=sd();return this.targets().add(sd(null,null,xP(e,n=>{const i=n.dataflow;t.receive(n),i&&i.run&&i.run()}))),t},between(e,t){let n=!1;return e.targets().add(sd(null,null,()=>n=!0)),t.targets().add(sd(null,null,()=>n=!1)),this.filter(()=>n)},detach(){this._filter=Ms,this._targets=null}};const m4e={skip:!0};function y4e(e,t,n,i,r,o){const s=rt({},o,m4e);let a,l;it(n)||(n=gr(n)),void 0===i?a=c=>e.touch(n(c)):it(i)?(l=new ln(null,i,r,!1),a=c=>{l.evaluate(c);const u=n(c),d=l.value;sne(d)?e.pulse(u,d,o):e.update(u,d,s)}):a=c=>e.update(n(c),i,s),t.apply(a)}function v4e(e,t,n,i,r,o){if(void 0===i)t.targets().add(n);else{const s=o||{},a=new ln(null,function b4e(e,t){return t=it(t)?t:gr(t),e?function(n,i){const r=t(n,i);return e.skip()||(e.skip(r!==this.value).value=r),r}:t}(n,i),r,!1);a.modified(s.force),a.rank=t.rank,t.targets().add(a),n&&(a.skip(!0),a.value=n.value,a.targets().add(n),e.connect(n,[a]))}}const BS={};function ld(e,t,n){this.dataflow=e,this.stamp=t??-1,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=n||null}function yL(e,t){const n=[];return id(e,t,i=>n.push(i)),n}function fne(e,t){const n={};return e.visit(t,i=>{n[Fe(i)]=1}),i=>n[Fe(i)]?null:i}function jS(e,t){return e?(n,i)=>e(n,i)&&t(n,i):t}function vL(e,t,n,i){const r=this;let o=0;this.dataflow=e,this.stamp=t,this.fields=null,this.encode=i||null,this.pulses=n;for(const s of n)if(s.stamp===t){if(s.fields){const a=r.fields||(r.fields={});for(const l in s.fields)a[l]=1}s.changed(r.ADD)&&(o|=r.ADD),s.changed(r.REM)&&(o|=r.REM),s.changed(r.MOD)&&(o|=r.MOD)}this.changes=o}function bL(){return(bL=qn(function*(e,t,n){const i=this,r=[];if(i._pulse)return hne(i);if(i._pending&&(yield i._pending),t&&(yield OS(i,t)),!i._touched.length)return i.debug("Dataflow invoked, but nothing to do."),i;const o=++i._clock;i._pulse=new ld(i,o,e),i._touched.forEach(u=>i._enqueue(u,!0)),i._touched=kS(Pv);let a,l,c,s=0;try{for(;i._heap.size()>0;)a=i._heap.pop(),a.rank===a.qrank?(l=a.run(i._getPulse(a,e)),l.then?l=yield l:l.async&&(r.push(l.async),l=BS),l!==BS&&a._targets&&a._targets.forEach(u=>i._enqueue(u)),++s):i._enqueue(a,!0)}catch(u){i._heap.clear(),c=u}if(i._input={},i._pulse=null,i.debug(`Pulse ${o}: ${s} operators`),c&&(i._postrun=[],i.error(c)),i._postrun.length){const u=i._postrun.sort((d,f)=>f.priority-d.priority);i._postrun=[];for(let d=0;di.runAsync(null,()=>{u.forEach(d=>{try{d(i)}catch(f){i.error(f)}})})),i})).apply(this,arguments)}function wL(){return(wL=qn(function*(e,t,n){for(;this._running;)yield this._running;const i=()=>this._running=null;return(this._running=this.evaluate(e,t,n)).then(i,i),this._running})).apply(this,arguments)}function hne(e){return e.error("Dataflow already running. Use runAsync() to chain invocations."),e}ld.prototype={StopPropagation:BS,ADD:1,REM:2,MOD:4,ADD_REM:3,ADD_MOD:5,ALL:7,REFLOW:8,SOURCE:16,NO_SOURCE:32,NO_FIELDS:64,fork(e){return new ld(this.dataflow).init(this,e)},clone(){const e=this.fork(7);return e.add=e.add.slice(),e.rem=e.rem.slice(),e.mod=e.mod.slice(),e.source&&(e.source=e.source.slice()),e.materialize(23)},addAll(){let e=this;return!e.source||e.add===e.rem||!e.rem.length&&e.source.length===e.add.length||(e=new ld(this.dataflow).init(this),e.add=e.source,e.rem=[]),e},init(e,t){const n=this;return n.stamp=e.stamp,n.encode=e.encode,e.fields&&!(64&t)&&(n.fields=e.fields),1&t?(n.addF=e.addF,n.add=e.add):(n.addF=null,n.add=[]),2&t?(n.remF=e.remF,n.rem=e.rem):(n.remF=null,n.rem=[]),4&t?(n.modF=e.modF,n.mod=e.mod):(n.modF=null,n.mod=[]),32&t?(n.srcF=null,n.source=null):(n.srcF=e.srcF,n.source=e.source,e.cleans&&(n.cleans=e.cleans)),n},runAfter(e){this.dataflow.runAfter(e)},changed(e){const t=e||7;return 1&t&&this.add.length||2&t&&this.rem.length||4&t&&this.mod.length},reflow(e){if(e)return this.fork(7).reflow();const t=this.add.length,n=this.source&&this.source.length;return n&&n!==t&&(this.mod=this.source,t&&this.filter(4,fne(this,1))),this},clean(e){return arguments.length?(this.cleans=!!e,this):this.cleans},modifies(e){const t=this.fields||(this.fields={});return te(e)?e.forEach(n=>t[n]=!0):t[e]=!0,this},modified(e,t){const n=this.fields;return!(!t&&!this.mod.length||!n)&&(arguments.length?te(e)?e.some(i=>n[i]):n[e]:!!n)},filter(e,t){const n=this;return 1&e&&(n.addF=jS(n.addF,t)),2&e&&(n.remF=jS(n.remF,t)),4&e&&(n.modF=jS(n.modF,t)),16&e&&(n.srcF=jS(n.srcF,t)),n},materialize(e){const t=this;return 1&(e=e||7)&&t.addF&&(t.add=yL(t.add,t.addF),t.addF=null),2&e&&t.remF&&(t.rem=yL(t.rem,t.remF),t.remF=null),4&e&&t.modF&&(t.mod=yL(t.mod,t.modF),t.modF=null),16&e&&t.srcF&&(t.source=t.source.filter(t.srcF),t.srcF=null),t},visit(e,t){const n=this,i=t;if(16&e)return id(n.source,n.srcF,i),n;1&e&&id(n.add,n.addF,i),2&e&&id(n.rem,n.remF,i),4&e&&id(n.mod,n.modF,i);const r=n.source;if(8&e&&r){const o=n.add.length+n.mod.length;o===r.length||id(r,o?fne(n,5):n.srcF,i)}return n}},me(vL,ld,{fork(e){const t=new ld(this.dataflow).init(this,e&this.NO_FIELDS);return void 0!==e&&(e&t.ADD&&this.visit(t.ADD,n=>t.add.push(n)),e&t.REM&&this.visit(t.REM,n=>t.rem.push(n)),e&t.MOD&&this.visit(t.MOD,n=>t.mod.push(n))),t},changed(e){return this.changes&e},modified(e){const t=this,n=t.fields;return n&&t.changes&t.MOD?te(e)?e.some(i=>n[i]):n[e]:0},filter(){J("MultiPulse does not support filtering.")},materialize(){J("MultiPulse does not support materialization.")},visit(e,t){const n=this,i=n.pulses,r=i.length;let o=0;if(e&n.SOURCE)for(;ot&&(o=n-1>>1,r=e[o],i(s,r)<0);)e[n]=r,n=o;return e[n]=s}function Vm(){this.logger(EP()),this.logLevel(bP),this._clock=0,this._rank=0,this._locale=oL();try{this._loader=IS()}catch{}this._touched=kS(Pv),this._input={},this._pulse=null,this._heap=function R4e(e){let t=[];return{clear:()=>t=[],size:()=>t.length,peek:()=>t[0],push:n=>(t.push(n),pne(t,0,t.length-1,e)),pop:()=>{const n=t.pop();let i;return t.length?(i=t[0],t[0]=n,function F4e(e,t,n){const i=t,r=e.length,o=e[t];let a,s=1+(t<<1);for(;s=0&&(s=a),e[t]=e[s],s=1+((t=s)<<1);e[t]=o,pne(e,i,t,n)}(t,0,e)):i=n,i}}}((e,t)=>e.qrank-t.qrank),this._postrun=[]}function t1(e){return function(){return this._log[e].apply(this,arguments)}}function K(e,t){ln.call(this,e,null,t)}Vm.prototype={stamp(){return this._clock},loader(e){return arguments.length?(this._loader=e,this):this._loader},locale(e){return arguments.length?(this._locale=e,this):this._locale},logger(e){return arguments.length?(this._log=e,this):this._log},error:t1("error"),warn:t1("warn"),info:t1("info"),debug:t1("debug"),logLevel:t1("level"),cleanThreshold:1e4,add:function a4e(e,t,n,i){let o,r=1;return e instanceof ln?o=e:e&&e.prototype instanceof ln?o=new e:it(e)?o=new ln(null,e):(r=0,o=new ln(e,t)),this.rank(o),r&&(i=n,n=t),n&&this.connect(o,o.parameters(n,i)),this.touch(o),o},connect:function l4e(e,t){const n=e.rank,i=t.length;for(let r=0;r=0;)t.push(n=i[r]),n===e&&J("Cycle detected in dataflow graph.")},pulse:function O4e(e,t,n){this.touch(e,n||EL);const i=new ld(this,this._clock+(this._pulse?0:1)),r=e.pulse&&e.pulse.source||[];return i.target=e,this._input[e.id]=t.pulse(i,r),this},touch:function I4e(e,t){const n=t||EL;return this._pulse?this._enqueue(e):this._touched.add(e),n.skip&&e.skip(!0),this},update:function k4e(e,t,n){const i=n||EL;return(e.set(t)||i.force)&&this.touch(e,i),this},changeset:hh,ingest:function f4e(e,t,n){return t=this.parse(t,n),this.pulse(e,this.changeset().insert(t))},parse:function d4e(e,t){const n=this.locale();return nne(e,t,n.timeParse,n.utcParse)},preload:function p4e(e,t,n){return _L.apply(this,arguments)},request:function h4e(e,t){return mL.apply(this,arguments)},events:function u4e(e,t,n,i){const r=this,o=sd(n,i),s=function(c){c.dataflow=r;try{o.receive(c)}catch(u){r.error(u)}finally{r.run()}};let a;a="string"==typeof e&&typeof document<"u"?document.querySelectorAll(e):Ee(e);const l=a.length;for(let c=0;cr.pulse),t):this._input[e.id]||function N4e(e,t){return t&&t.stamp===e.stamp?t:(e=e.fork(),t&&t!==BS&&(e.source=t.source),e)}(this._pulse,n&&n.pulse)}},me(K,ln,{run(e){if(e.stampthis.pulse=n):t!==e.StopPropagation&&(this.pulse=t),t},evaluate(e){const t=this.marshall(e.stamp),n=this.transform(t,e);return t.clear(),n},transform(){}});const Um={};function gne(e){const t=mne(e);return t&&t.Definition||null}function mne(e){return e=e&&e.toLowerCase(),De(Um,e)?Um[e]:null}function ph(e,t){let n;if(void 0===t)for(const i of e)null!=i&&(n=i)&&(n=i);else{let i=-1;for(let r of e)null!=(r=t(r,++i,e))&&(n=r)&&(n=r)}return n}function CL(e,t){let n;if(void 0===t)for(const i of e)null!=i&&(n>i||void 0===n&&i>=i)&&(n=i);else{let i=-1;for(let r of e)null!=(r=t(r,++i,e))&&(n>r||void 0===n&&r>=r)&&(n=r)}return n}function VS(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(et?1:0)}function yne(e,t,n=0,i=1/0,r){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),i=Math.floor(Math.min(e.length-1,i)),!(n<=t&&t<=i))return e;for(r=void 0===r?VS:function _ne(e=qc){if(e===qc)return VS;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const i=e(t,n);return i||0===i?i:(0===e(n,n))-(0===e(t,t))}}(r);i>n;){if(i-n>600){const l=i-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1);yne(e,t,Math.max(n,Math.floor(t-c*d/l+f)),Math.min(i,Math.floor(t+(l-c)*d/l+f)),r)}const o=e[t];let s=n,a=i;for(n1(e,n,t),r(e[i],o)>0&&n1(e,n,i);s0;)--a}0===r(e[n],o)?n1(e,n,a):(++a,n1(e,a,i)),a<=t&&(n=a+1),t<=a&&(i=a-1)}return e}function n1(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function vne(e){return null===e?NaN:+e}function DL(e,t,n){if(e=Float64Array.from(function*P4e(e,t){if(void 0===t)for(let n of e)null!=n&&(n=+n)>=n&&(yield n);else{let n=-1;for(let i of e)null!=(i=t(i,++n,e))&&(i=+i)>=i&&(yield i)}}(e,n)),(i=e.length)&&!isNaN(t=+t)){if(t<=0||i<2)return CL(e);if(t>=1)return ph(e);var i,r=(i-1)*t,o=Math.floor(r),s=ph(yne(e,o).subarray(0,o+1));return s+(CL(e.subarray(o+1))-s)*(r-o)}}function bne(e,t,n=vne){if((i=e.length)&&!isNaN(t=+t)){if(t<=0||i<2)return+n(e[0],0,e);if(t>=1)return+n(e[i-1],i-1,e);var i,r=(i-1)*t,o=Math.floor(r),s=+n(e[o],o,e);return s+(+n(e[o+1],o+1,e)-s)*(r-o)}}function wne(e,t){return DL(e,.5,t)}function*Ene(e,t){if(null==t)for(let n of e)null!=n&&""!==n&&(n=+n)>=n&&(yield n);else{let n=-1;for(let i of e)i=t(i,++n,e),null!=i&&""!==i&&(i=+i)>=i&&(yield i)}}function SL(e,t,n){const i=Float64Array.from(Ene(e,n));return i.sort(qc),t.map(r=>bne(i,r))}function TL(e,t){return SL(e,[.25,.5,.75],t)}function xL(e,t){const n=e.length,i=function $4e(e,t){const n=function L4e(e,t){let i,n=0,r=0,o=0;if(void 0===t)for(let s of e)null!=s&&(s=+s)>=s&&(i=s-r,r+=i/++n,o+=i*(s-r));else{let s=-1;for(let a of e)null!=(a=t(a,++s,e))&&(a=+a)>=a&&(i=a-r,r+=i/++n,o+=i*(a-r))}if(n>1)return o/(n-1)}(e,t);return n&&Math.sqrt(n)}(e,t),r=TL(e,t);return 1.06*(Math.min(i,(r[2]-r[0])/1.34)||i||Math.abs(r[0])||1)*Math.pow(n,-.2)}function Cne(e){const t=e.maxbins||20,n=e.base||10,i=Math.log(n),r=e.divide||[5,2];let a,l,c,u,d,f,o=e.extent[0],s=e.extent[1];const h=e.span||s-o||Math.abs(o)||1;if(e.step)a=e.step;else if(e.steps){for(u=h/t,d=0,f=e.steps.length;dt;)a*=n;for(d=0,f=r.length;d=c&&h/u<=t&&(a=u)}u=Math.log(a);const g=Math.pow(n,-(u>=0?0:1+~~(-u/i))-1);return(e.nice||void 0===e.nice)&&(u=Math.floor(o/a+g)*a,o=of);const r=e.length,o=new Float64Array(r);let d,s=0,a=1,l=i(e[0]),c=l,u=l+t;for(;a=u){for(c=(l+c)/2;s>1);sr;)e[s--]=e[i]}i=r,r=o}return e}(o,t+t/4):o}function V4e(e){return function(){return(e=(1103515245*e+12345)%2147483647)/2147483647}}function U4e(e,t){let n,i,r;null==t&&(t=e,e=0);const o={min(s){return arguments.length?(n=s||0,r=i-n,o):n},max(s){return arguments.length?(i=s||0,r=i-n,o):i},sample:()=>n+Math.floor(r*ks()),pdf:s=>s===Math.floor(s)&&s>=n&&s=i?1:(a-n+1)/r},icdf:s=>s>=0&&s<=1?n-1+Math.floor(s*r):NaN};return o.min(e).max(t)}const Tne=Math.sqrt(2*Math.PI),z4e=Math.SQRT2;let i1=NaN;function US(e,t){e=e||0,t=t??1;let r,o,n=0,i=0;if(i1==i1)n=i1,i1=NaN;else{do{n=2*ks()-1,i=2*ks()-1,r=n*n+i*i}while(0===r||r>1);o=Math.sqrt(-2*Math.log(r)/r),n*=o,i1=i*o}return e+n*t}function AL(e,t,n){const i=(e-(t||0))/(n=n??1);return Math.exp(-.5*i*i)/(n*Tne)}function zS(e,t,n){const i=(e-(t=t||0))/(n=n??1),r=Math.abs(i);let o;if(r>37)o=0;else{const s=Math.exp(-r*r/2);let a;r<7.07106781186547?(a=.0352624965998911*r+.700383064443688,a=a*r+6.37396220353165,a=a*r+33.912866078383,a=a*r+112.079291497871,a=a*r+221.213596169931,a=a*r+220.206867912376,o=s*a,a=.0883883476483184*r+1.75566716318264,a=a*r+16.064177579207,a=a*r+86.7807322029461,a=a*r+296.564248779674,a=a*r+637.333633378831,a=a*r+793.826512519948,a=a*r+440.413735824752,o/=a):(a=r+.65,a=r+4/a,a=r+3/a,a=r+2/a,a=r+1/a,o=s/a/2.506628274631)}return i>0?1-o:o}function HS(e,t,n){return e<0||e>1?NaN:(t||0)+(n??1)*z4e*function H4e(e){let n,t=-Math.log((1-e)*(1+e));return t<6.25?(t-=3.125,n=-364441206401782e-35,n=n*t-16850591381820166e-35,n=128584807152564e-32+n*t,n=11157877678025181e-33+n*t,n=n*t-1333171662854621e-31,n=20972767875968562e-33+n*t,n=6637638134358324e-30+n*t,n=n*t-4054566272975207e-29,n=n*t-8151934197605472e-29,n=26335093153082323e-28+n*t,n=n*t-12975133253453532e-27,n=n*t-5415412054294628e-26,n=1.0512122733215323e-9+n*t,n=n*t-4.112633980346984e-9,n=n*t-2.9070369957882005e-8,n=4.2347877827932404e-7+n*t,n=n*t-13654692000834679e-22,n=n*t-13882523362786469e-21,n=.00018673420803405714+n*t,n=n*t-.000740702534166267,n=n*t-.006033670871430149,n=.24015818242558962+n*t,n=1.6536545626831027+n*t):t<16?(t=Math.sqrt(t)-3.25,n=2.2137376921775787e-9,n=9.075656193888539e-8+n*t,n=n*t-2.7517406297064545e-7,n=1.8239629214389228e-8+n*t,n=15027403968909828e-22+n*t,n=n*t-4013867526981546e-21,n=29234449089955446e-22+n*t,n=12475304481671779e-21+n*t,n=n*t-47318229009055734e-21,n=6828485145957318e-20+n*t,n=24031110387097894e-21+n*t,n=n*t-.0003550375203628475,n=.0009532893797373805+n*t,n=n*t-.0016882755560235047,n=.002491442096107851+n*t,n=n*t-.003751208507569241,n=.005370914553590064+n*t,n=1.0052589676941592+n*t,n=3.0838856104922208+n*t):Number.isFinite(t)?(t=Math.sqrt(t)-5,n=-27109920616438573e-27,n=n*t-2.555641816996525e-10,n=1.5076572693500548e-9+n*t,n=n*t-3.789465440126737e-9,n=7.61570120807834e-9+n*t,n=n*t-1.496002662714924e-8,n=2.914795345090108e-8+n*t,n=n*t-6.771199775845234e-8,n=2.2900482228026655e-7+n*t,n=n*t-9.9298272942317e-7,n=4526062597223154e-21+n*t,n=n*t-1968177810553167e-20,n=7599527703001776e-20+n*t,n=n*t-.00021503011930044477,n=n*t-.00013871931833623122,n=1.0103004648645344+n*t,n=4.849906401408584+n*t):n=1/0,n*e}(2*e-1)}function ML(e,t){let n,i;const r={mean(o){return arguments.length?(n=o||0,r):n},stdev(o){return arguments.length?(i=o??1,r):i},sample:()=>US(n,i),pdf:o=>AL(o,n,i),cdf:o=>zS(o,n,i),icdf:o=>HS(o,n,i)};return r.mean(e).stdev(t)}function NL(e,t){const n=ML();let i=0;const r={data(o){return arguments.length?(e=o,i=o?o.length:0,r.bandwidth(t)):e},bandwidth(o){return arguments.length?(!(t=o)&&e&&(t=xL(e)),r):t},sample:()=>e[~~(ks()*i)]+t*n.sample(),pdf(o){let s=0,a=0;for(;aIL(n,i),pdf:o=>kL(o,n,i),cdf:o=>OL(o,n,i),icdf:o=>RL(o,n,i)};return r.mean(e).stdev(t)}function Ane(e,t){let i,n=0;const o={weights(s){return arguments.length?(i=function r(s){const a=[];let c,l=0;for(c=0;c=t&&e<=n?1/(n-t):0}function LL(e,t,n){return null==n&&(n=t??1,t=0),en?1:(e-t)/(n-t)}function $L(e,t,n){return null==n&&(n=t??1,t=0),e>=0&&e<=1?t+e*(n-t):NaN}function Mne(e,t){let n,i;const r={min(o){return arguments.length?(n=o||0,r):n},max(o){return arguments.length?(i=o??1,r):i},sample:()=>FL(n,i),pdf:o=>PL(o,n,i),cdf:o=>LL(o,n,i),icdf:o=>$L(o,n,i)};return null==t&&(t=e??1,e=0),r.min(e).max(t)}function BL(e,t,n){let i=0,r=0;for(const o of e){const s=n(o);null==t(o)||null==s||isNaN(s)||(i+=(s-i)/++r)}return{coef:[i],predict:()=>i,rSquared:0}}function r1(e,t,n,i){const r=i-e*e,o=Math.abs(r)<1e-24?0:(n-e*t)/r;return[t-o*e,o]}function GS(e,t,n,i){e=e.filter(h=>{let p=t(h),g=n(h);return null!=p&&(p=+p)>=p&&null!=g&&(g=+g)>=g}),i&&e.sort((h,p)=>t(h)-t(p));const r=e.length,o=new Float64Array(r),s=new Float64Array(r);let u,d,f,a=0,l=0,c=0;for(f of e)o[a]=u=+t(f),s[a]=d=+n(f),++a,l+=(u-l)/a,c+=(d-c)/a;for(a=0;a=o&&null!=s&&(s=+s)>=s&&i(o,s,++r)}function zm(e,t,n,i,r){let o=0,s=0;return o1(e,t,n,(a,l)=>{const c=l-r(a),u=l-i;o+=c*c,s+=u*u}),1-o/s}function jL(e,t,n){let i=0,r=0,o=0,s=0,a=0;o1(e,t,n,(u,d)=>{++a,i+=(u-i)/a,r+=(d-r)/a,o+=(u*d-o)/a,s+=(u*u-s)/a});const l=r1(i,r,o,s),c=u=>l[0]+l[1]*u;return{coef:l,predict:c,rSquared:zm(e,t,n,r,c)}}function Nne(e,t,n){let i=0,r=0,o=0,s=0,a=0;o1(e,t,n,(u,d)=>{++a,u=Math.log(u),i+=(u-i)/a,r+=(d-r)/a,o+=(u*d-o)/a,s+=(u*u-s)/a});const l=r1(i,r,o,s),c=u=>l[0]+l[1]*Math.log(u);return{coef:l,predict:c,rSquared:zm(e,t,n,r,c)}}function Ine(e,t,n){const[i,r,o,s]=GS(e,t,n);let f,h,p,a=0,l=0,c=0,u=0,d=0;o1(e,t,n,(y,v)=>{f=i[d++],h=Math.log(v),p=f*v,a+=(v*h-a)/d,l+=(p-l)/d,c+=(p*h-c)/d,u+=(f*p-u)/d});const[g,m]=r1(l/s,a/s,c/s,u/s),_=y=>Math.exp(g+m*(y-o));return{coef:[Math.exp(g-m*o),m],predict:_,rSquared:zm(e,t,n,s,_)}}function kne(e,t,n){let i=0,r=0,o=0,s=0,a=0,l=0;o1(e,t,n,(d,f)=>{const h=Math.log(d),p=Math.log(f);++l,i+=(h-i)/l,r+=(p-r)/l,o+=(h*p-o)/l,s+=(h*h-s)/l,a+=(f-a)/l});const c=r1(i,r,o,s),u=d=>c[0]*Math.pow(d,c[1]);return c[0]=Math.exp(c[0]),{coef:c,predict:u,rSquared:zm(e,t,n,a,u)}}function VL(e,t,n){const[i,r,o,s]=GS(e,t,n),a=i.length;let h,p,g,m,l=0,c=0,u=0,d=0,f=0;for(h=0;hv*(E-=o)*E+b*E+w+s;return{coef:[w-b*o+v*o*o+s,b-2*v*o,v],predict:C,rSquared:zm(e,t,n,s,C)}}function One(e,t,n,i){if(0===i)return BL(e,t,n);if(1===i)return jL(e,t,n);if(2===i)return VL(e,t,n);const[r,o,s,a]=GS(e,t,n),l=r.length,c=[],u=[],d=i+1;let f,h,p,g,m;for(f=0;fMath.abs(e[i][s])&&(s=r);for(o=i;o=i;o--)e[o][r]-=e[o][i]*e[i][r]/e[i][i]}for(r=t-1;r>=0;--r){for(a=0,o=r+1;o{let b=a+_[0]+_[1]*(v-=s)+_[2]*v*v;for(f=3;f=0;--o)for(a=t[o],l=1,r[o]+=a,s=1;s<=o;++s)l*=(o+1-s)/s,r[o-s]+=a*Math.pow(n,s)*l;return r[0]+=i,r}const Rne=2,Fne=1e-12;function Pne(e,t,n,i){const[r,o,s,a]=GS(e,t,n,!0),l=r.length,c=Math.max(2,~~(i*l)),u=new Float64Array(l),d=new Float64Array(l),f=new Float64Array(l).fill(1);for(let h=-1;++h<=Rne;){const p=[0,c-1];for(let m=0;mr[v]-_?y:v]-_||1);for(let P=y;P<=v;++P){const T=r[P],S=o[P],x=q4e(Math.abs(_-T)*k)*f[P],I=T*x;w+=x,C+=I,E+=S*x,D+=S*I,M+=T*I}const[R,F]=r1(C/w,E/w,D/w,M/w);u[m]=R+F*_,d[m]=Math.abs(o[m]-u[m]),Y4e(r,m+1,p)}if(h===Rne)break;const g=wne(d);if(Math.abs(g)=1?Fne:(y=1-_*_)*y}return function K4e(e,t,n,i){const r=e.length,o=[];let c,s=0,a=0,l=[];for(;s=e.length))for(;t>r&&e[o]-i<=i-e[r];)n[0]=++r,n[1]=o,++o}const X4e=.5*Math.PI/180;function WS(e,t,n,i){n=n||25,i=Math.max(n,i||200);const r=g=>[g,e(g)],o=t[0],s=t[1],a=s-o,l=a/i,c=[r(o)],u=[];if(n===i){for(let g=1;g0;)u.push(r(o+g/n*a));let d=c[0],f=u[u.length-1];const h=1/a,p=function Q4e(e,t){let n=e,i=e;const r=t.length;for(let o=0;oi&&(i=s)}return 1/(i-n)}(d[1],u);for(;f;){const g=r((d[0]+f[0])/2);g[0]-d[0]>=l&&Z4e(d,g,f,h,p)>X4e?u.push(g):(d=f,c.push(f),u.pop()),f=u[u.length-1]}return c}function Z4e(e,t,n,i,r){const o=Math.atan2(r*(n[1]-e[1]),i*(n[0]-e[0])),s=Math.atan2(r*(t[1]-e[1]),i*(t[0]-e[0]));return Math.abs(o-s)}function Yo(e,t,n){e=+e,t=+t,n=(r=arguments.length)<2?(t=e,e=0,1):r<3?1:+n;for(var i=-1,r=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(r);++i{const n=e.length;let i=1,r=String(e[0](t));for(;i{},t6e={init:zL,add:zL,rem:zL,idx:0},s1={values:{init:e=>e.cell.store=!0,value:e=>e.cell.data.values(),idx:-1},count:{value:e=>e.cell.num},__count__:{value:e=>e.missing+e.valid},missing:{value:e=>e.missing},valid:{value:e=>e.valid},sum:{init:e=>e.sum=0,value:e=>e.valid?e.sum:void 0,add:(e,t)=>e.sum+=+t,rem:(e,t)=>e.sum-=t},product:{init:e=>e.product=1,value:e=>e.valid?e.product:void 0,add:(e,t)=>e.product*=t,rem:(e,t)=>e.product/=t},mean:{init:e=>e.mean=0,value:e=>e.valid?e.mean:void 0,add:(e,t)=>(e.mean_d=t-e.mean,e.mean+=e.mean_d/e.valid),rem:(e,t)=>(e.mean_d=t-e.mean,e.mean-=e.valid?e.mean_d/e.valid:e.mean)},average:{value:e=>e.valid?e.mean:void 0,req:["mean"],idx:1},variance:{init:e=>e.dev=0,value:e=>e.valid>1?e.dev/(e.valid-1):void 0,add:(e,t)=>e.dev+=e.mean_d*(t-e.mean),rem:(e,t)=>e.dev-=e.mean_d*(t-e.mean),req:["mean"],idx:1},variancep:{value:e=>e.valid>1?e.dev/e.valid:void 0,req:["variance"],idx:2},stdev:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid-1)):void 0,req:["variance"],idx:2},stdevp:{value:e=>e.valid>1?Math.sqrt(e.dev/e.valid):void 0,req:["variance"],idx:2},stderr:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid*(e.valid-1))):void 0,req:["variance"],idx:2},distinct:{value:e=>e.cell.data.distinct(e.get),req:["values"],idx:3},ci0:{value:e=>e.cell.data.ci0(e.get),req:["values"],idx:3},ci1:{value:e=>e.cell.data.ci1(e.get),req:["values"],idx:3},median:{value:e=>e.cell.data.q2(e.get),req:["values"],idx:3},q1:{value:e=>e.cell.data.q1(e.get),req:["values"],idx:3},q3:{value:e=>e.cell.data.q3(e.get),req:["values"],idx:3},min:{init:e=>e.min=void 0,value:e=>e.min=Number.isNaN(e.min)?e.cell.data.min(e.get):e.min,add:(e,t)=>{(t{t<=e.min&&(e.min=NaN)},req:["values"],idx:4},max:{init:e=>e.max=void 0,value:e=>e.max=Number.isNaN(e.max)?e.cell.data.max(e.get):e.max,add:(e,t)=>{(t>e.max||void 0===e.max)&&(e.max=t)},rem:(e,t)=>{t>=e.max&&(e.max=NaN)},req:["values"],idx:4},argmin:{init:e=>e.argmin=void 0,value:e=>e.argmin||e.cell.data.argmin(e.get),add:(e,t,n)=>{t{t<=e.min&&(e.argmin=void 0)},req:["min","values"],idx:3},argmax:{init:e=>e.argmax=void 0,value:e=>e.argmax||e.cell.data.argmax(e.get),add:(e,t,n)=>{t>e.max&&(e.argmax=n)},rem:(e,t)=>{t>=e.max&&(e.argmax=void 0)},req:["max","values"],idx:3},exponential:{init:(e,t)=>{e.exp=0,e.exp_r=t},value:e=>e.valid?e.exp*(1-e.exp_r)/(1-e.exp_r**e.valid):void 0,add:(e,t)=>e.exp=e.exp_r*e.exp+t,rem:(e,t)=>e.exp=(e.exp-t/e.exp_r**(e.valid-1))/e.exp_r},exponentialb:{value:e=>e.valid?e.exp*(1-e.exp_r):void 0,req:["exponential"],idx:1}},a1=Object.keys(s1).filter(e=>"__count__"!==e);function $ne(e,t,n){return s1[e](n,t)}function Bne(e,t){return e.idx-t.idx}function r6e(){this.valid=0,this.missing=0,this._ops.forEach(e=>null==e.aggregate_param?e.init(this):e.init(this,e.aggregate_param))}function o6e(e,t){null!=e&&""!==e?e==e&&(++this.valid,this._ops.forEach(n=>n.add(this,e,t))):++this.missing}function s6e(e,t){null!=e&&""!==e?e==e&&(--this.valid,this._ops.forEach(n=>n.rem(this,e,t))):--this.missing}function a6e(e){return this._out.forEach(t=>e[t.out]=t.value(this)),e}function jne(e,t){const n=t||hr,i=function i6e(e){const t={};e.forEach(i=>t[i.name]=i);const n=i=>{i.req&&i.req.forEach(r=>{t[r]||n(t[r]=s1[r]())})};return e.forEach(n),Object.values(t).sort(Bne)}(e),r=e.slice().sort(Bne);function o(s){this._ops=i,this._out=r,this.cell=s,this.init()}return o.prototype.init=r6e,o.prototype.add=o6e,o.prototype.rem=s6e,o.prototype.set=a6e,o.prototype.get=n,o.fields=e.map(s=>s.out),o}function HL(e){this._key=e?As(e):Fe,this.reset()}[...a1,"__count__"].forEach(e=>{s1[e]=function n6e(e,t){return(n,i)=>rt({name:e,aggregate_param:i,out:n||e},t6e,t)}(e,s1[e])});const Qi=HL.prototype;function cd(e){K.call(this,null,e),this._adds=[],this._mods=[],this._alen=0,this._mlen=0,this._drop=!0,this._cross=!1,this._dims=[],this._dnames=[],this._measures=[],this._countOnly=!1,this._counts=null,this._prev=null,this._inputs=null,this._outputs=null}function GL(e){K.call(this,null,e)}function Vne(e,t,n){const i=e;let r=t||[],o=n||[],s={},a=0;return{add:l=>o.push(l),remove:l=>s[i(l)]=++a,size:()=>r.length,data:(l,c)=>(a&&(r=r.filter(u=>!s[i(u)]),s={},a=0),c&&l&&r.sort(l),o.length&&(r=l?Lee(l,r,o.sort(l)):r.concat(o),o=[]),r)}}function WL(e){K.call(this,[],e)}function Une(e){ln.call(this,null,c6e,e)}function c6e(e){return this.value&&!e.modified()?this.value:TP(e.fields,e.orders)}function qL(e){K.call(this,null,e)}function YL(e){K.call(this,null,e)}Qi.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null},Qi.add=function(e){this._add.push(e)},Qi.rem=function(e){this._rem.push(e)},Qi.values=function(){if(this._get=null,0===this._rem.length)return this._add;const e=this._add,t=this._rem,n=this._key,i=e.length,r=t.length,o=Array(i-r),s={};let a,l,c;for(a=0;a=0;)o=e(t[i])+"",De(n,o)||(n[o]=1,++r);return r},Qi.extent=function(e){if(this._get!==e||!this._ext){const t=this.values(),n=Iee(t,e);this._ext=[t[n[0]],t[n[1]]],this._get=e}return this._ext},Qi.argmin=function(e){return this.extent(e)[0]||{}},Qi.argmax=function(e){return this.extent(e)[1]||{}},Qi.min=function(e){const t=this.extent(e)[0];return null!=t?e(t):void 0},Qi.max=function(e){const t=this.extent(e)[1];return null!=t?e(t):void 0},Qi.quartile=function(e){return(this._get!==e||!this._q)&&(this._q=TL(this.values(),e),this._get=e),this._q},Qi.q1=function(e){return this.quartile(e)[0]},Qi.q2=function(e){return this.quartile(e)[1]},Qi.q3=function(e){return this.quartile(e)[2]},Qi.ci=function(e){return(this._get!==e||!this._ci)&&(this._ci=Dne(this.values(),1e3,.05,e),this._get=e),this._ci},Qi.ci0=function(e){return this.ci(e)[0]},Qi.ci1=function(e){return this.ci(e)[1]},cd.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:a1},{name:"aggregate_params",type:"number",null:!0,array:!0},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"drop",type:"boolean",default:!0},{name:"cross",type:"boolean",default:!1},{name:"key",type:"field"}]},me(cd,K,{transform(e,t){const n=this,i=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=e.modified();return n.stamp=i.stamp,n.value&&(r||t.modified(n._inputs,!0))?(n._prev=n.value,n.value=r?n.init(e):Object.create(null),t.visit(t.SOURCE,o=>n.add(o))):(n.value=n.value||n.init(e),t.visit(t.REM,o=>n.rem(o)),t.visit(t.ADD,o=>n.add(o))),i.modifies(n._outputs),n._drop=!1!==e.drop,e.cross&&n._dims.length>1&&(n._drop=!1,n.cross()),t.clean()&&n._drop&&i.clean(!0).runAfter(()=>this.clean()),n.changes(i)},cross(){const e=this,t=e.value,n=e._dnames,i=n.map(()=>({})),r=n.length;function o(a){let l,c,u,d;for(l in a)for(u=a[l].tuple,c=0;c{const v=$n(y);return r(y),n.push(v),v}),this.cellkey=e.key?e.key:UL(this._dims),this._countOnly=!0,this._counts=[],this._measures=[];const o=e.fields||[null],s=e.ops||["count"],a=e.aggregate_params||[null],l=e.as||[],c=o.length,u={};let d,f,h,p,g,m,_;for(c!==s.length&&J("Unmatched number of fields and aggregate ops."),_=0;_jne(y,y.field)),Object.create(null)},cellkey:UL(),cell(e,t){let n=this.value[e];return n?0===n.num&&this._drop&&n.stamp{const d=i(u);u[a]=d,u[l]=null==d?null:r+o*(1+(d-r)/o)}:u=>u[a]=i(u)),t.modifies(n?s:a)},_bins(e){if(this.value&&!e.modified())return this.value;const t=e.field,n=Cne(e),i=n.step;let s,a,r=n.start,o=r+Math.ceil((n.stop-r)/i)*i;null!=(s=e.anchor)&&(a=s-(r+i*Math.floor((s-r)/i)),r+=a,o+=a);const l=function(c){let u=pr(t(c));return null==u?null:uo?1/0:(u=Math.max(r,Math.min(u,o-i)),r+i*Math.floor(1e-14+(u-r)/i))};return l.start=r,l.stop=n.stop,l.step=i,this.value=co(l,fr(t),e.name||"bin_"+$n(t))}}),WL.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]},me(WL,K,{transform(e,t){const n=t.fork(t.ALL),i=Vne(Fe,this.value,n.materialize(n.ADD).add),r=e.sort,o=t.changed()||r&&(e.modified("sort")||t.modified(r.fields));return n.visit(n.REM,i.remove),this.modified(o),this.value=n.source=i.data(fh(r),o),t.source&&t.source.root&&(this.value.root=t.source.root),n}}),me(Une,ln),qL.Definition={type:"CountPattern",metadata:{generates:!0,changes:!0},params:[{name:"field",type:"field",required:!0},{name:"case",type:"enum",values:["upper","lower","mixed"],default:"mixed"},{name:"pattern",type:"string",default:'[\\w"]+'},{name:"stopwords",type:"string",default:""},{name:"as",type:"string",array:!0,length:2,default:["text","count"]}]},me(qL,K,{transform(e,t){const n=d=>f=>{for(var p,h=function u6e(e,t,n){switch(t){case"upper":e=e.toUpperCase();break;case"lower":e=e.toLowerCase()}return e.match(n)}(a(f),e.case,o)||[],g=0,m=h.length;gr[d]=1+(r[d]||0)),u=n(d=>r[d]-=1);return i?t.visit(t.SOURCE,c):(t.visit(t.ADD,c),t.visit(t.REM,u)),this._finish(t,l)},_parameterCheck(e,t){let n=!1;return(e.modified("stopwords")||!this._stop)&&(this._stop=new RegExp("^"+(e.stopwords||"")+"$","i"),n=!0),(e.modified("pattern")||!this._match)&&(this._match=new RegExp(e.pattern||"[\\w']+","g"),n=!0),(e.modified("field")||t.modified(e.field.fields))&&(n=!0),n&&(this._counts={}),n},_finish(e,t){const n=this._counts,i=this._tuples||(this._tuples={}),r=t[0],o=t[1],s=e.fork(e.NO_SOURCE|e.NO_FIELDS);let a,l,c;for(a in n)l=i[a],c=n[a]||0,!l&&c?(i[a]=l=Ft({}),l[r]=a,l[o]=c,s.add.push(l)):0===c?(l&&s.rem.push(l),n[a]=null,i[a]=null):l[o]!==c&&(l[o]=c,s.mod.push(l));return s.modifies(t)}}),YL.Definition={type:"Cross",metadata:{generates:!0},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:!0,length:2,default:["a","b"]}]},me(YL,K,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.as||["a","b"],r=i[0],o=i[1],s=!this.value||t.changed(t.ADD_REM)||e.modified("as")||e.modified("filter");let a=this.value;return s?(a&&(n.rem=a),a=t.materialize(t.SOURCE).source,n.add=this.value=function d6e(e,t,n,i){for(var l,c,r=[],o={},s=e.length,a=0;aGne(o,t))):"function"==typeof i[r]&&i[r](e[r]);return i}function KL(e){K.call(this,null,e)}const Wne=[{key:{function:"normal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"lognormal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"uniform"},params:[{name:"min",type:"number",default:0},{name:"max",type:"number",default:1}]},{key:{function:"kde"},params:[{name:"field",type:"field",required:!0},{name:"from",type:"data"},{name:"bandwidth",type:"number",default:0}]}];function qne(e,t){return e?e.map((n,i)=>t[i]||$n(n)):null}function XL(e,t,n){const i=[],r=d=>d(l);let o,s,a,l,c,u;if(null==t)i.push(e.map(n));else for(o={},s=0,a=e.length;st(n,e),fr(t),$n(t))}function ZL(e){K.call(this,[void 0,void 0],e)}function JL(e,t){ln.call(this,e),this.parent=t,this.count=0}function qS(e){K.call(this,{},e),this._keys=xm();const t=this._targets=[];t.active=0,t.forEach=n=>{for(let i=0,r=t.active;iAs(t)):As(e.name,e.as)}function e3(e){K.call(this,xm(),e)}function t3(e){K.call(this,[],e)}function n3(e){K.call(this,[],e)}function i3(e){K.call(this,null,e)}function Qne(e){K.call(this,[],e)}KL.Definition={type:"Density",metadata:{generates:!0},params:[{name:"extent",type:"number",array:!0,length:2},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"method",type:"string",default:"pdf",values:["pdf","cdf"]},{name:"distribution",type:"param",params:Wne.concat({key:{function:"mixture"},params:[{name:"distributions",type:"param",array:!0,params:Wne},{name:"weights",type:"number",array:!0}]})},{name:"as",type:"string",array:!0,default:["value","density"]}]},me(KL,K,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const i=Gne(e.distribution,function g6e(e){return()=>e.materialize(e.SOURCE).source}(t)),r=e.steps||e.minsteps||25,o=e.steps||e.maxsteps||200;let s=e.method||"pdf";"pdf"!==s&&"cdf"!==s&&J("Invalid density method: "+s),!e.extent&&!i.data&&J("Missing density extent parameter."),s=i[s];const a=e.as||["value","density"],c=WS(s,e.extent||Al(i.data()),r,o).map(u=>{const d={};return d[a[0]]=u[0],d[a[1]]=u[1],Ft(d)});this.value&&(n.rem=this.value),this.value=n.add=n.source=c}return n}}),QL.Definition={type:"DotBin",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"step",type:"number"},{name:"smooth",type:"boolean",default:!1},{name:"as",type:"string",default:"bin"}]},me(QL,K,{transform(e,t){if(this.value&&!e.modified()&&!t.changed())return t;const n=t.materialize(t.SOURCE).source,i=XL(t.source,e.groupby,hr),r=e.smooth||!1,o=e.field,s=e.step||((e,t)=>$v(Al(e,t))/30)(n,o),a=fh((p,g)=>o(p)-o(g)),l=e.as||"bin",c=i.length;let h,u=1/0,d=-1/0,f=0;for(;fd&&(d=g),p[++h][l]=g}return this.value={start:u,stop:d,step:s},t.reflow(!0).modifies(l)}}),me(Kne,ln),ZL.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]},me(ZL,K,{transform(e,t){const n=this.value,i=e.field,r=t.changed()||t.modified(i.fields)||e.modified("field");let o=n[0],s=n[1];if((r||null==o)&&(o=1/0,s=-1/0),t.visit(r?t.SOURCE:t.ADD,a=>{const l=pr(i(a));null!=l&&(ls&&(s=l))}),!Number.isFinite(o)||!Number.isFinite(s)){let a=$n(i);a&&(a=` for field "${a}"`),t.dataflow.warn(`Infinite extent${a}: [${o}, ${s}]`),o=s=void 0}this.value=[o,s]}}),me(JL,ln,{connect(e){return this.detachSubflow=e.detachSubflow,this.targets().add(e),e.source=this},add(e){this.count+=1,this.value.add.push(e)},rem(e){this.count-=1,this.value.rem.push(e)},mod(e){this.value.mod.push(e)},init(e){this.value.init(e,e.NO_SOURCE)},evaluate(){return this.value}}),me(qS,K,{activate(e){this._targets[this._targets.active++]=e},subflow(e,t,n,i){const r=this.value;let s,a,o=De(r,e)&&r[e];return o?o.value.stampi&&i.count>0);this.initTargets(n)}},initTargets(e){const t=this._targets,n=t.length,i=e?e.length:0;let r=0;for(;rthis.subflow(l,r,t);return this._group=e.group||{},this.initTargets(),t.visit(t.REM,l=>{const c=Fe(l),u=o.get(c);void 0!==u&&(o.delete(c),a(u).rem(l))}),t.visit(t.ADD,l=>{const c=i(l);o.set(Fe(l),c),a(c).add(l)}),s||t.modified(i.fields)?t.visit(t.MOD,l=>{const c=Fe(l),u=o.get(c),d=i(l);u===d?a(d).mod(l):(o.set(c,d),a(u).rem(l),a(d).add(l))}):t.changed(t.MOD)&&t.visit(t.MOD,l=>{a(o.get(Fe(l))).mod(l)}),s&&t.visit(t.REFLOW,l=>{const c=Fe(l),u=o.get(c),d=i(l);u!==d&&(o.set(c,d),a(u).rem(l),a(d).add(l))}),t.clean()?n.runAfter(()=>{this.clean(),o.clean()}):o.empty>n.cleanThreshold&&n.runAfter(o.clean),t}}),me(Xne,ln),e3.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]},me(e3,K,{transform(e,t){const n=t.dataflow,i=this.value,r=t.fork(),o=r.add,s=r.rem,a=r.mod,l=e.expr;let c=!0;function u(d){const f=Fe(d),h=l(d,e),p=i.get(f);h&&p?(i.delete(f),o.push(d)):h||p?c&&h&&!p&&a.push(d):(i.set(f,1),s.push(d))}return t.visit(t.REM,d=>{const f=Fe(d);i.has(f)?i.delete(f):s.push(d)}),t.visit(t.ADD,d=>{l(d,e)?o.push(d):i.set(Fe(d),1)}),t.visit(t.MOD,u),e.modified()&&(c=!1,t.visit(t.REFLOW,u)),i.empty>n.cleanThreshold&&n.runAfter(i.clean),r}}),t3.Definition={type:"Flatten",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"index",type:"string"},{name:"as",type:"string",array:!0}]},me(t3,K,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.fields,r=qne(i,e.as||[]),o=e.index||null,s=r.length;return n.rem=this.value,t.visit(t.SOURCE,a=>{const l=i.map(p=>p(a)),c=l.reduce((p,g)=>Math.max(p,g.length),0);let d,f,h,u=0;for(;u{for(let d,u=0;us[i]=n(s,e))}}),me(Qne,K,{transform(e,t){const n=t.fork(t.ALL),i=e.generator;let s,a,l,r=this.value,o=e.size-r.length;if(o>0){for(s=[];--o>=0;)s.push(l=Ft(i(e))),r.push(l);n.add=n.add.length?n.materialize(n.ADD).add.concat(s):s}else a=r.slice(0,-o),n.rem=n.rem.length?n.materialize(n.REM).rem.concat(a):a,r=r.slice(-o);return n.source=this.value=r,n}});const YS={value:"value",median:wne,mean:function J4e(e,t){let n=0,i=0;if(void 0===t)for(let r of e)null!=r&&(r=+r)>=r&&(++n,i+=r);else{let r=-1;for(let o of e)null!=(o=t(o,++r,e))&&(o=+o)>=o&&(++n,i+=o)}if(n)return i/n},min:CL,max:ph},v6e=[];function r3(e){K.call(this,[],e)}function o3(e){cd.call(this,e)}function s3(e){K.call(this,null,e)}function Zne(e){ln.call(this,null,C6e,e)}function C6e(e){return this.value&&!e.modified()?this.value:AP(e.fields,e.flat)}function Jne(e){K.call(this,[],e),this._pending=null}function a3(e,t,n){n.forEach(Ft);const i=t.fork(t.NO_FIELDS&t.NO_SOURCE);return i.rem=e.value,e.value=i.source=i.add=n,e._pending=null,i.rem.length&&i.clean(!0),i}function l3(e){K.call(this,{},e)}function eie(e){ln.call(this,null,S6e,e)}function S6e(e){if(this.value&&!e.modified())return this.value;const t=e.extents,n=t.length;let o,s,i=1/0,r=-1/0;for(o=0;or&&(r=s[1]);return[i,r]}function tie(e){ln.call(this,null,T6e,e)}function T6e(e){return this.value&&!e.modified()?this.value:e.values.reduce((t,n)=>t.concat(n),[])}function nie(e){K.call(this,null,e)}function c3(e){cd.call(this,e)}function iie(e){qS.call(this,e)}function u3(e){K.call(this,null,e)}function rie(e){K.call(this,null,e)}function d3(e){K.call(this,null,e)}function oie(e){K.call(this,null,e)}function f3(e){K.call(this,[],e),this.count=0}function h3(e){K.call(this,null,e)}function sie(e){K.call(this,null,e),this.modified(!0)}function p3(e){K.call(this,null,e)}r3.Definition={type:"Impute",metadata:{changes:!0},params:[{name:"field",type:"field",required:!0},{name:"key",type:"field",required:!0},{name:"keyvals",array:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]},me(r3,K,{transform(e,t){var f,h,p,g,m,_,y,v,b,w,n=t.fork(t.ALL),i=function b6e(e){var n,t=e.method||YS.value;if(null!=YS[t])return t===YS.value?(n=void 0!==e.value?e.value:0,()=>n):YS[t];J("Unrecognized imputation method: "+t)}(e),r=function w6e(e){const t=e.field;return n=>n?t(n):NaN}(e),o=$n(e.field),s=$n(e.key),a=(e.groupby||[]).map($n),l=function E6e(e,t,n,i){var c,u,d,f,h,p,g,m,r=_=>_(m),o=[],s=i?i.slice():[],a={},l={};for(s.forEach((_,y)=>a[_]=y+1),f=0,g=e.length;fn.add(o))):(r=n.value=n.value||this.init(e),t.visit(t.REM,o=>n.rem(o)),t.visit(t.ADD,o=>n.add(o))),n.changes(),t.visit(t.SOURCE,o=>{rt(o,r[n.cellkey(o)].tuple)}),t.reflow(i).modifies(this._outputs)},changes(){const e=this._adds,t=this._mods;let n,i;for(n=0,i=this._alen;n{const p=NL(h,s)[a],g=e.counts?h.length:1;WS(p,u||Al(h),d,f).forEach(_=>{const y={};for(let v=0;v(this._pending=Ee(r.data),o=>o.touch(this)))}:n.request(e.url,e.format).then(i=>a3(this,t,Ee(i.data)))}}),l3.Definition={type:"Lookup",metadata:{modifies:!0},params:[{name:"index",type:"index",params:[{name:"from",type:"data",required:!0},{name:"key",type:"field",required:!0}]},{name:"values",type:"field",array:!0},{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0},{name:"default",default:null}]},me(l3,K,{transform(e,t){const n=e.fields,i=e.index,r=e.values,o=null==e.default?null:e.default,s=e.modified(),a=n.length;let d,f,h,l=s?t.SOURCE:t.ADD,c=t,u=e.as;return r?(f=r.length,a>1&&!u&&J('Multi-field lookup requires explicit "as" parameter.'),u&&u.length!==a*f&&J('The "as" parameter has too few output field names.'),u=u||r.map($n),d=function(p){for(var _,y,g=0,m=0;gt.modified(p.fields)),l|=h?t.MOD:0),t.visit(l,d),c.modifies(u)}}),me(eie,ln),me(tie,ln),me(nie,K,{transform(e,t){return this.modified(e.modified()),this.value=e,t.fork(t.NO_SOURCE|t.NO_FIELDS)}}),c3.Definition={type:"Pivot",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"value",type:"field",required:!0},{name:"op",type:"enum",values:a1,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]},me(c3,cd,{_transform:cd.prototype.transform,transform(e,t){return this._transform(function x6e(e,t){const n=e.field,i=e.value,r=("count"===e.op?"__count__":e.op)||"sum",o=fr(n).concat(fr(i)),s=function M6e(e,t,n){const i={},r=[];return n.visit(n.SOURCE,o=>{const s=e(o);i[s]||(i[s]=1,r.push(s))}),r.sort(gS),t?r.slice(0,t):r}(n,e.limit||0,t);return t.changed()&&e.set("__pivot__",null,null,!0),{key:e.key,groupby:e.groupby,ops:s.map(()=>r),fields:s.map(a=>function A6e(e,t,n,i){return co(r=>t(r)===e?n(r):NaN,i,e+"")}(a,n,i,o)),as:s.map(a=>a+""),modified:e.modified.bind(e)}}(e,t),t)}}),me(iie,qS,{transform(e,t){const n=e.subflow,i=e.field,r=o=>this.subflow(Fe(o),n,t,o);return(e.modified("field")||i&&t.modified(fr(i)))&&J("PreFacet does not support field modification."),this.initTargets(),i?(t.visit(t.MOD,o=>{const s=r(o);i(o).forEach(a=>s.mod(a))}),t.visit(t.ADD,o=>{const s=r(o);i(o).forEach(a=>s.add(Ft(a)))}),t.visit(t.REM,o=>{const s=r(o);i(o).forEach(a=>s.rem(a))})):(t.visit(t.MOD,o=>r(o).mod(o)),t.visit(t.ADD,o=>r(o).add(o)),t.visit(t.REM,o=>r(o).rem(o))),t.clean()&&t.runAfter(()=>this.clean()),t}}),u3.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]},me(u3,K,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.fields,r=qne(e.fields,e.as||[]),o=i?(a,l)=>function N6e(e,t,n,i){for(let r=0,o=n.length;r{const l=Fe(a);n.rem.push(s[l]),s[l]=null}),t.visit(t.ADD,a=>{const l=o(a,Ft({}));s[Fe(a)]=l,n.add.push(l)}),t.visit(t.MOD,a=>{n.mod.push(o(a,s[Fe(a)]))}),n}}),me(rie,K,{transform(e,t){return this.value=e.value,e.modified("value")?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}}),d3.Definition={type:"Quantile",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"probs",type:"number",array:!0},{name:"step",type:"number",default:.01},{name:"as",type:"string",array:!0,default:["prob","value"]}]},me(d3,K,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=e.as||["prob","value"];if(this.value&&!e.modified()&&!t.changed())return n.source=this.value,n;const o=XL(t.materialize(t.SOURCE).source,e.groupby,e.field),s=(e.groupby||[]).map($n),a=[],l=e.step||.01,c=e.probs||Yo(l/2,1-1e-14,l),u=c.length;return o.forEach(d=>{const f=SL(d,c);for(let h=0;h{const o=Fe(r);n.rem.push(i[o]),i[o]=null}),t.visit(t.ADD,r=>{const o=gL(r);i[Fe(r)]=o,n.add.push(o)}),t.visit(t.MOD,r=>{const o=i[Fe(r)];for(const s in r)o[s]=r[s],n.modifies(s);n.mod.push(o)})),n}}),f3.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]},me(f3,K,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.modified("size"),r=e.size,o=this.value.reduce((u,d)=>(u[Fe(d)]=1,u),{});let s=this.value,a=this.count,l=0;function c(u){let d,f;s.length=l&&(d=s[f],o[Fe(d)]&&n.rem.push(d),s[f]=u)),++a}if(t.rem.length&&(t.visit(t.REM,u=>{const d=Fe(u);o[d]&&(o[d]=-1,n.rem.push(u)),--a}),s=s.filter(u=>-1!==o[Fe(u)])),(t.rem.length||i)&&s.length{o[Fe(u)]||c(u)}),l=-1),i&&s.length>r){const u=s.length-r;for(let d=0;d{o[Fe(u)]&&n.mod.push(u)}),t.add.length&&t.visit(t.ADD,c),(t.add.length||l<0)&&(n.add=s.filter(u=>!o[Fe(u)])),this.count=a,this.value=n.source=s,n}}),h3.Definition={type:"Sequence",metadata:{generates:!0,changes:!0},params:[{name:"start",type:"number",required:!0},{name:"stop",type:"number",required:!0},{name:"step",type:"number",default:1},{name:"as",type:"string",default:"data"}]},me(h3,K,{transform(e,t){if(this.value&&!e.modified())return;const n=t.materialize().fork(t.MOD),i=e.as||"data";return n.rem=this.value?t.rem.concat(this.value):t.rem,this.value=Yo(e.start,e.stop,e.step||1).map(r=>{const o={};return o[i]=r,Ft(o)}),n.add=t.add.concat(this.value),n}}),me(sie,K,{transform(e,t){return this.value=t.source,t.changed()?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}});const aie=["unit0","unit1"];function lie(e){K.call(this,xm(),e)}function cie(e){K.call(this,null,e)}p3.Definition={type:"TimeUnit",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"units",type:"enum",values:zP,array:!0},{name:"step",type:"number",default:1},{name:"maxbins",type:"number",default:40},{name:"extent",type:"date",array:!0},{name:"timezone",type:"enum",default:"local",values:["local","utc"]},{name:"as",type:"string",array:!0,length:2,default:aie}]},me(p3,K,{transform(e,t){const n=e.field,i=!1!==e.interval,r="utc"===e.timezone,o=this._floor(e,t),s=(r?$m:Lm)(o.unit).offset,a=e.as||aie,l=a[0],c=a[1],u=o.step;let d=o.start||1/0,f=o.stop||-1/0,h=t.ADD;return(e.modified()||t.changed(t.REM)||t.modified(fr(n)))&&(h=(t=t.reflow(!0)).SOURCE,d=1/0,f=-1/0),t.visit(h,p=>{const g=n(p);let m,_;null==g?(p[l]=null,i&&(p[c]=null)):(p[l]=m=_=o(g),i&&(p[c]=_=s(m,u)),mf&&(f=_))}),o.start=d,o.stop=f,t.modifies(i?a:l)},_floor(e,t){const n="utc"===e.timezone,{units:i,step:r}=e.units?{units:e.units,step:e.step||1}:Cte({extent:e.extent||Al(t.materialize(t.SOURCE).source,e.field),maxbins:e.maxbins}),o=GP(i),s=this.value||{},a=(n?fte:dte)(o,r);return a.unit=yt(o),a.units=o,a.step=r,a.start=s.start,a.stop=s.stop,this.value=a}}),me(lie,K,{transform(e,t){const n=t.dataflow,i=e.field,r=this.value,o=a=>r.set(i(a),a);let s=!0;return e.modified("field")||t.modified(i.fields)?(r.clear(),t.visit(t.SOURCE,o)):t.changed()?(t.visit(t.REM,a=>r.delete(i(a))),t.visit(t.ADD,o)):s=!1,this.modified(s),r.empty>n.cleanThreshold&&n.runAfter(r.clean),t.fork()}}),me(cie,K,{transform(e,t){(!this.value||e.modified("field")||e.modified("sort")||t.changed()||e.sort&&t.modified(e.sort.fields))&&(this.value=(e.sort?t.source.slice().sort(fh(e.sort)):t.source).map(e.field))}});const l1={row_number:function(){return{next:e=>e.index+1}},rank:function(){let e;return{init:()=>e=1,next:t=>{const n=t.index,i=t.data;return n&&t.compare(i[n-1],i[n])?e=n+1:e}}},dense_rank:function(){let e;return{init:()=>e=1,next:t=>{const n=t.index,i=t.data;return n&&t.compare(i[n-1],i[n])?++e:e}}},percent_rank:function(){const e=l1.rank(),t=e.next;return{init:e.init,next:n=>(t(n)-1)/(n.data.length-1)}},cume_dist:function(){let e;return{init:()=>e=0,next:t=>{const n=t.data,i=t.compare;let r=t.index;if(e0||J("ntile num must be greater than zero.");const n=l1.cume_dist(),i=n.next;return{init:n.init,next:r=>Math.ceil(t*i(r))}},lag:function(e,t){return t=+t||1,{next:n=>{const i=n.index-t;return i>=0?e(n.data[i]):null}}},lead:function(e,t){return t=+t||1,{next:n=>{const i=n.index+t,r=n.data;return ie(t.data[t.i0])}},last_value:function(e){return{next:t=>e(t.data[t.i1-1])}},nth_value:function(e,t){return(t=+t)>0||J("nth_value nth must be greater than zero."),{next:n=>{const i=n.i0+(t-1);return it=null,next:n=>{const i=e(n.data[n.index]);return null!=i?t=i:t}}},next_value:function(e){let t,n;return{init:()=>(t=null,n=-1),next:i=>{const r=i.data;return i.index<=n?t:(n=function O6e(e,t,n){for(let i=t.length;nl[g]=1)}h(e.sort),t.forEach((p,g)=>{const m=n[g],_=i[g],y=r[g]||null,v=$n(m),b=Lne(p,v,o[g]);if(h(m),s.push(b),De(l1,p))a.push(function k6e(e,t,n,i){const r=l1[e](t,n);return{init:r.init||Ju,update:function(o,s){s[i]=r.next(o)}}}(p,m,_,b));else{if(null==m&&"count"!==p&&J("Null aggregate field specified."),"count"===p)return void u.push(b);f=!1;let w=c[v];w||(w=c[v]=[],w.field=m,d.push(w)),w.push($ne(p,y,b))}}),(u.length||d.length)&&(this.cell=function F6e(e,t,n){e=e.map(l=>jne(l,l.field));const i={num:0,agg:null,store:!1,count:t};if(!n)for(var r=e.length,o=i.agg=Array(r),s=0;s0&&!r(o[n],o[n-1])&&(e.i0=t.left(o,o[n])),ie.init()),this.cell&&this.cell.init()},die.update=function(e,t){const n=this.cell,i=this.windows,r=e.data,o=i&&i.length;let s;if(n){for(s=e.p0;sthis.group(r(a));let s=this.state;(!s||n)&&(s=this.state=new uie(e)),n||t.modified(s.inputs)?(this.value={},t.visit(t.SOURCE,a=>o(a).add(a))):(t.visit(t.REM,a=>o(a).remove(a)),t.visit(t.ADD,a=>o(a).add(a)));for(let a=0,l=this._mlen;a0)for(var l,i=e[0],r=t[0],o=e[n]-i,s=t[n]-r,a=-1;++a<=n;)this._basis.point(this._beta*e[a]+(1-this._beta)*(i+(l=a/n)*o),this._beta*t[a]+(1-this._beta)*(r+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const U6e=function e(t){function n(i){return 1===t?new XS(i):new pie(i,t)}return n.beta=function(i){return e(+i)},n}(.85);function QS(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function m3(e,t){this._context=e,this._k=(1-t)/6}m3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:QS(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:QS(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const z6e=function e(t){function n(i){return new m3(i,t)}return n.tension=function(i){return e(+i)},n}(0);function _3(e,t){this._context=e,this._k=(1-t)/6}_3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:QS(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const H6e=function e(t){function n(i){return new _3(i,t)}return n.tension=function(i){return e(+i)},n}(0);function y3(e,t){this._context=e,this._k=(1-t)/6}y3.prototype={areaStart:ud,areaEnd:ud,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:QS(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const G6e=function e(t){function n(i){return new y3(i,t)}return n.tension=function(i){return e(+i)},n}(0),gie=Math.abs,yr=Math.atan2,Kc=Math.cos,W6e=Math.max,Hm=Math.min,po=Math.sin,bn=Math.sqrt,vr=1e-12,dd=Math.PI,ZS=dd/2,c1=2*dd;function mie(e){return e>=1?ZS:e<=-1?-ZS:Math.asin(e)}function v3(e,t,n){var i=e._x1,r=e._y1,o=e._x2,s=e._y2;if(e._l01_a>vr){var a=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*a-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,r=(r*a-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>vr){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,s=(s*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(i,r,o,s,e._x2,e._y2)}function _ie(e,t){this._context=e,this._alpha=t}_ie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:v3(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Y6e=function e(t){function n(i){return t?new _ie(i,t):new m3(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function yie(e,t){this._context=e,this._alpha=t}yie.prototype={areaStart:ud,areaEnd:ud,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:v3(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const K6e=function e(t){function n(i){return t?new yie(i,t):new y3(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function vie(e,t){this._context=e,this._alpha=t}vie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:v3(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const X6e=function e(t){function n(i){return t?new vie(i,t):new _3(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function bie(e){this._context=e}function b3(e){return new bie(e)}function wie(e){this._context=e}function Eie(e){return e<0?-1:1}function Cie(e,t,n){var i=e._x1-e._x0,r=t-e._x1,o=(e._y1-e._y0)/(i||r<0&&-0),s=(n-e._y1)/(r||i<0&&-0),a=(o*r+s*i)/(i+r);return(Eie(o)+Eie(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function Die(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function w3(e,t,n){var i=e._x0,o=e._x1,s=e._y1,a=(o-i)/3;e._context.bezierCurveTo(i+a,e._y0+a*t,o-a,s-a*n,o,s)}function JS(e){this._context=e}function Sie(e){this._context=new Tie(e)}function Tie(e){this._context=e}function xie(e){this._context=e}function Aie(e){var t,i,n=e.length-1,r=new Array(n),o=new Array(n),s=new Array(n);for(r[0]=0,o[0]=2,s[0]=e[0]+2*e[1],t=1;t=0;--t)r[t]=(s[t]-r[t+1])/o[t];for(o[n-1]=(e[n]+r[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};const E3=Math.PI,C3=2*E3,gh=1e-6,rje=C3-gh;function Mie(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Mie;const n=10**t;return function(i){this._+=i[0];for(let r=1,o=i.length;rgh)if(Math.abs(d*l-c*u)>gh&&o){let h=i-s,p=r-a,g=l*l+c*c,m=h*h+p*p,_=Math.sqrt(g),y=Math.sqrt(f),v=o*Math.tan((E3-Math.acos((g+f-m)/(2*_*y)))/2),b=v/y,w=v/_;Math.abs(b-1)>gh&&this._append`L${t+b*u},${n+b*d}`,this._append`A${o},${o},0,0,${+(d*h>u*p)},${this._x1=t+w*l},${this._y1=n+w*c}`}else this._append`L${this._x1=t},${this._y1=n}`}arc(t,n,i,r,o,s){if(t=+t,n=+n,s=!!s,(i=+i)<0)throw new Error(`negative radius: ${i}`);let a=i*Math.cos(r),l=i*Math.sin(r),c=t+a,u=n+l,d=1^s,f=s?r-o:o-r;null===this._x1?this._append`M${c},${u}`:(Math.abs(this._x1-c)>gh||Math.abs(this._y1-u)>gh)&&this._append`L${c},${u}`,i&&(f<0&&(f=f%C3+C3),f>rje?this._append`A${i},${i},0,1,${d},${t-a},${n-l}A${i},${i},0,1,${d},${this._x1=c},${this._y1=u}`:f>gh&&this._append`A${i},${i},0,${+(f>=E3)},${d},${this._x1=t+i*Math.cos(o)},${this._y1=n+i*Math.sin(o)}`)}rect(t,n,i,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function nT(){return new tT}function iT(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);t=i}return e},()=>new tT(t)}function sje(e){return e.innerRadius}function aje(e){return e.outerRadius}function lje(e){return e.startAngle}function cje(e){return e.endAngle}function uje(e){return e&&e.padAngle}function rT(e,t,n,i,r,o,s){var a=e-n,l=t-i,c=(s?o:-o)/bn(a*a+l*l),u=c*l,d=-c*a,f=e+u,h=t+d,p=n+u,g=i+d,m=(f+p)/2,_=(h+g)/2,y=p-f,v=g-h,b=y*y+v*v,w=r-o,C=f*g-p*h,E=(v<0?-1:1)*bn(W6e(0,w*w*b-C*C)),D=(C*v-y*E)/b,M=(-C*y-v*E)/b,k=(C*v+y*E)/b,R=(-C*y+v*E)/b,F=D-m,P=M-_,T=k-m,S=R-_;return F*F+P*P>T*T+S*S&&(D=k,M=R),{cx:D,cy:M,x01:-u,y01:-d,x11:D*(r/w-1),y11:M*(r/w-1)}}function Nie(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Iie(e){return e[0]}function kie(e){return e[1]}function Oie(e,t){var n=$t(!0),i=null,r=b3,o=null,s=iT(a);function a(l){var c,d,h,u=(l=Nie(l)).length,f=!1;for(null==i&&(o=r(h=s())),c=0;c<=u;++c)!(c=h;--p)a.point(v[p],b[p]);a.lineEnd(),a.areaEnd()}_&&(v[f]=+e(m,f,d),b[f]=+t(m,f,d),a.point(i?+i(m,f,d):v[f],n?+n(m,f,d):b[f]))}if(y)return a=null,y+""||null}function u(){return Oie().defined(r).curve(s).context(o)}return e="function"==typeof e?e:void 0===e?Iie:$t(+e),t="function"==typeof t?t:$t(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?kie:$t(+n),c.x=function(d){return arguments.length?(e="function"==typeof d?d:$t(+d),i=null,c):e},c.x0=function(d){return arguments.length?(e="function"==typeof d?d:$t(+d),c):e},c.x1=function(d){return arguments.length?(i=null==d?null:"function"==typeof d?d:$t(+d),c):i},c.y=function(d){return arguments.length?(t="function"==typeof d?d:$t(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t="function"==typeof d?d:$t(+d),c):t},c.y1=function(d){return arguments.length?(n=null==d?null:"function"==typeof d?d:$t(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(i).y(t)},c.defined=function(d){return arguments.length?(r="function"==typeof d?d:$t(!!d),c):r},c.curve=function(d){return arguments.length?(s=d,null!=o&&(a=s(o)),c):s},c.context=function(d){return arguments.length?(null==d?o=a=null:a=s(o=d),c):o},c}nT.prototype=tT.prototype,bn(3);const D3={draw(e,t){const n=bn(t/dd);e.moveTo(n,0),e.arc(0,0,n,0,c1)}};bn(1/3),po(dd/10),po(7*dd/10);function fd(e,t){if(typeof document<"u"&&document.createElement){const n=document.createElement("canvas");if(n&&n.getContext)return n.width=e,n.height=t,n}return null}po(c1/10),Kc(c1/10),bn(3),bn(3),bn(3),bn(12);const Lie=Fm(qc),oT=Lie.right,Rje=Lie.left,u1=(Fm(vne),oT);function Gm(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function d1(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function hd(){}var Wm=1/.7,qm="\\s*([+-]?\\d+)\\s*",f1="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ol="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Fje=/^#([0-9a-f]{3,8})$/,Pje=new RegExp(`^rgb\\(${qm},${qm},${qm}\\)$`),Lje=new RegExp(`^rgb\\(${Ol},${Ol},${Ol}\\)$`),$je=new RegExp(`^rgba\\(${qm},${qm},${qm},${f1}\\)$`),Bje=new RegExp(`^rgba\\(${Ol},${Ol},${Ol},${f1}\\)$`),jje=new RegExp(`^hsl\\(${f1},${Ol},${Ol}\\)$`),Vje=new RegExp(`^hsla\\(${f1},${Ol},${Ol},${f1}\\)$`),$ie={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Bie(){return this.rgb().formatHex()}function jie(){return this.rgb().formatRgb()}function h1(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Fje.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Vie(t):3===n?new Ni(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?sT(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?sT(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Pje.exec(e))?new Ni(t[1],t[2],t[3],1):(t=Lje.exec(e))?new Ni(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=$je.exec(e))?sT(t[1],t[2],t[3],t[4]):(t=Bje.exec(e))?sT(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=jje.exec(e))?Hie(t[1],t[2]/100,t[3]/100,1):(t=Vje.exec(e))?Hie(t[1],t[2]/100,t[3]/100,t[4]):$ie.hasOwnProperty(e)?Vie($ie[e]):"transparent"===e?new Ni(NaN,NaN,NaN,0):null}function Vie(e){return new Ni(e>>16&255,e>>8&255,255&e,1)}function sT(e,t,n,i){return i<=0&&(e=t=n=NaN),new Ni(e,t,n,i)}function x3(e){return e instanceof hd||(e=h1(e)),e?new Ni((e=e.rgb()).r,e.g,e.b,e.opacity):new Ni}function pd(e,t,n,i){return 1===arguments.length?x3(e):new Ni(e,t,n,i??1)}function Ni(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function Uie(){return`#${yh(this.r)}${yh(this.g)}${yh(this.b)}`}function zie(){const e=aT(this.opacity);return`${1===e?"rgb(":"rgba("}${_h(this.r)}, ${_h(this.g)}, ${_h(this.b)}${1===e?")":`, ${e})`}`}function aT(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _h(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function yh(e){return((e=_h(e))<16?"0":"")+e.toString(16)}function Hie(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new wa(e,t,n,i)}function Gie(e){if(e instanceof wa)return new wa(e.h,e.s,e.l,e.opacity);if(e instanceof hd||(e=h1(e)),!e)return new wa;if(e instanceof wa)return e;var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),o=Math.max(t,n,i),s=NaN,a=o-r,l=(o+r)/2;return a?(s=t===o?(n-i)/a+6*(n0&&l<1?0:s,new wa(s,a,l,e.opacity)}function lT(e,t,n,i){return 1===arguments.length?Gie(e):new wa(e,t,n,i??1)}function wa(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function Wie(e){return(e=(e||0)%360)<0?e+360:e}function cT(e){return Math.max(0,Math.min(1,e||0))}function A3(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function qie(e,t,n,i,r){var o=e*e,s=o*e;return((1-3*e+3*o-s)*t+(4-6*o+3*s)*n+(1+3*e+3*o-3*s)*i+s*r)/6}function Yie(e){var t=e.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),r=e[i],o=e[i+1];return qie((n-i/t)*t,i>0?e[i-1]:2*r-o,r,o,i=240?e-240:e+120,r,i),A3(e,r,i),A3(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new wa(Wie(this.h),cT(this.s),cT(this.l),aT(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=aT(this.opacity);return`${1===e?"hsl(":"hsla("}${Wie(this.h)}, ${100*cT(this.s)}%, ${100*cT(this.l)}%${1===e?")":`, ${e})`}`}}));const uT=e=>()=>e;function Xie(e,t){return function(n){return e+n*t}}function dT(e,t){var n=t-e;return n?Xie(e,n>180||n<-180?n-360*Math.round(n/360):n):uT(isNaN(e)?t:e)}function Ii(e,t){var n=t-e;return n?Xie(e,n):uT(isNaN(e)?t:e)}const M3=function e(t){var n=function Wje(e){return 1==(e=+e)?Ii:function(t,n){return n-t?function Gje(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}(t,n,e):uT(isNaN(t)?n:t)}}(t);function i(r,o){var s=n((r=pd(r)).r,(o=pd(o)).r),a=n(r.g,o.g),l=n(r.b,o.b),c=Ii(r.opacity,o.opacity);return function(u){return r.r=s(u),r.g=a(u),r.b=l(u),r.opacity=c(u),r+""}}return i.gamma=e,i}(1);function Qie(e){return function(t){var s,a,n=t.length,i=new Array(n),r=new Array(n),o=new Array(n);for(s=0;sn&&(o=t.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:Ea(i,r)})),n=k3.lastIndex;return nt&&(n=e,e=t,t=n),function(i){return Math.max(e,Math.min(t,i))}}(e[0],e[f-1])),a=f>2?tVe:eVe,l=c=null,d}function d(f){return null==f||isNaN(f=+f)?o:(l||(l=a(e.map(i),t,n)))(i(s(f)))}return d.invert=function(f){return s(r((c||(c=a(t,e.map(i),Ea)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,O3),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=p1,u()},d.clamp=function(f){return arguments.length?(s=!!f||go,u()):s!==go},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(o=f,d):o},function(f,h){return i=f,r=h,u()}}function rre(){return fT()(go,go)}function Rl(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function md(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}function ore(e,t,n,i){var o,r=rd(e,t,n);switch((i=lh(i??",f")).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null==i.precision&&!isNaN(o=Gee(r,s))&&(i.precision=o),$P(i,s);case"":case"e":case"g":case"p":case"r":null==i.precision&&!isNaN(o=Wee(r,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=o-("e"===i.type));break;case"f":case"%":null==i.precision&&!isNaN(o=qee(r))&&(i.precision=o-2*("%"===i.type))}return bS(i)}function vh(e){var t=e.domain;return e.ticks=function(n){var i=t();return FP(i[0],i[i.length-1],n??10)},e.tickFormat=function(n,i){var r=t();return ore(r[0],r[r.length-1],n??10,i)},e.nice=function(n){null==n&&(n=10);var l,c,i=t(),r=0,o=i.length-1,s=i[r],a=i[o],u=10;for(a0;){if((c=PP(s,a,n))===l)return i[r]=s,i[o]=a,t(i);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else{if(!(c<0))break;s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c}l=c}return e},e}function lre(e,t){var s,n=0,i=(e=e.slice()).length-1,r=e[n],o=e[i];return o-e(-t,n)}function F3(e){const t=e(cre,ure),n=t.domain;let r,o,i=10;function s(){return r=function sVe(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(i),o=function oVe(e){return 10===e?rVe:e===Math.E?Math.exp:t=>Math.pow(e,t)}(i),n()[0]<0?(r=dre(r),o=dre(o),e(nVe,iVe)):e(cre,ure),t}return t.base=function(a){return arguments.length?(i=+a,s()):i},t.domain=function(a){return arguments.length?(n(a),s()):n()},t.ticks=a=>{const l=n();let c=l[0],u=l[l.length-1];const d=u0){for(;f<=h;++f)for(p=1;pu)break;_.push(g)}}else for(;f<=h;++f)for(p=i-1;p>=1;--p)if(g=f>0?p/o(-f):p*o(f),!(gu)break;_.push(g)}2*_.length{if(null==a&&(a=10),null==l&&(l=10===i?"s":","),"function"!=typeof l&&(!(i%1)&&null==(l=lh(l)).precision&&(l.trim=!0),l=bS(l)),a===1/0)return l;const c=Math.max(1,i*a/t.ticks().length);return u=>{let d=u/o(Math.round(r(u)));return d*in(lre(n(),{floor:a=>o(Math.floor(r(a))),ceil:a=>o(Math.ceil(r(a)))})),t}function hre(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function aVe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function lVe(e){return e<0?-e*e:e*e}function P3(e){var t=e(go,go),n=1;return t.exponent=function(r){return arguments.length?(n=+r,function i(){return 1===n?e(go,go):.5===n?e(aVe,lVe):e(hre(n),hre(1/n))}()):n},vh(t)}function L3(){var e=P3(fT());return e.copy=function(){return g1(e,L3()).exponent(e.exponent())},Rl.apply(e,arguments),e}function pre(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function gre(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function $3(e){var t=1,n=e(pre(t),gre(t));return n.constant=function(i){return arguments.length?e(pre(t=+i),gre(t)):t},vh(n)}function _re(e,t,n,i,r,o){const s=[[Wc,1,Uc],[Wc,5,5e3],[Wc,15,15e3],[Wc,30,3e4],[o,1,Ns],[o,5,5*Ns],[o,15,15*Ns],[o,30,30*Ns],[r,1,zc],[r,3,3*zc],[r,6,6*zc],[r,12,12*zc],[i,1,Hc],[i,2,2*Hc],[n,1,VP],[t,1,tte],[t,3,3*tte],[e,1,UP]];function l(c,u,d){const f=Math.abs(u-c)/d,h=Fm(([,,m])=>m).right(s,f);if(h===s.length)return e.every(rd(c/UP,u/UP,d));if(0===h)return Rm.every(Math.max(rd(c,u,d),1));const[p,g]=s[f/s[h-1][2]180?u+=360:u-c>180&&(c+=360),f.push({i:d.push(r(d)+"rotate(",null,i)-2,x:Ea(c,u)})):u&&d.push(r(d)+"rotate("+u+i)}(c.rotate,u.rotate,d,f),function a(c,u,d,f){c!==u?f.push({i:d.push(r(d)+"skewX(",null,i)-2,x:Ea(c,u)}):u&&d.push(r(d)+"skewX("+u+i)}(c.skewX,u.skewX,d,f),function l(c,u,d,f,h,p){if(c!==d||u!==f){var g=h.push(r(h)+"scale(",null,",",null,")");p.push({i:g-4,x:Ea(c,d)},{i:g-2,x:Ea(u,f)})}else(1!==d||1!==f)&&h.push(r(h)+"scale("+d+","+f+")")}(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,f),c=u=null,function(h){for(var m,p=-1,g=f.length;++pkVe?Math.pow(e,1/3):e/Vre+jre}function K3(e){return e>Ym?e*e*e:Vre*(e-jre)}function X3(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Q3(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function vT(e,t,n,i){return 1===arguments.length?function zre(e){if(e instanceof Fl)return new Fl(e.h,e.c,e.l,e.opacity);if(e instanceof Ca||(e=Ure(e)),0===e.a&&0===e.b)return new Fl(NaN,00?i:1:0}const Km="linear",Xc="log",_1="pow",y1="sqrt",wT="symlog",wh="time",Eh="utc",Ll="sequential",Xm="diverging",Qm="quantile",ET="quantize",CT="threshold",n$="ordinal",i$="point",r$="bin-ordinal",wi="continuous",v1="discrete",b1="discretizing",Fs="interpolating",o$="temporal";function s$(){const e=W3().unknown(void 0),t=e.domain,n=e.range;let r,o,i=[0,1],s=!1,a=0,l=0,c=.5;function u(){const d=t().length,f=i[1]g+r*_);return n(f?m.reverse():m)}return delete e.unknown,e.domain=function(d){return arguments.length?(t(d),u()):t()},e.range=function(d){return arguments.length?(i=[+d[0],+d[1]],u()):i.slice()},e.rangeRound=function(d){return i=[+d[0],+d[1]],s=!0,u()},e.bandwidth=function(){return o},e.step=function(){return r},e.round=function(d){return arguments.length?(s=!!d,u()):s},e.padding=function(d){return arguments.length?(l=Math.max(0,Math.min(1,d)),a=l,u()):a},e.paddingInner=function(d){return arguments.length?(a=Math.max(0,Math.min(1,d)),u()):a},e.paddingOuter=function(d){return arguments.length?(l=Math.max(0,Math.min(1,d)),u()):l},e.align=function(d){return arguments.length?(c=Math.max(0,Math.min(1,d)),u()):c},e.invertRange=function(d){if(null==d[0]||null==d[1])return;const f=i[1]i[1-f])?void 0:(_=Math.max(0,oT(h,g)-1),y=g===m?_:oT(h,m)-1,g-h[_]>o+1e-10&&++_,f&&(v=_,_=p-y,y=p-v),_>y?void 0:t().slice(_,y+1))},e.invert=function(d){const f=e.invertRange([d,d]);return f&&f[0]},e.copy=function(){return s$().domain(t()).range(i).round(s).paddingInner(a).paddingOuter(l).align(c)},u()}function Zre(e){const t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return Zre(t())},e}var eUe=Array.prototype.map;const nUe=Array.prototype.slice,DT=new Map,eoe=Symbol("vega_scale");function toe(e){return e[eoe]=!0,e}function Nt(e,t,n){return arguments.length>1?(DT.set(e,function rUe(e,t,n){const i=function(){const o=t();return o.invertRange||(o.invertRange=o.invert?function QVe(e){return function(t){let r,n=t[0],i=t[1];return i=i&&n[l]<=r&&(o<0&&(o=l),s=l);if(!(o<0))return i=e.invertExtent(n[o]),r=e.invertExtent(n[s]),[void 0===i[0]?i[1]:i[0],void 0===r[1]?r[0]:r[1]]}}(o):void 0),o.type=e,toe(o)};return i.metadata=va(Ee(n)),i}(e,t,n)),this):noe(e)?DT.get(e):void 0}function noe(e){return DT.has(e)}function Ch(e,t){const n=DT.get(e);return n&&n.metadata[t]}function a$(e){return Ch(e,wi)}function Zm(e){return Ch(e,v1)}function l$(e){return Ch(e,b1)}function ioe(e){return Ch(e,Xc)}function roe(e){return Ch(e,Fs)}function ooe(e){return Ch(e,Qm)}Nt("identity",function are(e){var t;function n(i){return null==i||isNaN(i=+i)?t:i}return n.invert=n,n.domain=n.range=function(i){return arguments.length?(e=Array.from(i,O3),n):e.slice()},n.unknown=function(i){return arguments.length?(t=i,n):t},n.copy=function(){return are(e).unknown(t)},e=arguments.length?Array.from(e,O3):[0,1],vh(n)}),Nt(Km,function sre(){var e=rre();return e.copy=function(){return g1(e,sre())},Rl.apply(e,arguments),vh(e)},wi),Nt(Xc,function fre(){const e=F3(fT()).domain([1,10]);return e.copy=()=>g1(e,fre()).base(e.base()),Rl.apply(e,arguments),e},[wi,Xc]),Nt(_1,L3,wi),Nt(y1,function cVe(){return L3.apply(null,arguments).exponent(.5)},wi),Nt(wT,function mre(){var e=$3(fT());return e.copy=function(){return g1(e,mre()).constant(e.constant())},Rl.apply(e,arguments)},wi),Nt(wh,function mVe(){return Rl.apply(B3(fVe,hVe,Ml,jv,Nm,Gc,CS,SS,Wc,eL).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},[wi,o$]),Nt(Eh,function _Ve(){return Rl.apply(B3(uVe,dVe,Nl,Vv,km,od,DS,TS,Wc,tL).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},[wi,o$]),Nt(Ll,j3,[wi,Fs]),Nt(`${Ll}-${Km}`,j3,[wi,Fs]),Nt(`${Ll}-${Xc}`,function yre(){var e=F3(hT()).domain([1,10]);return e.copy=function(){return _d(e,yre()).base(e.base())},md.apply(e,arguments)},[wi,Fs,Xc]),Nt(`${Ll}-${_1}`,V3,[wi,Fs]),Nt(`${Ll}-${y1}`,function yVe(){return V3.apply(null,arguments).exponent(.5)},[wi,Fs]),Nt(`${Ll}-${wT}`,function vre(){var e=$3(hT());return e.copy=function(){return _d(e,vre()).constant(e.constant())},md.apply(e,arguments)},[wi,Fs]),Nt(`${Xm}-${Km}`,function bre(){var e=vh(pT()(go));return e.copy=function(){return _d(e,bre())},md.apply(e,arguments)},[wi,Fs]),Nt(`${Xm}-${Xc}`,function wre(){var e=F3(pT()).domain([.1,1,10]);return e.copy=function(){return _d(e,wre()).base(e.base())},md.apply(e,arguments)},[wi,Fs,Xc]),Nt(`${Xm}-${_1}`,z3,[wi,Fs]),Nt(`${Xm}-${y1}`,function vVe(){return z3.apply(null,arguments).exponent(.5)},[wi,Fs]),Nt(`${Xm}-${wT}`,function Ere(){var e=$3(pT());return e.copy=function(){return _d(e,Ere()).constant(e.constant())},md.apply(e,arguments)},[wi,Fs]),Nt(Qm,function Cre(){var i,e=[],t=[],n=[];function r(){var s=0,a=Math.max(1,t.length);for(n=new Array(a-1);++s0?n[a-1]:e[0],a=n?[i[n-1],t]:[i[c-1],i[c]]},s.unknown=function(l){return arguments.length&&(o=l),s},s.thresholds=function(){return i.slice()},s.copy=function(){return Dre().domain([e,t]).range(r).unknown(o)},Rl.apply(vh(s),arguments)},b1),Nt(CT,function Sre(){var n,e=[.5],t=[0,1],i=1;function r(o){return null!=o&&o<=o?t[u1(e,o,0,i)]:n}return r.domain=function(o){return arguments.length?(e=Array.from(o),i=Math.min(e.length,t.length-1),r):e.slice()},r.range=function(o){return arguments.length?(t=Array.from(o),i=Math.min(e.length,t.length-1),r):t.slice()},r.invertExtent=function(o){var s=t.indexOf(o);return[e[s-1],e[s]]},r.unknown=function(o){return arguments.length?(n=o,r):n},r.copy=function(){return Sre().domain(e).range(t).unknown(n)},Rl.apply(r,arguments)},b1),Nt(r$,function Jre(){let e=[],t=[];function n(i){return null==i||i!=i?void 0:t[(u1(e,i)-1)%t.length]}return n.domain=function(i){return arguments.length?(e=function tUe(e){return eUe.call(e,pr)}(i),n):e.slice()},n.range=function(i){return arguments.length?(t=nUe.call(i),n):t.slice()},n.tickFormat=function(i,r){return ore(e[0],yt(e),i??10,r)},n.copy=function(){return Jre().domain(n.domain()).range(n.range())},n},[v1,b1]),Nt(n$,W3,v1),Nt("band",s$,v1),Nt(i$,function JVe(){return Zre(s$().paddingInner(1))},v1);const sUe=["clamp","base","constant","exponent"];function soe(e,t){const n=t[0],i=yt(t)-n;return function(r){return e(n+r*i)}}function ST(e,t,n){return U3(c$(t||"rgb",n),e)}function aoe(e,t){const n=new Array(t),i=t+1;for(let r=0;re[a]?s[a](e[a]()):0),s):gr(.5)}function c$(e,t){const n=t2[function aUe(e){return"interpolate"+e.toLowerCase().split("-").map(t=>t[0].toUpperCase()+t.slice(1)).join("")}(e)];return null!=t&&n&&n.gamma?n.gamma(t):n}function coe(e){if(te(e))return e;const t=e.length/6|0,n=new Array(t);for(let i=0;i1?(doe[e]=t,this):doe[e]}uoe({accent:jVe,category10:VVe,category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",dark2:UVe,observable10:zVe,paired:HVe,pastel1:GVe,pastel2:WVe,set1:qVe,set2:YVe,set3:KVe,tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"},coe),uoe({blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},e=>ST(coe(e)));const TT="symbol",uUe="discrete",fUe=e=>te(e)?e.map(t=>String(t)):String(e),hUe=(e,t)=>e[1]-t[1],pUe=(e,t)=>t[1]-e[1];function d$(e,t,n){let i;return At(t)&&(e.bins&&(t=Math.max(t,e.bins.length)),null!=n&&(t=Math.min(t,Math.floor($v(e.domain())/n||1)+1))),we(t)&&(i=t.step,t=t.interval),Ce(t)&&(t=e.type===wh?Lm(t):e.type==Eh?$m(t):J("Only time and utc scales accept interval strings."),i&&(t=t.every(i))),t}function foe(e,t,n){let i=e.range(),r=i[0],o=yt(i),s=hUe;if(r>o&&(i=o,o=r,r=i,s=pUe),r=Math.floor(r),o=Math.ceil(o),t=t.map(a=>[a,e(a)]).filter(a=>r<=a[1]&&a[1]<=o).sort(s).map(a=>a[0]),n>0&&t.length>1){const a=[t[0],yt(t)];for(;t.length>n&&t.length>=3;)t=t.filter((l,c)=>!(c%2));t.length<3&&(t=a)}return t}function f$(e,t){return e.bins?foe(e,e.bins,t):e.ticks?e.ticks(t):e.domain()}function hoe(e,t,n,i,r,o){const s=t.type;let a=fUe;if(s===wh||r===wh)a=e.timeFormat(i);else if(s===Eh||r===Eh)a=e.utcFormat(i);else if(ioe(s)){const l=e.formatFloat(i);if(o||t.bins)a=l;else{const c=poe(t,n,!1);a=u=>c(u)?l(u):""}}else if(t.tickFormat){const l=t.domain();a=e.formatSpan(l[0],l[l.length-1],n,i)}else i&&(a=e.format(i));return a}function poe(e,t,n){const i=f$(e,t),r=e.base(),o=Math.log(r),s=Math.max(1,r*t/i.length),a=l=>{let c=l/Math.pow(r,Math.round(Math.log(l)/o));return c*rh$[e.type]||e.bins;function _oe(e,t,n,i,r,o,s){const a=goe[t.type]&&o!==wh&&o!==Eh?function gUe(e,t,n){const i=t[goe[t.type]](),r=i.length;let s,o=r>1?i[1]-i[0]:i[0];for(s=1;s(t,n,i)=>{const r=yoe(i[n+1],yoe(i.max,1/0)),o=voe(t,e),s=voe(r,e);return o&&s?o+" \u2013 "+s:s?"< "+s:"\u2265 "+o},yoe=(e,t)=>e??t,bUe=e=>(t,n)=>n?e(t):null,wUe=e=>t=>e(t),voe=(e,t)=>Number.isFinite(e)?t(e):null;function boe(e,t,n){n=n||{};const i=Math.max(3,n.maxlen||7),r=function CUe(e,t,n,i){const r=i||t.type;return Ce(n)&&function oUe(e){return Ch(e,o$)}(r)&&(n=n.replace(/%a/g,"%A").replace(/%b/g,"%B")),n||r!==wh?n||r!==Eh?_oe(e,t,5,null,n,i,!0):e.utcFormat("%A, %d %B %Y, %X UTC"):e.timeFormat("%A, %d %B %Y, %X")}(e,t,n.format,n.formatType);if(l$(t.type)){const o=moe(t).slice(1).map(r),s=o.length;return`${s} boundar${1===s?"y":"ies"}: ${o.join(", ")}`}if(Zm(t.type)){const o=t.domain(),s=o.length;return`${s} value${1===s?"":"s"}: ${s>i?o.slice(0,i-2).map(r).join(", ")+", ending with "+o.slice(-1).map(r):o.map(r).join(", ")}`}{const o=t.domain();return`values from ${r(o[0])} to ${r(yt(o))}`}}let woe=0;function p$(e){return e&&e.gradient}function Eoe(e,t,n){const i=e.gradient;let r=e.id,o="radial"===i?"p_":"";return r||(r=e.id="gradient_"+woe++,"radial"===i?(e.x1=$l(e.x1,.5),e.y1=$l(e.y1,.5),e.r1=$l(e.r1,0),e.x2=$l(e.x2,.5),e.y2=$l(e.y2,.5),e.r2=$l(e.r2,.5),o="p_"):(e.x1=$l(e.x1,0),e.y1=$l(e.y1,0),e.x2=$l(e.x2,1),e.y2=$l(e.y2,0))),t[r]=e,"url("+(n||"")+"#"+o+r+")"}function $l(e,t){return e??t}function Coe(e,t){var i,n=[];return i={gradient:"linear",x1:e?e[0]:0,y1:e?e[1]:0,x2:t?t[0]:1,y2:t?t[1]:0,stops:n,stop:function(r,o){return n.push({offset:r,color:o}),i}}}const Doe={basis:{curve:function B6e(e){return new XS(e)}},"basis-closed":{curve:function j6e(e){return new fie(e)}},"basis-open":{curve:function V6e(e){return new hie(e)}},bundle:{curve:U6e,tension:"beta",value:.85},cardinal:{curve:z6e,tension:"tension",value:0},"cardinal-open":{curve:H6e,tension:"tension",value:0},"cardinal-closed":{curve:G6e,tension:"tension",value:0},"catmull-rom":{curve:Y6e,tension:"alpha",value:.5},"catmull-rom-closed":{curve:K6e,tension:"alpha",value:.5},"catmull-rom-open":{curve:X6e,tension:"alpha",value:.5},linear:{curve:b3},"linear-closed":{curve:function Q6e(e){return new wie(e)}},monotone:{horizontal:function J6e(e){return new Sie(e)},vertical:function Z6e(e){return new JS(e)}},natural:{curve:function eje(e){return new xie(e)}},step:{curve:function tje(e){return new eT(e,.5)}},"step-after":{curve:function ije(e){return new eT(e,1)}},"step-before":{curve:function nje(e){return new eT(e,0)}}};function g$(e,t,n){var i=De(Doe,e)&&Doe[e],r=null;return i&&(r=i.curve||i[t||"vertical"],i.tension&&null!=n&&(r=r[i.tension](n))),r}const SUe={m:2,l:2,h:1,v:1,z:0,c:6,s:4,q:4,t:2,a:7},TUe=/[mlhvzcsqta]([^mlhvzcsqta]+|$)/gi,xUe=/^[+-]?(([0-9]*\.[0-9]+)|([0-9]+\.)|([0-9]+))([eE][+-]?[0-9]+)?/,AUe=/^((\s+,?\s*)|(,\s*))/,MUe=/^[01]/;function Jm(e){const t=[];return(e.match(TUe)||[]).forEach(i=>{let r=i[0];const o=r.toLowerCase(),s=SUe[o],a=function NUe(e,t,n){const i=[];for(let r=0;t&&r1&&(g=Math.sqrt(g),n*=g,i*=g);const m=f/n,_=d/n,y=-d/i,v=f/i,b=m*a+_*l,w=y*a+v*l,C=m*e+_*t,E=y*e+v*t;let M=1/((C-b)*(C-b)+(E-w)*(E-w))-.25;M<0&&(M=0);let k=Math.sqrt(M);o==r&&(k=-k);const R=.5*(b+C)-k*(E-w),F=.5*(w+E)+k*(C-b),P=Math.atan2(w-F,b-R);let S=Math.atan2(E-F,C-R)-P;S<0&&1===o?S+=Bl:S>0&&0===o&&(S-=Bl);const x=Math.ceil(Math.abs(S/(Dh+.001))),I=[];for(let A=0;A+e}function AT(e,t,n){return Math.max(t,Math.min(e,n))}function Noe(){var e=PUe,t=LUe,n=$Ue,i=BUe,r=Qc(0),o=r,s=r,a=r,l=null;function c(u,d,f){var h,p=d??+e.call(this,u),g=f??+t.call(this,u),m=+n.call(this,u),_=+i.call(this,u),y=Math.min(m,_)/2,v=AT(+r.call(this,u),0,y),b=AT(+o.call(this,u),0,y),w=AT(+s.call(this,u),0,y),C=AT(+a.call(this,u),0,y);if(l||(l=h=nT()),v<=0&&b<=0&&w<=0&&C<=0)l.rect(p,g,m,_);else{var E=p+m,D=g+_;l.moveTo(p+v,g),l.lineTo(E-b,g),l.bezierCurveTo(E-vd*b,g,E,g+vd*b,E,g+b),l.lineTo(E,D-C),l.bezierCurveTo(E,D-vd*C,E-vd*C,D,E-C,D),l.lineTo(p+w,D),l.bezierCurveTo(p+vd*w,D,p,D-vd*w,p,D-w),l.lineTo(p,g+v),l.bezierCurveTo(p,g+vd*v,p+vd*v,g,p+v,g),l.closePath()}if(h)return l=null,h+""||null}return c.x=function(u){return arguments.length?(e=Qc(u),c):e},c.y=function(u){return arguments.length?(t=Qc(u),c):t},c.width=function(u){return arguments.length?(n=Qc(u),c):n},c.height=function(u){return arguments.length?(i=Qc(u),c):i},c.cornerRadius=function(u,d,f,h){return arguments.length?(r=Qc(u),o=null!=d?Qc(d):r,a=null!=f?Qc(f):r,s=null!=h?Qc(h):o,c):r},c.context=function(u){return arguments.length?(l=u??null,c):l},c}function Ioe(){var e,t,n,i,o,s,a,l,r=null;function c(d,f,h){const p=h/2;if(o){var g=a-f,m=d-s;if(g||m){var _=Math.hypot(g,m),y=(g/=_)*l,v=(m/=_)*l,b=Math.atan2(m,g);r.moveTo(s-y,a-v),r.lineTo(d-g*p,f-m*p),r.arc(d,f,p,b-Math.PI,b),r.lineTo(s+y,a+v),r.arc(s,a,l,b,b+Math.PI)}else r.arc(d,f,p,0,Bl);r.closePath()}else o=1;s=d,a=f,l=p}function u(d){var f,p,m,h=d.length,g=!1;for(null==r&&(r=m=nT()),f=0;f<=h;++f)!(fe.x||0,D1=e=>e.y||0,MT=e=>!1!==e.defined,i9e=function fje(){var e=sje,t=aje,n=$t(0),i=null,r=lje,o=cje,s=uje,a=null,l=iT(c);function c(){var u,d,f=+e.apply(this,arguments),h=+t.apply(this,arguments),p=r.apply(this,arguments)-ZS,g=o.apply(this,arguments)-ZS,m=gie(g-p),_=g>p;if(a||(a=u=l()),hvr)if(m>c1-vr)a.moveTo(h*Kc(p),h*po(p)),a.arc(0,0,h,p,g,!_),f>vr&&(a.moveTo(f*Kc(g),f*po(g)),a.arc(0,0,f,g,p,_));else{var P,T,y=p,v=g,b=p,w=g,C=m,E=m,D=s.apply(this,arguments)/2,M=D>vr&&(i?+i.apply(this,arguments):bn(f*f+h*h)),k=Hm(gie(h-f)/2,+n.apply(this,arguments)),R=k,F=k;if(M>vr){var S=mie(M/f*po(D)),x=mie(M/h*po(D));(C-=2*S)>vr?(b+=S*=_?1:-1,w-=S):(C=0,b=w=(p+g)/2),(E-=2*x)>vr?(y+=x*=_?1:-1,v-=x):(E=0,y=v=(p+g)/2)}var I=h*Kc(y),A=h*po(y),N=f*Kc(w),O=f*po(w);if(k>vr){var H,$=h*Kc(v),B=h*po(v),V=f*Kc(b),j=f*po(b);if(m1?0:e<-1?dd:Math.acos(e)}((oe*ue+Y*W)/(bn(oe*oe+Y*Y)*bn(ue*ue+W*W)))/2),ie=bn(H[0]*H[0]+H[1]*H[1]);R=Hm(k,(f-ie)/(ne-1)),F=Hm(k,(h-ie)/(ne+1))}else R=F=0}E>vr?F>vr?(P=rT(V,j,I,A,h,F,_),T=rT($,B,N,O,h,F,_),a.moveTo(P.cx+P.x01,P.cy+P.y01),Fvr&&C>vr?R>vr?(P=rT(N,O,$,B,f,-R,_),T=rT(I,A,V,j,f,-R,_),a.lineTo(P.cx+P.x01,P.cy+P.y01),Re.startAngle||0).endAngle(e=>e.endAngle||0).padAngle(e=>e.padAngle||0).innerRadius(e=>e.innerRadius||0).outerRadius(e=>e.outerRadius||0).cornerRadius(e=>e.cornerRadius||0),r9e=Rie().x(C1).y1(D1).y0(e=>(e.y||0)+(e.height||0)).defined(MT),o9e=Rie().y(D1).x1(C1).x0(e=>(e.x||0)+(e.width||0)).defined(MT),s9e=Oie().x(C1).y(D1).defined(MT),a9e=Noe().x(C1).y(D1).width(e=>e.width||0).height(e=>e.height||0).cornerRadius(e=>E1(e.cornerRadiusTopLeft,e.cornerRadius)||0,e=>E1(e.cornerRadiusTopRight,e.cornerRadius)||0,e=>E1(e.cornerRadiusBottomRight,e.cornerRadius)||0,e=>E1(e.cornerRadiusBottomLeft,e.cornerRadius)||0),l9e=function kje(e,t){let n=null,i=iT(r);function r(){let o;if(n||(n=o=i()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return e="function"==typeof e?e:$t(e||D3),t="function"==typeof t?t:$t(void 0===t?64:+t),r.type=function(o){return arguments.length?(e="function"==typeof o?o:$t(o),r):e},r.size=function(o){return arguments.length?(t="function"==typeof o?o:$t(+o),r):t},r.context=function(o){return arguments.length?(n=o??null,r):n},r}().type(e=>Moe(e.shape||"circle")).size(e=>E1(e.size,64)),c9e=Ioe().x(C1).y(D1).defined(MT).size(e=>e.size||1);function v$(e){return e.cornerRadius||e.cornerRadiusTopLeft||e.cornerRadiusTopRight||e.cornerRadiusBottomRight||e.cornerRadiusBottomLeft}function t_(e,t,n,i){return a9e.context(e)(t,n,i)}var koe=1;function Ooe(){koe=1}function b$(e,t,n){var i=t.clip,r=e._defs,o=t.clip_id||(t.clip_id="clip"+koe++),s=r.clipping[o]||(r.clipping[o]={id:o});return it(i)?s.path=i(null):v$(n)?s.path=t_(null,n,0,0):(s.width=n.width||0,s.height=n.height||0),"url(#"+o+")"}function li(e){this.clear(),e&&this.union(e)}function NT(e){this.mark=e,this.bounds=this.bounds||new li}function IT(e){NT.call(this,e),this.items=this.items||[]}li.prototype={clone(){return new li(this)},clear(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},equals(e){return this.x1===e.x1&&this.y1===e.y1&&this.x2===e.x2&&this.y2===e.y2},set(e,t,n,i){return nthis.x2&&(this.x2=e),t>this.y2&&(this.y2=t),this},expand(e){return this.x1-=e,this.y1-=e,this.x2+=e,this.y2+=e,this},round(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this},scale(e){return this.x1*=e,this.y1*=e,this.x2*=e,this.y2*=e,this},translate(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this},rotate(e,t,n){const i=this.rotatedPoints(e,t,n);return this.clear().add(i[0],i[1]).add(i[2],i[3]).add(i[4],i[5]).add(i[6],i[7])},rotatedPoints(e,t,n){var{x1:i,y1:r,x2:o,y2:s}=this,a=Math.cos(e),l=Math.sin(e),c=t-t*a+n*l,u=n-t*l-n*a;return[a*i-l*r+c,l*i+a*r+u,a*i-l*s+c,l*i+a*s+u,a*o-l*r+c,l*o+a*r+u,a*o-l*s+c,l*o+a*s+u]},union(e){return e.x1this.x2&&(this.x2=e.x2),e.y2>this.y2&&(this.y2=e.y2),this},intersect(e){return e.x1>this.x1&&(this.x1=e.x1),e.y1>this.y1&&(this.y1=e.y1),e.x2=e.x2&&this.y1<=e.y1&&this.y2>=e.y2},alignsWith(e){return e&&(this.x1==e.x1||this.x2==e.x2||this.y1==e.y1||this.y2==e.y2)},intersects(e){return e&&!(this.x2e.x2||this.y2e.y2)},contains(e,t){return!(ethis.x2||tthis.y2)},width(){return this.x2-this.x1},height(){return this.y2-this.y1}},me(IT,NT);class Roe{constructor(t){this._pending=0,this._loader=t||IS()}pending(){return this._pending}sanitizeURL(t){const n=this;return Foe(n),n._loader.sanitize(t,{context:"href"}).then(i=>(S1(n),i)).catch(()=>(S1(n),null))}loadImage(t){const n=this,i=typeof Image<"u"?Image:null;return Foe(n),n._loader.sanitize(t,{context:"image"}).then(r=>{const o=r.href;if(!o||!i)throw{url:o};const s=new i,a=De(r,"crossOrigin")?r.crossOrigin:"anonymous";return null!=a&&(s.crossOrigin=a),s.onload=()=>S1(n),s.onerror=()=>S1(n),s.src=o,s}).catch(r=>(S1(n),{complete:!1,width:0,height:0,src:r&&r.url||""}))}ready(){const t=this;return new Promise(n=>{!function i(r){t.pending()?setTimeout(()=>{i(!0)},10):n(r)}(!1)})}}function Foe(e){e._pending+=1}function S1(e){e._pending-=1}function Zc(e,t,n){if(t.stroke&&0!==t.opacity&&0!==t.strokeOpacity){const i=null!=t.strokeWidth?+t.strokeWidth:1;e.expand(i+(n?function m9e(e,t){return e.strokeJoin&&"miter"!==e.strokeJoin?0:t}(t,i):0))}return e}const _9e=Bl-1e-8;let kT,OT,RT,Sh,w$,FT,E$,C$;const bd=(e,t)=>kT.add(e,t),PT=(e,t)=>bd(OT=e,RT=t),Poe=e=>bd(e,kT.y1),Loe=e=>bd(kT.x1,e),Th=(e,t)=>w$*e+E$*t,xh=(e,t)=>FT*e+C$*t,D$=(e,t)=>bd(Th(e,t),xh(e,t)),S$=(e,t)=>PT(Th(e,t),xh(e,t));function T1(e,t){return kT=e,t?(Sh=t*yd,w$=C$=Math.cos(Sh),FT=Math.sin(Sh),E$=-FT):(w$=C$=1,Sh=FT=E$=0),y9e}const y9e={beginPath(){},closePath(){},moveTo:S$,lineTo:S$,rect(e,t,n,i){Sh?(D$(e+n,t),D$(e+n,t+i),D$(e,t+i),S$(e,t)):(bd(e+n,t+i),PT(e,t))},quadraticCurveTo(e,t,n,i){const r=Th(e,t),o=xh(e,t),s=Th(n,i),a=xh(n,i);$oe(OT,r,s,Poe),$oe(RT,o,a,Loe),PT(s,a)},bezierCurveTo(e,t,n,i,r,o){const s=Th(e,t),a=xh(e,t),l=Th(n,i),c=xh(n,i),u=Th(r,o),d=xh(r,o);Boe(OT,s,l,u,Poe),Boe(RT,a,c,d,Loe),PT(u,d)},arc(e,t,n,i,r,o){if(i+=Sh,r+=Sh,OT=n*Math.cos(r)+e,RT=n*Math.sin(r)+t,Math.abs(r-i)>_9e)bd(e-n,t-n),bd(e+n,t+n);else{const s=c=>bd(n*Math.cos(c)+e,n*Math.sin(c)+t);let a,l;if(s(i),s(r),r!==i)if((i%=Bl)<0&&(i+=Bl),(r%=Bl)<0&&(r+=Bl),rr;++l,a-=Dh)s(a);else for(a=i-i%Dh+Dh,l=0;l<4&&a1e-14?(u=s*s+a*o,u>=0&&(u=Math.sqrt(u),l=(-s+u)/o,c=(-s-u)/o)):l=.5*a/s,0f)return!1;g>d&&(d=g)}else if(h>0){if(g0&&(e.globalAlpha=n,e.fillStyle=Hoe(e,t,t.fill),!0)}var b9e=[];function r_(e,t,n){var i=null!=(i=t.strokeWidth)?i:1;return!(i<=0)&&(n*=null==t.strokeOpacity?1:t.strokeOpacity)>0&&(e.globalAlpha=n,e.strokeStyle=Hoe(e,t,t.stroke),e.lineWidth=i,e.lineCap=t.strokeCap||"butt",e.lineJoin=t.strokeJoin||"miter",e.miterLimit=t.strokeMiterLimit||10,e.setLineDash&&(e.setLineDash(t.strokeDash||b9e),e.lineDashOffset=t.strokeDashOffset||0),!0)}function w9e(e,t){return e.zindex-t.zindex||e.index-t.index}function M$(e){if(!e.zdirty)return e.zitems;var i,r,o,t=e.items,n=[];for(r=0,o=t.length;r=0;)if(i=t(n[r]))return i;if(n===o)for(r=(n=e.items).length;--r>=0;)if(!n[r].zindex&&(i=t(n[r])))return i;return null}function N$(e){return function(t,n,i){Sa(n,r=>{(!i||i.intersects(r.bounds))&&Goe(e,t,r,r)})}}function E9e(e){return function(t,n,i){n.items.length&&(!i||i.intersects(n.bounds))&&Goe(e,t,n.items[0],n.items)}}function Goe(e,t,n,i){var r=null==n.opacity?1:n.opacity;0!==r&&(e(t,i)||(i_(t,n),n.fill&<(t,n,r)&&t.fill(),n.stroke&&r_(t,n,r)&&t.stroke()))}function BT(e){return e=e||Ms,function(t,n,i,r,o,s){return i*=t.pixelRatio,r*=t.pixelRatio,$T(n,a=>{const l=a.bounds;if((!l||l.contains(o,s))&&l&&e(t,a,i,r,o,s))return a})}}function x1(e,t){return function(n,i,r,o){var u,s=Array.isArray(i)?i[0]:i,a=t??s.fill,l=s.stroke&&n.isPointInStroke;return l&&(u=s.strokeCap,n.lineWidth=s.strokeWidth??1,n.lineCap=u??"butt"),!e(n,i)&&(a&&n.isPointInPath(r,o)||l&&n.isPointInStroke(r,o))}}function I$(e){return BT(x1(e))}function Ah(e,t){return"translate("+e+","+t+")"}function k$(e){return"rotate("+e+")"}function Woe(e){return Ah(e.x||0,e.y||0)}function O$(e,t,n){function o(s,a){var l=a.x||0,c=a.y||0,u=a.angle||0;s.translate(l,c),u&&s.rotate(u*=yd),s.beginPath(),t(s,a),u&&s.rotate(-u),s.translate(-l,-c)}return{type:e,tag:"path",nested:!1,attr:function i(s,a){s("transform",function D9e(e){return Ah(e.x||0,e.y||0)+(e.angle?" "+k$(e.angle):"")}(a)),s("d",t(null,a))},bound:function r(s,a){return t(T1(s,a.angle),a),Zc(s,a).translate(a.x||0,a.y||0)},draw:N$(o),pick:I$(o),isect:n||x$(o)}}var T9e=O$("arc",function u9e(e,t){return i9e.context(e)(t)});function R$(e,t,n){function o(l,c){l.beginPath(),t(l,c)}const s=x1(o);return{type:e,tag:"path",nested:!0,attr:function i(l,c){var u=c.mark.items;u.length&&l("d",t(null,u))},bound:function r(l,c){var u=c.items;return 0===u.length?l:(t(T1(l),u),Zc(l,u[0]))},draw:E9e(o),pick:function a(l,c,u,d,f,h){var p=c.items,g=c.bounds;return!p||!p.length||g&&!g.contains(f,h)?null:s(l,p,u*=l.pixelRatio,d*=l.pixelRatio)?p[0]:null},isect:A$,tip:n}}var N9e=R$("area",function d9e(e,t){const n=t[0];return("horizontal"===n.orient?o9e:r9e).curve(g$(n.interpolate||"linear",n.orient,n.tension)).context(e)(t)},function x9e(e,t){for(var s,a,n="horizontal"===e[0].orient?t[1]:t[0],i="horizontal"===e[0].orient?"y":"x",r=e.length,o=1/0;--r>=0;)!1!==e[r].defined&&(a=Math.abs(e[r][i]-n)).5&&t<1.5?.5-Math.abs(t-1):0}function Koe(e,t){const n=Yoe(t);e("d",t_(null,t,n,n))}function A1(e,t,n,i){const r=Yoe(t);e.beginPath(),t_(e,t,(n||0)+r,(i||0)+r)}const L9e=x1(A1),$9e=x1(A1,!1),B9e=x1(A1,!0);var z9e={type:"group",tag:"g",nested:!1,attr:function k9e(e,t){e("transform",Woe(t))},bound:function P9e(e,t){if(!t.clip&&t.items){const n=t.items,i=n.length;for(let r=0;r{const o=r.x||0,s=r.y||0,a=r.strokeForeground,l=null==r.opacity?1:r.opacity;(r.stroke||r.fill)&&l&&(A1(e,r,o,s),i_(e,r),r.fill&<(e,r,l)&&e.fill(),r.stroke&&!a&&r_(e,r,l)&&e.stroke()),e.save(),e.translate(o,s),r.clip&&qoe(e,r),n&&n.translate(-o,-s),Sa(r,c=>{("group"===c.marktype||null==i||i.includes(c.marktype))&&this.draw(e,c,n,i)}),n&&n.translate(o,s),e.restore(),a&&r.stroke&&l&&(A1(e,r,o,s),i_(e,r),r_(e,r,l)&&e.stroke())})},pick:function V9e(e,t,n,i,r,o){if(t.bounds&&!t.bounds.contains(r,o)||!t.items)return null;const s=n*e.pixelRatio,a=i*e.pixelRatio;return $T(t,l=>{let c,u,d;const f=l.bounds;if(f&&!f.contains(r,o))return;u=l.x||0,d=l.y||0;const g=l.clip;if(g&&(ru+(l.width||0)||od+(l.height||0)))return;if(e.save(),e.translate(u,d),u=r-u,d=o-d,g&&v$(l)&&!B9e(e,l,s,a))return e.restore(),null;const m=l.strokeForeground,_=!1!==t.interactive;return _&&m&&l.stroke&&$9e(e,l,s,a)?(e.restore(),l):(c=$T(l,y=>function U9e(e,t,n){return(!1!==e.interactive||"group"===e.marktype)&&e.bounds&&e.bounds.contains(t,n)}(y,u,d)?this.pick(y,n,i,u,d):null),!c&&_&&(l.fill||!m&&l.stroke)&&L9e(e,l,s,a)&&(c=l),e.restore(),c||null)})},isect:Voe,content:function F9e(e,t,n){e("clip-path",t.clip?b$(n,t,t):null)},background:function O9e(e,t){e("class","background"),e("aria-hidden",!0),Koe(e,t)},foreground:function R9e(e,t){e("class","foreground"),e("aria-hidden",!0),t.strokeForeground?Koe(e,t):e("d","")}},M1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"};function F$(e,t){var n=e.image;return(!n||e.url&&e.url!==n.url)&&(n={complete:!1,width:0,height:0},t.loadImage(e.url).then(i=>{e.image=i,e.image.url=e.url})),n}function P$(e,t){return null!=e.width?e.width:t&&t.width?!1!==e.aspect&&e.height?e.height*t.width/t.height:t.width:0}function L$(e,t){return null!=e.height?e.height:t&&t.height?!1!==e.aspect&&e.width?e.width*t.height/t.width:t.height:0}function jT(e,t){return"center"===e?t/2:"right"===e?t:0}function VT(e,t){return"middle"===e?t/2:"bottom"===e?t:0}var q9e={type:"image",tag:"image",nested:!1,attr:function H9e(e,t,n){const i=F$(t,n),r=P$(t,i),o=L$(t,i),s=(t.x||0)-jT(t.align,r),a=(t.y||0)-VT(t.baseline,o);e("href",!i.src&&i.toDataURL?i.toDataURL():i.src||"",M1["xmlns:xlink"],"xlink:href"),e("transform",Ah(s,a)),e("width",r),e("height",o),e("preserveAspectRatio",!1===t.aspect?"none":"xMidYMid")},bound:function G9e(e,t){const n=t.image,i=P$(t,n),r=L$(t,n),o=(t.x||0)-jT(t.align,i),s=(t.y||0)-VT(t.baseline,r);return e.set(o,s,o+i,s+r)},draw:function W9e(e,t,n){Sa(t,i=>{if(n&&!n.intersects(i.bounds))return;const r=F$(i,this);let o=P$(i,r),s=L$(i,r);if(0===o||0===s)return;let c,u,d,f,a=(i.x||0)-jT(i.align,o),l=(i.y||0)-VT(i.baseline,s);!1!==i.aspect&&(u=r.width/r.height,d=i.width/i.height,u==u&&d==d&&u!==d&&(d=0;)if(!1!==e[i].defined&&(r=e[i].x-t[0])*r+(o=e[i].y-t[1])*o{if(!n||n.intersects(i.bounds)){var r=null==i.opacity?1:i.opacity;r&&Qoe(e,i,r)&&(i_(e,i),e.stroke())}})},pick:BT(function r7e(e,t,n,i){return!!e.isPointInStroke&&Qoe(e,t,1)&&e.isPointInStroke(n,i)}),isect:Uoe},s7e=O$("shape",function h9e(e,t){return(t.mark.shape||t.shape).context(e)(t)}),a7e=O$("symbol",function p9e(e,t){return l9e.context(e)(t)},A$);const Zoe=Pee();var Ko={height:jl,measureWidth:$$,estimateWidth:zT,width:zT,canvas:Joe};function Joe(e){Ko.width=e&&wd?$$:zT}function zT(e,t){return ese(Cd(e,t),jl(e))}function ese(e,t){return~~(.8*e.length*t)}function $$(e,t){return jl(e)<=0||!(t=Cd(e,t))?0:tse(t,HT(e))}function tse(e,t){const n=`(${t}) ${e}`;let i=Zoe.get(n);return void 0===i&&(wd.font=t,i=wd.measureText(e).width,Zoe.set(n,i)),i}function jl(e){return null!=e.fontSize?+e.fontSize||0:11}function Ed(e){return null!=e.lineHeight?e.lineHeight:jl(e)+2}function N1(e){return function l7e(e){return te(e)?e.length>1?e:e[0]:e}(e.lineBreak&&e.text&&!te(e.text)?e.text.split(e.lineBreak):e.text)}function B$(e){const t=N1(e);return(te(t)?t.length-1:0)*Ed(e)}function Cd(e,t){const n=null==t?"":(t+"").trim();return e.limit>0&&n.length?function u7e(e,t){var n=+e.limit,i=function c7e(e){if(Ko.width===$$){const t=HT(e);return n=>tse(n,t)}if(Ko.width===zT){const t=jl(e);return n=>ese(n,t)}return t=>Ko.width(e,t)}(e);if(i(t)>>1))>n?s=l+1:a=l;return r+t.slice(s)}for(;s>>1)))Math.max(f,Ko.width(t,h)),0)):d=Ko.width(t,u),"center"===r?l-=d/2:"right"===r&&(l-=d),e.set(l+=s,c+=a,l+d,c+i),t.angle&&!n)e.rotate(t.angle*yd,s,a);else if(2===n)return e.rotatedPoints(t.angle*yd,s,a);return e}var Xo={arc:T9e,area:N9e,group:z9e,image:q9e,line:Y9e,path:Q9e,rect:e7e,rule:o7e,shape:s7e,symbol:a7e,text:{type:"text",tag:"text",nested:!1,attr:function f7e(e,t){var l,n=t.dx||0,i=(t.dy||0)+j$(t),r=GT(t),o=r.x1,s=r.y1,a=t.angle||0;e("text-anchor",d7e[t.align]||"start"),a?(l=Ah(o,s)+" "+k$(a),(n||i)&&(l+=" "+Ah(n,i))):l=Ah(o+n,s+i),e("transform",l)},bound:V$,draw:function h7e(e,t,n){Sa(t,i=>{var o,s,a,l,c,u,d,r=null==i.opacity?1:i.opacity;if(!(n&&!n.intersects(i.bounds)||0===r||i.fontSize<=0||null==i.text||0===i.text.length)){if(e.font=HT(i),e.textAlign=i.align||"left",s=(o=GT(i)).x1,a=o.y1,i.angle&&(e.save(),e.translate(s,a),e.rotate(i.angle*yd),s=a=0),s+=i.dx||0,a+=(i.dy||0)+j$(i),u=N1(i),i_(e,i),te(u))for(c=Ed(i),l=0;l=0;)if(!1!==e[n].defined&&(i=e[n].x-t[0])*i+(r=e[n].y-t[1])*r<(i=e[n].size||1)*i)return e[n];return null})};function U$(e,t,n){var i=Xo[e.mark.marktype];return i.nested&&(e=e.mark),(t||i.bound)(e.bounds||(e.bounds=new li),e,n)}var nse={mark:null};function ise(e,t,n){var a,l,c,u,i=Xo[e.marktype],r=i.bound,o=e.items,s=o&&o.length;if(i.nested)return s?c=o[0]:(nse.mark=e,c=nse),u=U$(c,r,n),t&&t.union(u)||u;if(t=t||e.bounds&&e.bounds.clear()||new li,s)for(a=0,l=o.length;at;)e.removeChild(n[--i]);return e}function cse(e){return"mark-"+e.marktype+(e.role?" role-"+e.role:"")+(e.name?" "+e.name:"")}function WT(e,t){const n=t.getBoundingClientRect();return[e.clientX-n.left-(t.clientLeft||0),e.clientY-n.top-(t.clientTop||0)]}class H${constructor(t,n){this._active=null,this._handlers={},this._loader=t||IS(),this._tooltip=n||b7e}initialize(t,n,i){return this._el=t,this._obj=i||null,this.origin(n)}element(){return this._el}canvas(){return this._el&&this._el.firstChild}origin(t){return arguments.length?(this._origin=t||[0,0],this):this._origin.slice()}scene(t){return arguments.length?(this._scene=t,this):this._scene}on(){}off(){}_handlerIndex(t,n,i){for(let r=t?t.length:0;--r>=0;)if(t[r].type===n&&(!i||t[r].handler===i))return r;return-1}handlers(t){const n=this._handlers,i=[];if(t)i.push(...n[this.eventName(t)]);else for(const r in n)i.push(...n[r]);return i}eventName(t){const n=t.indexOf(".");return n<0?t:t.slice(0,n)}handleHref(t,n,i){this._loader.sanitize(i,{context:"href"}).then(r=>{const o=new MouseEvent(t.type,t),s=Dd(null,"a");for(const a in r)s.setAttribute(a,r[a]);s.dispatchEvent(o)}).catch(()=>{})}handleTooltip(t,n,i){n&&null!=n.tooltip&&(n=function v7e(e,t,n,i){var o,s,r=e&&e.mark;if(r&&(o=Xo[r.marktype]).tip){for((s=WT(t,n))[0]-=i[0],s[1]-=i[1];e=e.mark.group;)s[0]-=e.x||0,s[1]-=e.y||0;e=o.tip(r.items,s)}return e}(n,t,this.canvas(),this._origin),this._tooltip.call(this._obj,this,t,n,i&&n&&n.tooltip||null))}getItemBoundingClientRect(t){const n=this.canvas();if(!n)return;const i=n.getBoundingClientRect(),r=this._origin,o=t.bounds,s=o.width(),a=o.height();let l=o.x1+r[0]+i.left,c=o.y1+r[1]+i.top;for(;t.mark&&(t=t.mark.group);)l+=t.x||0,c+=t.y||0;return{x:l,y:c,width:s,height:a,left:l,top:c,right:l+s,bottom:c+a}}}function b7e(e,t,n,i){e.element().setAttribute("title",i||"")}class O1{constructor(t){this._el=null,this._bgcolor=null,this._loader=new Roe(t)}initialize(t,n,i,r,o){return this._el=t,this.resize(n,i,r,o)}element(){return this._el}canvas(){return this._el&&this._el.firstChild}background(t){return 0===arguments.length?this._bgcolor:(this._bgcolor=t,this)}resize(t,n,i,r){return this._width=t,this._height=n,this._origin=i||[0,0],this._scale=r||1,this}dirty(){}render(t,n){const i=this;return i._call=function(){i._render(t,n)},i._call(),i._call=null,i}_render(){}renderAsync(t,n){const i=this.render(t,n);return this._ready?this._ready.then(()=>i):Promise.resolve(i)}_load(t,n){var i=this,r=i._loader[t](n);if(!i._ready){const o=i._call;i._ready=i._loader.ready().then(s=>{s&&o(),i._ready=null})}return r}sanitizeURL(t){return this._load("sanitizeURL",t)}loadImage(t){return this._load("loadImage",t)}}const qT="dragleave",G$="pointerdown",YT="pointermove",KT="pointerout",fse="pointerover",W$="mousedown",XT="mouseout",QT="click",gse="mousewheel",ZT="touchstart",JT="touchmove",ex="touchend",A7e=["keydown","keypress","keyup","dragenter",qT,"dragover",G$,"pointerup",YT,KT,fse,W$,"mouseup","mousemove",XT,"mouseover",QT,"dblclick","wheel",gse,ZT,JT,ex],q$=YT,R1=XT,Y$=QT;class F1 extends H${constructor(t,n){super(t,n),this._down=null,this._touch=null,this._first=!0,this._events={},this.events=A7e,this.pointermove=_se([YT,"mousemove"],[fse,"mouseover"],[KT,XT]),this.dragover=_se(["dragover"],["dragenter"],[qT]),this.pointerout=yse([KT,XT]),this.dragleave=yse([qT])}initialize(t,n,i){return this._canvas=t&&z$(t,"canvas"),[QT,W$,G$,YT,KT,qT].forEach(r=>mse(this,r)),super.initialize(t,n,i)}canvas(){return this._canvas}context(){return this._canvas.getContext("2d")}DOMMouseScroll(t){this.fire(gse,t)}pointerdown(t){this._down=this._active,this.fire(G$,t)}mousedown(t){this._down=this._active,this.fire(W$,t)}click(t){this._down===this._active&&(this.fire(QT,t),this._down=null)}touchstart(t){this._touch=this.pickEvent(t.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire(ZT,t,!0)}touchmove(t){this.fire(JT,t,!0)}touchend(t){this.fire(ex,t,!0),this._touch=null}fire(t,n,i){const r=i?this._touch:this._active,o=this._handlers[t];if(n.vegaType=t,t===Y$&&r&&r.href?this.handleHref(n,r,r.href):(t===q$||t===R1)&&this.handleTooltip(n,r,t!==R1),o)for(let s=0,a=o.length;s=0&&r.splice(o,1),this}pickEvent(t){const n=WT(t,this._canvas),i=this._origin;return this.pick(this._scene,n[0],n[1],n[0]-i[0],n[1]-i[1])}pick(t,n,i,r,o){const s=this.context();return Xo[t.marktype].pick.call(this,s,t,n,i,r,o)}}const M7e=e=>e===ZT||e===JT||e===ex?[ZT,JT,ex]:[e];function mse(e,t){M7e(t).forEach(n=>function N7e(e,t){const n=e.canvas();n&&!e._events[t]&&(e._events[t]=1,n.addEventListener(t,e[t]?i=>e[t](i):i=>e.fire(t,i)))}(e,n))}function P1(e,t,n){t.forEach(i=>e.fire(i,n))}function _se(e,t,n){return function(i){const r=this._active,o=this.pickEvent(i);o===r||((!r||!r.exit)&&P1(this,n,i),this._active=o,P1(this,t,i)),P1(this,e,i)}}function yse(e){return function(t){P1(this,e,t),this._active=null}}class tx extends O1{constructor(t){super(t),this._options={},this._redraw=!1,this._dirty=new li,this._tempb=new li}initialize(t,n,i,r,o,s){return this._options=s||{},this._canvas=this._options.externalContext?null:fd(1,1),t&&this._canvas&&(Ls(t,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),super.initialize(t,n,i,r,o)}resize(t,n,i,r){if(super.resize(t,n,i,r),this._canvas)!function k7e(e,t,n,i,r,o){const s=typeof HTMLElement<"u"&&e instanceof HTMLElement&&null!=e.parentNode,a=e.getContext("2d"),l=s?function I7e(){return typeof window<"u"&&window.devicePixelRatio||1}():r;e.width=t*l,e.height=n*l;for(const c in o)a[c]=o[c];return s&&1!==l&&(e.style.width=t+"px",e.style.height=n+"px"),a.pixelRatio=l,a.setTransform(l,0,0,l,l*i[0],l*i[1]),e}(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{const o=this._options.externalContext;o||J("CanvasRenderer is missing a valid canvas or context"),o.scale(this._scale,this._scale),o.translate(this._origin[0],this._origin[1])}return this._redraw=!0,this}canvas(){return this._canvas}context(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)}dirty(t){const n=this._tempb.clear().union(t.bounds);let i=t.mark.group;for(;i;)n.translate(i.x||0,i.y||0),i=i.mark.group;this._dirty.union(n)}_render(t,n){const i=this.context(),r=this._origin,o=this._width,s=this._height,a=this._dirty,l=O7e(r,o,s);i.save();const c=this._redraw||a.empty()?(this._redraw=!1,l.expand(1)):function R7e(e,t,n){return t.expand(1).round(),e.pixelRatio%1&&t.scale(e.pixelRatio).round().scale(1/e.pixelRatio),t.translate(-n[0]%1,-n[1]%1),e.beginPath(),e.rect(t.x1,t.y1,t.width(),t.height()),e.clip(),t}(i,l.intersect(a),r);return this.clear(-r[0],-r[1],o,s),this.draw(i,t,c,n),i.restore(),a.clear(),this}draw(t,n,i,r){if("group"!==n.marktype&&null!=r&&!r.includes(n.marktype))return;const o=Xo[n.marktype];n.clip&&function I9e(e,t){var n=t.clip;e.save(),it(n)?(e.beginPath(),n(e),e.clip()):qoe(e,t.group)}(t,n),o.draw.call(this,t,n,i,r),n.clip&&t.restore()}clear(t,n,i,r){const o=this._options,s=this.context();"pdf"!==o.type&&!o.externalContext&&s.clearRect(t,n,i,r),null!=this._bgcolor&&(s.fillStyle=this._bgcolor,s.fillRect(t,n,i,r))}}const O7e=(e,t,n)=>(new li).set(0,0,t,n).translate(-e[0],-e[1]);class vse extends H${constructor(t,n){super(t,n);const i=this;i._hrefHandler=K$(i,(r,o)=>{o&&o.href&&i.handleHref(r,o,o.href)}),i._tooltipHandler=K$(i,(r,o)=>{i.handleTooltip(r,o,r.type!==R1)})}initialize(t,n,i){let r=this._svg;return r&&(r.removeEventListener(Y$,this._hrefHandler),r.removeEventListener(q$,this._tooltipHandler),r.removeEventListener(R1,this._tooltipHandler)),this._svg=r=t&&z$(t,"svg"),r&&(r.addEventListener(Y$,this._hrefHandler),r.addEventListener(q$,this._tooltipHandler),r.addEventListener(R1,this._tooltipHandler)),super.initialize(t,n,i)}canvas(){return this._svg}on(t,n){const i=this.eventName(t),r=this._handlers;if(this._handlerIndex(r[i],t,n)<0){const s={type:t,handler:n,listener:K$(this,n)};(r[i]||(r[i]=[])).push(s),this._svg&&this._svg.addEventListener(i,s.listener)}return this}off(t,n){const i=this.eventName(t),r=this._handlers[i],o=this._handlerIndex(r,t,n);return o>=0&&(this._svg&&this._svg.removeEventListener(i,r[o].listener),r.splice(o,1)),this}}const K$=(e,t)=>n=>{let i=n.target.__data__;i=Array.isArray(i)?i[0]:i,n.vegaType=n.type,t.call(e._obj,n,i)},bse="aria-hidden",X$="aria-label",Q$="role",Z$="aria-roledescription",wse="graphics-object",J$="graphics-symbol",Ese=(e,t,n)=>({[Q$]:e,[Z$]:t,[X$]:n||void 0}),F7e=va(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),Cse={axis:{desc:"axis",caption:function $7e(e){const t=e.datum,n=e.orient,i=t.title?Ase(e):null,r=e.context,o=r.scales[t.scale].value,s=r.dataflow.locale(),a=o.type;return("left"===n||"right"===n?"Y":"X")+"-axis"+(i?` titled '${i}'`:"")+` for a ${Zm(a)?"discrete":a} scale with ${boe(s,o,e)}`}},legend:{desc:"legend",caption:function B7e(e){const t=e.datum,n=t.title?Ase(e):null,i=`${t.type||""} legend`.trim(),r=t.scales,o=Object.keys(r),s=e.context,a=s.scales[r[o[0]]].value,l=s.dataflow.locale();return function V7e(e){return e.length?e[0].toUpperCase()+e.slice(1):e}(i)+(n?` titled '${n}'`:"")+` for ${function j7e(e){return e=e.map(t=>t+("fill"===t||"stroke"===t?" color":"")),e.length<2?e[0]:e.slice(0,-1).join(", ")+" and "+yt(e)}(o)} with ${boe(l,a,e)}`}},"title-text":{desc:"title",caption:e=>`Title text '${xse(e)}'`},"title-subtitle":{desc:"subtitle",caption:e=>`Subtitle text '${xse(e)}'`}},Dse={ariaRole:Q$,ariaRoleDescription:Z$,description:X$};function Sse(e,t){const n=!1===t.aria;if(e(bse,n||void 0),n||null==t.description)for(const i in Dse)e(Dse[i],void 0);else{const i=t.mark.marktype;e(X$,t.description),e(Q$,t.ariaRole||("group"===i?wse:J$)),e(Z$,t.ariaRoleDescription||`${i} mark`)}}function Tse(e){return!1===e.aria?{[bse]:!0}:F7e[e.role]?null:Cse[e.role]?function L7e(e,t){try{const n=e.items[0];return Ese(t.role||J$,t.desc,n.description||(t.caption||(()=>""))(n))}catch{return null}}(e,Cse[e.role]):function P7e(e){const t=e.marktype,n="group"===t||"text"===t||e.items.some(i=>null!=i.description&&!1!==i.aria);return Ese(n?wse:J$,`${t} mark container`,e.description)}(e)}function xse(e){return Ee(e.text).join(" ")}function Ase(e){try{return Ee(yt(e.items).items[0].text).join(" ")}catch{return null}}const Mse=e=>(e+"").replace(/&/g,"&").replace(//g,">"),U7e=e=>Mse(e).replace(/"/g,""").replace(/\t/g," ").replace(/\n/g," ").replace(/\r/g," ");function eB(){let e="",t="",n="";const i=[],r=()=>t=n="",s=(l,c)=>(null!=c&&(t+=` ${l}="${U7e(c)}"`),a),a={open(l){(l=>{t&&(e+=`${t}>${n}`,r()),i.push(l)})(l),t="<"+l;for(var c=arguments.length,u=new Array(c>1?c-1:0),d=1;d${n}`:"/>"):``,r(),a},attr:s,text:l=>(n+=Mse(l),a),toString:()=>e};return a}const Nse=e=>Ise(eB(),e)+"";function Ise(e,t){if(e.open(t.tagName),t.hasAttributes()){const n=t.attributes,i=n.length;for(let r=0;r{u.dirty=n})),!r.zdirty){if(i.exit){s.nested&&r.items.length?(c=r.items[0],c._svg&&this._update(s,c._svg,c)):i._svg&&(c=i._svg.parentNode,c&&c.removeChild(i._svg)),i._svg=null;continue}i=s.nested?r.items[0]:i,i._update!==n&&(i._svg&&i._svg.ownerSVGElement?this._update(s,i._svg,i):(this._dirtyAll=!1,Rse(i,n)),i._update=n)}return!this._dirtyAll}mark(t,n,i,r){if(!this.isDirty(n))return n._svg;const o=this._svg,s=n.marktype,a=Xo[s],l=!1===n.interactive?"none":null,c="g"===a.tag,u=Fse(n,t,i,"g",o);if("group"!==s&&null!=r&&!r.includes(s))return Ls(u,0),n._svg;u.setAttribute("class",cse(n));const d=Tse(n);for(const g in d)Br(u,g,d[g]);c||Br(u,"pointer-events",l),Br(u,"clip-path",n.clip?b$(this,n,n.group):null);let f=null,h=0;const p=g=>{const m=this.isDirty(g),_=Fse(g,u,f,a.tag,o);m&&(this._update(a,_,g),c&&function G7e(e,t,n,i){t=t.lastChild.previousSibling;let r,o=0;Sa(n,s=>{r=e.mark(t,s,r,i),++o}),Ls(t,1+o)}(this,_,g,r)),f=_,++h};return a.nested?n.items.length&&p(n.items[0]):Sa(n,p),Ls(u,h),u}_update(t,n,i){Jc=n,br=n.__values__,Sse($1,i),t.attr($1,i,this);const r=q7e[t.type];r&&r.call(this,t,n,i),Jc&&this.style(Jc,i)}style(t,n){if(null!=n){for(const i in nx){let r="font"===i?I1(n):n[i];if(r===br[i])continue;const o=nx[i];null==r?t.removeAttribute(o):(p$(r)&&(r=Eoe(r,this._defs.gradient,Pse())),t.setAttribute(o,r+"")),br[i]=r}for(const i in ix)rx(t,ix[i],n[i])}}defs(){const t=this._svg,n=this._defs;let i=n.el,r=0;for(const o in n.gradient)i||(n.el=i=Ei(t,1,"defs",Ci)),r=z7e(i,n.gradient[o],r);for(const o in n.clipping)i||(n.el=i=Ei(t,1,"defs",Ci)),r=H7e(i,n.clipping[o],r);i&&(0===r?(t.removeChild(i),n.el=null):Ls(i,r))}_clearDefs(){const t=this._defs;t.gradient={},t.clipping={}}}function Rse(e,t){for(;e&&e.dirty!==t;e=e.mark.group){if(e.dirty=t,!e.mark||e.mark.dirty===t)return;e.mark.dirty=t}}function z7e(e,t,n){let i,r,o;if("radial"===t.gradient){let s=Ei(e,n++,"pattern",Ci);Sd(s,{id:"p_"+t.id,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),s=Ei(s,0,"rect",Ci),Sd(s,{width:1,height:1,fill:`url(${Pse()}#${t.id})`}),Sd(e=Ei(e,n++,"radialGradient",Ci),{id:t.id,fx:t.x1,fy:t.y1,fr:t.r1,cx:t.x2,cy:t.y2,r:t.r2})}else Sd(e=Ei(e,n++,"linearGradient",Ci),{id:t.id,x1:t.x1,x2:t.x2,y1:t.y1,y2:t.y2});for(i=0,r=t.stops.length;i1&&e.previousSibling!=t}(o,n))&&t.insertBefore(o,n?n.nextSibling:t.firstChild),o}let Jc=null,br=null;const q7e={group(e,t,n){const i=Jc=t.childNodes[2];br=i.__values__,e.foreground($1,n,this),br=t.__values__,Jc=t.childNodes[1],e.content($1,n,this);const r=Jc=t.childNodes[0];e.background($1,n,this);const o=!1===n.mark.interactive?"none":null;if(o!==br.events&&(Br(i,"pointer-events",o),Br(r,"pointer-events",o),br.events=o),n.strokeForeground&&n.stroke){const s=n.fill;Br(i,"display",null),this.style(r,n),Br(r,"stroke",null),s&&(n.fill=null),br=i.__values__,this.style(i,n),s&&(n.fill=s),Jc=null}else Br(i,"display","none")},image(e,t,n){!1===n.smooth?(rx(t,"image-rendering","optimizeSpeed"),rx(t,"image-rendering","pixelated")):rx(t,"image-rendering",null)},text(e,t,n){const i=N1(n);let r,o,s,a;te(i)?(o=i.map(l=>Cd(n,l)),r=o.join("\n"),r!==br.text&&(Ls(t,0),s=t.ownerDocument,a=Ed(n),o.forEach((l,c)=>{const u=Dd(s,"tspan",Ci);u.__data__=n,u.textContent=l,c&&(u.setAttribute("x",0),u.setAttribute("dy",a)),t.appendChild(u)}),br.text=r)):(o=Cd(n,i),o!==br.text&&(t.textContent=o,br.text=o)),Br(t,"font-family",I1(n)),Br(t,"font-size",jl(n)+"px"),Br(t,"font-style",n.fontStyle),Br(t,"font-variant",n.fontVariant),Br(t,"font-weight",n.fontWeight)}};function $1(e,t,n){t!==br[e]&&(n?function Y7e(e,t,n,i){null!=n?e.setAttributeNS(i,t,n):e.removeAttributeNS(i,t)}(Jc,e,t,n):Br(Jc,e,t),br[e]=t)}function rx(e,t,n){n!==br[t]&&(null==n?e.style.removeProperty(t):e.style.setProperty(t,n+""),br[t]=n)}function Sd(e,t){for(const n in t)Br(e,n,t[n])}function Br(e,t,n){null!=n?e.setAttribute(t,n):e.removeAttribute(t)}function Pse(){let e;return typeof window>"u"?"":(e=window.location).hash?e.href.slice(0,-e.hash.length):e.href}class Lse extends O1{constructor(t){super(t),this._text=null,this._defs={gradient:{},clipping:{}}}svg(){return this._text}_render(t){const n=eB();n.open("svg",rt({},M1,{class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}));const i=this._bgcolor;return i&&"transparent"!==i&&"none"!==i&&n.open("rect",{width:this._width,height:this._height,fill:i}).close(),n.open("g",kse,{transform:"translate("+this._origin+")"}),this.mark(n,t),n.close(),this.defs(n),this._text=n.close()+"",this}mark(t,n){const i=Xo[n.marktype],r=i.tag,o=[Sse,i.attr];t.open("g",{class:cse(n),"clip-path":n.clip?b$(this,n,n.group):null},Tse(n),{"pointer-events":"g"!==r&&!1===n.interactive?"none":null});const s=a=>{const l=this.href(a);if(l&&t.open("a",l),t.open(r,this.attr(n,a,o,"g"!==r?r:null)),"text"===r){const c=N1(a);if(te(c)){const u={x:0,dy:Ed(a)};for(let d=0;dthis.mark(t,f)),t.close(),c&&d?(u&&(a.fill=null),a.stroke=d,t.open("path",this.attr(n,a,i.foreground,"bgrect")).close(),u&&(a.fill=u)):t.open("path",this.attr(n,a,i.foreground,"bgfore")).close()}t.close(),l&&t.close()};return i.nested?n.items&&n.items.length&&s(n.items[0]):Sa(n,s),t.close()}href(t){const n=t.href;let i;if(n){if(i=this._hrefs&&this._hrefs[n])return i;this.sanitizeURL(n).then(r=>{r["xlink:href"]=r.href,r.href=null,(this._hrefs||(this._hrefs={}))[n]=r})}return null}attr(t,n,i,r){const o={},s=(a,l,c,u)=>{o[u||a]=l};return Array.isArray(i)?i.forEach(a=>a(s,n,this)):i(s,n,this),r&&function K7e(e,t,n,i,r){let o;if(null==t||("bgrect"===i&&!1===n.interactive&&(e["pointer-events"]="none"),"bgfore"===i&&(!1===n.interactive&&(e["pointer-events"]="none"),e.display="none",null!==t.fill)))return e;"image"===i&&!1===t.smooth&&(o=["image-rendering: optimizeSpeed;","image-rendering: pixelated;"]),"text"===i&&(e["font-family"]=I1(t),e["font-size"]=jl(t)+"px",e["font-style"]=t.fontStyle,e["font-variant"]=t.fontVariant,e["font-weight"]=t.fontWeight);for(const s in nx){let a=t[s];const l=nx[s];"transparent"===a&&("fill"===l||"stroke"===l)||null!=a&&(p$(a)&&(a=Eoe(a,r.gradient,"")),e[l]=a)}for(const s in ix){const a=t[s];null!=a&&(o=o||[],o.push(`${ix[s]}: ${a};`))}o&&(e.style=o.join(" "))}(o,n,t,r,this._defs),o}defs(t){const n=this._defs.gradient,i=this._defs.clipping;if(Object.keys(n).length+Object.keys(i).length!==0){t.open("defs");for(const o in n){const s=n[o],a=s.stops;"radial"===s.gradient?(t.open("pattern",{id:"p_"+o,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),t.open("rect",{width:"1",height:"1",fill:"url(#"+o+")"}).close(),t.close(),t.open("radialGradient",{id:o,fx:s.x1,fy:s.y1,fr:s.r1,cx:s.x2,cy:s.y2,r:s.r2})):t.open("linearGradient",{id:o,x1:s.x1,x2:s.x2,y1:s.y1,y2:s.y2});for(let l=0;l!Ta.svgMarkTypes.includes(o));this._svgRenderer.render(t,Ta.svgMarkTypes),this._canvasRenderer.render(t,r)}resize(t,n,i,r){return super.resize(t,n,i,r),this._svgRenderer.resize(t,n,i,r),this._canvasRenderer.resize(t,n,i,r),this}background(t){return Ta.svgOnTop?this._canvasRenderer.background(t):this._svgRenderer.background(t),this}}class $se extends F1{constructor(t,n){super(t,n)}initialize(t,n,i){const r=Ei(Ei(t,0,"div"),Ta.svgOnTop?0:1,"div");return super.initialize(r,n,i)}}const Td={Canvas:"canvas",PNG:"png",SVG:"svg",Hybrid:"hybrid",None:"none"},Mh={};function ox(e,t){return e=String(e||"").toLowerCase(),arguments.length>1?(Mh[e]=t,this):Mh[e]}function Hse(e,t,n){const i=[],r=(new li).union(t),o=e.marktype;return o?Gse(e,r,n,i):"group"===o?Wse(e,r,n,i):J("Intersect scene must be mark node or group item.")}function Gse(e,t,n,i){if(function Q7e(e,t,n){return e.bounds&&t.intersects(e.bounds)&&("group"===e.marktype||!1!==e.interactive&&(!n||n(e)))}(e,t,n)){const r=e.items,o=e.marktype,s=r.length;let a=0;if("group"===o)for(;a=0;o--)if(n[o]!=i[o])return!1;for(o=n.length-1;o>=0;o--)if(!rB(e[r=n[o]],t[r],r))return!1;return typeof e==typeof t}(e,t):e==t)}function Kse(e,t){return rB(Jm(e),Jm(t))}function eze(){Ooe(),function DUe(){woe=0}()}const o_="top",xa="left",Aa="right",xd="bottom",oB="start",sB="middle",jr="end",oze="x",sze="y",sx="group",aB="axis",lB="title",cB="legend",Xse="row-header",Qse="row-footer",Jse="column-header",eae="column-footer",tae="column-title",uB="none",ax="all",dB="each",fB="flush",Ad="column",Md="row";function oae(e){K.call(this,null,e)}function lx(e,t,n){return t(e.bounds.clear(),e,n)}me(oae,K,{transform(e,t){const n=t.dataflow,i=e.mark,r=i.marktype,o=Xo[r],s=o.bound;let l,a=i.bounds;if(o.nested)i.items.length&&n.dirty(i.items[0]),a=lx(i,s),i.items.forEach(c=>{c.bounds.clear().union(a)});else if(r===sx||e.modified())switch(t.visit(t.MOD,c=>n.dirty(c)),a.clear(),i.items.forEach(c=>a.union(lx(c,s))),i.role){case aB:case cB:case lB:t.reflow()}else l=t.changed(t.REM),t.visit(t.ADD,c=>{a.union(lx(c,s))}),t.visit(t.MOD,c=>{l=l||a.alignsWith(c.bounds),n.dirty(c),a.union(lx(c,s))}),l&&(a.clear(),i.items.forEach(c=>a.union(c.bounds)));return Yse(i),t.modifies("bounds")}});const sae=":vega_identifier:";function hB(e){K.call(this,0,e)}function aae(e){K.call(this,null,e)}function lae(e){K.call(this,null,e)}hB.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]},me(hB,K,{transform(e,t){const n=function fze(e){return e._signals[sae]||(e._signals[sae]=e.add(0))}(t.dataflow),i=e.as;let r=n.value;return t.visit(t.ADD,o=>o[i]=o[i]||++r),n.set(this.value=r),t}}),me(aae,K,{transform(e,t){let n=this.value;n||(n=t.dataflow.scenegraph().mark(e.markdef,function hze(e){const t=e.groups,n=e.parent;return t&&1===t.size?t.get(Object.keys(t.object)[0]):t&&n?t.lookup(n):null}(e),e.index),n.group.context=e.context,e.context.group||(e.context.group=n.group),n.source=this.source,n.clip=e.clip,n.interactive=e.interactive,this.value=n);const i=n.marktype===sx?IT:NT;return t.visit(t.ADD,r=>i.call(r,n)),(e.modified("clip")||e.modified("interactive"))&&(n.clip=e.clip,n.interactive=!!e.interactive,n.zdirty=!0,t.reflow()),n.items=t.source,t}});const cae={parity:e=>e.filter((t,n)=>n%2?t.opacity=0:1),greedy:(e,t)=>{let n;return e.filter((i,r)=>r&&uae(n.bounds,i.bounds,t)?i.opacity=0:(n=i,1))}},uae=(e,t,n)=>n>Math.max(t.x1-e.x2,e.x1-t.x2,t.y1-e.y2,e.y1-t.y2),dae=(e,t)=>{for(var o,n=1,i=e.length,r=e[0].bounds;n{const t=e.bounds;return t.width()>1&&t.height()>1},fae=e=>(e.forEach(t=>t.opacity=1),e),hae=(e,t)=>e.reflow(t.modified()).modifies("opacity");function pae(e){K.call(this,null,e)}me(lae,K,{transform(e,t){const n=cae[e.method]||cae.parity,i=e.separation||0;let o,s,r=t.materialize(t.SOURCE).source;if(!r||!r.length)return;if(!e.method)return e.modified("method")&&(fae(r),t=hae(t,e)),t;if(r=r.filter(pze),!r.length)return;if(e.sort&&(r=r.slice().sort(e.sort)),o=fae(r),t=hae(t,e),o.length>=3&&dae(o,i)){do{o=n(o,i)}while(o.length>=3&&dae(o,i));o.length<3&&!yt(r).opacity&&(o.length>1&&(yt(o).opacity=0),yt(r).opacity=1)}e.boundScale&&e.boundTolerance>=0&&(s=((e,t,n)=>{var i=e.range(),r=new li;return t===o_||t===xd?r.set(i[0],-1/0,i[1],1/0):r.set(-1/0,i[0],1/0,i[1]),r.expand(n||1),o=>r.encloses(o.bounds)})(e.boundScale,e.boundOrient,+e.boundTolerance),r.forEach(l=>{s(l)||(l.opacity=0)}));const a=o[0].mark.bounds.clear();return r.forEach(l=>{l.opacity&&a.union(l.bounds)}),t}}),me(pae,K,{transform(e,t){const n=t.dataflow;if(t.visit(t.ALL,i=>n.dirty(i)),t.fields&&t.fields.zindex){const i=t.source&&t.source[0];i&&(i.mark.zdirty=!0)}}});const wr=new li;function s_(e,t,n){return e[t]===n?0:(e[t]=n,1)}function mze(e){var t=e.items[0].orient;return t===xa||t===Aa}function yze(e,t,n,i){var b,w,r=t.items[0],o=r.datum,s=null!=r.translate?r.translate:.5,a=r.orient,l=function _ze(e){let t=+e.grid;return[e.ticks?t++:-1,e.labels?t++:-1,t+ +e.domain]}(o),c=r.range,u=r.offset,d=r.position,f=r.minExtent,h=r.maxExtent,p=o.title&&r.items[l[2]].items[0],g=r.titlePadding,m=r.bounds,_=p&&B$(p),y=0,v=0;switch(wr.clear().union(m),m.clear(),(b=l[0])>-1&&m.union(r.items[b].bounds),(b=l[1])>-1&&m.union(r.items[b].bounds),a){case o_:y=d||0,v=-u,w=Math.max(f,Math.min(h,-m.y1)),m.add(0,-w).add(c,0),p&&cx(e,p,w,g,_,0,-1,m);break;case xa:y=-u,v=d||0,w=Math.max(f,Math.min(h,-m.x1)),m.add(-w,0).add(0,c),p&&cx(e,p,w,g,_,1,-1,m);break;case Aa:y=n+u,v=d||0,w=Math.max(f,Math.min(h,m.x2)),m.add(0,0).add(w,c),p&&cx(e,p,w,g,_,1,1,m);break;case xd:y=d||0,v=i+u,w=Math.max(f,Math.min(h,m.y2)),m.add(0,0).add(c,w),p&&cx(e,p,w,g,0,0,1,m);break;default:y=r.x,v=r.y}return Zc(m.translate(y,v),r),s_(r,"x",y+s)|s_(r,"y",v+s)&&(r.bounds=wr,e.dirty(r),r.bounds=m,e.dirty(r)),r.mark.bounds.clear().union(m)}function cx(e,t,n,i,r,o,s,a){const l=t.bounds;if(t.auto){const c=s*(n+r+i);let u=0,d=0;e.dirty(t),o?u=(t.x||0)-(t.x=c):d=(t.y||0)-(t.y=c),t.mark.bounds.clear().union(l.translate(-u,-d)),e.dirty(t)}a.union(l)}const gae=(e,t)=>Math.floor(Math.min(e,t)),mae=(e,t)=>Math.ceil(Math.max(e,t));function bze(e){return(new li).set(0,0,e.width||0,e.height||0)}function wze(e){const t=e.bounds.clone();return t.empty()?t.set(0,0,0,0):t.translate(-(e.x||0),-(e.y||0))}function xn(e,t,n){return(we(e)?e[t]:e)??(void 0!==n?n:0)}function _ae(e){return e<0?Math.ceil(-e):0}function yae(e,t,n){var C,E,D,M,k,R,F,P,T,S,x,i=!n.nodirty,r=n.bounds===fB?bze:wze,o=wr.set(0,0,0,0),s=xn(n.align,Ad),a=xn(n.align,Md),l=xn(n.padding,Ad),c=xn(n.padding,Md),u=n.columns||t.length,d=u<=0?1:Math.ceil(t.length/u),f=t.length,h=Array(f),p=Array(u),g=0,m=Array(f),_=Array(d),y=0,v=Array(f),b=Array(f),w=Array(f);for(E=0;E1)for(E=0;E0&&(v[E]+=T/2);if(a&&xn(n.center,Md)&&1!==u)for(E=0;E0&&(b[E]+=S/2);for(E=0;Er&&(e.warn("Grid headers exceed limit: "+r),t=t.slice(0,r)),g+=o,y=0,b=t.length;y=0&&null==(E=n[v]);v-=f);a?(D=null==h?E.x:Math.round(E.bounds.x1+h*E.bounds.width()),M=g):(D=g,M=null==h?E.y:Math.round(E.bounds.y1+h*E.bounds.height())),w.union(C.bounds.translate(D-(C.x||0),M-(C.y||0))),C.x=D,C.y=M,e.dirty(C),m=s(m,w[c])}return m}function vae(e,t,n,i,r,o){if(t){e.dirty(t);var s=n,a=n;i?s=Math.round(r.x1+o*r.width()):a=Math.round(r.y1+o*r.height()),t.bounds.translate(s-(t.x||0),a-(t.y||0)),t.mark.bounds.clear().union(t.bounds),t.x=s,t.y=a,e.dirty(t)}}function xze(e,t,n,i,r,o,s){const a=function Sze(e,t){const n=e[t]||{};return(i,r)=>null!=n[i]?n[i]:null!=e[i]?e[i]:r}(n,t),l=function Tze(e,t){let n=-1/0;return e.forEach(i=>{null!=i.offset&&(n=Math.max(n,i.offset))}),n>-1/0?n:t}(e,a("offset",0)),c=a("anchor",oB),u=c===jr?1:c===sB?.5:0,d={align:dB,bounds:a("bounds",fB),columns:"vertical"===a("direction")?1:e.length,padding:a("margin",8),center:a("center"),nodirty:!0};switch(t){case xa:d.anchor={x:Math.floor(i.x1)-l,column:jr,y:u*(s||i.height()+2*i.y1),row:c};break;case Aa:d.anchor={x:Math.ceil(i.x2)+l,y:u*(s||i.height()+2*i.y1),row:c};break;case o_:d.anchor={y:Math.floor(r.y1)-l,row:jr,x:u*(o||r.width()+2*r.x1),column:c};break;case xd:d.anchor={y:Math.ceil(r.y2)+l,x:u*(o||r.width()+2*r.x1),column:c};break;case"top-left":d.anchor={x:l,y:l};break;case"top-right":d.anchor={x:o-l,y:l,column:jr};break;case"bottom-left":d.anchor={x:l,y:s-l,row:jr};break;case"bottom-right":d.anchor={x:o-l,y:s-l,column:jr,row:jr}}return d}function Aze(e,t){var l,c,n=t.items[0],i=n.datum,r=n.orient,o=n.bounds,s=n.x,a=n.y;return n._bounds?n._bounds.clear().union(o):n._bounds=o.clone(),o.clear(),function Nze(e,t,n){var i=t.padding,r=i-n.x,o=i-n.y;if(t.datum.title){var s=t.items[1].items[0],a=s.anchor,l=t.titlePadding||0,c=i-s.x,u=i-s.y;switch(s.orient){case xa:r+=Math.ceil(s.bounds.width())+l;break;case Aa:case xd:break;default:o+=s.bounds.height()+l}switch((r||o)&&B1(e,n,r,o),s.orient){case xa:u+=a_(t,n,s,a,1,1);break;case Aa:c+=a_(t,n,s,jr,0,0)+l,u+=a_(t,n,s,a,1,1);break;case xd:c+=a_(t,n,s,a,0,0),u+=a_(t,n,s,jr,-1,0,1)+l;break;default:c+=a_(t,n,s,a,0,0)}(c||u)&&B1(e,s,c,u),(c=Math.round(s.bounds.x1-i))<0&&(B1(e,n,-c,0),B1(e,s,-c,0))}else(r||o)&&B1(e,n,r,o)}(e,n,n.items[0].items[0]),o=function Mze(e,t){return e.items.forEach(n=>t.union(n.bounds)),t.x1=e.padding,t.y1=e.padding,t}(n,o),l=2*n.padding,c=2*n.padding,o.empty()||(l=Math.ceil(o.width()+l),c=Math.ceil(o.height()+c)),"symbol"===i.type&&function Ize(e){const t=e.reduce((n,i)=>(n[i.column]=Math.max(i.bounds.x2-i.x,n[i.column]||0),n),{});e.forEach(n=>{n.width=t[n.column],n.height=n.bounds.y2-n.y})}(n.items[0].items[0].items[0].items),r!==uB&&(n.x=s=0,n.y=a=0),n.width=l,n.height=c,Zc(o.set(s,a,s+l,a+c),n),n.mark.bounds.clear().union(o),n}function a_(e,t,n,i,r,o,s){const l=n.datum.vgrad,u=("symbol"===e.datum.type||!o&&l||s?t:t.items[0]).bounds[r?"y2":"x2"]-e.padding,d=l&&o?u:0,f=l&&o?0:u,h=r<=0?0:B$(n);return Math.round(i===oB?d:i===jr?f-h:.5*(u-h))}function B1(e,t,n,i){t.x+=n,t.y+=i,t.bounds.translate(n,i),t.mark.bounds.translate(n,i),e.dirty(t)}function bae(e){K.call(this,null,e)}function wae(e,t){let n=0;if(void 0===t)for(let i of e)(i=+i)&&(n+=i);else{let i=-1;for(let r of e)(r=+t(r,++i,e))&&(n+=r)}return n}function Eae(e){K.call(this,null,e)}function Cae(e){K.call(this,null,e)}function Pze(){return Ft({})}function Dae(e){K.call(this,null,e)}function Sae(e){K.call(this,[],e)}me(bae,K,{transform(e,t){const n=t.dataflow;return e.mark.items.forEach(i=>{e.layout&&function Eze(e,t,n){var u,d,f,h,p,g,m,i=function vze(e){var r,o,t=e.items,n=t.length,i=0;const s={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};for(;i{(f=_.orient||Aa)!==uB&&(m[f]||(m[f]=[])).push(_)});for(const _ in m){const y=m[_];yae(e,y,xze(y,_,n.legends,a,l,r,o))}c.forEach(_=>{const y=_.bounds;if(y.equals(_._bounds)||(_.bounds=_._bounds,e.dirty(_),_.bounds=y,e.dirty(_)),!n.autosize||"fit"!==n.autosize.type&&"fit-x"!==n.autosize.type&&"fit-y"!==n.autosize.type)s.union(y);else switch(_.orient){case xa:case Aa:s.add(y.x1,0).add(y.x2,0);break;case o_:case xd:s.add(0,y.y1).add(0,y.y2)}})}s.union(a).union(l),u&&s.union(function kze(e,t,n,i,r){var v,o=t.items[0],a=o.orient,l=o.anchor,c=o.offset,u=o.padding,d=o.items[0].items[0],f=o.items[1]&&o.items[1].items[0],h=a===xa||a===Aa?i:n,p=0,g=0,m=0,_=0,y=0;if(o.frame!==sx?a===xa?(p=r.y2,h=r.y1):a===Aa?(p=r.y1,h=r.y2):(p=r.x1,h=r.x2):a===xa&&(p=i,h=0),v=l===oB?p:l===jr?h:(p+h)/2,f&&f.text){switch(a){case o_:case xd:y=d.bounds.height()+u;break;case xa:_=d.bounds.width()+u;break;case Aa:_=-d.bounds.width()-u}wr.clear().union(f.bounds),wr.translate(_-(f.x||0),y-(f.y||0)),s_(f,"x",_)|s_(f,"y",y)&&(e.dirty(f),f.bounds.clear().union(wr),f.mark.bounds.clear().union(wr),e.dirty(f)),wr.clear().union(f.bounds)}else wr.clear();switch(wr.union(d.bounds),a){case o_:g=v,m=r.y1-wr.height()-c;break;case xa:g=r.x1-wr.width()-c,m=v;break;case Aa:g=r.x2+wr.width()+c,m=v;break;case xd:g=v,m=r.y2+c;break;default:g=o.x,m=o.y}return s_(o,"x",g)|s_(o,"y",m)&&(wr.translate(g,m),e.dirty(o),o.bounds.clear().union(wr),t.bounds.clear().union(wr),e.dirty(o)),o.bounds}(e,u,r,o,s)),t.clip&&s.set(0,0,t.width||0,t.height||0),function Fze(e,t,n,i){const r=i.autosize||{},o=r.type;if(e._autosize<1||!o)return;let s=e._width,a=e._height,l=Math.max(0,t.width||0),c=Math.max(0,Math.ceil(-n.x1)),u=Math.max(0,t.height||0),d=Math.max(0,Math.ceil(-n.y1));const f=Math.max(0,Math.ceil(n.x2-l)),h=Math.max(0,Math.ceil(n.y2-u));if("padding"===r.contains){const p=e.padding();s-=p.left+p.right,a-=p.top+p.bottom}o===uB?(c=0,d=0,l=s,u=a):"fit"===o?(l=Math.max(0,s-c-f),u=Math.max(0,a-d-h)):"fit-x"===o?(l=Math.max(0,s-c-f),a=u+d+h):"fit-y"===o?(s=l+c+f,u=Math.max(0,a-d-h)):"pad"===o&&(s=l+c+f,a=u+d+h),e._resizeView(s,a,l,u,[c,d],r.resize)}(e,t,s,n)}(n,i,e)}),function Oze(e){return e&&"legend-entry"!==e.mark.role}(e.mark.group)?t.reflow():t}}),me(Eae,K,{transform(e,t){if(this.value&&!e.modified())return t.StopPropagation;var n=t.dataflow.locale(),i=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=this.value,o=e.scale,a=d$(o,null==e.count?e.values?e.values.length:10:e.count,e.minstep),l=e.format||hoe(n,o,a,e.formatSpecifier,e.formatType,!!e.values),c=e.values?foe(o,e.values,a):f$(o,a);return r&&(i.rem=r),r=c.map((u,d)=>Ft({index:d/(c.length-1||1),value:u,label:l(u)})),e.extra&&r.length&&r.push(Ft({index:-1,extra:{value:r[0].value},label:""})),i.source=r,i.add=r,this.value=r,i}}),me(Cae,K,{transform(e,t){var n=t.dataflow,i=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=e.item||Pze,o=e.key||Fe,s=this.value;return te(i.encode)&&(i.encode=null),s&&(e.modified("key")||t.modified(o))&&J("DataJoin does not support modified key function or fields."),s||(t=t.addAll(),this.value=s=function Lze(e){const t=xm().test(n=>n.exit);return t.lookup=n=>t.get(e(n)),t}(o)),t.visit(t.ADD,a=>{const l=o(a);let c=s.get(l);c?c.exit?(s.empty--,i.add.push(c)):i.mod.push(c):(c=r(a),s.set(l,c),i.add.push(c)),c.datum=a,c.exit=!1}),t.visit(t.MOD,a=>{const l=o(a),c=s.get(l);c&&(c.datum=a,i.mod.push(c))}),t.visit(t.REM,a=>{const l=o(a),c=s.get(l);a===c.datum&&!c.exit&&(i.rem.push(c),c.exit=!0,++s.empty)}),t.changed(t.ADD_MOD)&&i.modifies("datum"),(t.clean()||e.clean&&s.empty>n.cleanThreshold)&&n.runAfter(s.clean),i}}),me(Dae,K,{transform(e,t){var n=t.fork(t.ADD_REM),i=e.mod||!1,r=e.encoders,o=t.encode;if(te(o)){if(!n.changed()&&!o.every(d=>r[d]))return t.StopPropagation;o=o[0],n.encode=null}var s="enter"===o,a=r.update||ed,l=r.enter||ed,c=r.exit||ed,u=(o&&!s?r[o]:a)||ed;if(t.changed(t.ADD)&&(t.visit(t.ADD,d=>{l(d,e),a(d,e)}),n.modifies(l.output),n.modifies(a.output),u!==ed&&u!==a&&(t.visit(t.ADD,d=>{u(d,e)}),n.modifies(u.output))),t.changed(t.REM)&&c!==ed&&(t.visit(t.REM,d=>{c(d,e)}),n.modifies(c.output)),s||u!==ed){const d=t.MOD|(e.modified()?t.REFLOW:0);s?(t.visit(d,f=>{const h=l(f,e)||i;(u(f,e)||h)&&n.mod.push(f)}),n.mod.length&&n.modifies(l.output)):t.visit(d,f=>{(u(f,e)||i)&&n.mod.push(f)}),n.mod.length&&n.modifies(u.output)}return n.changed()?n:t.StopPropagation}}),me(Sae,K,{transform(e,t){if(null!=this.value&&!e.modified())return t.StopPropagation;var f,h,p,g,m,n=t.dataflow.locale(),i=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=this.value,o=e.type||TT,s=e.scale,a=+e.limit,l=d$(s,null==e.count?5:e.count,e.minstep),u=e.format||_oe(n,s,l,o,e.formatSpecifier,e.formatType,!!e.values||o===TT),d=e.values||moe(s,l);return r&&(i.rem=r),o===TT?(a&&d.length>a?(t.dataflow.warn("Symbol legend count exceeds limit, filtering items."),r=d.slice(0,a-1),m=!0):r=d,it(p=e.size)?(!e.values&&0===s(r[0])&&(r=r.slice(1)),g=r.reduce((_,y)=>Math.max(_,p(y,e)),0)):p=gr(g=p||8),r=r.map((_,y)=>Ft({index:y,label:u(_,y,r),value:_,offset:g,size:p(_,e)})),m&&r.push(Ft({index:r.length,label:`\u2026${d.length-r.length} entries`,value:m=d[r.length],offset:g,size:p(m,e)}))):"gradient"===o?(f=s.domain(),h=loe(s,f[0],yt(f)),d.length<3&&!e.values&&f[0]!==yt(f)&&(d=[f[0],yt(f)]),r=d.map((_,y)=>Ft({index:y,label:u(_,y,d),value:_,perc:h(_)}))):(p=d.length-1,h=function EUe(e){const t=e.domain(),n=t.length-1;let i=+t[0],r=+yt(t),o=r-i;if(e.type===CT){const s=n?o/n:.1;i-=s,r+=s,o=r-i}return s=>(s-i)/o}(s),r=d.map((_,y)=>Ft({index:y,label:u(_,y,d),value:_,perc:y?h(_):0,perc2:y===p?1:h(d[y+1])}))),i.source=r,i.add=r,this.value=r,i}});const $ze=e=>e.source.x,Bze=e=>e.source.y,jze=e=>e.target.x,Vze=e=>e.target.y;function pB(e){K.call(this,{},e)}pB.Definition={type:"LinkPath",metadata:{modifies:!0},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]},me(pB,K,{transform(e,t){var n=e.sourceX||$ze,i=e.sourceY||Bze,r=e.targetX||jze,o=e.targetY||Vze,s=e.as||"path",l=e.shape||"line",c=Mae.get(l+"-"+(e.orient||"vertical"))||Mae.get(l);return c||J("LinkPath unsupported type: "+e.shape+(e.orient?"-"+e.orient:"")),t.visit(t.SOURCE,u=>{u[s]=c(n(u),i(u),r(u),o(u))}),t.reflow(e.modified()).modifies(s)}});const Tae=(e,t,n,i)=>"M"+e+","+t+"L"+n+","+i,xae=(e,t,n,i)=>{var r=n-e,o=i-t,s=Math.hypot(r,o)/2;return"M"+e+","+t+"A"+s+","+s+" "+180*Math.atan2(o,r)/Math.PI+" 0 1 "+n+","+i},Aae=(e,t,n,i)=>{const r=n-e,o=i-t,s=.2*(r+o),a=.2*(o-r);return"M"+e+","+t+"C"+(e+s)+","+(t+a)+" "+(n+a)+","+(i-s)+" "+n+","+i},Mae=xm({line:Tae,"line-radial":(e,t,n,i)=>Tae(t*Math.cos(e),t*Math.sin(e),i*Math.cos(n),i*Math.sin(n)),arc:xae,"arc-radial":(e,t,n,i)=>xae(t*Math.cos(e),t*Math.sin(e),i*Math.cos(n),i*Math.sin(n)),curve:Aae,"curve-radial":(e,t,n,i)=>Aae(t*Math.cos(e),t*Math.sin(e),i*Math.cos(n),i*Math.sin(n)),"orthogonal-horizontal":(e,t,n,i)=>"M"+e+","+t+"V"+i+"H"+n,"orthogonal-vertical":(e,t,n,i)=>"M"+e+","+t+"H"+n+"V"+i,"orthogonal-radial":(e,t,n,i)=>{const r=Math.cos(e),o=Math.sin(e),s=Math.cos(n),a=Math.sin(n);return"M"+t*r+","+t*o+"A"+t+","+t+" 0 0,"+((Math.abs(n-e)>Math.PI?n<=e:n>e)?1:0)+" "+t*s+","+t*a+"L"+i*s+","+i*a},"diagonal-horizontal":(e,t,n,i)=>{const r=(e+n)/2;return"M"+e+","+t+"C"+r+","+t+" "+r+","+i+" "+n+","+i},"diagonal-vertical":(e,t,n,i)=>{const r=(t+i)/2;return"M"+e+","+t+"C"+e+","+r+" "+n+","+r+" "+n+","+i},"diagonal-radial":(e,t,n,i)=>{const r=Math.cos(e),o=Math.sin(e),s=Math.cos(n),a=Math.sin(n),l=(t+i)/2;return"M"+t*r+","+t*o+"C"+l*r+","+l*o+" "+l*s+","+l*a+" "+i*s+","+i*a}});function gB(e){K.call(this,null,e)}gB.Definition={type:"Pie",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:!1},{name:"as",type:"string",array:!0,length:2,default:["startAngle","endAngle"]}]},me(gB,K,{transform(e,t){var p,g,m,n=e.as||["startAngle","endAngle"],i=n[0],r=n[1],s=e.startAngle||0,a=null!=e.endAngle?e.endAngle:2*Math.PI,l=t.source,c=l.map(e.field||Dm),u=c.length,d=s,f=(a-s)/wae(c),h=Yo(u);for(e.sort&&h.sort((_,y)=>c[_]-c[y]),p=0;pr+(o<0?-1:o>0?1:0),0))!==t.length&&n.warn("Log scale domain includes zero: "+ge(t)),t}function Oae(e,t,n){return it(e)&&(t||n)?soe(e,mB(t||[0,1],n)):e}function mB(e,t){return t?e.slice().reverse():e}function Rae(e){K.call(this,null,e)}me(Iae,K,{transform(e,t){var n=t.dataflow,i=this.value,r=function qze(e){var i,t=e.type,n="";return t===Ll?Ll+"-"+Km:(function Yze(e){const t=e.type;return a$(t)&&t!==wh&&t!==Eh&&(e.scheme||e.range&&e.range.length&&e.range.every(Ce))}(e)&&(n=2===(i=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(null!=e.domainMid):0)?Ll+"-":3===i?Xm+"-":""),(n+t||Km).toLowerCase())}(e);for(r in(!i||r!==i.type)&&(this.value=i=Nt(r)()),e)if(!Wze[r]){if("padding"===r&&Nae(i.type))continue;it(i[r])?i[r](e[r]):n.warn("Unsupported scale property: "+r)}return function Jze(e,t,n){var i=e.type,r=t.round||!1,o=t.range;if(null!=t.rangeStep)o=function eHe(e,t,n){return"band"!==e&&e!==i$&&J("Only band and point scales support rangeStep."),[0,t.rangeStep*t$(n,e===i$?1:(null!=t.paddingInner?t.paddingInner:t.padding)||0,(null!=t.paddingOuter?t.paddingOuter:t.padding)||0)]}(i,t,n);else if(t.scheme&&(o=function tHe(e,t,n){var o,i=t.schemeExtent;return te(t.scheme)?o=ST(t.scheme,t.interpolate,t.interpolateGamma):(o=u$(t.scheme.toLowerCase()))||J(`Unrecognized scheme name: ${t.scheme}`),n=e===CT?n+1:e===r$?n-1:e===Qm||e===ET?+t.schemeCount||5:n,roe(e)?Oae(o,i,t.reverse):it(o)?aoe(Oae(o,i),n):e===n$?o:o.slice(0,n)}(i,t,n),it(o))){if(e.interpolator)return e.interpolator(o);J(`Scale type ${i} does not support interpolating color schemes.`)}if(o&&roe(i))return e.interpolator(ST(mB(o,t.reverse),t.interpolate,t.interpolateGamma));o&&t.interpolate&&e.interpolate?e.interpolate(c$(t.interpolate,t.interpolateGamma)):it(e.round)?e.round(r):it(e.rangeRound)&&e.interpolate(r?p1:gd),o&&e.range(mB(o,t.reverse))}(i,e,function Zze(e,t,n){let i=t.bins;if(i&&!te(i)){const r=e.domain(),o=r[0],s=yt(r),a=i.step;let l=null==i.start?o:i.start,c=null==i.stop?s:i.stop;a||J("Scale bins parameter missing step property."),ls&&(c=a*Math.floor(s/a)),i=Yo(l,c+a/2,a)}return i?e.bins=i:e.bins&&delete e.bins,e.type===r$&&(i?!t.domain&&!t.domainRaw&&(e.domain(i),n=i.length):e.bins=e.domain()),n}(i,e,function Kze(e,t,n){const i=function Xze(e,t,n){return t?(e.domain(kae(e.type,t,n)),t.length):-1}(e,t.domainRaw,n);if(i>-1)return i;var a,l,r=t.domain,o=e.type,s=t.zero||void 0===t.zero&&function Gze(e){const t=e.type;return!e.bins&&(t===Km||t===_1||t===y1)}(e);if(!r)return 0;if((s||null!=t.domainMin||null!=t.domainMax||null!=t.domainMid)&&(a=(r=r.slice()).length-1||1,s&&(r[0]>0&&(r[0]=0),r[a]<0&&(r[a]=0)),null!=t.domainMin&&(r[0]=t.domainMin),null!=t.domainMax&&(r[a]=t.domainMax),null!=t.domainMid)){const c=(l=t.domainMid)>r[a]?a+1:lg(u);if(null==t)r.push(e.slice());else for(s={},a=0,l=e.length;ap&&(p=h),n&&f.sort(n)}return r.max=p,r}(t.source,e.groupby,o,s),c=0,u=l.length,d=l.max;ce;function dx(e,t){e&&jae.hasOwnProperty(e.type)&&jae[e.type](e,t)}var Bae={Feature:function(e,t){dx(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,r=n.length;++i0){for(s=t[--n];n>0&&(i=s,r=t[--n],s=i+r,o=r-(s-i),!o););n>0&&(o<0&&t[n-1]<0||o>0&&t[n-1]>0)&&(r=2*o,i=s+r,r==i-s&&(s=i))}return s}}var $e=1e-6,fx=1e-12,ht=Math.PI,Bn=ht/2,hx=ht/4,Vr=2*ht,Yn=180/ht,dt=ht/180,vt=Math.abs,l_=Math.atan,$s=Math.atan2,je=Math.cos,px=Math.ceil,Uae=Math.exp,vB=(Math,Math.hypot),gx=Math.log,bB=Math.pow,Re=Math.sin,Bs=Math.sign||function(e){return e>0?1:e<0?-1:0},Ur=Math.sqrt,wB=Math.tan;function zae(e){return e>1?0:e<-1?ht:Math.acos(e)}function mo(e){return e>1?Bn:e<-1?-Bn:Math.asin(e)}function Ji(){}var Hae,Gae,DB,SB,EB=new Zi,CB=new Zi,Nd={point:Ji,lineStart:Ji,lineEnd:Ji,polygonStart:function(){Nd.lineStart=sHe,Nd.lineEnd=lHe},polygonEnd:function(){Nd.lineStart=Nd.lineEnd=Nd.point=Ji,EB.add(vt(CB)),CB=new Zi},result:function(){var e=EB/2;return EB=new Zi,e}};function sHe(){Nd.point=aHe}function aHe(e,t){Nd.point=Wae,Hae=DB=e,Gae=SB=t}function Wae(e,t){CB.add(SB*e-DB*t),DB=e,SB=t}function lHe(){Wae(Hae,Gae)}const qae=Nd;var c_=1/0,mx=c_,V1=-c_,_x=V1;const yx={point:function uHe(e,t){eV1&&(V1=e),t_x&&(_x=t)},lineStart:Ji,lineEnd:Ji,polygonStart:Ji,polygonEnd:Ji,result:function(){var e=[[c_,mx],[V1,_x]];return V1=_x=-(mx=c_=1/0),e}};var Yae,Kae,Vl,Ul,TB=0,xB=0,U1=0,vx=0,bx=0,u_=0,AB=0,MB=0,z1=0,Ma={point:Nh,lineStart:Xae,lineEnd:Qae,polygonStart:function(){Ma.lineStart=hHe,Ma.lineEnd=pHe},polygonEnd:function(){Ma.point=Nh,Ma.lineStart=Xae,Ma.lineEnd=Qae},result:function(){var e=z1?[AB/z1,MB/z1]:u_?[vx/u_,bx/u_]:U1?[TB/U1,xB/U1]:[NaN,NaN];return TB=xB=U1=vx=bx=u_=AB=MB=z1=0,e}};function Nh(e,t){TB+=e,xB+=t,++U1}function Xae(){Ma.point=dHe}function dHe(e,t){Ma.point=fHe,Nh(Vl=e,Ul=t)}function fHe(e,t){var n=e-Vl,i=t-Ul,r=Ur(n*n+i*i);vx+=r*(Vl+e)/2,bx+=r*(Ul+t)/2,u_+=r,Nh(Vl=e,Ul=t)}function Qae(){Ma.point=Nh}function hHe(){Ma.point=gHe}function pHe(){Zae(Yae,Kae)}function gHe(e,t){Ma.point=Zae,Nh(Yae=Vl=e,Kae=Ul=t)}function Zae(e,t){var n=e-Vl,i=t-Ul,r=Ur(n*n+i*i);vx+=r*(Vl+e)/2,bx+=r*(Ul+t)/2,u_+=r,AB+=(r=Ul*e-Vl*t)*(Vl+e),MB+=r*(Ul+t),z1+=3*r,Nh(Vl=e,Ul=t)}const Jae=Ma;function ele(e){this._context=e}ele.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Vr)}},result:Ji};var IB,tle,nle,H1,G1,NB=new Zi,wx={point:Ji,lineStart:function(){wx.point=mHe},lineEnd:function(){IB&&ile(tle,nle),wx.point=Ji},polygonStart:function(){IB=!0},polygonEnd:function(){IB=null},result:function(){var e=+NB;return NB=new Zi,e}};function mHe(e,t){wx.point=ile,tle=H1=e,nle=G1=t}function ile(e,t){NB.add(Ur((H1-=e)*H1+(G1-=t)*G1)),H1=e,G1=t}const rle=wx;let ole,Ex,sle,ale;class lle{constructor(t){this._append=null==t?cle:function _He(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return cle;if(t!==ole){const n=10**t;ole=t,Ex=function(r){let o=1;this._+=r[0];for(const s=r.length;o=0))throw new RangeError(`invalid digits: ${a}`);n=l}return null===t&&(o=new lle(n)),s},s.projection(e).digits(n).context(t)}function dle(){var t,e=[];return{point:function(n,i,r){t.push([n,i,r])},lineStart:function(){e.push(t=[])},lineEnd:Ji,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Cx(e,t){return vt(e[0]-t[0])<$e&&vt(e[1]-t[1])<$e}function Dx(e,t,n,i){this.x=e,this.z=t,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function fle(e,t,n,i,r){var a,l,o=[],s=[];if(e.forEach(function(p){if(!((g=p.length-1)<=0)){var g,y,m=p[0],_=p[g];if(Cx(m,_)){if(!m[2]&&!_[2]){for(r.lineStart(),a=0;a=0;--a)r.point((d=u[a])[0],d[1]);else i(f.x,f.p.x,-1,r);f=f.p}u=(f=f.o).z,h=!h}while(!f.v);r.lineEnd()}}}function hle(e){if(t=e.length){for(var t,r,n=0,i=e[0];++n=0?1:-1,k=M*D,R=k>ht,F=m*C;if(l.add($s(F*M*Re(k),_*E+F*je(k))),s+=R?D+M*Vr:D,R^p>=n^b>=n){var P=d_(Ih(h),Ih(v));Ax(P);var T=d_(o,P);Ax(T);var S=(R^D>=0?-1:1)*mo(T[2]);(i>S||i===S&&(P[0]||P[1]))&&(a+=R^D>=0?1:-1)}}return(s<-$e||s<$e&&l<-fx)^1&a}(c,i);u.length?(l||(r.polygonStart(),l=!0),fle(u,wHe,b,n,r)):b&&(l||(r.polygonStart(),l=!0),r.lineStart(),n(null,null,1,r),r.lineEnd()),l&&(r.polygonEnd(),l=!1),u=c=null},sphere:function(){r.polygonStart(),r.lineStart(),n(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function h(b,w){e(b,w)&&r.point(b,w)}function p(b,w){o.point(b,w)}function g(){f.point=p,o.lineStart()}function m(){f.point=h,o.lineEnd()}function _(b,w){d.push([b,w]),a.point(b,w)}function y(){a.lineStart(),d=[]}function v(){_(d[0][0],d[0][1]),a.lineEnd();var C,D,M,k,b=a.clean(),w=s.result(),E=w.length;if(d.pop(),c.push(d),d=null,E){if(1&b){if((D=(M=w[0]).length-1)>0){for(l||(r.polygonStart(),l=!0),r.lineStart(),C=0;C1&&2&b&&w.push(w.pop().concat(w.shift())),u.push(w.filter(bHe))}}return f}}function bHe(e){return e.length>1}function wHe(e,t){return((e=e.x)[0]<0?e[1]-Bn-$e:Bn-e[1])-((t=t.x)[0]<0?t[1]-Bn-$e:Bn-t[1])}const mle=gle(function(){return!0},function EHe(e){var r,t=NaN,n=NaN,i=NaN;return{lineStart:function(){e.lineStart(),r=1},point:function(o,s){var a=o>0?ht:-ht,l=vt(o-t);vt(l-ht)<$e?(e.point(t,n=(n+s)/2>0?Bn:-Bn),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(a,n),e.point(o,n),r=0):i!==a&&l>=ht&&(vt(t-i)<$e&&(t-=i*$e),vt(o-a)<$e&&(o-=a*$e),n=function CHe(e,t,n,i){var r,o,s=Re(e-n);return vt(s)>$e?l_((Re(t)*(o=je(i))*Re(n)-Re(i)*(r=je(t))*Re(e))/(r*o*s)):(t+i)/2}(t,n,o,s),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(a,n),r=0),e.point(t=o,n=s),i=a},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-r}}},function DHe(e,t,n,i){var r;if(null==e)i.point(-ht,r=n*Bn),i.point(0,r),i.point(ht,r),i.point(ht,0),i.point(ht,-r),i.point(0,-r),i.point(-ht,-r),i.point(-ht,0),i.point(-ht,r);else if(vt(e[0]-t[0])>$e){var o=e[0]0)do{f.point(0===h||3===h?e:n,h>1?i:t)}while((h=(h+d+4)%4)!==p);else f.point(u[0],u[1])}function s(c,u){return vt(c[0]-e)<$e?u>0?0:3:vt(c[0]-n)<$e?u>0?2:1:vt(c[1]-t)<$e?u>0?1:0:u>0?3:2}function a(c,u){return l(c.x,u.x)}function l(c,u){var d=s(c,1),f=s(u,1);return d!==f?d-f:0===d?u[1]-c[1]:1===d?c[0]-u[0]:2===d?c[1]-u[1]:u[0]-c[0]}return function(c){var f,h,p,g,m,_,y,v,b,w,C,u=c,d=dle(),E={point:D,lineStart:function F(){E.point=T,h&&h.push(p=[]),w=!0,b=!1,y=v=NaN},lineEnd:function P(){f&&(T(g,m),_&&b&&d.rejoin(),f.push(d.result())),E.point=D,b&&u.lineEnd()},polygonStart:function k(){u=d,f=[],h=[],C=!0},polygonEnd:function R(){var S=function M(){for(var S=0,x=0,I=h.length;xi&&(j-B)*(i-V)>(H-V)*(e-B)&&++S:H<=i&&(j-B)*(i-V)<(H-V)*(e-B)&&--S;return S}(),x=C&&S,I=(f=ple(f)).length;(x||I)&&(c.polygonStart(),x&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),I&&fle(f,a,S,o,c),c.polygonEnd()),u=c,f=h=p=null}};function D(S,x){r(S,x)&&u.point(S,x)}function T(S,x){var I=r(S,x);if(h&&p.push([S,x]),w)g=S,m=x,_=I,w=!1,I&&(u.lineStart(),u.point(S,x));else if(I&&b)u.point(S,x);else{var A=[y=Math.max(Mx,Math.min(W1,y)),v=Math.max(Mx,Math.min(W1,v))],N=[S=Math.max(Mx,Math.min(W1,S)),x=Math.max(Mx,Math.min(W1,x))];!function THe(e,t,n,i,r,o){var p,s=e[0],a=e[1],u=0,d=1,f=t[0]-s,h=t[1]-a;if(p=n-s,f||!(p>0)){if(p/=f,f<0){if(p0){if(p>d)return;p>u&&(u=p)}if(p=r-s,f||!(p<0)){if(p/=f,f<0){if(p>d)return;p>u&&(u=p)}else if(f>0){if(p0)){if(p/=h,h<0){if(p0){if(p>d)return;p>u&&(u=p)}if(p=o-a,h||!(p<0)){if(p/=h,h<0){if(p>d)return;p>u&&(u=p)}else if(h>0){if(p0&&(e[0]=s+u*f,e[1]=a+u*h),d<1&&(t[0]=s+d*f,t[1]=a+d*h),!0}}}}}(A,N,e,t,n,i)?I&&(u.lineStart(),u.point(S,x),C=!1):(b||(u.lineStart(),u.point(A[0],A[1])),u.point(N[0],N[1]),I||u.lineEnd(),C=!1)}y=S,v=x,b=I}return E}}function RB(e,t){function n(i,r){return i=e(i,r),t(i[0],i[1])}return e.invert&&t.invert&&(n.invert=function(i,r){return(i=t.invert(i,r))&&e.invert(i[0],i[1])}),n}function FB(e,t){return vt(e)>ht&&(e-=Math.round(e/Vr)*Vr),[e,t]}function ble(e,t,n){return(e%=Vr)?t||n?RB(Ele(e),Cle(t,n)):Ele(e):t||n?Cle(t,n):FB}function wle(e){return function(t,n){return vt(t+=e)>ht&&(t-=Math.round(t/Vr)*Vr),[t,n]}}function Ele(e){var t=wle(e);return t.invert=wle(-e),t}function Cle(e,t){var n=je(e),i=Re(e),r=je(t),o=Re(t);function s(a,l){var c=je(l),u=je(a)*c,d=Re(a)*c,f=Re(l),h=f*n+u*i;return[$s(d*r-h*o,u*n-f*i),mo(h*r+d*o)]}return s.invert=function(a,l){var c=je(l),u=je(a)*c,d=Re(a)*c,f=Re(l),h=f*r-d*o;return[$s(d*r+f*o,u*n+h*i),mo(h*n-u*i)]},s}function q1(e){return function(t){var n=new PB;for(var i in e)n[i]=e[i];return n.stream=t,n}}function PB(){}function LB(e,t,n){var i=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=i&&e.clipExtent(null),eu(n,e.stream(yx)),t(yx.result()),null!=i&&e.clipExtent(i),e}function Nx(e,t,n){return LB(e,function(i){var r=t[1][0]-t[0][0],o=t[1][1]-t[0][1],s=Math.min(r/(i[1][0]-i[0][0]),o/(i[1][1]-i[0][1])),a=+t[0][0]+(r-s*(i[1][0]+i[0][0]))/2,l=+t[0][1]+(o-s*(i[1][1]+i[0][1]))/2;e.scale(150*s).translate([a,l])},n)}function $B(e,t,n){return Nx(e,[[0,0],t],n)}function BB(e,t,n){return LB(e,function(i){var r=+t,o=r/(i[1][0]-i[0][0]),s=(r-o*(i[1][0]+i[0][0]))/2,a=-o*i[0][1];e.scale(150*o).translate([s,a])},n)}function jB(e,t,n){return LB(e,function(i){var r=+t,o=r/(i[1][1]-i[0][1]),s=-o*i[0][0],a=(r-o*(i[1][1]+i[0][1]))/2;e.scale(150*o).translate([s,a])},n)}FB.invert=FB,PB.prototype={constructor:PB,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Dle=16,AHe=je(30*dt);function Sle(e,t){return+t?function NHe(e,t){function n(i,r,o,s,a,l,c,u,d,f,h,p,g,m){var _=c-i,y=u-r,v=_*_+y*y;if(v>4*t&&g--){var b=s+f,w=a+h,C=l+p,E=Ur(b*b+w*w+C*C),D=mo(C/=E),M=vt(vt(C)-1)<$e||vt(o-d)<$e?(o+d)/2:$s(w,b),k=e(M,D),R=k[0],F=k[1],P=R-i,T=F-r,S=y*P-_*T;(S*S/v>t||vt((_*P+y*T)/v-.5)>.3||s*f+a*h+l*p0,r=vt(t)>$e;function s(u,d){return je(u)*je(d)>t}function l(u,d,f){var g=[1,0,0],m=d_(Ih(u),Ih(d)),_=Tx(m,m),y=m[0],v=_-y*y;if(!v)return!f&&u;var b=t*_/v,w=-t*y/v,C=d_(g,m),E=xx(g,b);kB(E,xx(m,w));var M=C,k=Tx(E,M),R=Tx(M,M),F=k*k-R*(Tx(E,E)-1);if(!(F<0)){var P=Ur(F),T=xx(M,(-k-P)/R);if(kB(T,E),T=Sx(T),!f)return T;var N,S=u[0],x=d[0],I=u[1],A=d[1];x0^T[1]<(vt(T[0]-S)<$e?I:A):I<=T[1]&&T[1]<=A:O>ht^(S<=T[0]&&T[0]<=x)){var V=xx(M,(-k+P)/R);return kB(V,E),[T,Sx(V)]}}}function c(u,d){var f=i?e:ht-e,h=0;return u<-f?h|=1:u>f&&(h|=2),d<-f?h|=4:d>f&&(h|=8),h}return gle(s,function a(u){var d,f,h,p,g;return{lineStart:function(){p=h=!1,g=1},point:function(m,_){var v,y=[m,_],b=s(m,_),w=i?b?0:c(m,_):b?c(m+(m<0?ht:-ht),_):0;if(!d&&(p=h=b)&&u.lineStart(),b!==h&&(!(v=l(d,y))||Cx(d,v)||Cx(y,v))&&(y[2]=1),b!==h)g=0,b?(u.lineStart(),v=l(y,d),u.point(v[0],v[1])):(v=l(d,y),u.point(v[0],v[1],2),u.lineEnd()),d=v;else if(r&&d&&i^b){var C;!(w&f)&&(C=l(y,d,!0))&&(g=0,i?(u.lineStart(),u.point(C[0][0],C[0][1]),u.point(C[1][0],C[1][1]),u.lineEnd()):(u.point(C[1][0],C[1][1]),u.lineEnd(),u.lineStart(),u.point(C[0][0],C[0][1],3)))}b&&(!d||!Cx(d,y))&&u.point(y[0],y[1]),d=y,h=b,f=w},lineEnd:function(){h&&u.lineEnd(),d=null},clean:function(){return g|(p&&h)<<1}}},function o(u,d,f,h){!function _le(e,t,n,i,r,o){if(n){var s=je(t),a=Re(t),l=i*n;null==r?(r=t+i*Vr,o=t-l/2):(r=yle(s,r),o=yle(s,o),(i>0?ro)&&(r+=i*Vr));for(var c,u=r;i>0?u>o:u2?S[2]%360*dt:0,P()):[a*Yn,l*Yn,c*Yn]},R.angle=function(S){return arguments.length?(d=S%360*dt,P()):d*Yn},R.reflectX=function(S){return arguments.length?(f=S?-1:1,P()):f<0},R.reflectY=function(S){return arguments.length?(h=S?-1:1,P()):h<0},R.precision=function(S){return arguments.length?(C=Sle(E,w=S*S),T()):Ur(w)},R.fitExtent=function(S,x){return Nx(R,S,x)},R.fitSize=function(S,x){return $B(R,S,x)},R.fitWidth=function(S,x){return BB(R,S,x)},R.fitHeight=function(S,x){return jB(R,S,x)},function(){return t=e.apply(this,arguments),R.invert=t.invert&&F,P()}}function VB(e){var t=0,n=ht/3,i=xle(e),r=i(t,n);return r.parallels=function(o){return arguments.length?i(t=o[0]*dt,n=o[1]*dt):[t*Yn,n*Yn]},r}function FHe(e,t){var n=Re(e),i=(n+Re(t))/2;if(vt(i)<$e)return function RHe(e){var t=je(e);function n(i,r){return[i*t,Re(r)/t]}return n.invert=function(i,r){return[i/t,mo(r*t)]},n}(e);var r=1+n*(2*i-n),o=Ur(r)/i;function s(a,l){var c=Ur(r-2*i*Re(l))/i;return[c*Re(a*=i),o-c*je(a)]}return s.invert=function(a,l){var c=o-l,u=$s(a,vt(c))*Bs(c);return c*i<0&&(u-=ht*Bs(a)*Bs(c)),[u/i,mo((r-(a*a+c*c)*i*i)/(2*i))]},s}function Ix(){return VB(FHe).scale(155.424).center([0,33.6442])}function Ale(){return Ix().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Mle(e){return function(t,n){var i=je(t),r=je(n),o=e(i*r);return o===1/0?[2,0]:[o*r*Re(t),o*Re(n)]}}function Y1(e){return function(t,n){var i=Ur(t*t+n*n),r=e(i),o=Re(r),s=je(r);return[$s(t*o,i*s),mo(i&&n*o/i)]}}var Nle=Mle(function(e){return Ur(2/(1+e))});Nle.invert=Y1(function(e){return 2*mo(e/2)});var Ile=Mle(function(e){return(e=zae(e))&&e/Re(e)});function kx(e,t){return[e,gx(wB((Bn+t)/2))]}function kle(e){var a,l,c,t=zl(e),n=t.center,i=t.scale,r=t.translate,o=t.clipExtent,s=null;function u(){var d=ht*i(),f=t(function xHe(e){function t(n){return(n=e(n[0]*dt,n[1]*dt))[0]*=Yn,n[1]*=Yn,n}return e=ble(e[0]*dt,e[1]*dt,e.length>2?e[2]*dt:0),t.invert=function(n){return(n=e.invert(n[0]*dt,n[1]*dt))[0]*=Yn,n[1]*=Yn,n},t}(t.rotate()).invert([0,0]));return o(null==s?[[f[0]-d,f[1]-d],[f[0]+d,f[1]+d]]:e===kx?[[Math.max(f[0]-d,s),a],[Math.min(f[0]+d,l),c]]:[[s,Math.max(f[1]-d,a)],[l,Math.min(f[1]+d,c)]])}return t.scale=function(d){return arguments.length?(i(d),u()):i()},t.translate=function(d){return arguments.length?(r(d),u()):r()},t.center=function(d){return arguments.length?(n(d),u()):n()},t.clipExtent=function(d){return arguments.length?(null==d?s=a=l=c=null:(s=+d[0][0],a=+d[0][1],l=+d[1][0],c=+d[1][1]),u()):null==s?null:[[s,a],[l,c]]},u()}function Ox(e){return wB((Bn+e)/2)}function VHe(e,t){var n=je(e),i=e===t?Re(e):gx(n/je(t))/gx(Ox(t)/Ox(e)),r=n*bB(Ox(e),i)/i;if(!i)return kx;function o(s,a){r>0?a<-Bn+$e&&(a=-Bn+$e):a>Bn-$e&&(a=Bn-$e);var l=r/bB(Ox(a),i);return[l*Re(i*s),r-l*je(i*s)]}return o.invert=function(s,a){var l=r-a,c=Bs(i)*Ur(s*s+l*l),u=$s(s,vt(l))*Bs(l);return l*i<0&&(u-=ht*Bs(s)*Bs(l)),[u/i,2*l_(bB(r/c,1/i))-Bn]},o}function Rx(e,t){return[e,t]}function HHe(e,t){var n=je(e),i=e===t?Re(e):(n-je(t))/(t-e),r=n/i+e;if(vt(i)<$e)return Rx;function o(s,a){var l=r-a,c=i*s;return[l*Re(c),r-l*je(c)]}return o.invert=function(s,a){var l=r-a,c=$s(s,vt(l))*Bs(l);return l*i<0&&(c-=ht*Bs(s)*Bs(l)),[c/i,r-Bs(i)*Ur(s*s+l*l)]},o}Ile.invert=Y1(function(e){return e}),kx.invert=function(e,t){return[e,2*l_(Uae(t))-Bn]},Rx.invert=Rx;var K1=1.340264,X1=-.081106,Q1=893e-6,Z1=.003796,Fx=Ur(3)/2;function Ole(e,t){var n=mo(Fx*Re(t)),i=n*n,r=i*i*i;return[e*je(n)/(Fx*(K1+3*X1*i+r*(7*Q1+9*Z1*i))),n*(K1+X1*i+r*(Q1+Z1*i))]}function Rle(e,t){var n=je(t),i=je(e)*n;return[n*Re(e)/i,Re(t)/i]}function Fle(e,t){var n=t*t,i=n*n;return[e*(.8707-.131979*n+i*(i*(.003971*n-.001529*i)-.013791)),t*(1.007226+n*(.015085+i*(.028874*n-.044475-.005916*i)))]}function Ple(e,t){return[je(t)*Re(e),Re(t)]}function Lle(e,t){var n=je(t),i=1+je(e)*n;return[n*Re(e)/i,Re(t)/i]}function $le(e,t){return[gx(wB((Bn+t)/2)),-e]}Ole.invert=function(e,t){for(var s,n=t,i=n*n,r=i*i*i,o=0;o<12&&(r=(i=(n-=s=(n*(K1+X1*i+r*(Q1+Z1*i))-t)/(K1+3*X1*i+r*(7*Q1+9*Z1*i)))*n)*i*i,!(vt(s)$e&&--i>0);return[e/(.8707+(o=n*n)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),n]},Ple.invert=Y1(mo),Lle.invert=Y1(function(e){return 2*l_(e)}),$le.invert=function(e,t){return[-t,2*l_(Uae(e))-Bn]};var eGe=Math.abs,UB=(Math,Math,Math,Math.cos),Px=(Math,Math,Math,Math,Math,Math,Math,Math,Math.sin),tGe=(Math,1e-6),Id=Math.PI,zB=Id/2,jle=(Math,Lx(2));function Vle(e){return e>1?zB:e<-1?-zB:Math.asin(e)}function Lx(e){return e>0?Math.sqrt(e):0}function nGe(e,t){var r,n=e*Px(t),i=30;do{t-=r=(t+Px(t)-n)/(1+UB(t))}while(eGe(r)>tGe&&--i>0);return t/2}Lx(Id);var rGe=function iGe(e,t,n){function i(r,o){return[e*r*UB(o=nGe(n,o)),t*Px(o)]}return i.invert=function(r,o){return o=Vle(o/t),[r/(e*UB(o)),Vle((2*o+Px(2*o))/n)]},i}(jle/zB,jle,Id);const sGe=ule(),HB=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function GB(e,t){if(!e||"string"!=typeof e)throw new Error("Projection type must be a name string.");return e=e.toLowerCase(),arguments.length>1?($x[e]=function aGe(e,t){return function n(){const i=t();return i.type=e,i.path=ule().projection(i),i.copy=i.copy||function(){const r=n();return HB.forEach(o=>{i[o]&&r[o](i[o]())}),r.path.pointRadius(i.path.pointRadius()),r},toe(i)}}(e,t),this):$x[e]||null}function Ule(e){return e&&e.path||sGe}const $x={albers:Ale,albersusa:function LHe(){var e,t,i,o,a,l,n=Ale(),r=Ix().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=Ix().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(f,h){l=[f,h]}};function u(f){var h=f[0],p=f[1];return l=null,i.point(h,p),l||(o.point(h,p),l)||(a.point(h,p),l)}function d(){return e=t=null,u}return u.invert=function(f){var h=n.scale(),p=n.translate(),g=(f[0]-p[0])/h,m=(f[1]-p[1])/h;return(m>=.12&&m<.234&&g>=-.425&&g<-.214?r:m>=.166&&m<.234&&g>=-.214&&g<-.115?s:n).invert(f)},u.stream=function(f){return e&&t===f?e:e=function PHe(e){var t=e.length;return{point:function(n,i){for(var r=-1;++r2?i[2]+90:90]):[(i=n())[0],i[1],i[2]-90]},n([0,0,90]).scale(159.155)}};for(const e in $x)GB(e,$x[e]);function zle(e,t,n){var i=Yo(e,t-$e,n).concat(t);return function(r){return i.map(function(o){return[r,o]})}}function Hle(e,t,n){var i=Yo(e,t-$e,n).concat(t);return function(r){return i.map(function(o){return[o,r]})}}function lGe(){}const tu=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function Wle(){var e=1,t=1,n=a;function i(l,c){return c.map(u=>r(l,u))}function r(l,c){var u=[],d=[];return function o(l,c,u){var h,p,m,_,y,d=[],f=[];for(h=p=-1,tu[(m=l[0]>=c)<<1].forEach(v);++h=c)<<1].forEach(v);for(tu[0|m].forEach(v);++p=c)<<1|(_=l[p*e]>=c)<<2].forEach(v);++h=c)<<1|(_=l[p*e+h+1]>=c)<<2|y<<3].forEach(v);tu[m|_<<3].forEach(v)}for(h=-1,tu[(_=l[p*e]>=c)<<2].forEach(v);++h=c)<<2|y<<3].forEach(v);function v(b){var M,k,w=[b[0][0]+h,b[0][1]+p],C=[b[1][0]+h,b[1][1]+p],E=s(w),D=s(C);(M=f[E])?(k=d[D])?(delete f[M.end],delete d[k.start],M===k?(M.ring.push(C),u(M.ring)):d[M.start]=f[k.end]={start:M.start,end:k.end,ring:M.ring.concat(k.ring)}):(delete f[M.end],M.ring.push(C),f[M.end=D]=M):(M=d[D])?(k=f[E])?(delete d[M.start],delete f[k.end],M===k?(M.ring.push(C),u(M.ring)):d[k.start]=f[M.end]={start:k.start,end:M.end,ring:k.ring.concat(M.ring)}):(delete d[M.start],M.ring.unshift(w),d[M.start=E]=M):d[E]=f[D]={start:E,end:D,ring:[w,C]}}tu[_<<3].forEach(v)}(l,c,f=>{n(f,l,c),function cGe(e){for(var t=0,n=e.length,i=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];++t0?u.push([f]):d.push(f)}),d.forEach(f=>{for(var g,h=0,p=u.length;h{var m,f=d[0],h=d[1],p=0|f,g=0|h,_=c[g*e+p];f>0&&f0&&h=0&&u>=0||J("invalid size"),e=c,t=u,i},i.smooth=function(l){return arguments.length?(n=l?a:lGe,i):n===a},i}function uGe(e,t){for(var r,n=-1,i=t.length;++ni!=h>i&&n<(f-c)*(i-u)/(h-u)+c&&(r=-r)}return r}function fGe(e,t,n){var i;return function hGe(e,t,n){return(t[0]-e[0])*(n[1]-e[1])==(n[0]-e[0])*(t[1]-e[1])}(e,t,n)&&function pGe(e,t,n){return e<=t&&t<=n||n<=t&&t<=e}(e[i=+(e[0]===t[0])],n[i],t[i])}function qle(e,t,n){return function(i){var r=Al(i),o=n?Math.min(r[0],0):r[0],s=r[1],a=s-o,l=t?rd(o,s,e):a/(e+1);return Yo(o+l,s,l)}}function WB(e){K.call(this,null,e)}function Yle(e,t,n,i,r){const o=e.x1||0,s=e.y1||0,a=t*n<0;function l(d){d.forEach(c)}function c(d){a&&d.reverse(),d.forEach(u)}function u(d){d[0]=(d[0]-o)*t+i,d[1]=(d[1]-s)*n+r}return function(d){return d.coordinates.forEach(l),d}}function Kle(e,t,n){const i=e>=0?e:xL(t,n);return Math.round((Math.sqrt(4*i*i+1)-1)/2)}function qB(e){return it(e)?e:gr(+e)}function Xle(){var e=l=>l[0],t=l=>l[1],n=Dm,i=[-1,-1],r=960,o=500,s=2;function a(l,c){const u=Kle(i[0],l,e)>>s,d=Kle(i[1],l,t)>>s,f=u?u+2:0,h=d?d+2:0,p=2*f+(r>>s),g=2*h+(o>>s),m=new Float32Array(p*g),_=new Float32Array(p*g);let y=m;l.forEach(b=>{const w=f+(+e(b)>>s),C=h+(+t(b)>>s);w>=0&&w=0&&C0&&d>0?(f_(p,g,m,_,u),h_(p,g,_,m,d),f_(p,g,m,_,u),h_(p,g,_,m,d),f_(p,g,m,_,u),h_(p,g,_,m,d)):u>0?(f_(p,g,m,_,u),f_(p,g,_,m,u),f_(p,g,m,_,u),y=_):d>0&&(h_(p,g,m,_,d),h_(p,g,_,m,d),h_(p,g,m,_,d),y=_);const v=c?Math.pow(2,-2*s):1/wae(y);for(let b=0,w=p*g;b>s),y2:h+(o>>s)}}return a.x=function(l){return arguments.length?(e=qB(l),a):e},a.y=function(l){return arguments.length?(t=qB(l),a):t},a.weight=function(l){return arguments.length?(n=qB(l),a):n},a.size=function(l){if(!arguments.length)return[r,o];var c=+l[0],u=+l[1];return c>=0&&u>=0||J("invalid size"),r=c,o=u,a},a.cellSize=function(l){return arguments.length?((l=+l)>=1||J("invalid cell size"),s=Math.floor(Math.log(l)/Math.LN2),a):1<=r&&(a>=o&&(l-=n[a-o+s*e]),i[a-r+s*e]=l/Math.min(a+1,e-1+o-a,o))}function h_(e,t,n,i,r){const o=1+(r<<1);for(let s=0;s=r&&(a>=o&&(l-=n[s+(a-o)*e]),i[s+(a-r)*e]=l/Math.min(a+1,t-1+o-a,o))}function YB(e){K.call(this,null,e)}WB.Definition={type:"Isocontour",metadata:{generates:!0},params:[{name:"field",type:"field"},{name:"thresholds",type:"number",array:!0},{name:"levels",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"zero",type:"boolean",default:!0},{name:"smooth",type:"boolean",default:!0},{name:"scale",type:"number",expr:!0},{name:"translate",type:"number",array:!0,expr:!0},{name:"as",type:"string",null:!0,default:"contour"}]},me(WB,K,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=t.materialize(t.SOURCE).source,r=e.field||hr,o=Wle().smooth(!1!==e.smooth),s=e.thresholds||function gGe(e,t,n){const i=qle(n.levels||10,n.nice,!1!==n.zero);return"shared"!==n.resolve?i:i(e.map(r=>ph(t(r).values)))}(i,r,e),a=null===e.as?null:e.as||"contour",l=[];return i.forEach(c=>{const u=r(c),d=o.size([u.width,u.height])(u.values,te(s)?s:s(u.values));(function mGe(e,t,n,i){let r=i.scale||t.scale,o=i.translate||t.translate;if(it(r)&&(r=r(n,i)),it(o)&&(o=o(n,i)),(1===r||null==r)&&!o)return;const s=(At(r)?r:r[0])||1,a=(At(r)?r:r[1])||1;e.forEach(Yle(t,s,a,o&&o[0]||0,o&&o[1]||0))})(d,u,c,e),d.forEach(f=>{l.push(FS(c,Ft(null!=a?{[a]:f}:f)))})}),this.value&&(n.rem=this.value),this.value=n.source=n.add=l,n}}),YB.Definition={type:"KDE2D",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"weight",type:"field"},{name:"groupby",type:"field",array:!0},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number",array:!0,length:2},{name:"counts",type:"boolean",default:!1},{name:"as",type:"string",default:"grid"}]};const _Ge=["x","y","weight","size","cellSize","bandwidth"];function Qle(e,t){return _Ge.forEach(n=>null!=t[n]?e[n](t[n]):0),e}function KB(e){K.call(this,null,e)}me(YB,K,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var l,n=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=function yGe(e,t){var r,o,s,a,l,c,n=[],i=u=>u(a);if(null==t)n.push(e);else for(r={},o=0,s=e.length;oFt(function c(u,d){for(let f=0;f$e}).map(f)).concat(Yo(px(o/c)*c,r,c).filter(function(v){return vt(v%d)>$e}).map(h))}return _.lines=function(){return y().map(function(v){return{type:"LineString",coordinates:v}})},_.outline=function(){return{type:"Polygon",coordinates:[p(i).concat(g(s).slice(1),p(n).reverse().slice(1),g(a).reverse().slice(1))]}},_.extent=function(v){return arguments.length?_.extentMajor(v).extentMinor(v):_.extentMinor()},_.extentMajor=function(v){return arguments.length?(a=+v[0][1],s=+v[1][1],(i=+v[0][0])>(n=+v[1][0])&&(v=i,i=n,n=v),a>s&&(v=a,a=s,s=v),_.precision(m)):[[i,a],[n,s]]},_.extentMinor=function(v){return arguments.length?(o=+v[0][1],r=+v[1][1],(t=+v[0][0])>(e=+v[1][0])&&(v=t,t=e,e=v),o>r&&(v=o,o=r,r=v),_.precision(m)):[[t,o],[e,r]]},_.step=function(v){return arguments.length?_.stepMajor(v).stepMinor(v):_.stepMinor()},_.stepMajor=function(v){return arguments.length?(u=+v[0],d=+v[1],_):[u,d]},_.stepMinor=function(v){return arguments.length?(l=+v[0],c=+v[1],_):[l,c]},_.precision=function(v){return arguments.length?(m=+v,f=zle(o,r,90),h=Hle(t,e,m),p=zle(a,s,90),g=Hle(i,n,m),_):m},_.extentMajor([[-180,-90+$e],[180,90-$e]]).extentMinor([[-180,-80-$e],[180,80+$e]])}()}function i5(e){K.call(this,null,e)}function Zle(e){if(!it(e))return!1;const t=va(fr(e));return t.$x||t.$y||t.$value||t.$max}function Jle(e){K.call(this,null,e),this.modified(!0)}function ece(e,t,n){it(e[t])&&e[t](n)}function tce(e,t,n,i){if(isNaN(t)||isNaN(n))return e;var r,d,f,h,p,g,m,_,y,o=e._root,s={data:i},a=e._x0,l=e._y0,c=e._x1,u=e._y1;if(!o)return e._root=s,e;for(;o.length;)if((g=t>=(d=(a+c)/2))?a=d:c=d,(m=n>=(f=(l+u)/2))?l=f:u=f,r=o,!(o=o[_=m<<1|g]))return r[_]=s,e;if(h=+e._x.call(null,o.data),p=+e._y.call(null,o.data),t===h&&n===p)return s.next=o,r?r[_]=s:e._root=s,e;do{r=r?r[_]=new Array(4):e._root=new Array(4),(g=t>=(d=(a+c)/2))?a=d:c=d,(m=n>=(f=(l+u)/2))?l=f:u=f}while((_=m<<1|g)==(y=(p>=f)<<1|h>=d));return r[y]=o,r[_]=s,e}function zr(e,t,n,i,r){this.node=e,this.x0=t,this.y0=n,this.x1=i,this.y1=r}function UGe(e){return e[0]}function HGe(e){return e[1]}function r5(e,t,n){var i=new o5(t??UGe,n??HGe,NaN,NaN,NaN,NaN);return null==e?i:i.addAll(e)}function o5(e,t,n,i,r,o){this._x=e,this._y=t,this._x0=n,this._y0=i,this._x1=r,this._y1=o,this._root=void 0}function nce(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}ZB.Definition={type:"GeoJSON",metadata:{},params:[{name:"fields",type:"field",array:!0,length:2},{name:"geojson",type:"field"}]},me(ZB,K,{transform(e,t){var c,n=this._features,i=this._points,r=e.fields,o=r&&r[0],s=r&&r[1],a=e.geojson||!r&&hr,l=t.ADD;c=e.modified()||t.changed(t.REM)||t.modified(fr(a))||o&&t.modified(fr(o))||s&&t.modified(fr(s)),(!this.value||c)&&(l=t.SOURCE,this._features=n=[],this._points=i=[]),a&&t.visit(l,u=>n.push(a(u))),o&&s&&(t.visit(l,u=>{var d=o(u),f=s(u);null!=d&&null!=f&&(d=+d)===d&&(f=+f)===f&&i.push([d,f])}),n=n.concat({type:XB,geometry:{type:"MultiPoint",coordinates:i}})),this.value={type:QB,features:n}}}),JB.Definition={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"path"}]},me(JB,K,{transform(e,t){var n=t.fork(t.ALL),i=this.value,r=e.field||hr,o=e.as||"path",s=n.SOURCE;!i||e.modified()?(this.value=i=Ule(e.projection),n.materialize().reflow()):s=r===hr||t.modified(r.fields)?n.ADD_MOD:n.ADD;const a=function bGe(e,t){const n=e.pointRadius();return e.context(null),null!=t&&e.pointRadius(t),n}(i,e.pointRadius);return n.visit(s,l=>l[o]=i(r(l))),i.pointRadius(a),n.modifies(o)}}),e5.Definition={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]},me(e5,K,{transform(e,t){var l,n=e.projection,i=e.fields[0],r=e.fields[1],o=e.as||["x","y"],s=o[0],a=o[1];function c(u){const d=n([i(u),r(u)]);d?(u[s]=d[0],u[a]=d[1]):(u[s]=void 0,u[a]=void 0)}return e.modified()?t=t.materialize().reflow(!0).visit(t.SOURCE,c):(l=t.modified(i.fields)||t.modified(r.fields),t.visit(l?t.ADD_MOD:t.ADD,c)),t.modifies(o)}}),t5.Definition={type:"GeoShape",metadata:{modifies:!0,nomod:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"shape"}]},me(t5,K,{transform(e,t){var n=t.fork(t.ALL),i=this.value,r=e.as||"shape",o=n.ADD;return(!i||e.modified())&&(this.value=i=function wGe(e,t,n){const i=null==n?r=>e(t(r)):r=>{var o=e.pointRadius(),s=e.pointRadius(n)(t(r));return e.pointRadius(o),s};return i.context=r=>(e.context(r),i),i}(Ule(e.projection),e.field||As("datum"),e.pointRadius),n.materialize().reflow(),o=n.SOURCE),n.visit(o,s=>s[r]=i),n.modifies(r)}}),n5.Definition={type:"Graticule",metadata:{changes:!0,generates:!0},params:[{name:"extent",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMajor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMinor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"step",type:"number",array:!0,length:2},{name:"stepMajor",type:"number",array:!0,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:!0,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]},me(n5,K,{transform(e,t){var r,n=this.value,i=this.generator;if(!n.length||e.modified())for(const o in e)it(i[o])&&i[o](e[o]);return r=i(),n.length?t.mod.push(one(n[0],r)):t.add.push(Ft(r)),n[0]=r,t}}),i5.Definition={type:"heatmap",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"color",type:"string",expr:!0},{name:"opacity",type:"number",expr:!0},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"as",type:"string",default:"image"}]},me(i5,K,{transform(e,t){if(!t.changed()&&!e.modified())return t.StopPropagation;var n=t.materialize(t.SOURCE).source,i="shared"===e.resolve,r=e.field||hr,o=function CGe(e,t){let n;return it(e)?(n=i=>e(i,t),n.dep=Zle(e)):e?n=gr(e):(n=i=>i.$value/i.$max||0,n.dep=!0),n}(e.opacity,e),s=function EGe(e,t){let n;return it(e)?(n=i=>pd(e(i,t)),n.dep=Zle(e)):n=gr(pd(e||"#888")),n}(e.color,e),a=e.as||"image",l={$x:0,$y:0,$value:0,$max:i?ph(n.map(c=>ph(r(c).values))):0};return n.forEach(c=>{const u=r(c),d=rt({},c,l);i||(d.$max=ph(u.values||[])),c[a]=function DGe(e,t,n,i){const r=e.width,s=e.x1||0,a=e.y1||0,l=e.x2||r,c=e.y2||e.height,u=e.values,d=u?m=>u[m]:Ju,f=fd(l-s,c-a),h=f.getContext("2d"),p=h.getImageData(0,0,l-s,c-a),g=p.data;for(let m=a,_=0;m{null!=e[i]&&ece(n,i,e[i])})):HB.forEach(i=>{e.modified(i)&&ece(n,i,e[i])}),null!=e.pointRadius&&n.path.pointRadius(e.pointRadius),e.fit&&function SGe(e,t){const n=function xGe(e){return 1===(e=Ee(e)).length?e[0]:{type:QB,features:e.reduce((t,n)=>t.concat(function AGe(e){return e.type===QB?e.features:Ee(e).filter(t=>null!=t).map(t=>t.type===XB?t:{type:XB,geometry:t})}(n)),[])}}(t.fit);t.extent?e.fitExtent(t.extent,n):t.size&&e.fitSize(t.size,n)}(n,e),t.fork(t.NO_SOURCE|t.NO_FIELDS)}});var Hr=r5.prototype=o5.prototype;function Gr(e){return function(){return e}}function kd(e){return 1e-6*(e()-.5)}function WGe(e){return e.x+e.vx}function qGe(e){return e.y+e.vy}Hr.copy=function(){var n,i,e=new o5(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root;if(!t)return e;if(!t.length)return e._root=nce(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var r=0;r<4;++r)(i=t.source[r])&&(i.length?n.push({source:i,target:t.target[r]=new Array(4)}):t.target[r]=nce(i));return e},Hr.add=function NGe(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return tce(this.cover(t,n),t,n,e)},Hr.addAll=function IGe(e){var t,n,r,o,i=e.length,s=new Array(i),a=new Array(i),l=1/0,c=1/0,u=-1/0,d=-1/0;for(n=0;nu&&(u=r),od&&(d=o));if(l>u||c>d)return this;for(this.cover(l,c).cover(u,d),n=0;ne||e>=r||i>t||t>=o;)switch(c=(tu||(a=p.y0)>d||(l=p.x1)=_)<<1|e>=m)&&(p=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=p)}else{var y=e-+this._x.call(null,h.data),v=t-+this._y.call(null,h.data),b=y*y+v*v;if(b=(f=(s+l)/2))?s=f:l=f,(g=d>=(h=(a+c)/2))?a=h:c=h,t=n,!(n=n[m=g<<1|p]))return this;if(!n.length)break;(t[m+1&3]||t[m+2&3]||t[m+3&3])&&(i=t,_=m)}for(;n.data!==e;)if(r=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,r?(o?r.next=o:delete r.next,this):t?(o?t[m]=o:delete t[m],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(i?i[_]=n:this._root=n),this):(this._root=o,this)},Hr.removeAll=function LGe(e){for(var t=0,n=e.length;t{}};function ice(){for(var i,e=0,t=arguments.length,n={};e=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}(e+"",n),o=-1,s=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o0)for(var r,o,n=new Array(r),i=0;i=0&&e._call.call(void 0,t),e=e._next;--p_}()}finally{p_=0,function nWe(){for(var e,n,t=jx,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:jx=n);nb=e,a5(i)}(),kh=0}}function tWe(){var e=ib.now(),t=e-Vx;t>oce&&(Ux-=t,Vx=e)}function a5(e){p_||(eb&&(eb=clearTimeout(eb)),e-kh>24?(e<1/0&&(eb=setTimeout(lce,e-ib.now()-Ux)),tb&&(tb=clearInterval(tb))):(tb||(Vx=ib.now(),tb=setInterval(tWe,oce)),p_=1,sce(lce)))}zx.prototype=ace.prototype={constructor:zx,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?s5():+n)+(null==t?0:+t),!this._next&&nb!==this&&(nb?nb._next=this:jx=this,nb=this),this._call=e,this._time=n,a5()},stop:function(){this._call&&(this._call=null,this._time=1/0,a5())}};function sWe(e){return e.x}function aWe(e){return e.y}var cWe=Math.PI*(3-Math.sqrt(5));function fWe(e){return e.index}function uce(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}const dce={center:function MGe(e,t){var n,i=1;function r(){var o,a,s=n.length,l=0,c=0;for(o=0;oh+k||Cp+k||Ef.index){var R=h-D.x-D.vx,F=p-D.y-D.vy,P=R*R+F*F;Pc.r&&(c.r=c[u].r)}function l(){if(t){var c,d,u=t.length;for(n=new Array(u),c=0;c=a)){(h.data!==t||h.next)&&(0===_&&(b+=(_=kd(n))*_),0===y&&(b+=(y=kd(n))*y),b[t(w,C,s),w]));for(m=0,a=new Array(_);mt(i,n):t)}function EWe(e){var t=0,n=e.children,i=n&&n.length;if(i)for(;--i>=0;)t+=n[i].value;else t=1;e.value=t}function u5(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=BWe)):void 0===t&&(t=$We);for(var i,o,s,a,l,n=new g_(e),r=[n];i=r.pop();)if((s=t(i.data))&&(l=(s=Array.from(s)).length))for(i.children=s,a=l-1;a>=0;--a)r.push(o=s[a]=new g_(s[a])),o.parent=i,o.depth=i.depth+1;return n.eachBefore(pce)}function $We(e){return e.children}function BWe(e){return Array.isArray(e)?e[1]:null}function jWe(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function pce(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function g_(e){this.data=e,this.depth=this.height=0,this.parent=null}function Hx(e){return null==e?null:gce(e)}function gce(e){if("function"!=typeof e)throw new Error;return e}function Oh(){return 0}function m_(e){return function(){return e}}c5.Definition={type:"Force",metadata:{modifies:!0},params:[{name:"static",type:"boolean",default:!1},{name:"restart",type:"boolean",default:!1},{name:"iterations",type:"number",default:300},{name:"alpha",type:"number",default:1},{name:"alphaMin",type:"number",default:.001},{name:"alphaTarget",type:"number",default:0},{name:"velocityDecay",type:"number",default:.4},{name:"forces",type:"param",array:!0,params:[{key:{force:"center"},params:[{name:"x",type:"number",default:0},{name:"y",type:"number",default:0}]},{key:{force:"collide"},params:[{name:"radius",type:"number",expr:!0},{name:"strength",type:"number",default:.7},{name:"iterations",type:"number",default:1}]},{key:{force:"nbody"},params:[{name:"strength",type:"number",default:-30,expr:!0},{name:"theta",type:"number",default:.9},{name:"distanceMin",type:"number",default:1},{name:"distanceMax",type:"number"}]},{key:{force:"link"},params:[{name:"links",type:"data"},{name:"id",type:"field"},{name:"distance",type:"number",default:30,expr:!0},{name:"strength",type:"number",expr:!0},{name:"iterations",type:"number",default:1}]},{key:{force:"x"},params:[{name:"strength",type:"number",default:.1},{name:"x",type:"field"}]},{key:{force:"y"},params:[{name:"strength",type:"number",default:.1},{name:"y",type:"field"}]}]},{name:"as",type:"string",array:!0,modify:!1,default:fce}]},me(c5,K,{transform(e,t){var n=this.value,i=t.changed(t.ADD_REM),r=e.modified(l5),o=e.iterations||300;if(n?(i&&(t.modifies("index"),n.nodes(t.source)),(r||t.changed(t.MOD))&&hce(n,e,0,t)):(this.value=n=function yWe(e,t){const n=function uWe(e){var t,n=1,i=.001,r=1-Math.pow(i,1/300),o=0,s=.6,a=new Map,l=ace(d),c=ZGe("tick","end"),u=function oWe(){let e=1;return()=>(e=(1664525*e+1013904223)%4294967296)/4294967296}();function d(){f(),c.call("tick",t),n1?(null==m?a.delete(g):a.set(g,p(m)),t):a.get(g)},find:function(g,m,_){var b,w,C,E,D,y=0,v=e.length;for(null==_?_=1/0:_*=_,y=0;y1?(c.on(g,m),t):c.on(g)}}}(e),i=n.stop,r=n.restart;let o=!1;return n.stopped=()=>o,n.restart=()=>(o=!1,r()),n.stop=()=>(o=!0,i()),hce(n,t,!0).on("end",()=>o=!0)}(t.source,e),n.on("tick",function _We(e,t){return()=>e.touch(t).run()}(t.dataflow,this)),e.static||(i=!0,n.tick()),t.modifies("index")),r||i||e.modified(mWe)||t.changed()&&e.restart)if(n.alpha(Math.max(n.alpha(),e.alpha||1)).alphaDecay(1-Math.pow(n.alphaMin(),1/o)),e.static)for(n.stop();--o>=0;)n.tick();else if(n.stopped()&&n.restart(),!i)return t.StopPropagation;return this.finish(e,t)},finish(e,t){const n=t.dataflow;for(let u,a=this._argops,l=0,c=a.length;l=0;--o)i.push(r[o]);return this},find:function xWe(e,t){let n=-1;for(const i of this)if(e.call(t,i,++n,this))return i},sum:function AWe(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,i=t.children,r=i&&i.length;--r>=0;)n+=i[r].value;t.value=n})},sort:function MWe(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function NWe(e){for(var t=this,n=function IWe(e,t){if(e===t)return e;var n=e.ancestors(),i=t.ancestors(),r=null;for(e=n.pop(),t=i.pop();e===t;)r=e,e=n.pop(),t=i.pop();return r}(t,e),i=[t];t!==n;)i.push(t=t.parent);for(var r=i.length;e!==n;)i.splice(r,0,e),e=e.parent;return i},ancestors:function kWe(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function OWe(){return Array.from(this)},leaves:function RWe(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function FWe(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function LWe(){return u5(this).eachBefore(jWe)},[Symbol.iterator]:function*PWe(){var t,i,r,o,e=this,n=[e];do{for(t=n.reverse(),n=[];e=t.pop();)if(yield e,i=e.children)for(r=0,o=i.length;r0&&n*n>i*i+r*r}function d5(e,t){for(var n=0;n1e-6?(R+Math.sqrt(R*R-4*k*F))/(2*k):F/R);return{x:i+C+E*P,y:r+D+M*P,r:P}}function bce(e,t,n){var r,o,a,l,i=e.x-t.x,s=e.y-t.y,c=i*i+s*s;c?(o=t.r+n.r,l=e.r+n.r,(o*=o)>(l*=l)?(r=(c+l-o)/(2*c),a=Math.sqrt(Math.max(0,l/c-r*r)),n.x=e.x-r*i-a*s,n.y=e.y-r*s+a*i):(r=(c+o-l)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x+r*i-a*s,n.y=t.y+r*s+a*i)):(n.x=t.x+n.r,n.y=t.y)}function wce(e,t){var n=e.r+t.r-1e-6,i=t.x-e.x,r=t.y-e.y;return n>0&&n*n>i*i+r*r}function Ece(e){var t=e._,n=e.next._,i=t.r+n.r,r=(t.x*n.r+n.x*t.r)/i,o=(t.y*n.r+n.y*t.r)/i;return r*r+o*o}function Wx(e){this._=e,this.next=null,this.previous=null}function Cce(e,t){if(!(o=(e=function HWe(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}(e)).length))return 0;var n,i,r,o,s,a,l,c,u,d,f;if((n=e[0]).x=0,n.y=0,!(o>1))return n.r;if(n.x=-(i=e[1]).r,i.x=n.r,i.y=0,!(o>2))return n.r+i.r;bce(i,n,r=e[2]),n=new Wx(n),i=new Wx(i),r=new Wx(r),n.next=r.previous=i,i.next=n.previous=r,r.next=i.previous=n;e:for(l=3;lfunction tqe(e){let t=(e=`${e}`).length;return p5(e,t-1)&&!p5(e,t-2)&&(e=e.slice(0,-1)),"/"===e[0]?e:`/${e}`}(n(b,w,r))),y=_.map(Mce),v=new Set(_).add("");for(const b of y)v.has(b)||(v.add(b),_.push(b),y.push(Mce(b)),o.push(h5));s=(b,w)=>_[w],a=(b,w)=>y[w]}for(u=0,l=o.length;u=0&&(h=o[_]).data===h5;--_)h.data=null}if(d.parent=ZWe,d.eachBefore(function(_){_.depth=_.parent.depth+1,--l}).eachBefore(pce),d.parent=null,l>0)throw new Error("cycle");return d}return i.id=function(r){return arguments.length?(e=Hx(r),i):e},i.parentId=function(r){return arguments.length?(t=Hx(r),i):t},i.path=function(r){return arguments.length?(n=Hx(r),i):n},i}function Mce(e){let t=e.length;if(t<2)return"";for(;--t>1&&!p5(e,t););return e.slice(0,t)}function p5(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function nqe(e,t){return e.parent===t.parent?1:2}function g5(e){var t=e.children;return t?t[0]:e.t}function m5(e){var t=e.children;return t?t[t.length-1]:e.t}function iqe(e,t,n){var i=n/(t.i-e.i);t.c-=i,t.s+=n,e.c+=i,t.z+=n,t.m+=n}function oqe(e,t,n){return e.a.parent===t.parent?e.a:n}function qx(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function lqe(e,t){return e.parent===t.parent?1:2}function uqe(e,t){return e+t.x}function fqe(e,t){return Math.max(e,t.y)}function Yx(e,t,n,i,r){for(var s,o=e.children,a=-1,l=o.length,c=e.value&&(r-n)/e.value;++ay&&(y=c),C=m*m*w,(v=Math.max(y/C,C/_))>b){m-=c;break}b=v}s.push(l={value:m,dice:h1?i:1)},n}(Nce),yqe=function e(t){function n(i,r,o,s,a){if((l=i._squarify)&&l.ratio===t)for(var l,c,u,d,h,f=-1,p=l.length,g=i.value;++f1?i:1)},n}(Nce);function _5(e,t,n){const i={};return e.each(r=>{const o=r.data;n(o)&&(i[t(o)]=r)}),e.lookup=i,e}function y5(e){K.call(this,null,e)}y5.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]};const bqe=e=>e.values;function wqe(){const e=[],t={entries:r=>i(n(r,0),0),key:r=>(e.push(r),t)};function n(r,o){if(o>=e.length)return r;const s=r.length,a=e[o++],l={},c={};let d,f,h,u=-1;for(;++ue.length)return r;const s=[];for(const a in r)s.push({key:a,values:i(r[a],o)});return s}return t}function nu(e){K.call(this,null,e)}me(y5,K,{transform(e,t){t.source||J("Nest transform requires an upstream data source.");var n=e.generate,i=e.modified(),r=t.clone(),o=this.value;return(!o||i||t.changed())&&(o&&o.each(s=>{s.children&&RS(s.data)&&r.rem.push(s.data)}),this.value=o=u5({values:Ee(e.keys).reduce((s,a)=>(s.key(a),s),wqe()).entries(r.source)},bqe),n&&o.each(s=>{s.children&&(s=Ft(s.data),r.add.push(s),r.source.push(s))}),_5(o,Fe,Fe)),r.source.root=o,r}});const Eqe=(e,t)=>e.parent===t.parent?1:2;me(nu,K,{transform(e,t){(!t.source||!t.source.root)&&J(this.constructor.name+" transform requires a backing tree data source.");const n=this.layout(e.method),i=this.fields,r=t.source.root,o=e.as||i;e.field?r.sum(e.field):r.count(),e.sort&&r.sort(fh(e.sort,s=>s.data)),function Cqe(e,t,n){for(let i,r=0,o=t.length;rfunction Dqe(e,t,n){const i=e.data,r=t.length-1;for(let o=0;o(e=(1664525*e+1013904223)%4294967296)/4294967296}();return o.x=t/2,o.y=n/2,e?o.eachBefore(Dce(e)).eachAfter(f5(i,.5,s)).eachBefore(Sce(1)):o.eachBefore(Dce(KWe)).eachAfter(f5(Oh,1,s)).eachAfter(f5(i,o.r/Math.min(t,n),s)).eachBefore(Sce(Math.min(t,n)/(2*o.r))),o}return r.radius=function(o){return arguments.length?(e=Hx(o),r):e},r.size=function(o){return arguments.length?(t=+o[0],n=+o[1],r):[t,n]},r.padding=function(o){return arguments.length?(i="function"==typeof o?o:m_(+o),r):i},r},params:["radius","size","padding"],fields:v5});const w5=["x0","y0","x1","y1","depth","children"];function E5(e){nu.call(this,e)}function C5(e){K.call(this,null,e)}E5.Definition={type:"Partition",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"padding",type:"number",default:0},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:w5.length,default:w5}]},me(E5,nu,{layout:function QWe(){var e=1,t=1,n=0,i=!1;function r(s){var a=s.height+1;return s.x0=s.y0=n,s.x1=e,s.y1=t/a,s.eachBefore(function o(s,a){return function(l){l.children&&sb(l,l.x0,s*(l.depth+1)/a,l.x1,s*(l.depth+2)/a);var c=l.x0,u=l.y0,d=l.x1-n,f=l.y1-n;d=0;--s)i.push(r=n.children[s]=new qx(o[s],s)),r.parent=n;return(t.parent=new qx(null,0)).children=[t],t}(c);if(u.eachAfter(o),u.parent.m=-u.z,u.eachBefore(s),i)c.eachBefore(l);else{var d=c,f=c,h=c;c.eachBefore(function(y){y.xf.x&&(f=y),y.depth>h.depth&&(h=y)});var p=d===f?1:e(d,f)/2,g=p-d.x,m=t/(f.x+p+g),_=n/(h.depth||1);c.eachBefore(function(y){y.x=(y.x+g)*m,y.y=y.depth*_})}return c}function o(c){var u=c.children,d=c.parent.children,f=c.i?d[c.i-1]:null;if(u){!function rqe(e){for(var o,t=0,n=0,i=e.children,r=i.length;--r>=0;)(o=i[r]).z+=t,o.m+=t,t+=o.s+(n+=o.c)}(c);var h=(u[0].z+u[u.length-1].z)/2;f?(c.z=f.z+e(c._,f._),c.m=c.z-h):c.z=h}else f&&(c.z=f.z+e(c._,f._));c.parent.A=function a(c,u,d){if(u){for(var b,f=c,h=c,p=u,g=f.parent.children[0],m=f.m,_=h.m,y=p.m,v=g.m;p=m5(p),f=g5(f),p&&f;)g=g5(g),(h=m5(h)).a=c,(b=p.z+y-f.z-m+e(p._,f._))>0&&(iqe(oqe(p,c,d),c,b),m+=b,_+=b),y+=p.m,m+=f.m,v+=g.m,_+=h.m;p&&!m5(h)&&(h.t=p,h.m+=y-_),f&&!g5(g)&&(g.t=f,g.m+=m-v,d=c)}return d}(c,f,c.parent.A||d[0])}function s(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function l(c){c.x*=t,c.y=c.depth*n}return r.separation=function(c){return arguments.length?(e=c,r):e},r.size=function(c){return arguments.length?(i=!1,t=+c[0],n=+c[1],r):i?null:[t,n]},r.nodeSize=function(c){return arguments.length?(i=!0,t=+c[0],n=+c[1],r):i?[t,n]:null},r},cluster:function gqe(){var e=lqe,t=1,n=1,i=!1;function r(o){var s,a=0;o.eachAfter(function(f){var h=f.children;h?(f.x=function cqe(e){return e.reduce(uqe,0)/e.length}(h),f.y=function dqe(e){return 1+e.reduce(fqe,0)}(h)):(f.x=s?a+=e(f,s):0,f.y=0,s=f)});var l=function hqe(e){for(var t;t=e.children;)e=t[0];return e}(o),c=function pqe(e){for(var t;t=e.children;)e=t[t.length-1];return e}(o),u=l.x-e(l,c)/2,d=c.x+e(c,l)/2;return o.eachAfter(i?function(f){f.x=(f.x-o.x)*t,f.y=(o.y-f.y)*n}:function(f){f.x=(f.x-u)/(d-u)*t,f.y=(1-(o.y?f.y/o.y:1))*n})}return r.separation=function(o){return arguments.length?(e=o,r):e},r.size=function(o){return arguments.length?(i=!1,t=+o[0],n=+o[1],r):i?null:[t,n]},r.nodeSize=function(o){return arguments.length?(i=!0,t=+o[0],n=+o[1],r):i?[t,n]:null},r}},D5=["x","y","depth","children"];function S5(e){nu.call(this,e)}function T5(e){K.call(this,[],e)}S5.Definition={type:"Tree",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"tidy",values:["tidy","cluster"]},{name:"size",type:"number",array:!0,length:2},{name:"nodeSize",type:"number",array:!0,length:2},{name:"separation",type:"boolean",default:!0},{name:"as",type:"string",array:!0,length:D5.length,default:D5}]},me(S5,nu,{layout(e){const t=e||"tidy";if(De(Oce,t))return Oce[t]();J("Unrecognized Tree layout method: "+t)},params:["size","nodeSize"],fields:D5}),T5.Definition={type:"TreeLinks",metadata:{tree:!0,generates:!0,changes:!0},params:[]},me(T5,K,{transform(e,t){const n=this.value,i=t.source&&t.source.root,r=t.fork(t.NO_SOURCE),o={};return i||J("TreeLinks transform requires a tree data source."),t.changed(t.ADD_REM)?(r.rem=n,t.visit(t.SOURCE,s=>o[Fe(s)]=1),i.each(s=>{const a=s.data,l=s.parent&&s.parent.data;l&&o[Fe(a)]&&o[Fe(l)]&&r.add.push(Ft({source:l,target:a}))}),this.value=r.add):t.changed(t.MOD)&&(t.visit(t.MOD,s=>o[Fe(s)]=1),n.forEach(s=>{(o[Fe(s.source)]||o[Fe(s.target)])&&r.mod.push(s)})),r}});const Rce={binary:function mqe(e,t,n,i,r){var s,l,o=e.children,a=o.length,c=new Array(a+1);for(c[0]=l=s=0;s=f-1){var y=o[d];return y.x0=p,y.y0=g,y.x1=m,void(y.y1=_)}for(var v=c[d],b=h/2+v,w=d+1,C=f-1;w>>1;c[E]_-g){var k=h?(p*M+m*D)/h:m;u(d,w,D,p,g,k,_),u(w,f,M,k,g,m,_)}else{var R=h?(g*M+_*D)/h:_;u(d,w,D,p,g,m,R),u(w,f,M,p,R,m,_)}}(0,a,e.value,t,n,i,r)},dice:sb,slice:Yx,slicedice:function _qe(e,t,n,i,r){(1&e.depth?Yx:sb)(e,t,n,i,r)},squarify:kce,resquarify:yqe},x5=["x0","y0","x1","y1","depth","children"];function A5(e){nu.call(this,e)}A5.Definition={type:"Treemap",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"squarify",values:["squarify","resquarify","binary","dice","slice","slicedice"]},{name:"padding",type:"number",default:0},{name:"paddingInner",type:"number",default:0},{name:"paddingOuter",type:"number",default:0},{name:"paddingTop",type:"number",default:0},{name:"paddingRight",type:"number",default:0},{name:"paddingBottom",type:"number",default:0},{name:"paddingLeft",type:"number",default:0},{name:"ratio",type:"number",default:1.618033988749895},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:x5.length,default:x5}]},me(A5,nu,{layout(){const e=function vqe(){var e=kce,t=!1,n=1,i=1,r=[0],o=Oh,s=Oh,a=Oh,l=Oh,c=Oh;function u(f){return f.x0=f.y0=0,f.x1=n,f.y1=i,f.eachBefore(d),r=[0],t&&f.eachBefore(Tce),f}function d(f){var h=r[f.depth],p=f.x0+h,g=f.y0+h,m=f.x1-h,_=f.y1-h;m{const n=e.tile();n.ratio&&e.tile(n.ratio(t))},e.method=t=>{De(Rce,t)?e.tile(Rce[t]):J("Unrecognized Treemap layout method: "+t)},e},params:["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],fields:x5});const M5=4278190080;function N5(e,t,n){return new Uint32Array(e.getImageData(0,0,t,n).data.buffer)}function Kx(e,t,n){if(!t.length)return;const i=t[0].mark.marktype;"group"===i?t.forEach(r=>{r.items.forEach(o=>Kx(e,o.items,n))}):Xo[i].draw(e,{items:n?t.map(xqe):t})}function xqe(e){const t=FS(e,{});return t.stroke&&0!==t.strokeOpacity||t.fill&&0!==t.fillOpacity?{...t,strokeOpacity:1,stroke:"#000",fillOpacity:0}:t}const iu=5,Wr=31,ab=32,Od=new Uint32Array(ab+1),Na=new Uint32Array(ab+1);Na[0]=0,Od[0]=~Na[0];for(let e=1;e<=ab;++e)Na[e]=Na[e-1]<<1|1,Od[e]=~Na[e];function Xx(e,t,n,i,r,o){let s=n/2;return e-s<0||e+s>r||t-(s=i/2)<0||t+s>o}function Rd(e,t,n,i,r,o,s,a){const l=r*o/(2*i),c=e(t-l),u=e(t+l),d=e(n-(o/=2)),f=e(n+o);return s.outOfBounds(c,d,u,f)||s.getRange(c,d,u,f)||a&&a.getRange(c,d,u,f)}const kqe=[-1,-1,1,1],Oqe=[-1,1,-1,1],Fqe=["right","center","left"],Pqe=["bottom","middle","top"];function Fce(e,t,n,i,r,o,s,a,l,c,u,d){return!(r.outOfBounds(e,n,t,i)||(d&&o||r).getRange(e,n,t,i))}const $qe={"top-left":0,top:1,"top-right":2,left:4,middle:5,right:6,"bottom-left":8,bottom:9,"bottom-right":10},Bqe={naive:function Nqe(e,t,n,i){const r=e.width,o=e.height;return function(s){const a=s.datum.datum.items[i].items,l=a.length,c=s.datum.fontSize,u=Ko.width(s.datum,s.datum.text);let f,h,p,g,m,_,y,d=0;for(let v=0;v=d&&(d=y,s.x=m,s.y=_);return m=u/2,_=c/2,f=s.x-m,h=s.x+m,p=s.y-_,g=s.y+_,s.align="center",f<0&&h<=r?s.align="left":0<=f&&r=1;)y=(m+_)/2,Rd(e,p,g,h,f,y,s,a)?_=y:m=y;if(m>d)return[p,g,m,!0]}}return function(c){const u=c.datum.datum.items[i].items,d=u.length,f=c.datum.fontSize,h=Ko.width(c.datum,c.datum.text);let y,v,b,w,C,E,D,M,k,R,F,P,T,S,x,I,A,p=n?f:0,g=!1,m=!1,_=0;for(let N=0;Nv&&(A=y,y=v,v=A),b>w&&(A=b,b=w,w=A),k=e(y),F=e(v),R=~~((k+F)/2),P=e(b),S=e(w),T=~~((P+S)/2),D=R;D>=k;--D)for(M=T;M>=P;--M)I=l(D,M,p,h,f),I&&([c.x,c.y,p,g]=I);for(D=R;D<=F;++D)for(M=T;M<=S;++M)I=l(D,M,p,h,f),I&&([c.x,c.y,p,g]=I);!g&&!n&&(x=Math.abs(v-y+w-b),C=(y+v)/2,E=(b+w)/2,x>=_&&!Xx(C,E,h,f,r,o)&&!Rd(e,C,E,f,h,f,s,null)&&(_=x,c.x=C,c.y=E,m=!0))}return!(!g&&!m||(C=h/2,E=f/2,s.setRange(e(c.x-C),e(c.y-E),e(c.x+C),e(c.y+E)),c.align="center",c.baseline="middle",0))}},floodfill:function Rqe(e,t,n,i){const r=e.width,o=e.height,s=t[0],a=t[1],l=e.bitmap();return function(c){const u=c.datum.datum.items[i].items,d=u.length,f=c.datum.fontSize,h=Ko.width(c.datum,c.datum.text),p=[];let v,b,w,C,E,D,M,k,R,F,P,T,g=n?f:0,m=!1,_=!1,y=0;for(let S=0;S=1;)P=(R+F)/2,Rd(e,E,D,f,h,P,s,a)?F=P:R=P;R>g&&(c.x=E,c.y=D,g=R,m=!0)}}!m&&!n&&(T=Math.abs(b-v+C-w),E=(v+b)/2,D=(w+C)/2,T>=y&&!Xx(E,D,h,f,r,o)&&!Rd(e,E,D,f,h,f,s,null)&&(y=T,c.x=E,c.y=D,_=!0))}return!(!m&&!_||(E=h/2,D=f/2,s.setRange(e(c.x-E),e(c.y-D),e(c.x+E),e(c.y+D)),c.align="center",c.baseline="middle",0))}}};function jqe(e,t,n,i,r,o,s,a,l,c,u){if(!e.length)return e;const d=Math.max(i.length,r.length),f=function Vqe(e,t){const n=new Float64Array(t),i=e.length;for(let r=0;r[o.x,o.x,o.x,o.y,o.y,o.y];return e?"line"===e||"area"===e?o=>r(o.datum):"line"===t?o=>{const s=o.datum.items[i].items;return r(s.length?s["start"===n?0:s.length-1]:{x:NaN,y:NaN})}:o=>{const s=o.datum.bounds;return[s.x1,(s.x1+s.x2)/2,s.x2,s.y1,(s.y1+s.y2)/2,s.y2]}:r}(p,g,a,l),y=null===c||c===1/0,v=m&&"naive"===u;let b=-1,w=-1;const C=e.map(k=>{const R=y?Ko.width(k,k.text):void 0;return b=Math.max(b,R),w=Math.max(w,k.fontSize),{datum:k,opacity:0,x:void 0,y:void 0,align:void 0,baseline:void 0,boundary:_(k),textWidth:R}});c=null===c||c===1/0?Math.max(b,w)+Math.max(...i):c;const E=function Mqe(e,t,n){const i=Math.max(1,Math.sqrt(e*t/1e6)),r=~~((e+2*n+i)/i),o=~~((t+2*n+i)/i),s=a=>~~((a+n)/i);return s.invert=a=>a*i-n,s.bitmap=()=>function Aqe(e,t){const n=new Uint32Array(~~((e*t+ab)/ab));function i(o,s){n[o]|=s}function r(o,s){n[o]&=s}return{array:n,get:(o,s)=>{const a=s*e+o;return n[a>>>iu]&1<<(a&Wr)},set:(o,s)=>{const a=s*e+o;i(a>>>iu,1<<(a&Wr))},clear:(o,s)=>{const a=s*e+o;r(a>>>iu,~(1<<(a&Wr)))},getRange:(o,s,a,l)=>{let u,d,f,h,c=l;for(;c>=s;--c)if(u=c*e+o,d=c*e+a,f=u>>>iu,h=d>>>iu,f===h){if(n[f]&Od[u&Wr]&Na[1+(d&Wr)])return!0}else{if(n[f]&Od[u&Wr]||n[h]&Na[1+(d&Wr)])return!0;for(let p=f+1;p{let c,u,d,f,h;for(;s<=l;++s)if(c=s*e+o,u=s*e+a,d=c>>>iu,f=u>>>iu,d===f)i(d,Od[c&Wr]&Na[1+(u&Wr)]);else for(i(d,Od[c&Wr]),i(f,Na[1+(u&Wr)]),h=d+1;h{let c,u,d,f,h;for(;s<=l;++s)if(c=s*e+o,u=s*e+a,d=c>>>iu,f=u>>>iu,d===f)r(d,Na[c&Wr]|Od[1+(u&Wr)]);else for(r(d,Na[c&Wr]),r(f,Od[1+(u&Wr)]),h=d+1;ho<0||s<0||l>=t||a>=e}}(r,o),s.ratio=i,s.padding=n,s.width=e,s.height=t,s}(t[0],t[1],c);let D;if(!v){n&&C.sort((F,P)=>n(F.datum,P.datum));let k=!1;for(let F=0;FF.datum);D=o.length||R?function Tqe(e,t,n,i,r){const o=e.width,s=e.height,a=i||r,l=fd(o,s).getContext("2d"),c=fd(o,s).getContext("2d"),u=a&&fd(o,s).getContext("2d");n.forEach(D=>Kx(l,D,!1)),Kx(c,t,!1),a&&Kx(u,t,!0);const d=N5(l,o,s),f=N5(c,o,s),h=a&&N5(u,o,s),p=e.bitmap(),g=a&&e.bitmap();let m,_,y,v,b,w,C,E;for(_=0;_n.set(e(i.boundary[0]),e(i.boundary[3]))),[n,void 0]}(E,s&&C)}const M=m?Bqe[u](E,D,s,l):function Lqe(e,t,n,i){const r=e.width,o=e.height,s=t[0],a=t[1],l=i.length;return function(c){const u=c.boundary,d=c.datum.fontSize;if(u[2]<0||u[5]<0||u[0]>r||u[3]>o)return!1;let h,p,g,m,_,y,v,b,w,C,E,D,M,k,R,f=c.textWidth??0;for(let F=0;F>>2&3)-1,g=0===h&&0===p||i[F]<0,m=h&&p?Math.SQRT1_2:1,_=i[F]<0?-1:1,y=u[1+h]+i[F]*h*m,E=u[4+p]+_*d*p/2+i[F]*p*m,b=E-d/2,w=E+d/2,D=e(y),k=e(b),R=e(w),!f){if(!Fce(D,D,k,R,s,a,0,0,0,0,0,g))continue;f=Ko.width(c.datum,c.datum.text)}if(C=y+_*f*h/2,y=C-f/2,v=C+f/2,D=e(y),M=e(v),Fce(D,M,k,R,s,a,0,0,0,0,0,g))return c.x=h?h*_<0?v:y:C,c.y=p?p*_<0?w:b:E,c.align=Fqe[h*_+1],c.baseline=Pqe[p*_+1],s.setRange(D,k,M,R),!0}return!1}}(E,D,h,f);return C.forEach(k=>k.opacity=+M(k)),C}const L5=["x","y","opacity","align","baseline"],Pce=["top-left","left","bottom-left","top","bottom","top-right","right","bottom-right"];function $5(e){K.call(this,null,e)}function Lce(e,t){var r,o,s,a,l,c,n=[],i=function(u){return u(a)};if(null==t)n.push(e);else for(r={},o=0,s=e.length;o{const s=o.datum;s[r[0]]=o.x,s[r[1]]=o.y,s[r[2]]=o.opacity,s[r[3]]=o.align,s[r[4]]=o.baseline}),t.reflow(i).modifies(r)}}),B5.Definition={type:"Loess",metadata:{generates:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"bandwidth",type:"number",default:.3},{name:"as",type:"string",array:!0}]},me(B5,K,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const r=Lce(t.materialize(t.SOURCE).source,e.groupby),o=(e.groupby||[]).map($n),s=o.length,a=e.as||[$n(e.x),$n(e.y)],l=[];r.forEach(c=>{Pne(c,e.x,e.y,e.bandwidth||.3).forEach(u=>{const d={};for(let f=0;f"poly"===e?t:"quad"===e?2:1)(s,a),c=e.as||[$n(e.x),$n(e.y)],u=j5[s],d=[];let f=e.extent;De(j5,s)||J("Invalid regression method: "+s),null!=f&&"log"===s&&f[0]<=0&&(t.dataflow.warn("Ignoring extent with values <= 0 for log regression."),f=null),r.forEach(h=>{if(h.length<=l)return void t.dataflow.warn("Skipping regression with more parameters than data points.");const g=u(h,e.x,e.y,a);if(e.params)return void d.push(Ft({keys:h.dims,coef:g.coef,rSquared:g.rSquared}));const m=f||Al(h,e.x),_=y=>{const v={};for(let b=0;b_([y,g.predict(y)])):WS(g.predict,m,25,200).forEach(_)}),this.value&&(n.rem=this.value),this.value=n.add=n.source=d}return n}});const Bt=11102230246251565e-32,Di=134217729,Wqe=(3+8*Bt)*Bt;function lb(e,t,n,i,r){let o,s,a,l,c=t[0],u=i[0],d=0,f=0;u>c==u>-c?(o=c,c=t[++d]):(o=u,u=i[++f]);let h=0;if(dc==u>-c?(s=c+o,a=o-(s-c),c=t[++d]):(s=u+o,a=o-(s-u),u=i[++f]),o=s,0!==a&&(r[h++]=a);dc==u>-c?(s=o+c,l=s-o,a=o-(s-l)+(c-l),c=t[++d]):(s=o+u,l=s-o,a=o-(s-l)+(u-l),u=i[++f]),o=s,0!==a&&(r[h++]=a);for(;d=Yqe*c?l:-function Qqe(e,t,n,i,r,o,s){let a,l,c,u,d,f,h,p,g,m,_,y,v,b,w,C,E,D;const M=e-r,k=n-r,R=t-o,F=i-o;b=M*F,f=Di*M,h=f-(f-M),p=M-h,f=Di*F,g=f-(f-F),m=F-g,w=p*m-(b-h*g-p*g-h*m),C=R*k,f=Di*R,h=f-(f-R),p=R-h,f=Di*k,g=f-(f-k),m=k-g,E=p*m-(C-h*g-p*g-h*m),_=w-E,d=w-_,__[0]=w-(_+d)+(d-E),y=b+_,d=y-b,v=b-(y-d)+(_-d),_=v-C,d=v-_,__[1]=v-(_+d)+(d-C),D=y+_,d=D-y,__[2]=y-(D-d)+(_-d),__[3]=D;let P=function qqe(e,t){let n=t[0];for(let i=1;i=T||-P>=T||(d=e-M,a=e-(M+d)+(d-r),d=n-k,c=n-(k+d)+(d-r),d=t-R,l=t-(R+d)+(d-o),d=i-F,u=i-(F+d)+(d-o),0===a&&0===l&&0===c&&0===u)||(T=11093356479670487e-47*s+Wqe*Math.abs(P),P+=M*u+F*a-(R*c+k*l),P>=T||-P>=T))return P;b=a*F,f=Di*a,h=f-(f-a),p=a-h,f=Di*F,g=f-(f-F),m=F-g,w=p*m-(b-h*g-p*g-h*m),C=l*k,f=Di*l,h=f-(f-l),p=l-h,f=Di*k,g=f-(f-k),m=k-g,E=p*m-(C-h*g-p*g-h*m),_=w-E,d=w-_,qr[0]=w-(_+d)+(d-E),y=b+_,d=y-b,v=b-(y-d)+(_-d),_=v-C,d=v-_,qr[1]=v-(_+d)+(d-C),D=y+_,d=D-y,qr[2]=y-(D-d)+(_-d),qr[3]=D;const S=lb(4,__,4,qr,$ce);b=M*u,f=Di*M,h=f-(f-M),p=M-h,f=Di*u,g=f-(f-u),m=u-g,w=p*m-(b-h*g-p*g-h*m),C=R*c,f=Di*R,h=f-(f-R),p=R-h,f=Di*c,g=f-(f-c),m=c-g,E=p*m-(C-h*g-p*g-h*m),_=w-E,d=w-_,qr[0]=w-(_+d)+(d-E),y=b+_,d=y-b,v=b-(y-d)+(_-d),_=v-C,d=v-_,qr[1]=v-(_+d)+(d-C),D=y+_,d=D-y,qr[2]=y-(D-d)+(_-d),qr[3]=D;const x=lb(S,$ce,4,qr,Bce);b=a*u,f=Di*a,h=f-(f-a),p=a-h,f=Di*u,g=f-(f-u),m=u-g,w=p*m-(b-h*g-p*g-h*m),C=l*c,f=Di*l,h=f-(f-l),p=l-h,f=Di*c,g=f-(f-c),m=c-g,E=p*m-(C-h*g-p*g-h*m),_=w-E,d=w-_,qr[0]=w-(_+d)+(d-E),y=b+_,d=y-b,v=b-(y-d)+(_-d),_=v-C,d=v-_,qr[1]=v-(_+d)+(d-C),D=y+_,d=D-y,qr[2]=y-(D-d)+(_-d),qr[3]=D;const I=lb(x,Bce,4,qr,jce);return jce[I-1]}(e,t,n,i,r,o,c)}ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(8),ae(8),ae(8),ae(4),ae(8),ae(8),ae(8),ae(12),ae(192),ae(192),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(8),ae(8),ae(8),ae(8),ae(8),ae(8),ae(8),ae(8),ae(8),ae(4),ae(4),ae(4),ae(8),ae(16),ae(16),ae(16),ae(32),ae(32),ae(48),ae(64),ae(1152),ae(1152),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(4),ae(24),ae(24),ae(24),ae(24),ae(24),ae(24),ae(24),ae(24),ae(24),ae(24),ae(1152),ae(1152),ae(1152),ae(1152),ae(1152),ae(2304),ae(2304),ae(3456),ae(5760),ae(8),ae(8),ae(8),ae(16),ae(24),ae(48),ae(48),ae(96),ae(192),ae(384),ae(384),ae(384),ae(768),ae(96),ae(96),ae(96),ae(1152);const aue=Math.pow(2,-52),aA=new Uint32Array(512);class lA{static from(t,n=_Ye,i=yYe){const r=t.length,o=new Float64Array(2*r);for(let s=0;s>1;if(n>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const i=Math.max(2*n-5,0);this._triangles=new Uint32Array(3*i),this._halfedges=new Int32Array(3*i),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:t,_hullPrev:n,_hullNext:i,_hullTri:r,_hullHash:o}=this,s=t.length>>1;let a=1/0,l=1/0,c=-1/0,u=-1/0;for(let M=0;Mc&&(c=k),R>u&&(u=R),this._ids[M]=M}const d=(a+c)/2,f=(l+u)/2;let h,p,g;for(let M=0,k=1/0;M0&&(p=M,k=R)}let y=t[2*p],v=t[2*p+1],b=1/0;for(let M=0;MF&&(M[k++]=P,F=T)}return this.hull=M.subarray(0,k),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(Qx(m,_,y,v,w,C)<0){const M=p,k=y,R=v;p=g,y=w,v=C,g=M,w=k,C=R}const E=function mYe(e,t,n,i,r,o){const s=n-e,a=i-t,l=r-e,c=o-t,u=s*s+a*a,d=l*l+c*c,f=.5/(s*c-a*l);return{x:e+(c*u-a*d)*f,y:t+(s*d-l*u)*f}}(m,_,y,v,w,C);this._cx=E.x,this._cy=E.y;for(let M=0;M0&&Math.abs(P-k)<=aue&&Math.abs(T-R)<=aue||(k=P,R=T,F===h||F===p||F===g))continue;let S=0;for(let O=0,$=this._hashKey(P,T);O=0;)if(x=I,x===S){x=-1;break}if(-1===x)continue;let A=this._addTriangle(x,F,i[x],-1,-1,r[x]);r[F]=this._legalize(A+2),r[x]=A,D++;let N=i[x];for(;I=i[N],Qx(P,T,t[2*N],t[2*N+1],t[2*I],t[2*I+1])<0;)A=this._addTriangle(N,F,I,r[F],-1,r[N]),r[F]=this._legalize(A+2),i[N]=N,D--,N=I;if(x===S)for(;I=n[x],Qx(P,T,t[2*I],t[2*I+1],t[2*x],t[2*x+1])<0;)A=this._addTriangle(I,F,x,-1,r[x],r[I]),this._legalize(A+2),r[I]=A,i[x]=x,D--,x=I;this._hullStart=n[F]=x,i[x]=n[N]=F,i[F]=N,o[this._hashKey(P,T)]=F,o[this._hashKey(t[2*x],t[2*x+1])]=x}this.hull=new Uint32Array(D);for(let M=0,k=this._hullStart;M0?3-n:1+n)/4}(t-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:n,_halfedges:i,coords:r}=this;let o=0,s=0;for(;;){const a=i[t],l=t-t%3;if(s=l+(t+2)%3,-1===a){if(0===o)break;t=aA[--o];continue}const c=a-a%3,d=c+(a+2)%3,f=n[s],h=n[t],p=n[l+(t+1)%3],g=n[d];if(pYe(r[2*f],r[2*f+1],r[2*h],r[2*h+1],r[2*p],r[2*p+1],r[2*g],r[2*g+1])){n[t]=g,n[a]=f;const _=i[d];if(-1===_){let v=this._hullStart;do{if(this._hullTri[v]===d){this._hullTri[v]=t;break}v=this._hullPrev[v]}while(v!==this._hullStart)}this._link(t,_),this._link(a,i[s]),this._link(s,d),o=n&&t[e[a]]>s;)e[a+1]=e[a--];e[a+1]=o}else{let o=n+1,s=i;fb(e,n+i>>1,o),t[e[n]]>t[e[i]]&&fb(e,n,i),t[e[o]]>t[e[i]]&&fb(e,o,i),t[e[n]]>t[e[o]]&&fb(e,n,o);const a=e[o],l=t[a];for(;;){do{o++}while(t[e[o]]l);if(s=s-n?(S_(e,t,o,i),S_(e,t,n,s-1)):(S_(e,t,n,s-1),S_(e,t,o,i))}}function fb(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function _Ye(e){return e[0]}function yYe(e){return e[1]}class Uh{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,n){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,n){this._+=`L${this._x1=+t},${this._y1=+n}`}arc(t,n,i){const r=(t=+t)+(i=+i),o=n=+n;if(i<0)throw new Error("negative radius");null===this._x1?this._+=`M${r},${o}`:(Math.abs(this._x1-r)>1e-6||Math.abs(this._y1-o)>1e-6)&&(this._+="L"+r+","+o),i&&(this._+=`A${i},${i},0,1,1,${t-i},${n}A${i},${i},0,1,1,${this._x1=r},${this._y1=o}`)}rect(t,n,i,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${+i}v${+r}h${-i}Z`}value(){return this._||null}}class p8{constructor(){this._=[]}moveTo(t,n){this._.push([t,n])}closePath(){this._.push(this._[0].slice())}lineTo(t,n){this._.push([t,n])}value(){return this._.length?this._:null}}class vYe{constructor(t,[n,i,r,o]=[0,0,960,500]){if(!((r=+r)>=(n=+n)&&(o=+o)>=(i=+i)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=r,this.xmin=n,this.ymax=o,this.ymin=i,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:n,triangles:i},vectors:r}=this;let o,s;const a=this.circumcenters=this._circumcenters.subarray(0,i.length/3*2);for(let y,v,g=0,m=0,_=i.length;g<_;g+=3,m+=2){const b=2*i[g],w=2*i[g+1],C=2*i[g+2],E=t[b],D=t[b+1],R=t[C],F=t[C+1],P=t[w]-E,T=t[w+1]-D,S=R-E,x=F-D,I=2*(P*x-T*S);if(Math.abs(I)<1e-9){if(void 0===o){o=s=0;for(const N of n)o+=t[2*N],s+=t[2*N+1];o/=n.length,s/=n.length}const A=1e9*Math.sign((o-E)*x-(s-D)*S);y=(E+R)/2-A*x,v=(D+F)/2+A*S}else{const A=1/I,N=P*P+T*T,O=S*S+x*x;y=E+(x*N-T*O)*A,v=D+(P*O-S*N)*A}a[m]=y,a[m+1]=v}let c,d,h,l=n[n.length-1],u=4*l,f=t[2*l],p=t[2*l+1];r.fill(0);for(let g=0;g1;)o-=2;for(let s=2;s0){if(n>=this.ymax)return null;(s=(this.ymax-n)/r)0){if(t>=this.xmax)return null;(s=(this.xmax-t)/i)this.xmax?2:0)|(nthis.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let n=0;n2&&function CYe(e){const{triangles:t,coords:n}=e;for(let i=0;i1e-10)return!1}return!0}(t)){this.collinear=Int32Array.from({length:n.length/2},(f,h)=>h).sort((f,h)=>n[2*f]-n[2*h]||n[2*f+1]-n[2*h+1]);const l=this.collinear[0],c=this.collinear[this.collinear.length-1],u=[n[2*l],n[2*l+1],n[2*c],n[2*c+1]],d=1e-8*Math.hypot(u[3]-u[1],u[2]-u[0]);for(let f=0,h=n.length/2;f0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],s[r[0]]=1,2===r.length&&(s[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(t){return new vYe(this,t)}*neighbors(t){const{inedges:n,hull:i,_hullIndex:r,halfedges:o,triangles:s,collinear:a}=this;if(a){const d=a.indexOf(t);return d>0&&(yield a[d-1]),void(d=0&&o!==i&&o!==r;)i=o;return o}_step(t,n,i){const{inedges:r,hull:o,_hullIndex:s,halfedges:a,triangles:l,points:c}=this;if(-1===r[t]||!c.length)return(t+1)%(c.length>>1);let u=t,d=T_(n-c[2*t],2)+T_(i-c[2*t+1],2);const f=r[t];let h=f;do{let p=l[h];const g=T_(n-c[2*p],2)+T_(i-c[2*p+1],2);if(g>5<<5,f=~~Math.max(Math.abs(y+v),Math.abs(y-v))}else u=u+31>>5<<5;if(f>l&&(l=f),s+u>=hb<<5&&(s=0,a+=l,l=0),a+f>=cA)break;r.translate((s+(u>>1))/o,(a+(f>>1))/o),t.rotate&&r.rotate(t.rotate*_8),r.fillText(t.text,0,0),t.padding&&(r.lineWidth=2*t.padding,r.strokeText(t.text,0,0)),r.restore(),t.width=u,t.height=f,t.xoff=s,t.yoff=a,t.x1=u>>1,t.y1=f>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,s+=u}for(var w=r.getImageData(0,0,(hb<<5)/o,cA/o).data,C=[];--i>=0;)if((t=n[i]).hasText){for(d=(u=t.width)>>5,f=t.y1-t.y0,h=0;h>5)]|=k,E|=k}E?D=p:(t.y0++,f--,p--,a++)}t.y1=t.y0+D,t.sprite=C.slice(0,(t.y1-t.y0)*d)}}}function kYe(e,t,n){for(var u,i=e.sprite,r=e.width>>5,o=e.x-(r<<4),s=127&o,a=32-s,l=e.y1-e.y0,c=(e.y+e.y0)*(n>>=5)+(o>>5),d=0;d>>s:0))&t[c+f])return!0;c+=n}return!1}function OYe(e,t){var n=e[0],i=e[1];t.x+t.x0i.x&&(i.x=t.x+t.x1),t.y+t.y1>i.y&&(i.y=t.y+t.y1)}function RYe(e,t){return e.x+e.x1>t[0].x&&e.x+e.x0t[0].y&&e.y+e.y0=v));)if(g.x=_+D,g.y=y+M,!(g.x+g.x0<0||g.y+g.y0<0||g.x+g.x1>e[0]||g.y+g.y1>e[1])&&(!m||!kYe(g,p,e[0]))&&(!m||RYe(g,m))){for(var A,k=g.sprite,R=g.width>>5,F=e[0]>>5,P=g.x-(R<<4),T=127&P,S=32-T,x=g.y1-g.y0,I=(g.y+g.y0)*F+(P>>5),N=0;N>>T:0);I+=F}return g.sprite=null,!0}return!1}return d.layout=function(){for(var p=function f(p){p.width=p.height=1;var g=Math.sqrt(p.getContext("2d").getImageData(0,0,1,1).data.length>>2);p.width=(hb<<5)/g,p.height=cA/g;var m=p.getContext("2d");return m.fillStyle=m.strokeStyle="red",m.textAlign="center",{context:m,ratio:g}}(fd()),g=function PYe(e){for(var t=[],n=-1;++n>5)*e[1]),m=null,_=c.length,y=-1,v=[],b=c.map(C=>({text:t(C),font:n(C),style:r(C),weight:o(C),rotate:s(C),size:~~(i(C)+1e-14),padding:a(C),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:C})).sort((C,E)=>E.size-C.size);++y<_;){var w=b[y];w.x=e[0]*(u()+.5)>>1,w.y=e[1]*(u()+.5)>>1,IYe(p,w,b,y),w.hasText&&h(g,w,m)&&(v.push(w),m?OYe(m,w):m=[{x:w.x+w.x0,y:w.y+w.y0},{x:w.x+w.x1,y:w.y+w.y1}],w.x-=e[0]>>1,w.y-=e[1]>>1)}return v},d.words=function(p){return arguments.length?(c=p,d):c},d.size=function(p){return arguments.length?(e=[+p[0],+p[1]],d):e},d.font=function(p){return arguments.length?(n=zh(p),d):n},d.fontStyle=function(p){return arguments.length?(r=zh(p),d):r},d.fontWeight=function(p){return arguments.length?(o=zh(p),d):o},d.rotate=function(p){return arguments.length?(s=zh(p),d):s},d.text=function(p){return arguments.length?(t=zh(p),d):t},d.spiral=function(p){return arguments.length?(l=LYe[p]||p,d):l},d.fontSize=function(p){return arguments.length?(i=zh(p),d):i},d.padding=function(p){return arguments.length?(a=zh(p),d):a},d.random=function(p){return arguments.length?(u=p,d):u},d}(),e)}y8.Definition={type:"Wordcloud",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2},{name:"font",type:"string",expr:!0,default:"sans-serif"},{name:"fontStyle",type:"string",expr:!0,default:"normal"},{name:"fontWeight",type:"string",expr:!0,default:"normal"},{name:"fontSize",type:"number",expr:!0,default:14},{name:"fontSizeRange",type:"number",array:"nullable",default:[10,50]},{name:"rotate",type:"number",expr:!0,default:0},{name:"text",type:"field"},{name:"spiral",type:"string",values:["archimedean","rectangular"]},{name:"padding",type:"number",expr:!0},{name:"as",type:"string",array:!0,length:7,default:uue}]},me(y8,K,{transform(e,t){e.size&&(!e.size[0]||!e.size[1])&&J("Wordcloud size dimensions must be non-zero.");const i=e.modified();if(!(i||t.changed(t.ADD_REM)||$Ye.some(function n(p){const g=e[p];return it(g)&&t.modified(g.fields)})))return;const r=t.materialize(t.SOURCE).source,o=this.value,s=e.as||uue;let l,a=e.fontSize||14;if(it(a)?l=e.fontSizeRange:a=gr(a),l){const p=a,g=Nt("sqrt")().domain(Al(r,p)).range(l);a=m=>g(p(m))}r.forEach(p=>{p[s[0]]=NaN,p[s[1]]=NaN,p[s[3]]=0});const c=o.words(r).text(e.text).size(e.size||[500,500]).padding(e.padding||1).spiral(e.spiral||"archimedean").rotate(e.rotate||0).font(e.font||"sans-serif").fontStyle(e.fontStyle||"normal").fontWeight(e.fontWeight||"normal").fontSize(a).random(ks).layout(),u=o.size(),d=u[0]>>1,f=u[1]>>1,h=c.length;for(let g,m,p=0;pnew Uint8Array(e),VYe=e=>new Uint16Array(e),pb=e=>new Uint32Array(e);function uA(e,t,n){const i=(t<257?jYe:t<65537?VYe:pb)(e);return n&&i.set(n),i}function due(e,t,n){const i=1<{const r=e[n],o=e[i];return ro?1:0}),function BYe(e,t){return Array.from(t,n=>e[n])}(e,t)}(h,f),u)p=t,g=e,t=Array(u+d),e=pb(u+d),function GYe(e,t,n,i,r,o,s,a,l){let d,c=0,u=0;for(d=0;c0)for(m=0;me,size:()=>n}}function v8(e){K.call(this,function UYe(){let e=8,t=[],n=pb(0),i=uA(0,e),r=uA(0,e);return{data:()=>t,seen:()=>n=function zYe(e,t,n){return e.length>=t?e:((n=n||new e.constructor(t)).set(e),n)}(n,t.length),add(o){for(let c,s=0,a=t.length,l=o.length;st.length,curr:()=>i,prev:()=>r,reset:o=>r[o]=i[o],all:()=>e<257?255:e<65537?65535:4294967295,set(o,s){i[o]|=s},clear(o,s){i[o]&=~s},resize(o,s){(o>i.length||s>e)&&(e=Math.max(s,e),i=uA(o,e,i),r=uA(o,e))}}}(),e),this._indices=null,this._dims=null}function b8(e){K.call(this,null,e)}v8.Definition={type:"CrossFilter",metadata:{},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"query",type:"array",array:!0,required:!0,content:{type:"number",array:!0,length:2}}]},me(v8,K,{transform(e,t){return this._dims?e.modified("fields")||e.fields.some(i=>t.modified(i.fields))?this.reinit(e,t):this.eval(e,t):this.init(e,t)},init(e,t){const n=e.fields,i=e.query,r=this._indices={},o=this._dims=[],s=i.length;let l,c,a=0;for(;a{const o=r.remove(t,n);for(const s in i)i[s].reindex(o)})},update(e,t,n){const i=this._dims,r=e.query,o=t.stamp,s=i.length;let l,c,a=0;for(n.filters=0,c=0;ch)for(m=h,_=Math.min(d,p);m<_;++m)y=l[m],o[y]!==n&&(a[y]=s[y],o[y]=n,i.push(y)),s[y]^=g;if(f>p)for(m=Math.max(d,p),_=f;m<_;++m)y=l[m],o[y]!==n&&(a[y]=s[y],o[y]=n,i.push(y)),s[y]^=g;else if(fd)for(p=d,g=Math.min(c,f);pf)for(p=Math.max(c,f),g=u;pa[u]&n?null:s[u];return o.filter(o.MOD,c),r&r-1?(o.filter(o.ADD,u=>{const d=a[u]&n;return!d&&d^l[u]&n?s[u]:null}),o.filter(o.REM,u=>!(a[u]&n)||l[u]&n?null:s[u])):(o.filter(o.ADD,c),o.filter(o.REM,u=>(a[u]&n)===r?s[u]:null)),o.filter(o.SOURCE,u=>c(u._index))}});const Hh="Literal",hue="CallExpression";function Oa(e){this.type=e}Oa.prototype.visit=function(e){let t,n,i;if(e(this))return 1;for(t=function nKe(e){switch(e.type){case"ArrayExpression":return e.elements;case"BinaryExpression":case"LogicalExpression":return[e.left,e.right];case hue:return[e.callee].concat(e.arguments);case"ConditionalExpression":return[e.test,e.consequent,e.alternate];case"MemberExpression":return[e.object,e.property];case"ObjectExpression":return e.properties;case"Property":return[e.key,e.value];case"UnaryExpression":return[e.argument];default:return[]}}(this),n=0,i=t.length;n",Yl[Gh]="Identifier",Yl[jd]="Keyword",Yl[fA]="Null",Yl[Wh]="Numeric",Yl[vo]="Punctuator",Yl[mb]="String",Yl[9]="RegularExpression";var rKe="ArrayExpression",oKe="BinaryExpression",sKe="CallExpression",aKe="ConditionalExpression",pue="Identifier",lKe="Literal",cKe="LogicalExpression",uKe="MemberExpression",dKe="ObjectExpression",fKe="Property",hKe="UnaryExpression",ki="Unexpected token %0",pKe="Unexpected number",gKe="Unexpected string",mKe="Unexpected identifier",_Ke="Unexpected reserved word",yKe="Unexpected end of input",w8="Invalid regular expression",E8="Invalid regular expression: missing /",gue="Octal literals are not allowed in strict mode.",vKe="Duplicate data property in object literal not allowed in strict mode",er="ILLEGAL",_b="Disabled.",bKe=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),wKe=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function hA(e,t){if(!e)throw new Error("ASSERT: "+t)}function ru(e){return e>=48&&e<=57}function C8(e){return"0123456789abcdefABCDEF".includes(e)}function yb(e){return"01234567".includes(e)}function EKe(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e)}function vb(e){return 10===e||13===e||8232===e||8233===e}function bb(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&bKe.test(String.fromCharCode(e))}function pA(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&wKe.test(String.fromCharCode(e))}const CKe={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function mue(){for(;Z1114111||"}"!==e)&&It({},ki,er),t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function _ue(){var e,t;for(e=Me.charCodeAt(Z++),t=String.fromCharCode(e),92===e&&(117!==Me.charCodeAt(Z)&&It({},ki,er),++Z,(!(e=D8("u"))||"\\"===e||!bb(e.charCodeAt(0)))&&It({},ki,er),t=e);Z>>="===(s=Me.substr(Z,4))?{type:vo,value:s,start:e,end:Z+=4}:">>>"===(o=s.substr(0,3))||"<<="===o||">>="===o?{type:vo,value:o,start:e,end:Z+=3}:i===(r=o.substr(0,2))[1]&&"+-<>&|".includes(i)||"=>"===r?{type:vo,value:r,start:e,end:Z+=2}:("//"===r&&It({},ki,er),"<>=!+-*%&|^/".includes(i)?(++Z,{type:vo,value:i,start:e,end:Z}):void It({},ki,er))}function yue(){var e,t,n;if(hA(ru((n=Me[Z]).charCodeAt(0))||"."===n,"Numeric literal must start with a decimal digit or a decimal point"),t=Z,e="","."!==n){if(e=Me[Z++],n=Me[Z],"0"===e){if("x"===n||"X"===n)return++Z,function xKe(e){let t="";for(;Z=Er)return{type:gb,start:Z,end:Z};const e=Me.charCodeAt(Z);return bb(e)?function TKe(){var e,t;return e=Z,t=92===Me.charCodeAt(Z)?_ue():function SKe(){var e,t;for(e=Z++;Z(hA(s=0&&It({},w8,n),{value:n,literal:t}}(),i=function NKe(e,t){let n=e;t.includes("u")&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,(i,r)=>{if(parseInt(r,16)<=1114111)return"x";It({},w8)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{It({},w8)}try{return new RegExp(e,t)}catch{return null}}(t.value,n.value),{literal:t.literal+n.literal,value:i,regex:{pattern:t.value,flags:n.value},start:e,end:Z}}()),bue()):gA(bo())}return n}function WKe(){const e=[];if(Cr("("),!wn(")"))for(;Z":case"<=":case">=":case"instanceof":case"in":t=7;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11}return t}function qh(){var e,t;return e=function QKe(){var e,t,n,i,r,o,s,a,l,c;if(e=Yt,l=mA(),0===(r=Tue(i=Yt)))return l;for(i.prec=r,bo(),t=[e,Yt],o=[l,i,s=mA()];(r=Tue(Yt))>0;){for(;o.length>2&&r<=o[o.length-2].prec;)s=o.pop(),a=o.pop().value,l=o.pop(),t.pop(),n=wue(a,l,s),o.push(n);(i=bo()).prec=r,o.push(i),t.push(Yt),n=mA(),o.push(n)}for(n=o[c=o.length-1],t.pop();c>1;)t.pop(),n=wue(o[c-1].value,o[c-2],n),c-=2;return n}(),wn("?")&&(bo(),t=qh(),Cr(":"),e=function LKe(e,t,n){const i=new Oa(aKe);return i.test=e,i.consequent=t,i.alternate=n,i}(e,t,qh())),e}function A8(){const e=qh();if(wn(","))throw new Error(_b);return e}function M8(e){Z=0,Er=(Me=e).length,Yt=null,bue();const t=A8();if(Yt.type!==gb)throw new Error("Unexpect token after expression.");return t}var xue={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function Aue(e){function n(s,a,l){return c=>function t(s,a,l,c){let u=e(a[0]);return l&&(u=l+"("+u+")",0===l.lastIndexOf("new ",0)&&(u="("+u+")")),u+"."+s+(c<0?"":0===c?"()":"("+a.slice(1).map(e).join(",")+")")}(s,c,a,l)}const i="new Date",r="String",o="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",hypot:"Math.hypot",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(s){s.length<3&&J("Missing arguments to clamp function."),s.length>3&&J("Too many arguments to clamp function.");const a=s.map(e);return"Math.max("+a[1]+", Math.min("+a[2]+","+a[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:i,date:n("getDate",i,0),day:n("getDay",i,0),year:n("getFullYear",i,0),month:n("getMonth",i,0),hours:n("getHours",i,0),minutes:n("getMinutes",i,0),seconds:n("getSeconds",i,0),milliseconds:n("getMilliseconds",i,0),time:n("getTime",i,0),timezoneoffset:n("getTimezoneOffset",i,0),utcdate:n("getUTCDate",i,0),utcday:n("getUTCDay",i,0),utcyear:n("getUTCFullYear",i,0),utcmonth:n("getUTCMonth",i,0),utchours:n("getUTCHours",i,0),utcminutes:n("getUTCMinutes",i,0),utcseconds:n("getUTCSeconds",i,0),utcmilliseconds:n("getUTCMilliseconds",i,0),length:n("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:n("toUpperCase",r,0),lower:n("toLowerCase",r,0),substring:n("substring",r),split:n("split",r),trim:n("trim",r,0),regexp:o,test:n("test",o),if:function(s){s.length<3&&J("Missing arguments to if function."),s.length>3&&J("Too many arguments to if function.");const a=s.map(e);return"("+a[0]+"?"+a[1]+":"+a[2]+")"}}}function Mue(e){const t=(e=e||{}).allowed?va(e.allowed):{},n=e.forbidden?va(e.forbidden):{},i=e.constants||xue,r=(e.functions||Aue)(d),o=e.globalvar,s=e.fieldvar,a=it(o)?o:p=>`${o}["${p}"]`;let l={},c={},u=0;function d(p){if(Ce(p))return p;const g=f[p.type];return null==g&&J("Unsupported type: "+p.type),g(p)}const f={Literal:p=>p.raw,Identifier:p=>{const g=p.name;return u>0?g:De(n,g)?J("Illegal identifier: "+g):De(i,g)?i[g]:De(t,g)?g:(l[g]=1,a(g))},MemberExpression:p=>{const g=!p.computed,m=d(p.object);g&&(u+=1);const _=d(p.property);return m===s&&(c[function ZKe(e){const t=e&&e.length-1;return t&&('"'===e[0]&&'"'===e[t]||"'"===e[0]&&"'"===e[t])?e.slice(1,-1):e}(_)]=1),g&&(u-=1),m+(g?"."+_:"["+_+"]")},CallExpression:p=>{"Identifier"!==p.callee.type&&J("Illegal callee type: "+p.callee.type);const g=p.callee.name,m=p.arguments,_=De(r,g)&&r[g];return _||J("Unrecognized function: "+g),it(_)?_(m):_+"("+m.map(d).join(",")+")"},ArrayExpression:p=>"["+p.elements.map(d).join(",")+"]",BinaryExpression:p=>"("+d(p.left)+" "+p.operator+" "+d(p.right)+")",UnaryExpression:p=>"("+p.operator+d(p.argument)+")",ConditionalExpression:p=>"("+d(p.test)+"?"+d(p.consequent)+":"+d(p.alternate)+")",LogicalExpression:p=>"("+d(p.left)+p.operator+d(p.right)+")",ObjectExpression:p=>"{"+p.properties.map(d).join(",")+"}",Property:p=>{u+=1;const g=d(p.key);return u-=1,g+":"+d(p.value)}};function h(p){const g={code:d(p),globals:Object.keys(l),fields:Object.keys(c)};return l={},c={},g}return h.functions=r,h.constants=i,h}var Nue,Iue,N8,I8,k8,_A=new Zi,yA=new Zi,Kl={point:Ji,lineStart:Ji,lineEnd:Ji,polygonStart:function(){_A=new Zi,Kl.lineStart=JKe,Kl.lineEnd=eXe},polygonEnd:function(){var e=+_A;yA.add(e<0?Vr+e:e),this.lineStart=this.lineEnd=this.point=Ji},sphere:function(){yA.add(Vr)}};function JKe(){Kl.point=tXe}function eXe(){kue(Nue,Iue)}function tXe(e,t){Kl.point=kue,Nue=e,Iue=t,N8=e*=dt,I8=je(t=(t*=dt)/2+hx),k8=Re(t)}function kue(e,t){var n=(e*=dt)-N8,i=n>=0?1:-1,r=i*n,o=je(t=(t*=dt)/2+hx),s=Re(t),a=k8*s,l=I8*o+a*je(r),c=a*i*Re(r);_A.add($s(c,l)),N8=e,I8=o,k8=s}var kn,wo,jn,is,Yh,Oue,Rue,x_,Eb,Vd,ou,su={point:O8,lineStart:Pue,lineEnd:Lue,polygonStart:function(){su.point=$ue,su.lineStart=iXe,su.lineEnd=rXe,Eb=new Zi,Kl.polygonStart()},polygonEnd:function(){Kl.polygonEnd(),su.point=O8,su.lineStart=Pue,su.lineEnd=Lue,_A<0?(kn=-(jn=180),wo=-(is=90)):Eb>$e?is=90:Eb<-$e&&(wo=-90),ou[0]=kn,ou[1]=jn},sphere:function(){kn=-(jn=180),wo=-(is=90)}};function O8(e,t){Vd.push(ou=[kn=e,jn=e]),tis&&(is=t)}function Fue(e,t){var n=Ih([e*dt,t*dt]);if(x_){var i=d_(x_,n),o=d_([i[1],-i[0],0],i);Ax(o),o=Sx(o);var c,s=e-Yh,a=s>0?1:-1,l=o[0]*Yn*a,u=vt(s)>180;u^(a*Yhis&&(is=c):u^(a*Yh<(l=(l+360)%360-180)&&lis&&(is=t)),u?ers(kn,jn)&&(jn=e):rs(e,jn)>rs(kn,jn)&&(kn=e):jn>=kn?(ejn&&(jn=e)):e>Yh?rs(kn,e)>rs(kn,jn)&&(jn=e):rs(e,jn)>rs(kn,jn)&&(kn=e)}else Vd.push(ou=[kn=e,jn=e]);tis&&(is=t),x_=n,Yh=e}function Pue(){su.point=Fue}function Lue(){ou[0]=kn,ou[1]=jn,su.point=O8,x_=null}function $ue(e,t){if(x_){var n=e-Yh;Eb.add(vt(n)>180?n+(n>0?360:-360):n)}else Oue=e,Rue=t;Kl.point(e,t),Fue(e,t)}function iXe(){Kl.lineStart()}function rXe(){$ue(Oue,Rue),Kl.lineEnd(),vt(Eb)>$e&&(kn=-(jn=180)),ou[0]=kn,ou[1]=jn,x_=null}function rs(e,t){return(t-=e)<0?t+360:t}function oXe(e,t){return e[0]-t[0]}function Bue(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tt.indexOf(n)>=0):t},R_union:function(e,t){var n=pr(t[0]),i=pr(t[1]);return n>i&&(n=t[1],i=t[0]),e.length?(e[0]>n&&(e[0]=n),e[1]i&&(n=t[1],i=t[0]),e.length?ii&&(e[1]=i),e):[n,i]}};function j8(e,t,n,i){t[0].type!==Hh&&J("First argument to selection functions must be a string literal.");const r=t[0].value,s="unit",a="@"+s,l=":"+r;(t.length>=2&&yt(t).value)===$8&&!De(i,a)&&(i[a]=n.getData(r).indataRef(n,s)),De(i,l)||(i[l]=n.getData(r).tuplesRef())}function Que(e){const t=this.context.data[e];return t?t.values.value:[]}const Tb=e=>function(t,n){const i=this.context.dataflow.locale();return null===t?"null":i[e](n)(t)},FXe=Tb("format"),Zue=Tb("timeFormat"),PXe=Tb("utcFormat"),LXe=Tb("timeParse"),$Xe=Tb("utcParse"),xA=new Date(2e3,0,1);function AA(e,t,n){return Number.isInteger(e)&&Number.isInteger(t)?(xA.setYear(2e3),xA.setMonth(e),xA.setDate(t),Zue.call(this,xA,n)):""}const V8="%",Jue="$";function U8(e,t,n,i){t[0].type!==Hh&&J("First argument to data functions must be a string literal.");const r=t[0].value,o=":"+r;if(!De(o,i))try{i[o]=n.getData(r).tuplesRef()}catch{}}function Jr(e,t,n,i){if(t[0].type===Hh)ede(n,i,t[0].value);else for(e in n.scales)ede(n,i,e)}function ede(e,t,n){const i=V8+n;if(!De(t,i))try{t[i]=e.scaleRef(n)}catch{}}function Ql(e,t){if(it(e))return e;if(Ce(e)){const n=t.scales[e];return n&&function iUe(e){return e&&!0===e[eoe]}(n.value)?n.value:void 0}}function z8(e,t){return function(n,i,r){if(n){const o=Ql(n,(r||this).context);return o&&o.path[e](i)}return t(i)}}const qXe=z8("area",function nXe(e){return yA=new Zi,eu(e,Kl),2*yA}),YXe=z8("bounds",function sXe(e){var t,n,i,r,o,s,a;if(is=jn=-(kn=wo=1/0),Vd=[],eu(e,su),n=Vd.length){for(Vd.sort(oXe),t=1,o=[i=Vd[0]];trs(i[0],i[1])&&(i[1]=r[1]),rs(r[0],i[1])>rs(i[0],i[1])&&(i[0]=r[0])):o.push(i=r);for(s=-1/0,t=0,i=o[n=o.length-1];t<=n;i=r,++t)(a=rs(i[1],(r=o[t])[0]))>s&&(s=a,kn=r[0],jn=i[1])}return Vd=ou=null,kn===1/0||wo===1/0?[[NaN,NaN],[NaN,NaN]]:[[kn,wo],[jn,is]]}),KXe=z8("centroid",function fXe(e){Cb=vA=bA=wA=EA=CA=DA=SA=0,R8=new Zi,F8=new Zi,P8=new Zi,eu(e,Ra);var t=+R8,n=+F8,i=+P8,r=vB(t,n,i);return rnde(e,t)}const rde={};function q8(e){return te(e)||ArrayBuffer.isView(e)?e:null}function Y8(e){return q8(e)||(Ce(e)?e:null)}const ode=e=>e.data;function sde(e,t){const n=Que.call(t,e);return n.root&&n.root.lookup||{}}const ade=()=>typeof window<"u"&&window||null;function lde(e,t,n){if(!e)return[];const[i,r]=e,o=(new li).set(i[0],i[1],r[0],r[1]);return Hse(n||this.context.dataflow.scenegraph().root,o,function MQe(e){let t=null;if(e){const n=Ee(e.marktype),i=Ee(e.markname);t=r=>(!n.length||n.some(o=>r.marktype===o))&&(!i.length||i.some(o=>r.name===o))}return t}(t))}const xb={random:()=>ks(),cumulativeNormal:zS,cumulativeLogNormal:OL,cumulativeUniform:LL,densityNormal:AL,densityLogNormal:kL,densityUniform:PL,quantileNormal:HS,quantileLogNormal:RL,quantileUniform:$L,sampleNormal:US,sampleLogNormal:IL,sampleUniform:FL,isArray:te,isBoolean:td,isDate:nd,isDefined:e=>void 0!==e,isNumber:At,isObject:we,isRegExp:Ree,isString:Ce,isTuple:RS,isValid:e=>null!=e&&e==e,toBoolean:MP,toDate:e=>NP(e),toNumber:pr,toString:IP,indexof:function cQe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i1?t-1:0),i=1;i1?t-1:0),i=1;i1?t-1:0),i=1;iAl(e),inScope:function QXe(e){const t=this.context.group;let n=!1;if(t)for(;e;){if(e===t){n=!0;break}e=e.mark.group}return n},intersect:lde,clampRange:Nee,pinchDistance:function oQe(e){const t=e.touches;return Math.hypot(t[0].clientX-t[1].clientX,t[0].clientY-t[1].clientY)},pinchAngle:function sQe(e){const t=e.touches;return Math.atan2(t[0].clientY-t[1].clientY,t[0].clientX-t[1].clientX)},screen:function TQe(){const e=ade();return e?e.screen:{}},containerSize:function AQe(){const e=this.context.dataflow,t=e.container&&e.container();return t?[t.clientWidth,t.clientHeight]:[void 0,void 0]},windowSize:function xQe(){const e=ade();return e?[e.innerWidth,e.innerHeight]:[void 0,void 0]},bandspace:function pQe(e,t,n){return t$(e||0,t||0,n||0)},setdata:function OXe(e,t){const n=this.context.dataflow;return n.pulse(this.context.data[e].input,n.changeset().remove(Ms).insert(t)),1},pathShape:function CQe(e){let t=null;return function(n){return n?w1(n,t=t||Jm(e)):e}},panLinear:Dee,panLog:See,panPow:Tee,panSymlog:xee,zoomLinear:CP,zoomLog:DP,zoomPow:pS,zoomSymlog:SP,encode:function RXe(e,t,n){if(e){const i=this.context.dataflow;i.pulse(e.mark.source,i.changeset().encode(e,t))}return void 0!==n?n:e},modify:function rQe(e,t,n,i,r,o){const s=this.context.dataflow,a=this.context.data[e],l=a.input,c=s.stamp();let d,f,u=a.changes;if(!1===s._trigger||!(l.value.length||t||i))return 0;if((!u||u.stamp{a.modified=!0,s.pulse(l,u).run()},!0,1)),n&&(d=!0===n?Ms:te(n)||RS(n)?n:ide(n),u.remove(d)),t&&u.insert(t),i&&(d=ide(i),l.value.some(d)?u.remove(d):u.insert(i)),r)for(f in o)u.modify(r,f,o[f]);return 1},lassoAppend:function NQe(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5;const r=(e=Ee(e))[e.length-1];return void 0===r||Math.hypot(r[0]-t,r[1]-n)>i?[...e,[t,n]]:e},lassoPath:function IQe(e){return Ee(e).reduce((t,n,i)=>{let[r,o]=n;return t+(0==i?`M ${r},${o} `:i===e.length-1?" Z":`L ${r},${o} `)},"")},intersectLasso:function kQe(e,t,n){const{x:i,y:r,mark:o}=n,s=(new li).set(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,Number.MIN_SAFE_INTEGER,Number.MIN_SAFE_INTEGER);for(const[l,c]of t)ls.x2&&(s.x2=l),cs.y2&&(s.y2=c);return s.translate(i,r),lde([[s.x1,s.y1],[s.x2,s.y2]],e,o).filter(l=>function OQe(e,t,n){let i=0;for(let r=0,o=n.length-1;rt!=a>t&&e<(s-l)*(t-c)/(a-c)+l&&i++}return 1&i}(l.x,l.y,t))}},RQe=["view","item","group","xy","x","y"],cde="this.",K8={},ude={forbidden:["_"],allowed:["datum","event","item"],fieldvar:"datum",globalvar:e=>`_[${ge(Jue+e)}]`,functions:function PQe(e){const t=Aue(e);RQe.forEach(n=>t[n]="event.vega."+n);for(const n in xb)t[n]=cde+n;return rt(t,function WXe(e,t,n){t.__bandwidth=r=>r&&r.bandwidth?r.bandwidth():0,n._bandwidth=Jr,n._range=Jr,n._scale=Jr;const i=r=>"_["+(r.type===Hh?ge(V8+r.value):ge(V8)+"+"+e(r))+"]";return{_bandwidth:r=>`this.__bandwidth(${i(r[0])})`,_range:r=>`${i(r[0])}.range()`,_scale:r=>`${i(r[0])}(${e(r[1])})`}}(e,xb,K8)),t},constants:xue,visitors:K8},X8=Mue(ude);function Kn(e,t,n){return 1===arguments.length?xb[e]:(xb[e]=t,n&&(K8[e]=n),X8&&(X8.functions[e]=cde+e),this)}function Zl(e,t){const n={};let i;try{i=M8(e=Ce(e)?e:ge(e)+"")}catch{J("Expression parse error: "+e)}i.visit(o=>{if(o.type!==hue)return;const s=o.callee.name,a=ude.visitors[s];a&&a(s,o.arguments,t,n)});const r=X8(i);return r.globals.forEach(o=>{const s=Jue+o;!De(n,s)&&t.getSignal(o)&&(n[s]=t.signalRef(o))}),{$expr:rt({code:r.code},t.options.ast?{ast:i}:null),$fields:r.fields,$params:n}}Kn("bandwidth",function gQe(e,t){const n=Ql(e,(t||this).context);return n&&n.bandwidth?n.bandwidth():0},Jr),Kn("copy",function mQe(e,t){const n=Ql(e,(t||this).context);return n?n.copy():void 0},Jr),Kn("domain",function _Qe(e,t){const n=Ql(e,(t||this).context);return n?n.domain():[]},Jr),Kn("range",function vQe(e,t){const n=Ql(e,(t||this).context);return n&&n.range?n.range():[]},Jr),Kn("invert",function yQe(e,t,n){const i=Ql(e,(n||this).context);return i?te(t)?(i.invertRange||i.invert)(t):(i.invert||i.invertExtent)(t):void 0},Jr),Kn("scale",function bQe(e,t,n){const i=Ql(e,(n||this).context);return i?i(t):void 0},Jr),Kn("gradient",function wQe(e,t,n,i,r){e=Ql(e,(r||this).context);const o=Coe(t,n);let s=e.domain(),a=s[0],l=yt(s),c=hr;return l-a?c=loe(e,a,l):e=(e.interpolator?Nt("sequential")().interpolator(e.interpolator()):Nt("linear")().interpolate(e.interpolate()).range(e.range())).domain([a=0,l=1]),e.ticks&&(s=e.ticks(+i||15),a!==s[0]&&s.unshift(a),l!==yt(s)&&s.push(l)),s.forEach(u=>o.stop(c(u),e(u))),o},Jr),Kn("geoArea",qXe,Jr),Kn("geoBounds",YXe,Jr),Kn("geoCentroid",KXe,Jr),Kn("geoShape",function EQe(e,t,n){const i=Ql(e,(n||this).context);return function(r){return i?i.path.context(r)(t):""}},Jr),Kn("geoScale",function XXe(e,t){const n=Ql(e,(t||this).context);return n&&n.scale()},Jr),Kn("indata",function kXe(e,t,n){const i=this.context.data[e]["index:"+t],r=i?i.value.get(n):void 0;return r&&r.count},function GXe(e,t,n,i){t[0].type!==Hh&&J("First argument to indata must be a string literal."),t[1].type!==Hh&&J("Second argument to indata must be a string literal.");const r=t[0].value,o=t[1].value,s="@"+o;De(s,i)||(i[s]=n.getData(r).indataRef(n,o))}),Kn("data",Que,U8),Kn("treePath",function DQe(e,t,n){const i=sde(e,this),r=i[t],o=i[n];return r&&o?r.path(o).map(ode):void 0},U8),Kn("treeAncestors",function SQe(e,t){const n=sde(e,this)[t];return n?n.ancestors().map(ode):void 0},U8),Kn("vlSelectionTest",function DXe(e,t,n){for(var c,u,d,f,h,i=this.context.data[e],r=i?i.values.value:[],o=i?i[TA]&&i[TA].value:void 0,s=n===$8,a=r.length,l=0;l(E[u[M].field]=D,E),{}))}else h=Xl,p=Sb(c),(m=(g=s[h]||(s[h]={}))[f]||(g[f]=[])).push(p),n&&(m=a[f]||(a[f]=[])).push({[Xl]:p});return t=t||"union",s[Xl]?s[Xl]=B8[`${Xl}_${t}`](...Object.values(s[Xl])):Object.keys(s).forEach(E=>{s[E]=Object.keys(s[E]).map(D=>s[E][D]).reduce((D,M)=>void 0===D?M:B8[`${l[E]}_${t}`](D,M))}),o=Object.keys(a),n&&o.length&&(s[i?"vlPoint":"vlMulti"]="union"===t?{[Yue]:o.reduce((D,M)=>(D.push(...a[M]),D),[])}:{[yXe]:o.map(D=>({[Yue]:a[D]}))}),s},j8),Kn("vlSelectionTuples",function AXe(e,t){return e.map(n=>rt(t.fields?{values:t.fields.map(i=>Wue(i)(n.datum))}:{[Xl]:Sb(n.datum)},t))});const $Qe=va(["rule"]),dde=va(["group","image","rect"]);function Q8(e){return(e+"").toLowerCase()}function Ab(e,t,n){n.endsWith(";")||(n="return("+n+");");const i=Function(...t.concat(n));return e&&e.functions?i.bind(e.functions):i}var zQe={operator:(e,t)=>Ab(e,["_"],t.code),parameter:(e,t)=>Ab(e,["datum","_"],t.code),event:(e,t)=>Ab(e,["event"],t.code),handler:(e,t)=>Ab(e,["_","event"],`var datum=event.item&&event.item.datum;return ${t.code};`),encode:(e,t)=>{const{marktype:n,channels:i}=t;let r="var o=item,datum=o.datum,m=0,$;";for(const o in i){const s="o["+ge(o)+"]";r+=`$=${i[o].code};if(${s}!==$)${s}=$,m=1;`}return r+=function BQe(e,t){let n="";return $Qe[t]||(e.x2&&(e.x?(dde[t]&&(n+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),n+="o.width=o.x2-o.x;"):n+="o.x=o.x2-(o.width||0);"),e.xc&&(n+="o.x=o.xc-(o.width||0)/2;"),e.y2&&(e.y?(dde[t]&&(n+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),n+="o.height=o.y2-o.y;"):n+="o.y=o.y2-(o.height||0);"),e.yc&&(n+="o.y=o.yc-(o.height||0)/2;")),n}(i,n),r+="return m;",Ab(e,["item","_"],r)},codegen:{get(e){const t=`[${e.map(ge).join("][")}]`,n=Function("_",`return _${t};`);return n.path=t,n},comparator(e,t){let n;const r=Function("a","b","var u, v; return "+e.map((o,s)=>{const a=t[s];let l,c;return o.path?(l=`a${o.path}`,c=`b${o.path}`):((n=n||{})["f"+s]=o,l=`this.f${s}(a)`,c=`this.f${s}(b)`),function UQe(e,t,n,i){return`((u = ${e}) < (v = ${t}) || u == null) && v != null ? ${n}\n : (u > v || v == null) && u != null ? ${i}\n : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ${n}\n : v !== v && u === u ? ${i} : `}(l,c,-a,a)}).join("")+"0;");return n?r.bind(n):r}}};function fde(e,t,n){if(!e||!we(e))return e;for(let o,i=0,r=hde.length;ir&&r.$tupleid?Fe:r);return t.fn[n]||(t.fn[n]=TP(i,e.$order,t.expr.codegen))}},{key:"$context",parse:function JQe(e,t){return t}},{key:"$subflow",parse:function eZe(e,t){const n=e.$subflow;return function(i,r,o){const s=t.fork().parse(n),a=s.get(n.operators[0].id),l=s.signals.parent;return l&&l.set(o),a.detachSubflow=()=>t.detach(s),a}}},{key:"$tupleid",parse:function tZe(){return Fe}}];const rZe={skip:!0};function pde(e,t,n,i){return new gde(e,t,n,i)}function gde(e,t,n,i){this.dataflow=e,this.transforms=t,this.events=e.events.bind(e),this.expr=i||zQe,this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},n&&(this.functions=Object.create(n),this.functions.context=this)}function mde(e){this.dataflow=e.dataflow,this.transforms=e.transforms,this.events=e.events,this.expr=e.expr,this.signals=Object.create(e.signals),this.scales=Object.create(e.scales),this.nodes=Object.create(e.nodes),this.data=Object.create(e.data),this.fn=Object.create(e.fn),e.functions&&(this.functions=Object.create(e.functions),this.functions.context=this)}function _de(e,t){e&&(null==t?e.removeAttribute("aria-label"):e.setAttribute("aria-label",t))}gde.prototype=mde.prototype={fork(){const e=new mde(this);return(this.subcontext||(this.subcontext=[])).push(e),e},detach(e){this.subcontext=this.subcontext.filter(n=>n!==e);const t=Object.keys(e.nodes);for(const n of t)e.nodes[n]._targets=null;for(const n of t)e.nodes[n].detach();e.nodes=null},get(e){return this.nodes[e]},set(e,t){return this.nodes[e]=t},add(e,t){const n=this,i=n.dataflow,r=e.value;if(n.set(e.id,t),function VQe(e){return"collect"===Q8(e)}(e.type)&&r&&(r.$ingest?i.ingest(t,r.$ingest,r.$format):r.$request?i.preload(t,r.$request,r.$format):i.pulse(t,i.changeset().insert(r))),e.root&&(n.root=t),e.parent){let o=n.get(e.parent.$ref);o?(i.connect(o,[t]),t.targets().add(o)):(n.unresolved=n.unresolved||[]).push(()=>{o=n.get(e.parent.$ref),i.connect(o,[t]),t.targets().add(o)})}if(e.signal&&(n.signals[e.signal]=t),e.scale&&(n.scales[e.scale]=t),e.data)for(const o in e.data){const s=n.data[o]||(n.data[o]={});e.data[o].forEach(a=>s[a]=t)}},resolve(){return(this.unresolved||[]).forEach(e=>e()),delete this.unresolved,this},operator(e,t){this.add(e,this.dataflow.add(e.value,t))},transform(e,t){this.add(e,this.dataflow.add(this.transforms[Q8(t)]))},stream(e,t){this.set(e.id,t)},update(e,t,n,i,r){this.dataflow.on(t,n,i,r,e.options)},operatorExpression(e){return this.expr.operator(this,e)},parameterExpression(e){return this.expr.parameter(this,e)},eventExpression(e){return this.expr.event(this,e)},handlerExpression(e){return this.expr.handler(this,e)},encodeExpression(e){return this.expr.encode(this,e)},parse:function LQe(e){const t=this,n=e.operators||[];return e.background&&(t.background=e.background),e.eventConfig&&(t.eventConfig=e.eventConfig),e.locale&&(t.locale=e.locale),n.forEach(i=>t.parseOperator(i)),n.forEach(i=>t.parseOperatorParameters(i)),(e.streams||[]).forEach(i=>t.parseStream(i)),(e.updates||[]).forEach(i=>t.parseUpdate(i)),t.resolve()},parseOperator:function HQe(e){const t=this;!function jQe(e){return"operator"===Q8(e)}(e.type)&&e.type?t.transform(e,e.type):t.operator(e,e.update?t.operatorExpression(e.update):null)},parseOperatorParameters:function GQe(e){const t=this;if(e.params){const n=t.get(e.id);n||J("Invalid operator id: "+e.id),t.dataflow.connect(n,n.parameters(t.parseParameters(e.params),e.react,e.initonly))}},parseParameters:function WQe(e,t){t=t||{};const n=this;for(const i in e){const r=e[i];t[i]=te(r)?r.map(o=>fde(o,n,t)):fde(r,n,t)}return t},parseStream:function nZe(e){var r,t=this,n=null!=e.filter?t.eventExpression(e.filter):void 0,i=null!=e.stream?t.get(e.stream):void 0;e.source?i=t.events(e.source,e.type,n):e.merge&&(i=(r=e.merge.map(o=>t.get(o)))[0].merge.apply(r[0],r.slice(1))),e.between&&(r=e.between.map(o=>t.get(o)),i=i.between(r[0],r[1])),e.filter&&(i=i.filter(n)),null!=e.throttle&&(i=i.throttle(+e.throttle)),null!=e.debounce&&(i=i.debounce(+e.debounce)),null==i&&J("Invalid stream definition: "+JSON.stringify(e)),e.consume&&i.consume(!0),t.stream(e,i)},parseUpdate:function iZe(e){var r,t=this,n=we(n=e.source)?n.$ref:n,i=t.get(n),o=e.update,s=void 0;i||J("Source not defined: "+e.source),r=e.target&&e.target.$expr?t.eventExpression(e.target.$expr):t.get(e.target),o&&o.$expr&&(o.$params&&(s=t.parseParameters(o.$params)),o=t.handlerExpression(o.$expr)),t.update(e,i,r,o,s)},getState:function oZe(e){var t=this,n={};if(e.signals){var i=n.signals={};Object.keys(t.signals).forEach(o=>{const s=t.signals[o];e.signals(o,s)&&(i[o]=s.value)})}if(e.data){var r=n.data={};Object.keys(t.data).forEach(o=>{const s=t.data[o];e.data(o,s)&&(r[o]=s.input.value)})}return t.subcontext&&!1!==e.recurse&&(n.subcontext=t.subcontext.map(o=>o.getState(e))),n},setState:function sZe(e){var t=this,n=t.dataflow,i=e.data,r=e.signals;Object.keys(r||{}).forEach(o=>{n.update(t.signals[o],r[o],rZe)}),Object.keys(i||{}).forEach(o=>{n.pulse(t.data[o].input,n.changeset().remove(Ms).insert(i[o]))}),(e.subcontext||[]).forEach((o,s)=>{const a=t.subcontext[s];a&&a.setState(o)})}};const Z8="default";function J8(e,t){const n=e.globalCursor()?typeof document<"u"&&document.body:e.container();if(n)return null==t?n.style.removeProperty("cursor"):n.style.cursor=t}function MA(e,t){var n=e._runtime.data;return De(n,t)||J("Unrecognized data set: "+t),n[t]}function NA(e,t){sne(t)||J("Second argument to changes must be a changeset.");const n=MA(this,e);return n.modified=!0,this.pulse(n.input,t)}function yde(e){var t=e.padding();return Math.max(0,e._viewWidth+t.left+t.right)}function vde(e){var t=e.padding();return Math.max(0,e._viewHeight+t.top+t.bottom)}function IA(e){var t=e.padding(),n=e._origin;return[t.left+n[0],t.top+n[1]]}const vZe={trap:!1};function wde(e,t,n,i){e._eventListeners.push({type:n,sources:Ee(t),handler:i})}function kA(e,t,n){const i=e._eventConfig&&e._eventConfig[t];return!(!1===i||we(i)&&!i[n])||(e.warn(`Blocked ${t} ${n} event listener.`),!1)}function Ede(e){return e.item}function Cde(e){return e.item.mark.source}function Dde(e){return function(t,n){return n.vega.view().changeset().encode(n.item,e)}}function os(e,t,n){const i=document.createElement(e);for(const r in t)i.setAttribute(r,t[r]);return null!=n&&(i.textContent=n),i}const SZe="vega-bind",TZe="vega-bind-name",xZe="vega-bind-radio";function AZe(e,t,n){if(!t)return;const i=n.param;let r=n.state;return r||(r=n.state={elements:null,active:!1,set:null,update:s=>{s!=e.signal(i.signal)&&e.runAsync(null,()=>{r.source=!0,e.signal(i.signal,s)})}},i.debounce&&(r.update=xP(i.debounce,r.update))),(null==i.input&&i.element?MZe:IZe)(r,t,i,e),r.active||(e.on(e._signals[i.signal],null,()=>{r.source?r.source=!1:r.set(e.signal(i.signal))}),r.active=!0),r}function MZe(e,t,n,i){const r=n.event||"input",o=()=>e.update(t.value);i.signal(n.signal,t.value),t.addEventListener(r,o),wde(i,t,r,o),e.set=s=>{t.value=s,t.dispatchEvent(function NZe(e){return typeof Event<"u"?new Event(e):{type:e}}(r))}}function IZe(e,t,n,i){const r=i.signal(n.signal),o=os("div",{class:SZe}),s="radio"===n.input?o:o.appendChild(os("label"));s.appendChild(os("span",{class:TZe},n.name||n.signal)),t.appendChild(o);let a=kZe;switch(n.input){case"checkbox":a=OZe;break;case"select":a=RZe;break;case"radio":a=FZe;break;case"range":a=PZe}a(e,s,n,r)}function kZe(e,t,n,i){const r=os("input");for(const o in n)"signal"!==o&&"element"!==o&&r.setAttribute("input"===o?"type":o,n[o]);r.setAttribute("name",n.signal),r.value=i,t.appendChild(r),r.addEventListener("input",()=>e.update(r.value)),e.elements=[r],e.set=o=>r.value=o}function OZe(e,t,n,i){const r={type:"checkbox",name:n.signal};i&&(r.checked=!0);const o=os("input",r);t.appendChild(o),o.addEventListener("change",()=>e.update(o.checked)),e.elements=[o],e.set=s=>o.checked=!!s||null}function RZe(e,t,n,i){const r=os("select",{name:n.signal}),o=n.labels||[];n.options.forEach((s,a)=>{const l={value:s};OA(s,i)&&(l.selected=!0),r.appendChild(os("option",l,(o[a]||s)+""))}),t.appendChild(r),r.addEventListener("change",()=>{e.update(n.options[r.selectedIndex])}),e.elements=[r],e.set=s=>{for(let a=0,l=n.options.length;a{const l={type:"radio",name:n.signal,value:s};OA(s,i)&&(l.checked=!0);const c=os("input",l);c.addEventListener("change",()=>e.update(s));const u=os("label",{},(o[a]||s)+"");return u.prepend(c),r.appendChild(u),c}),e.set=s=>{const a=e.elements,l=a.length;for(let c=0;c{l.textContent=a.value,e.update(+a.value)};a.addEventListener("input",c),a.addEventListener("change",c),e.elements=[a],e.set=u=>{a.value=u,l.textContent=u}}function OA(e,t){return e===t||e+""==t+""}function Sde(e,t,n,i,r,o){return(t=t||new i(e.loader())).initialize(n,yde(e),vde(e),IA(e),r,o).background(e.background())}function e4(e,t){return t?function(){try{t.apply(this,arguments)}catch(n){e.error(n)}}:null}function t4(e,t,n){if("string"==typeof t){if(!(typeof document<"u"))return e.error("DOM document instance not found."),null;if(!(t=document.querySelector(t)))return e.error("Signal bind element not found: "+t),null}if(t&&n)try{t.textContent=""}catch(i){t=null,e.error(i)}return t}const Mb=e=>+e||0;function Tde(e){return we(e)?{top:Mb(e.top),bottom:Mb(e.bottom),left:Mb(e.left),right:Mb(e.right)}:(e=>({top:e,bottom:e,left:e,right:e}))(Mb(e))}function n4(e,t,n,i){return i4.apply(this,arguments)}function i4(){return(i4=qn(function*(e,t,n,i){const r=ox(t),o=r&&r.headless;return o||J("Unrecognized renderer type: "+t),yield e.runAsync(),Sde(e,null,null,o,n,i).renderAsync(e._scenegraph.root)})).apply(this,arguments)}function r4(){return(r4=qn(function*(e,t){e!==Td.Canvas&&e!==Td.SVG&&e!==Td.PNG&&J("Unrecognized image type: "+e);const n=yield n4(this,e,t);return e===Td.SVG?function VZe(e,t){const n=new Blob([e],{type:t});return window.URL.createObjectURL(n)}(n.svg(),"image/svg+xml"):n.canvas().toDataURL("image/png")})).apply(this,arguments)}function o4(){return(o4=qn(function*(e,t){return(yield n4(this,Td.Canvas,e,t)).canvas()})).apply(this,arguments)}function s4(){return(s4=qn(function*(e){return(yield n4(this,Td.SVG,e)).svg()})).apply(this,arguments)}var xde="width",Ade="height",a4="padding",Mde={skip:!0};function Nde(e,t){var n=e.autosize(),i=e.padding();return t-(n&&n.contains===a4?i.left+i.right:0)}function Ide(e,t){var n=e.autosize(),i=e.padding();return t-(n&&n.contains===a4?i.top+i.bottom:0)}function KZe(e,t){return t.modified&&te(t.input.value)&&!e.startsWith("_:vega:_")}function XZe(e,t){return!("parent"===e||t instanceof Um.proxy)}function JZe(e,t,n,i){const r=e.element();r&&r.setAttribute("title",function eJe(e){return null==e?"":te(e)?kde(e):we(e)&&!nd(e)?function tJe(e){return Object.keys(e).map(t=>{const n=e[t];return t+": "+(te(n)?kde(n):Ode(n))}).join("\n")}(e):e+""}(i))}function kde(e){return"["+e.map(Ode).join(", ")+"]"}function Ode(e){return te(e)?"[\u2026]":we(e)&&!nd(e)?"{\u2026}":e}function Rde(e,t){const n=this;if(t=t||{},Vm.call(n),t.loader&&n.loader(t.loader),t.logger&&n.logger(t.logger),null!=t.logLevel&&n.logLevel(t.logLevel),t.locale||e.locale){const o=rt({},e.locale,t.locale);n.locale(Yte(o.number,o.time))}n._el=null,n._elBind=null,n._renderType=t.renderer||Td.Canvas,n._scenegraph=new ase;const i=n._scenegraph.root;n._renderer=null,n._tooltip=t.tooltip||JZe,n._redraw=!0,n._handler=(new F1).scene(i),n._globalCursor=!1,n._preventDefault=!1,n._timers=[],n._eventListeners=[],n._resizeListeners=[],n._eventConfig=function bZe(e){const t=rt({defaults:{}},e),n=(i,r)=>{r.forEach(o=>{te(i[o])&&(i[o]=va(i[o]))})};return n(t.defaults,["prevent","allow"]),n(t,["view","window","selector"]),t}(e.eventConfig),n.globalCursor(n._eventConfig.globalCursor);const r=function HZe(e,t,n){return pde(e,Um,xb,n).parse(t)}(n,e,t.expr);n._runtime=r,n._signals=r.signals,n._bind=(e.bindings||[]).map(o=>({state:null,param:rt({},o)})),r.root&&r.root.set(i),i.source=r.data.root.input,n.pulse(r.data.root.input,n.changeset().insert(i.items)),n._width=n.width(),n._height=n.height(),n._viewWidth=Nde(n,n._width),n._viewHeight=Ide(n,n._height),n._origin=[0,0],n._resize=0,n._autosize=1,function WZe(e){var t=e._signals,n=t[xde],i=t[Ade],r=t[a4];function o(){e._autosize=e._resize=1}e._resizeWidth=e.add(null,a=>{e._width=a.size,e._viewWidth=Nde(e,a.size),o()},{size:n}),e._resizeHeight=e.add(null,a=>{e._height=a.size,e._viewHeight=Ide(e,a.size),o()},{size:i});const s=e.add(null,o,{pad:r});e._resizeWidth.rank=n.rank+1,e._resizeHeight.rank=i.rank+1,s.rank=r.rank+1}(n),function cZe(e){e.add(null,t=>(e._background=t.bg,e._resize=1,t.bg),{bg:e._signals.background})}(n),function uZe(e){const t=e._signals.cursor||(e._signals.cursor=e.add({user:Z8,item:null}));e.on(e.events("view","pointermove"),t,(n,i)=>{const r=t.value,o=r?Ce(r)?r:r.user:Z8,s=i.item&&i.item.cursor||null;return r&&o===r.user&&s==r.item?r:{user:o,item:s}}),e.add(null,function(n){let i=n.cursor,r=this.value;return Ce(i)||(r=i.item,i=i.user),J8(e,i&&i!==Z8?i:r||i),r},{cursor:t})}(n),n.description(e.description),t.hover&&n.hover(),t.container&&n.initialize(t.container,t.bind),t.watchPixelRatio&&n._watchPixelRatio()}function RA(e,t){return De(e._signals,t)?e._signals[t]:J("Unrecognized signal name: "+ge(t))}function Fde(e,t){const n=(e._targets||[]).filter(i=>i._update&&i._update.handler===t);return n.length?n[0]:null}function Pde(e,t,n,i){let r=Fde(n,i);return r||(r=e4(e,()=>i(t,n.value)),r.handler=i,e.on(n,null,r)),e}function Lde(e,t,n){const i=Fde(t,n);return i&&t._targets.remove(i),e}me(Rde,Vm,{evaluate(e,t,n){var i=this;return qn(function*(){if(yield Vm.prototype.evaluate.call(i,e,t),i._redraw||i._resize)try{i._renderer&&(i._resize&&(i._resize=0,function pZe(e){var t=IA(e),n=yde(e),i=vde(e);e._renderer.background(e.background()),e._renderer.resize(n,i,t),e._handler.origin(t),e._resizeListeners.forEach(r=>{try{r(n,i)}catch(o){e.error(o)}})}(i)),yield i._renderer.renderAsync(i._scenegraph.root)),i._redraw=!1}catch(r){i.error(r)}return n&&OS(i,n),i})()},dirty(e){this._redraw=!0,this._renderer&&this._renderer.dirty(e)},description(e){if(arguments.length){const t=null!=e?e+"":null;return t!==this._desc&&_de(this._el,this._desc=t),this}return this._desc},container(){return this._el},scenegraph(){return this._scenegraph},origin(){return this._origin.slice()},signal(e,t,n){const i=RA(this,e);return 1===arguments.length?i.value:this.update(i,t,n)},width(e){return arguments.length?this.signal("width",e):this.signal("width")},height(e){return arguments.length?this.signal("height",e):this.signal("height")},padding(e){return arguments.length?this.signal("padding",Tde(e)):Tde(this.signal("padding"))},autosize(e){return arguments.length?this.signal("autosize",e):this.signal("autosize")},background(e){return arguments.length?this.signal("background",e):this.signal("background")},renderer(e){return arguments.length?(ox(e)||J("Unrecognized renderer type: "+e),e!==this._renderType&&(this._renderType=e,this._resetRenderer()),this):this._renderType},tooltip(e){return arguments.length?(e!==this._tooltip&&(this._tooltip=e,this._resetRenderer()),this):this._tooltip},loader(e){return arguments.length?(e!==this._loader&&(Vm.prototype.loader.call(this,e),this._resetRenderer()),this):this._loader},resize(){return this._autosize=1,this.touch(RA(this,"autosize"))},_resetRenderer(){this._renderer&&(this._renderer=null,this.initialize(this._el,this._elBind))},_resizeView:function qZe(e,t,n,i,r,o){this.runAfter(s=>{let a=0;s._autosize=0,s.width()!==n&&(a=1,s.signal(xde,n,Mde),s._resizeWidth.skip(!0)),s.height()!==i&&(a=1,s.signal(Ade,i,Mde),s._resizeHeight.skip(!0)),s._viewWidth!==e&&(s._resize=1,s._viewWidth=e),s._viewHeight!==t&&(s._resize=1,s._viewHeight=t),(s._origin[0]!==r[0]||s._origin[1]!==r[1])&&(s._resize=1,s._origin=r),a&&s.run("enter"),o&&s.runAfter(l=>l.resize())},!1,1)},addEventListener(e,t,n){let i=t;return n&&!1===n.trap||(i=e4(this,t),i.raw=t),this._handler.on(e,i),this},removeEventListener(e,t){for(var r,o,n=this._handler.handlers(e),i=n.length;--i>=0;)if(r=n[i].handler,e===(o=n[i].type)&&(t===r||t===r.raw)){this._handler.off(o,r);break}return this},addResizeListener(e){const t=this._resizeListeners;return t.includes(e)||t.push(e),this},removeResizeListener(e){var t=this._resizeListeners,n=t.indexOf(e);return n>=0&&t.splice(n,1),this},addSignalListener(e,t){return Pde(this,e,RA(this,e),t)},removeSignalListener(e,t){return Lde(this,RA(this,e),t)},addDataListener(e,t){return Pde(this,e,MA(this,e).values,t)},removeDataListener(e,t){return Lde(this,MA(this,e).values,t)},globalCursor(e){if(arguments.length){if(this._globalCursor!==!!e){const t=J8(this,null);this._globalCursor=!!e,t&&J8(this,t)}return this}return this._globalCursor},preventDefault(e){return arguments.length?(this._preventDefault=e,this):this._preventDefault},timer:function ZZe(e,t){this._timers.push(function aZe(e,t,n){var i=new zx,r=t;return null==t?(i.restart(e,t,n),i):(i._restart=i.restart,i.restart=function(o,s,a){s=+s,a=null==a?s5():+a,i._restart(function l(c){c+=r,i._restart(l,r+=s,a),o(c)},s,a)},i.restart(e,t,n),i)}(function n(i){e({timestamp:Date.now(),elapsed:i})},t))},events:function EZe(e,t,n){var s,i=this,r=new $S(n),o=function(c,u){i.runAsync(null,()=>{"view"===e&&function wZe(e,t){var n=e._eventConfig.defaults,i=n.prevent,r=n.allow;return!1!==i&&!0!==r&&(!0===i||!1===r||(i?i[t]:r?!r[t]:e.preventDefault()))}(i,t)&&c.preventDefault(),r.receive(function gZe(e,t,n){var o,a,i=e._renderer,r=i&&i.canvas();return r&&(a=IA(e),(o=WT(t.changedTouches?t.changedTouches[0]:t,r))[0]-=a[0],o[1]-=a[1]),t.dataflow=e,t.item=n,t.vega=function mZe(e,t,n){const i=t?"group"===t.mark.marktype?t:t.mark.group:null;function r(s){var l,a=i;if(s)for(l=t;l;l=l.mark.group)if(l.mark.name===s){a=l;break}return a&&a.mark&&a.mark.interactive?a:{}}function o(s){if(!s)return n;Ce(s)&&(s=r(s));const a=n.slice();for(;s;)a[0]-=s.x||0,a[1]-=s.y||0,s=s.mark&&s.mark.group;return a}return{view:gr(e),item:gr(t||{}),group:r,xy:o,x:s=>o(s)[0],y:s=>o(s)[1]}}(e,n,o),t}(i,c,u))})};if("timer"===e)kA(i,"timer",t)&&i.timer(o,t);else if("view"===e)kA(i,"view",t)&&i.addEventListener(t,o,vZe);else if("window"===e?kA(i,"window",t)&&typeof window<"u"&&(s=[window]):typeof document<"u"&&kA(i,"selector",t)&&(s=Array.from(document.querySelectorAll(e))),s){for(var a=0,l=s.length;a=0;)t[r].stop();for(r=i.length;--r>=0;)for(o=(s=i[r]).sources.length;--o>=0;)s.sources[o].removeEventListener(s.type,s.handler);for(e&&e.call(this,this._handler,null,null,null),r=n.length;--r>=0;)this._handler.off(n[r].type,n[r].handler);return this},hover:function CZe(e,t){return t=[t||"update",(e=[e||"hover"])[0]],this.on(this.events("view","pointerover",Ede),Cde,Dde(e)),this.on(this.events("view","pointerout",Ede),Cde,Dde(t)),this},data:function dZe(e,t){return arguments.length<2?MA(this,e).values.value:NA.call(this,e,hh().remove(Ms).insert(t))},change:NA,insert:function fZe(e,t){return NA.call(this,e,hh().insert(t))},remove:function hZe(e,t){return NA.call(this,e,hh().remove(t))},scale:function GZe(e){var t=this._runtime.scales;return De(t,e)||J("Unrecognized scale or projection: "+e),t[e].value},initialize:function $Ze(e,t){const n=this,i=n._renderType,r=n._eventConfig.bind,o=ox(i);e=n._el=e?t4(n,e,!0):null,function lZe(e){const t=e.container();t&&(t.setAttribute("role","graphics-document"),t.setAttribute("aria-roleDescription","visualization"),_de(t,e.description()))}(n),o||n.error("Unrecognized renderer type: "+i);const s=o.handler||F1,a=e?o.renderer:o.headless;return n._renderer=a?Sde(n,n._renderer,e,a):null,n._handler=function LZe(e,t,n,i){const r=new i(e.loader(),e4(e,e.tooltip())).scene(e.scenegraph().root).initialize(n,IA(e),e);return t&&t.handlers().forEach(o=>{r.on(o.type,o.handler)}),r}(n,n._handler,e,s),n._redraw=!0,e&&"none"!==r&&(t=t?n._elBind=t4(n,t,!0):e.appendChild(os("form",{class:"vega-bindings"})),n._bind.forEach(l=>{l.param.element&&"container"!==r&&(l.element=t4(n,l.param.element,!!l.param.input))}),n._bind.forEach(l=>{AZe(n,l.element||t,l)})),n},toImageURL:function jZe(e,t){return r4.apply(this,arguments)},toCanvas:function UZe(e,t){return o4.apply(this,arguments)},toSVG:function zZe(e){return s4.apply(this,arguments)},getState:function YZe(e){return this._runtime.getState(e||{data:KZe,signals:XZe,recurse:!0})},setState:function QZe(e){return this.runAsync(null,t=>{t._trigger=!1,t._runtime.setState(e)},t=>{t._trigger=!0}),this},_watchPixelRatio:function nJe(){if("canvas"===this.renderer()&&this._renderer._canvas){let e=null;const t=()=>{e?.();const n=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);n.addEventListener("change",t),e=()=>{n.removeEventListener("change",t)},this._renderer._canvas.getContext("2d").pixelRatio=window.devicePixelRatio||1,this._redraw=!0,this._resize=1,this.resize().runAsync()};t()}}});const iJe="view",FA="[",PA="]",$de="{",Bde="}",rJe=":",jde=",",oJe="@",sJe=">",aJe=/[[\]{}]/,lJe={"*":1,arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1};let Vde,Ude;function Ud(e,t,n){return Vde=t||iJe,Ude=n||lJe,zde(e.trim()).map(l4)}function Nb(e,t,n,i,r){const o=e.length;let a,s=0;for(;t=0?--s:i&&i.indexOf(a)>=0&&++s}return t}function zde(e){const t=[],n=e.length;let i=0,r=0;for(;r' after between selector: "+e;i=i.map(l4);const r=l4(e.slice(1).trim());return r.between?{between:i,stream:r}:(r.between=i,r)}(e):function dJe(e){const t={source:Vde},n=[];let l,c,i=[0,0],r=0,o=0,s=e.length,a=0;if(e[s-1]===Bde){if(a=e.lastIndexOf($de),!(a>=0))throw"Unmatched right brace: "+e;try{i=function fJe(e){const t=e.split(jde);if(!e.length||t.length>2)throw e;return t.map(n=>{const i=+n;if(i!=i)throw e;return i})}(e.substring(a+1,s-1))}catch{throw"Invalid throttle specification: "+e}s=(e=e.slice(0,a).trim()).length,a=0}if(!s)throw e;if(e[0]===oJe&&(r=++a),l=Nb(e,a,rJe),l1?(t.type=n[1],r?t.markname=n[0].slice(1):function cJe(e){return Ude[e]}(n[0])?t.marktype=n[0]:t.source=n[0]):t.type=n[0],"!"===t.type.slice(-1)&&(t.consume=!0,t.type=t.type.slice(0,-1)),null!=c&&(t.filter=c),i[0]&&(t.throttle=i[0]),i[1]&&(t.debounce=i[1]),t}(e)}function hJe(e){return we(e)?e:{type:e||"pad"}}const Ib=e=>+e||0,pJe=e=>({top:e,bottom:e,left:e,right:e});function gJe(e){return we(e)?e.signal?e:{top:Ib(e.top),bottom:Ib(e.bottom),left:Ib(e.left),right:Ib(e.right)}:pJe(Ib(e))}const Oi=e=>we(e)&&!te(e)?rt({},e):{value:e};function Hde(e,t,n,i){return null!=n?(we(n)&&!te(n)||te(n)&&n.length&&we(n[0])?e.update[t]=n:e[i||"enter"][t]={value:n},1):0}function tr(e,t,n){for(const i in t)Hde(e,i,t[i]);for(const i in n)Hde(e,i,n[i],"update")}function A_(e,t,n){for(const i in t)n&&De(n,i)||(e[i]=rt(e[i]||{},t[i]));return e}function M_(e,t){return t&&(t.enter&&t.enter[e]||t.update&&t.update[e])}const c4="mark",u4="frame",d4="scope",mJe="axis",_Je="axis-domain",yJe="axis-grid",vJe="axis-label",bJe="axis-tick",wJe="axis-title",EJe="legend",CJe="legend-band",DJe="legend-entry",SJe="legend-gradient",Gde="legend-label",TJe="legend-symbol",xJe="legend-title",AJe="title",MJe="title-text",NJe="title-subtitle";function f4(e,t,n){e[t]=n&&n.signal?{signal:n.signal}:{value:n}}const Wde=e=>Ce(e)?ge(e):e.signal?`(${e.signal})`:qde(e);function LA(e){if(null!=e.gradient)return function OJe(e){const t=[e.start,e.stop,e.count].map(n=>null==n?null:ge(n));for(;t.length&&null==yt(t);)t.pop();return t.unshift(Wde(e.gradient)),`gradient(${t.join(",")})`}(e);let t=e.signal?`(${e.signal})`:e.color?function kJe(e){return e.c?$A("hcl",e.h,e.c,e.l):e.h||e.s?$A("hsl",e.h,e.s,e.l):e.l||e.a?$A("lab",e.l,e.a,e.b):e.r||e.g||e.b?$A("rgb",e.r,e.g,e.b):null}(e.color):null!=e.field?qde(e.field):void 0!==e.value?ge(e.value):void 0;return null!=e.scale&&(t=function RJe(e,t){const n=Wde(e.scale);return null!=e.range?t=`lerp(_range(${n}), ${+e.range})`:(void 0!==t&&(t=`_scale(${n}, ${t})`),e.band&&(t=(t?t+"+":"")+`_bandwidth(${n})`+(1==+e.band?"":"*"+BA(e.band)),e.extra&&(t=`(datum.extra ? _scale(${n}, datum.extra.value) : ${t})`)),null==t&&(t="0")),t}(e,t)),void 0===t&&(t=null),null!=e.exponent&&(t=`pow(${t},${BA(e.exponent)})`),null!=e.mult&&(t+=`*${BA(e.mult)}`),null!=e.offset&&(t+=`+${BA(e.offset)}`),e.round&&(t=`round(${t})`),t}const $A=(e,t,n,i)=>`(${e}(${[t,n,i].map(LA).join(",")})+'')`;function BA(e){return we(e)?"("+LA(e)+")":e}function qde(e){return Yde(we(e)?e:{datum:e})}function Yde(e){let t,n,i;if(e.signal)t="datum",i=e.signal;else if(e.group||e.parent){for(n=Math.max(1,e.level||1),t="item";n-- >0;)t+=".mark.group";e.parent?(i=e.parent,t+=".datum"):i=e.group}else e.datum?(t="datum",i=e.datum):J("Invalid field reference: "+ge(e));return e.signal||(i=Ce(i)?xl(i).map(ge).join("]["):Yde(i)),t+"["+i+"]"}function Kde(e,t,n,i,r,o){const s={};(o=o||{}).encoders={$encode:s},e=function IJe(e,t,n,i,r){const o={},s={};let a,l,c,u;for(l in l="lineBreak","text"===t&&null!=r[l]&&!M_(l,e)&&f4(o,l,r[l]),("legend"==n||String(n).startsWith("axis"))&&(n=null),u=n===u4?r.group:n===c4?rt({},r.mark,r[t]):null,u)c=M_(l,e)||("fill"===l||"stroke"===l)&&(M_("fill",e)||M_("stroke",e)),c||f4(o,l,u[l]);for(l in Ee(i).forEach(d=>{const f=r.style&&r.style[d];for(const h in f)M_(h,e)||f4(o,h,f[h])}),e=rt({},e),o)u=o[l],u.signal?(a=a||{})[l]=u:s[l]=u;return e.enter=rt(s,e.enter),a&&(e.update=rt(a,e.update)),e}(e,t,n,i,r.config);for(const a in e)s[a]=PJe(e[a],t,o,r);return o}function PJe(e,t,n,i){const r={},o={};for(const s in e)null!=e[s]&&(r[s]=$Je(LJe(e[s]),i,n,o));return{$expr:{marktype:t,channels:r},$fields:Object.keys(o),$output:Object.keys(e)}}function LJe(e){return te(e)?function FJe(e){let t="";return e.forEach(n=>{const i=LA(n);t+=n.test?`(${n.test})?${i}:`:i}),":"===yt(t)&&(t+="null"),t}(e):LA(e)}function $Je(e,t,n,i){const r=Zl(e,t);return r.$fields.forEach(o=>i[o]=1),rt(n,r.$params),r.$expr}const BJe="outer",jJe=["value","update","init","react","bind"];function Xde(e,t){J(e+' for "outer" push: '+ge(t))}function Qde(e,t){const n=e.name;if(e.push===BJe)t.signals[n]||Xde("No prior signal definition",n),jJe.forEach(i=>{void 0!==e[i]&&Xde("Invalid property ",i)});else{const i=t.addSignal(n,e.value);!1===e.react&&(i.react=!1),e.bind&&t.addBinding(n,e.bind)}}function h4(e,t,n,i){this.id=-1,this.type=e,this.value=t,this.params=n,i&&(this.parent=i)}function jA(e,t,n,i){return new h4(e,t,n,i)}function VA(e,t){return jA("operator",e,t)}function Pe(e){const t={$ref:e.id};return e.id<0&&(e.refs=e.refs||[]).push(t),t}function kb(e,t){return t?{$field:e,$name:t}:{$field:e}}const p4=kb("key");function Zde(e,t){return{$compare:e,$order:t}}function UA(e,t){return(e&&e.signal?"$"+e.signal:e||"")+(e&&t?"_":"")+(t&&t.signal?"$"+t.signal:t||"")}const g4="scope",m4="view";function Si(e){return e&&e.signal}function zA(e){if(Si(e))return!0;if(we(e))for(const t in e)if(zA(e[t]))return!0;return!1}function Fa(e,t){return e??t}function Kh(e){return e&&e.signal||e}const Jde="timer";function Ob(e,t){return(e.merge?qJe:e.stream?YJe:e.type?KJe:J("Invalid stream specification: "+ge(e)))(e,t)}function qJe(e,t){const i=_4({merge:e.merge.map(r=>Ob(r,t))},e,t);return t.addStream(i).id}function YJe(e,t){const i=_4({stream:Ob(e.stream,t)},e,t);return t.addStream(i).id}function KJe(e,t){let n;e.type===Jde?(n=t.event(Jde,e.throttle),e={between:e.between,filter:e.filter}):n=t.event(function WJe(e){return e===g4?m4:e||m4}(e.source),e.type);const i=_4({stream:n},e,t);return 1===Object.keys(i).length?n:t.addStream(i).id}function _4(e,t,n){let i=t.between;return i&&(2!==i.length&&J('Stream "between" parameter must have 2 entries: '+ge(t)),e.between=[Ob(i[0],n),Ob(i[1],n)]),i=t.filter?[].concat(t.filter):[],(t.marktype||t.markname||t.markrole)&&i.push(function XJe(e,t,n){const i="event.item";return i+(e&&"*"!==e?"&&"+i+".mark.marktype==='"+e+"'":"")+(n?"&&"+i+".mark.role==='"+n+"'":"")+(t?"&&"+i+".mark.name==='"+t+"'":"")}(t.marktype,t.markname,t.markrole)),t.source===g4&&i.push("inScope(event.item)"),i.length&&(e.filter=Zl("("+i.join(")&&(")+")",n).$expr),null!=(i=t.throttle)&&(e.throttle=+i),null!=(i=t.debounce)&&(e.debounce=+i),t.consume&&(e.consume=!0),e}const QJe={code:"_.$value",ast:{type:"Identifier",value:"value"}};function eet(e){return{signal:"["+e.map(t=>t.scale?'scale("'+t.scale+'")':t.signal)+"]"}}const Qt=e=>(t,n,i)=>jA(e,n,t||void 0,i),efe=Qt("aggregate"),net=Qt("axisticks"),tfe=Qt("bound"),Pa=Qt("collect"),nfe=Qt("compare"),iet=Qt("datajoin"),ife=Qt("encode"),ret=Qt("expression"),oet=Qt("facet"),set=Qt("field"),aet=Qt("key"),cet=Qt("legendentries"),uet=Qt("load"),det=Qt("mark"),fet=Qt("multiextent"),het=Qt("multivalues"),pet=Qt("overlap"),get=Qt("params"),rfe=Qt("prefacet"),met=Qt("projection"),_et=Qt("proxy"),yet=Qt("relay"),ofe=Qt("render"),vet=Qt("scale"),Xh=Qt("sieve"),bet=Qt("sortitems"),sfe=Qt("viewlayout"),wet=Qt("values");let Eet=0;const afe={min:"min",max:"max",count:"sum"};function Det(e,t){const n=t.getScale(e.name).params;let i;for(i in n.domain=lfe(e.domain,e,t),null!=e.range&&(n.range=ufe(e,t,n)),null!=e.interpolate&&function Fet(e,t){t.interpolate=js(e.type||e),null!=e.gamma&&(t.interpolateGamma=js(e.gamma))}(e.interpolate,n),null!=e.nice&&(n.nice=function Ret(e,t){return e.signal?t.signalRef(e.signal):we(e)?{interval:js(e.interval),step:js(e.step)}:js(e)}(e.nice,t)),null!=e.bins&&(n.bins=function Oet(e,t){return e.signal||te(e)?HA(e,t):t.objectProperty(e)}(e.bins,t)),e)De(n,i)||"name"===i||(n[i]=js(e[i],t))}function js(e,t){return we(e)?e.signal?t.signalRef(e.signal):J("Unsupported object: "+ge(e)):e}function HA(e,t){return e.signal?t.signalRef(e.signal):e.map(n=>js(n,t))}function GA(e){J("Can not find data set: "+ge(e))}function lfe(e,t,n){if(e)return e.signal?n.signalRef(e.signal):(te(e)?Tet:e.fields?Aet:xet)(e,t,n);(null!=t.domainMin||null!=t.domainMax)&&J("No scale domain defined for domainMin/domainMax to override.")}function Tet(e,t,n){return e.map(i=>js(i,n))}function xet(e,t,n){const i=n.getData(e.data);return i||GA(e.data),Zm(t.type)?i.valuesRef(n,e.field,cfe(e.sort,!1)):ooe(t.type)?i.domainRef(n,e.field):i.extentRef(n,e.field)}function Aet(e,t,n){const i=e.data,r=e.fields.reduce((o,s)=>(s=Ce(s)?{data:i,field:s}:te(s)||s.signal?function Met(e,t){const n="_:vega:_"+Eet++,i=Pa({});if(te(e))i.value={$ingest:e};else if(e.signal){const r="setdata("+ge(n)+","+e.signal+")";i.params.input=t.signalRef(r)}return t.addDataPipeline(n,[i,Xh({})]),{data:n,field:"data"}}(s,n):s,o.push(s),o),[]);return(Zm(t.type)?Net:ooe(t.type)?Iet:ket)(e,n,r)}function Net(e,t,n){const i=cfe(e.sort,!0);let r,o;const s=n.map(c=>{const u=t.getData(c.data);return u||GA(c.data),u.countsRef(t,c.field,i)}),a={groupby:p4,pulse:s};i&&(r=i.op||"count",o=i.field?UA(r,i.field):"count",a.ops=[afe[r]],a.fields=[t.fieldRef(o)],a.as=[o]),r=t.add(efe(a));const l=t.add(Pa({pulse:Pe(r)}));return o=t.add(wet({field:p4,sort:t.sortRef(i),pulse:Pe(l)})),Pe(o)}function cfe(e,t){return e&&(e.field||e.op?e.field||"count"===e.op?t&&e.field&&e.op&&!afe[e.op]&&J("Multiple domain scales can not be sorted using "+e.op):J("No field provided for sort aggregate op: "+e.op):we(e)?e.field="key":e={field:"key"}),e}function Iet(e,t,n){const i=n.map(r=>{const o=t.getData(r.data);return o||GA(r.data),o.domainRef(t,r.field)});return Pe(t.add(het({values:i})))}function ket(e,t,n){const i=n.map(r=>{const o=t.getData(r.data);return o||GA(r.data),o.extentRef(t,r.field)});return Pe(t.add(fet({extents:i})))}function ufe(e,t,n){const i=t.config.range;let r=e.range;if(r.signal)return t.signalRef(r.signal);if(Ce(r)){if(i&&De(i,r))return ufe(e=rt({},e,{range:i[r]}),t,n);"width"===r?r=[0,{signal:"width"}]:"height"===r?r=Zm(e.type)?[0,{signal:"height"}]:[{signal:"height"},0]:J("Unrecognized scale range value: "+ge(r))}else{if(r.scheme)return n.scheme=te(r.scheme)?HA(r.scheme,t):js(r.scheme,t),r.extent&&(n.schemeExtent=HA(r.extent,t)),void(r.count&&(n.schemeCount=js(r.count,t)));if(r.step)return void(n.rangeStep=js(r.step,t));if(Zm(e.type)&&!te(r))return lfe(r,e,t);te(r)||J("Unsupported range type: "+ge(r))}return r.map(o=>(te(o)?HA:js)(o,t))}function y4(e,t,n){return te(e)?e.map(i=>y4(i,t,n)):we(e)?e.signal?n.signalRef(e.signal):"fit"===t?e:J("Unsupported parameter object: "+ge(e)):e}const La="top",N_="left",I_="right",zd="bottom",Let="vertical",$et="start",jet="end",v4="index",b4="label",Vet="offset",k_="perc",Uet="perc2",Vs="value",Rb="guide-label",w4="guide-title",zet="group-title",Het="group-subtitle",ffe="symbol",WA="gradient",E4="discrete",C4="size",D4=[C4,"shape","fill","stroke","strokeWidth","strokeDash","opacity"],Fb={name:1,style:1,interactive:1},wt={value:0},Us={value:1},qA="group",hfe="rect",S4="rule",Get="symbol",Qh="text";function Pb(e){return e.type=qA,e.interactive=e.interactive||!1,e}function Eo(e,t){const n=(i,r)=>Fa(e[i],Fa(t[i],r));return n.isVertical=i=>Let===Fa(e.direction,t.direction||(i?t.symbolDirection:t.gradientDirection)),n.gradientLength=()=>Fa(e.gradientLength,t.gradientLength||t.gradientWidth),n.gradientThickness=()=>Fa(e.gradientThickness,t.gradientThickness||t.gradientHeight),n.entryColumns=()=>Fa(e.columns,Fa(t.columns,+n.isVertical(!0))),n}function pfe(e,t){const n=t&&(t.update&&t.update[e]||t.enter&&t.enter[e]);return n&&n.signal?n:n?n.value:null}function YA(e,t,n){return`item.anchor === '${$et}' ? ${e} : item.anchor === '${jet}' ? ${t} : ${n}`}const T4=YA(ge(N_),ge(I_),ge("center"));function gfe(e,t){return t?e?we(e)?Object.assign({},e,{offset:gfe(e.offset,t)}):{value:e,offset:t}:t:e}function ss(e,t){return t?(e.name=t.name,e.style=t.style||e.style,e.interactive=!!t.interactive,e.encode=A_(e.encode,t,Fb)):e.interactive=!1,e}function Yet(e,t,n,i){const r=Eo(e,n),o=r.isVertical(),s=r.gradientThickness(),a=r.gradientLength();let l,c,u,d,f;o?(c=[0,1],u=[0,0],d=s,f=a):(c=[0,0],u=[1,0],d=a,f=s);const h={enter:l={opacity:wt,x:wt,y:wt,width:Oi(d),height:Oi(f)},update:rt({},l,{opacity:Us,fill:{gradient:t,start:c,stop:u}}),exit:{opacity:wt}};return tr(h,{stroke:r("gradientStrokeColor"),strokeWidth:r("gradientStrokeWidth")},{opacity:r("gradientOpacity")}),ss({type:hfe,role:SJe,encode:h},i)}function Ket(e,t,n,i,r){const o=Eo(e,n),s=o.isVertical(),a=o.gradientThickness(),l=o.gradientLength();let c,u,d,f,h="";s?(c="y",d="y2",u="x",f="width",h="1-"):(c="x",d="x2",u="y",f="height");const p={opacity:wt,fill:{scale:t,field:Vs}};p[c]={signal:h+"datum."+k_,mult:l},p[u]=wt,p[d]={signal:h+"datum."+Uet,mult:l},p[f]=Oi(a);const g={enter:p,update:rt({},p,{opacity:Us}),exit:{opacity:wt}};return tr(g,{stroke:o("gradientStrokeColor"),strokeWidth:o("gradientStrokeWidth")},{opacity:o("gradientOpacity")}),ss({type:hfe,role:CJe,key:Vs,from:r,encode:g},i)}const Xet=`datum.${k_}<=0?"${N_}":datum.${k_}>=1?"${I_}":"center"`,Qet=`datum.${k_}<=0?"${zd}":datum.${k_}>=1?"${La}":"middle"`;function mfe(e,t,n,i){const r=Eo(e,t),o=r.isVertical(),s=Oi(r.gradientThickness()),a=r.gradientLength();let c,u,d,f,l=r("labelOverlap"),h="";const p={enter:c={opacity:wt},update:u={opacity:Us,text:{field:b4}},exit:{opacity:wt}};return tr(p,{fill:r("labelColor"),fillOpacity:r("labelOpacity"),font:r("labelFont"),fontSize:r("labelFontSize"),fontStyle:r("labelFontStyle"),fontWeight:r("labelFontWeight"),limit:Fa(e.labelLimit,t.gradientLabelLimit)}),o?(c.align={value:"left"},c.baseline=u.baseline={signal:Qet},d="y",f="x",h="1-"):(c.align=u.align={signal:Xet},c.baseline={value:"top"},d="x",f="y"),c[d]=u[d]={signal:h+"datum."+k_,mult:a},c[f]=u[f]=s,s.offset=Fa(e.labelOffset,t.gradientLabelOffset)||0,l=l?{separation:r("labelSeparation"),method:l,order:"datum."+v4}:void 0,ss({type:Qh,role:Gde,style:Rb,key:Vs,from:i,encode:p,overlap:l},n)}function Zet(e,t,n,i,r){const o=Eo(e,t),s=n.entries,a=!(!s||!s.interactive),l=s?s.name:void 0,c=o("clipHeight"),u=o("symbolOffset"),d={data:"value"},f=`(${r}) ? datum.${Vet} : datum.${C4}`,h=c?Oi(c):{field:C4},p=`datum.${v4}`,g=`max(1, ${r})`;let m,_,y,v,b;h.mult=.5,m={enter:_={opacity:wt,x:{signal:f,mult:.5,offset:u},y:h},update:y={opacity:Us,x:_.x,y:_.y},exit:{opacity:wt}};let w=null,C=null;e.fill||(w=t.symbolBaseFillColor,C=t.symbolBaseStrokeColor),tr(m,{fill:o("symbolFillColor",w),shape:o("symbolType"),size:o("symbolSize"),stroke:o("symbolStrokeColor",C),strokeDash:o("symbolDash"),strokeDashOffset:o("symbolDashOffset"),strokeWidth:o("symbolStrokeWidth")},{opacity:o("symbolOpacity")}),D4.forEach(k=>{e[k]&&(y[k]=_[k]={scale:e[k],field:Vs})});const E=ss({type:Get,role:TJe,key:Vs,from:d,clip:!!c||void 0,encode:m},n.symbols),D=Oi(u);D.offset=o("labelOffset"),m={enter:_={opacity:wt,x:{signal:f,offset:D},y:h},update:y={opacity:Us,text:{field:b4},x:_.x,y:_.y},exit:{opacity:wt}},tr(m,{align:o("labelAlign"),baseline:o("labelBaseline"),fill:o("labelColor"),fillOpacity:o("labelOpacity"),font:o("labelFont"),fontSize:o("labelFontSize"),fontStyle:o("labelFontStyle"),fontWeight:o("labelFontWeight"),limit:o("labelLimit")});const M=ss({type:Qh,role:Gde,style:Rb,key:Vs,from:d,encode:m},n.labels);return m={enter:{noBound:{value:!c},width:wt,height:c?Oi(c):wt,opacity:wt},exit:{opacity:wt},update:y={opacity:Us,row:{signal:null},column:{signal:null}}},o.isVertical(!0)?(v=`ceil(item.mark.items.length / ${g})`,y.row.signal=`${p}%${v}`,y.column.signal=`floor(${p} / ${v})`,b={field:["row",p]}):(y.row.signal=`floor(${p} / ${g})`,y.column.signal=`${p} % ${g}`,b={field:p}),y.column.signal=`(${r})?${y.column.signal}:${p}`,Pb({role:d4,from:i={facet:{data:i,name:"value",groupby:v4}},encode:A_(m,s,Fb),marks:[E,M],name:l,interactive:a,sort:b})}const x4='item.orient === "left"',A4='item.orient === "right"',KA=`(${x4} || ${A4})`,ett=`datum.vgrad && ${KA}`,ttt=YA('"top"','"bottom"','"middle"'),itt=`datum.vgrad && ${A4} ? (${YA('"right"','"left"','"center"')}) : (${KA} && !(datum.vgrad && ${x4})) ? "left" : ${T4}`,rtt=`item._anchor || (${KA} ? "middle" : "start")`,ott=`${ett} ? (${x4} ? -90 : 90) : 0`,stt=`${KA} ? (datum.vgrad ? (${A4} ? "bottom" : "top") : ${ttt}) : "top"`;function ltt(e,t){let n;return we(e)&&(e.signal?n=e.signal:e.path?n="pathShape("+_fe(e.path)+")":e.sphere&&(n="geoShape("+_fe(e.sphere)+', {type: "Sphere"})')),n?t.signalRef(n):!!e}function _fe(e){return we(e)&&e.signal?e.signal:ge(e)}function yfe(e){const t=e.role||"";return t.startsWith("axis")||t.startsWith("legend")||t.startsWith("title")?t:e.type===qA?d4:t||c4}function ctt(e){return{marktype:e.type,name:e.name||void 0,role:e.role||yfe(e),zindex:+e.zindex||void 0,aria:e.aria,description:e.description}}function utt(e,t){return e&&e.signal?t.signalRef(e.signal):!1!==e}function M4(e,t){const n=gne(e.type);n||J("Unrecognized transform type: "+ge(e.type));const i=jA(n.type.toLowerCase(),null,vfe(n,e,t));return e.signal&&t.addSignal(e.signal,t.proxy(i)),i.metadata=n.metadata||{},i}function vfe(e,t,n){const i={},r=e.params.length;for(let o=0;owfe(e,r,n))):wfe(e,i,n)}(e,t,n):"projection"===i?n.projectionRef(t[e.name]):e.array&&!Si(r)?r.map(o=>bfe(e,o,n)):bfe(e,r,n):void(e.required&&J("Missing required "+ge(t.type)+" parameter: "+ge(e.name)))}function bfe(e,t,n){const i=e.type;if(Si(t))return Efe(i)?J("Expression references can not be signals."):N4(i)?n.fieldRef(t):Cfe(i)?n.compareRef(t):n.signalRef(t.signal);{const r=e.expr||N4(i);return r&&ptt(t)?n.exprRef(t.expr,t.as):r&>t(t)?kb(t.field,t.as):Efe(i)?Zl(t,n):mtt(i)?Pe(n.getData(t).values):N4(i)?kb(t):Cfe(i)?n.compareRef(t):t}}function wfe(e,t,n){const i=e.params.length;let r;for(let s=0;se&&e.expr,gtt=e=>e&&e.field,mtt=e=>"data"===e,Efe=e=>"expr"===e,N4=e=>"field"===e,Cfe=e=>"compare"===e;function XA(e,t){return e.$ref?e:e.data&&e.data.$ref?e.data:Pe(t.getData(e.data).output)}function Zh(e,t,n,i,r){this.scope=e,this.input=t,this.output=n,this.values=i,this.aggregate=r,this.index={}}function Dfe(e){return Ce(e)?e:null}function Sfe(e,t,n){const i=UA(n.op,n.field);let r;if(t.ops){for(let o=0,s=t.as.length;od??"null").join(",")+"),0)",t);l.update=u.$expr,l.params=u.$params}function QA(e,t){const n=yfe(e),i=e.type===qA,r=e.from&&e.from.facet,o=e.overlap;let a,l,c,u,d,f,h,s=e.layout||n===d4||n===u4;const p=n===c4||s||r,g=function _tt(e,t,n){let i,r,o,s,a;return e?(i=e.facet)&&(t||J("Only group marks can be faceted."),null!=i.field?s=a=XA(i,n):(e.data?a=Pe(n.getData(e.data).aggregate):(o=M4(rt({type:"aggregate",groupby:Ee(i.groupby)},i.aggregate),n),o.params.key=n.keyRef(i.groupby),o.params.pulse=XA(i,n),s=a=Pe(n.add(o))),r=n.keyRef(i.groupby,!0))):s=Pe(n.add(Pa(null,[{}]))),s||(s=XA(e,n)),{key:r,pulse:s,parent:a}}(e.from,i,t);l=t.add(iet({key:g.key||(e.key?kb(e.key):void 0),pulse:g.pulse,clean:!i}));const m=Pe(l);l=c=t.add(Pa({pulse:m})),l=t.add(det({markdef:ctt(e),interactive:utt(e.interactive,t),clip:ltt(e.clip,t),context:{$context:!0},groups:t.lookup(),parent:t.signals.parent?t.signalRef("parent"):null,index:t.markpath(),pulse:Pe(l)}));const _=Pe(l);l=u=t.add(ife(Kde(e.encode,e.type,n,e.style,t,{mod:!1,pulse:_}))),l.params.parent=t.encode(),e.transform&&e.transform.forEach(C=>{const E=M4(C,t),D=E.metadata;(D.generates||D.changes)&&J("Mark transforms should not generate new data."),D.nomod||(u.params.mod=!0),E.params.pulse=Pe(l),t.add(l=E)}),e.sort&&(l=t.add(bet({sort:t.compareRef(e.sort),pulse:Pe(l)})));const y=Pe(l);(r||s)&&(s=t.add(sfe({layout:t.objectProperty(e.layout),legends:t.legends,mark:_,pulse:y})),f=Pe(s));const v=t.add(tfe({mark:_,pulse:f||y}));h=Pe(v),i&&(p&&(a=t.operators,a.pop(),s&&a.pop()),t.pushState(y,f||h,m),r?function ytt(e,t,n){const i=e.from.facet,r=i.name,o=XA(i,t);let s;i.name||J("Facet must have a name: "+ge(i)),i.data||J("Facet must reference a data set: "+ge(i)),i.field?s=t.add(rfe({field:t.fieldRef(i.field),pulse:o})):i.groupby?s=t.add(oet({key:t.keyRef(i.groupby),group:Pe(t.proxy(n.parent)),pulse:o})):J("Facet must specify groupby or field: "+ge(i));const a=t.fork(),l=a.add(Pa()),c=a.add(Xh({pulse:Pe(l)}));a.addData(r,new Zh(a,l,l,c)),a.addSignal("parent",null),s.params.subflow={$subflow:a.parse(e).toRuntime()}}(e,t,g):p?function vtt(e,t,n){const i=t.add(rfe({pulse:n.pulse})),r=t.fork();r.add(Xh()),r.addSignal("parent",null),i.params.subflow={$subflow:r.parse(e).toRuntime()}}(e,t,g):t.parse(e),t.popState(),p&&(s&&a.push(s),a.push(v))),o&&(h=function btt(e,t,n){const i=e.method,r=e.bound,o=e.separation,s={separation:Si(o)?n.signalRef(o.signal):o,method:Si(i)?n.signalRef(i.signal):i,pulse:t};if(e.order&&(s.sort=n.compareRef({field:e.order})),r){const a=r.tolerance;s.boundTolerance=Si(a)?n.signalRef(a.signal):+a,s.boundScale=n.scaleRef(r.scale),s.boundOrient=r.orient}return Pe(n.add(pet(s)))}(o,h,t));const b=t.add(ofe({pulse:h})),w=t.add(Xh({pulse:Pe(b)},void 0,t.parent()));null!=e.name&&(d=e.name,t.addData(d,new Zh(t,c,b,w)),e.on&&e.on.forEach(C=>{(C.insert||C.remove||C.toggle)&&J("Marks only support modify triggers."),Tfe(C,t,d)}))}function Dtt(e,t,n){const i={enter:{},update:{}};return tr(i,{orient:e("orient"),offset:e("offset"),padding:e("padding"),titlePadding:e("titlePadding"),cornerRadius:e("cornerRadius"),fill:e("fillColor"),stroke:e("strokeColor"),strokeWidth:n.strokeWidth,strokeDash:n.strokeDash,x:e("legendX"),y:e("legendY"),format:t.format,formatType:t.formatType}),i}function xfe(e,t,n){return t[e]?`scale("${t[e]}",datum)`:pfe(e,n[0].encode)}Zh.fromEntries=function(e,t){const n=t.length,i=t[n-1],r=t[n-2];let o=t[0],s=null,a=1;for(o&&"load"===o.type&&(o=t[1]),e.add(t[0]);ae===zd||e===La,ZA=(e,t,n)=>Si(e)?$tt(e.signal,t,n):e===N_||e===La?t:n,Ri=(e,t,n)=>Si(e)?Ptt(e.signal,t,n):Mfe(e)?t:n,$a=(e,t,n)=>Si(e)?Ltt(e.signal,t,n):Mfe(e)?n:t,Nfe=(e,t,n)=>Si(e)?Btt(e.signal,t,n):e===La?{value:t}:{value:n},Ftt=(e,t,n)=>Si(e)?jtt(e.signal,t,n):e===I_?{value:t}:{value:n},Ptt=(e,t,n)=>Ife(`${e} === '${La}' || ${e} === '${zd}'`,t,n),Ltt=(e,t,n)=>Ife(`${e} !== '${La}' && ${e} !== '${zd}'`,t,n),$tt=(e,t,n)=>I4(`${e} === '${N_}' || ${e} === '${La}'`,t,n),Btt=(e,t,n)=>I4(`${e} === '${La}'`,t,n),jtt=(e,t,n)=>I4(`${e} === '${I_}'`,t,n),Ife=(e,t,n)=>(t=null!=t?Oi(t):t,n=null!=n?Oi(n):n,kfe(t)&&kfe(n)?{signal:`${e} ? (${t=t?t.signal||ge(t.value):null}) : (${n=n?n.signal||ge(n.value):null})`}:[rt({test:e},t)].concat(n||[])),kfe=e=>null==e||1===Object.keys(e).length,I4=(e,t,n)=>({signal:`${e} ? (${O_(t)}) : (${O_(n)})`}),Vtt=(e,t,n,i,r)=>({signal:(null!=i?`${e} === '${N_}' ? (${O_(i)}) : `:"")+(null!=n?`${e} === '${zd}' ? (${O_(n)}) : `:"")+(null!=r?`${e} === '${I_}' ? (${O_(r)}) : `:"")+(null!=t?`${e} === '${La}' ? (${O_(t)}) : `:"")+"(null)"}),O_=e=>Si(e)?e.signal:null==e?null:ge(e),Utt=(e,t)=>0===t?0:Si(e)?{signal:`(${e.signal}) * ${t}`}:{value:e*t},R_=(e,t)=>{const n=e.signal;return n&&n.endsWith("(null)")?{signal:n.slice(0,-6)+t.signal}:e};function F_(e,t,n,i){let r;if(t&&De(t,e))return t[e];if(De(n,e))return n[e];if(e.startsWith("title")){switch(e){case"titleColor":r="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":r=e[5].toLowerCase()+e.slice(6)}return i[w4][r]}if(e.startsWith("label")){switch(e){case"labelColor":r="fill";break;case"labelFont":case"labelFontSize":r=e[5].toLowerCase()+e.slice(6)}return i[Rb][r]}return null}function Ofe(e){const t={};for(const n of e)if(n)for(const i in n)t[i]=1;return Object.keys(t)}function Rfe(e,t){return{scale:e.scale,range:t}}function k4(e,t,n,i,r){return{signal:'flush(range("'+e+'"), scale("'+e+'", datum.value), '+t+","+n+","+i+","+r+")"}}function Qtt(e,t){const n=function ztt(e,t){var a,l,c,n=t.config,i=n.style,r=n.axis,o="band"===t.scaleType(e.scale)&&n.axisBand,s=e.orient;if(Si(s)){const d=Ofe([n.axisX,n.axisY]),f=Ofe([n.axisTop,n.axisBottom,n.axisLeft,n.axisRight]);for(c of(a={},d))a[c]=Ri(s,F_(c,n.axisX,r,i),F_(c,n.axisY,r,i));for(c of(l={},f))l[c]=Vtt(s.signal,F_(c,n.axisTop,r,i),F_(c,n.axisBottom,r,i),F_(c,n.axisLeft,r,i),F_(c,n.axisRight,r,i))}else a=s===La||s===zd?n.axisX:n.axisY,l=n["axis"+s[0].toUpperCase()+s.slice(1)];return a||l||o?rt({},r,a,l,o):r}(e,t),i=e.encode||{},r=i.axis||{},o=r.name||void 0,s=r.interactive,a=r.style,l=Eo(e,n),c=function qet(e){const t=e("tickBand");let i,r,n=e("tickOffset");return t?t.signal?(i={signal:`(${t.signal}) === 'extent' ? 1 : 0.5`},r={signal:`(${t.signal}) === 'extent'`},we(n)||(n={signal:`(${t.signal}) === 'extent' ? 0 : ${n}`})):"extent"===t?(i=1,r=!0,n=0):(i=.5,r=!1):(i=e("bandPosition"),r=e("tickExtra")),{extra:r,band:i,offset:n}}(l),u={scale:e.scale,ticks:!!l("ticks"),labels:!!l("labels"),grid:!!l("grid"),domain:!!l("domain"),title:null!=e.title},d=Pe(t.add(Pa({},[u]))),f=Pe(t.add(net({scale:t.scaleRef(e.scale),extra:t.property(c.extra),count:t.objectProperty(e.tickCount),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)}))),h=[];let p;return u.grid&&h.push(function Gtt(e,t,n,i,r){const o=Eo(e,t),s=e.orient,a=e.gridScale,l=ZA(s,1,-1),c=function Wtt(e,t){if(1!==t)if(we(e)){let n=e=rt({},e);for(;null!=n.mult;){if(!we(n.mult))return n.mult=Si(t)?{signal:`(${n.mult}) * (${t.signal})`}:n.mult*t,e;n=n.mult=rt({},n.mult)}n.mult=t}else e=Si(t)?{signal:`(${t.signal}) * (${e||0})`}:t*(e||0);return e}(e.offset,l);let u,d,f;const h={enter:u={opacity:wt},update:f={opacity:Us},exit:d={opacity:wt}};tr(h,{stroke:o("gridColor"),strokeCap:o("gridCap"),strokeDash:o("gridDash"),strokeDashOffset:o("gridDashOffset"),strokeOpacity:o("gridOpacity"),strokeWidth:o("gridWidth")});const p={scale:e.scale,field:Vs,band:r.band,extra:r.extra,offset:r.offset,round:o("tickRound")},g=Ri(s,{signal:"height"},{signal:"width"}),m=a?{scale:a,range:0,mult:l,offset:c}:{value:0,offset:c},_=a?{scale:a,range:1,mult:l,offset:c}:rt(g,{mult:l,offset:c});return u.x=f.x=Ri(s,p,m),u.y=f.y=$a(s,p,m),u.x2=f.x2=$a(s,_),u.y2=f.y2=Ri(s,_),d.x=Ri(s,p),d.y=$a(s,p),ss({type:S4,role:yJe,key:Vs,from:i,encode:h},n)}(e,n,i.grid,f,c)),u.ticks&&(p=l("tickSize"),h.push(function qtt(e,t,n,i,r,o){const s=Eo(e,t),a=e.orient,l=ZA(a,-1,1);let c,u,d;const f={enter:c={opacity:wt},update:d={opacity:Us},exit:u={opacity:wt}};tr(f,{stroke:s("tickColor"),strokeCap:s("tickCap"),strokeDash:s("tickDash"),strokeDashOffset:s("tickDashOffset"),strokeOpacity:s("tickOpacity"),strokeWidth:s("tickWidth")});const h=Oi(r);h.mult=l;const p={scale:e.scale,field:Vs,band:o.band,extra:o.extra,offset:o.offset,round:s("tickRound")};return d.y=c.y=Ri(a,wt,p),d.y2=c.y2=Ri(a,h),u.x=Ri(a,p),d.x=c.x=$a(a,wt,p),d.x2=c.x2=$a(a,h),u.y=$a(a,p),ss({type:S4,role:bJe,key:Vs,from:i,encode:f},n)}(e,n,i.ticks,f,p,c))),u.labels&&(p=u.ticks?p:0,h.push(function Ytt(e,t,n,i,r,o){const s=Eo(e,t),a=e.orient,l=e.scale,c=ZA(a,-1,1),u=Kh(s("labelFlush")),d=Kh(s("labelFlushOffset")),f=s("labelAlign"),h=s("labelBaseline");let g,p=0===u||!!u;const m=Oi(r);m.mult=c,m.offset=Oi(s("labelPadding")||0),m.offset.mult=c;const _={scale:l,field:Vs,band:.5,offset:gfe(o.offset,s("labelOffset"))},y=Ri(a,p?k4(l,u,'"left"','"right"','"center"'):{value:"center"},Ftt(a,"left","right")),v=Ri(a,Nfe(a,"bottom","top"),p?k4(l,u,'"top"','"bottom"','"middle"'):{value:"middle"}),b=k4(l,u,`-(${d})`,d,0);p=p&&d;const w={opacity:wt,x:Ri(a,_,m),y:$a(a,_,m)},C={enter:w,update:g={opacity:Us,text:{field:b4},x:w.x,y:w.y,align:y,baseline:v},exit:{opacity:wt,x:w.x,y:w.y}};tr(C,{dx:!f&&p?Ri(a,b):null,dy:!h&&p?$a(a,b):null}),tr(C,{angle:s("labelAngle"),fill:s("labelColor"),fillOpacity:s("labelOpacity"),font:s("labelFont"),fontSize:s("labelFontSize"),fontWeight:s("labelFontWeight"),fontStyle:s("labelFontStyle"),limit:s("labelLimit"),lineHeight:s("labelLineHeight")},{align:f,baseline:h});const E=s("labelBound");let D=s("labelOverlap");return D=D||E?{separation:s("labelSeparation"),method:D,order:"datum.index",bound:E?{scale:l,orient:a,tolerance:E}:null}:void 0,g.align!==y&&(g.align=R_(g.align,y)),g.baseline!==v&&(g.baseline=R_(g.baseline,v)),ss({type:Qh,role:vJe,style:Rb,key:Vs,from:i,encode:C,overlap:D},n)}(e,n,i.labels,f,p,c))),u.domain&&h.push(function Htt(e,t,n,i){const r=Eo(e,t),o=e.orient;let s,a;const l={enter:s={opacity:wt},update:a={opacity:Us},exit:{opacity:wt}};tr(l,{stroke:r("domainColor"),strokeCap:r("domainCap"),strokeDash:r("domainDash"),strokeDashOffset:r("domainDashOffset"),strokeWidth:r("domainWidth"),strokeOpacity:r("domainOpacity")});const c=Rfe(e,0),u=Rfe(e,1);return s.x=a.x=Ri(o,c,wt),s.x2=a.x2=Ri(o,u),s.y=a.y=$a(o,c,wt),s.y2=a.y2=$a(o,u),ss({type:S4,role:_Je,from:i,encode:l},n)}(e,n,i.domain,d)),u.title&&h.push(function Ktt(e,t,n,i){const r=Eo(e,t),o=e.orient,s=ZA(o,-1,1);let a,l;const c={enter:a={opacity:wt,anchor:Oi(r("titleAnchor",null)),align:{signal:T4}},update:l=rt({},a,{opacity:Us,text:Oi(e.title)}),exit:{opacity:wt}},u={signal:`lerp(range("${e.scale}"), ${YA(0,1,.5)})`};return l.x=Ri(o,u),l.y=$a(o,u),a.angle=Ri(o,wt,Utt(s,90)),a.baseline=Ri(o,Nfe(o,zd,La),{value:zd}),l.angle=a.angle,l.baseline=a.baseline,tr(c,{fill:r("titleColor"),fillOpacity:r("titleOpacity"),font:r("titleFont"),fontSize:r("titleFontSize"),fontStyle:r("titleFontStyle"),fontWeight:r("titleFontWeight"),limit:r("titleLimit"),lineHeight:r("titleLineHeight")},{align:r("titleAlign"),angle:r("titleAngle"),baseline:r("titleBaseline")}),function Xtt(e,t,n,i){const r=(a,l)=>null!=a?(n.update[l]=R_(Oi(a),n.update[l]),!1):!M_(l,i),o=r(e("titleX"),"x"),s=r(e("titleY"),"y");n.enter.auto=s===o?Oi(s):Ri(t,Oi(s),Oi(o))}(r,o,c,n),c.update.align=R_(c.update.align,a.align),c.update.angle=R_(c.update.angle,a.angle),c.update.baseline=R_(c.update.baseline,a.baseline),ss({type:Qh,role:wJe,style:w4,from:i,encode:c},n)}(e,n,i.title,d)),QA(Pb({role:mJe,from:d,encode:A_(Ztt(l,e),r,Fb),marks:h,aria:l("aria"),description:l("description"),zindex:l("zindex"),name:o,interactive:s,style:a}),t)}function Ztt(e,t){const n={enter:{},update:{}};return tr(n,{orient:e("orient"),offset:e("offset")||0,position:Fa(t.position,0),titlePadding:e("titlePadding"),minExtent:e("minExtent"),maxExtent:e("maxExtent"),range:{signal:`abs(span(range("${t.scale}")))`},translate:e("translate"),format:t.format,formatType:t.formatType}),n}function Ffe(e,t,n){const i=Ee(e.signals),r=Ee(e.scales);return n||i.forEach(o=>Qde(o,t)),Ee(e.projections).forEach(o=>function Pet(e,t){const n=t.config.projection||{},i={};for(const r in e)"name"!==r&&(i[r]=y4(e[r],r,t));for(const r in n)null==i[r]&&(i[r]=y4(n[r],r,t));t.addProjection(e.name,i)}(o,t)),r.forEach(o=>function Cet(e,t){const n=e.type||"linear";noe(n)||J("Unrecognized scale type: "+ge(n)),t.addScale(e.name,{type:n,domain:void 0})}(o,t)),Ee(e.data).forEach(o=>function Ott(e,t){const n=[];e.transform&&e.transform.forEach(i=>{n.push(M4(i,t))}),e.on&&e.on.forEach(i=>{Tfe(i,t,e.name)}),t.addDataPipeline(e.name,function Rtt(e,t,n){const i=[];let a,l,c,u,d,r=null,o=!1,s=!1;for(e.values?Si(e.values)||zA(e.format)?(i.push(Afe(t,e)),i.push(r=Jh())):i.push(r=Jh({$ingest:e.values,$format:e.format})):e.url?zA(e.url)||zA(e.format)?(i.push(Afe(t,e)),i.push(r=Jh())):i.push(r=Jh({$request:e.url,$format:e.format})):e.source&&(r=a=Ee(e.source).map(f=>Pe(t.getData(f).output)),i.push(null)),l=0,c=n.length;lDet(o,t)),(n||i).forEach(o=>function tet(e,t){const n=t.getSignal(e.name);let i=e.update;e.init&&(i?J("Signals can not include both init and update expressions."):(i=e.init,n.initonly=!0)),i&&(i=Zl(i,t),n.update=i.$expr,n.params=i.$params),e.on&&e.on.forEach(r=>function ZJe(e,t,n){const i=e.encode,r={target:n};let o=e.events,s=e.update,a=[];o||J("Signal update missing events specification."),Ce(o)&&(o=Ud(o,t.isSubscope()?g4:m4)),o=Ee(o).filter(l=>l.signal||l.scale?(a.push(l),0):1),a.length>1&&(a=[eet(a)]),o.length&&a.push(o.length>1?{merge:o}:o[0]),null!=i&&(s&&J("Signal encode and update are mutually exclusive."),s="encode(item(),"+ge(i)+")"),r.update=Ce(s)?Zl(s,t):null!=s.expr?Zl(s.expr,t):null!=s.value?s.value:null!=s.signal?{$expr:QJe,$params:{$value:t.signalRef(s.signal)}}:J("Invalid signal update specification."),e.force&&(r.options={force:!0}),a.forEach(l=>t.addUpdate(rt(function JJe(e,t){return{source:e.signal?t.signalRef(e.signal):e.scale?t.scaleRef(e.scale):Ob(e,t)}}(l,t),r)))}(r,t,n.id))}(o,t)),Ee(e.axes).forEach(o=>Qtt(o,t)),Ee(e.marks).forEach(o=>QA(o,t)),Ee(e.legends).forEach(o=>function wtt(e,t){const n=t.config.legend,i=e.encode||{},r=Eo(e,n),o=i.legend||{},s=o.name||void 0,a=o.interactive,l=o.style,c={};let d,f,h,u=0;D4.forEach(v=>e[v]?(c[v]=e[v],u=u||e[v]):0),u||J("Missing valid scale for legend.");const p=function Ett(e,t){let n=e.type||ffe;return!e.type&&1===function Ctt(e){return D4.reduce((t,n)=>t+(e[n]?1:0),0)}(e)&&(e.fill||e.stroke)&&(n=a$(t)?WA:l$(t)?E4:ffe),n!==WA?n:l$(t)?E4:WA}(e,t.scaleType(u)),g={title:null!=e.title,scales:c,type:p,vgrad:"symbol"!==p&&r.isVertical()},m=Pe(t.add(Pa(null,[g]))),y=Pe(t.add(cet(f={type:p,scale:t.scaleRef(u),count:t.objectProperty(r("tickCount")),limit:t.property(r("symbolLimit")),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)})));return p===WA?(h=[Yet(e,u,n,i.gradient),mfe(e,n,i.labels,y)],f.count=f.count||t.signalRef(`max(2,2*floor((${Kh(r.gradientLength())})/100))`)):p===E4?h=[Ket(e,u,n,i.gradient,y),mfe(e,n,i.labels,y)]:(d=function Jet(e,t){const n=Eo(e,t);return{align:n("gridAlign"),columns:n.entryColumns(),center:{row:!0,column:!1},padding:{row:n("rowPadding"),column:n("columnPadding")}}}(e,n),h=[Zet(e,n,i,y,Kh(d.columns))],f.size=function Stt(e,t,n){const i=Kh(xfe("size",e,n)),r=Kh(xfe("strokeWidth",e,n)),o=Kh(function Ttt(e,t,n){return pfe("fontSize",e)||function Wet(e,t,n){const i=t.config.style[n];return i&&i[e]}("fontSize",t,n)}(n[1].encode,t,Rb));return Zl(`max(ceil(sqrt(${i})+${r}),${o})`,t)}(e,t,h[0].marks)),h=[Pb({role:DJe,from:m,encode:{enter:{x:{value:0},y:{value:0}}},marks:h,layout:d,interactive:a})],g.title&&h.push(function att(e,t,n,i){const r=Eo(e,t),o={enter:{opacity:wt},update:{opacity:Us,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:wt}};return tr(o,{orient:r("titleOrient"),_anchor:r("titleAnchor"),anchor:{signal:rtt},angle:{signal:ott},align:{signal:itt},baseline:{signal:stt},text:e.title,fill:r("titleColor"),fillOpacity:r("titleOpacity"),font:r("titleFont"),fontSize:r("titleFontSize"),fontStyle:r("titleFontStyle"),fontWeight:r("titleFontWeight"),limit:r("titleLimit"),lineHeight:r("titleLineHeight")},{align:r("titleAlign"),baseline:r("titleBaseline")}),ss({type:Qh,role:xJe,style:w4,from:i,encode:o},n)}(e,n,i.title,m)),QA(Pb({role:EJe,from:m,encode:A_(Dtt(r,e,n),o,Fb),marks:h,aria:r("aria"),description:r("description"),zindex:r("zindex"),name:s,interactive:a,style:l}),t)}(o,t)),e.title&&function Att(e,t){const n=Eo(e=Ce(e)?{text:e}:e,t.config.title),i=e.encode||{},r=i.group||{},o=r.name||void 0,s=r.interactive,a=r.style,l=[],u=Pe(t.add(Pa(null,[{}])));return l.push(function Itt(e,t,n,i){const r={value:0},s={enter:{opacity:r},update:{opacity:{value:1}},exit:{opacity:r}};return tr(s,{text:e.text,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("color"),font:t("font"),fontSize:t("fontSize"),fontStyle:t("fontStyle"),fontWeight:t("fontWeight"),lineHeight:t("lineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),ss({type:Qh,role:MJe,style:zet,from:i,encode:s},n)}(e,n,function Mtt(e){const t=e.encode;return t&&t.title||rt({name:e.name,interactive:e.interactive,style:e.style},t)}(e),u)),e.subtitle&&l.push(function ktt(e,t,n,i){const r={value:0},s={enter:{opacity:r},update:{opacity:{value:1}},exit:{opacity:r}};return tr(s,{text:e.subtitle,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("subtitleColor"),font:t("subtitleFont"),fontSize:t("subtitleFontSize"),fontStyle:t("subtitleFontStyle"),fontWeight:t("subtitleFontWeight"),lineHeight:t("subtitleLineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),ss({type:Qh,role:NJe,style:Het,from:i,encode:s},n)}(e,n,i.subtitle,u)),QA(Pb({role:AJe,from:u,encode:Ntt(n,r),marks:l,aria:n("aria"),description:n("description"),zindex:n("zindex"),name:o,interactive:s,style:a}),t)}(e.title,t),t.parseLambdas(),t}const Jtt=e=>A_({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},e);function $b(e,t){return t&&t.signal?{name:e,update:t.signal}:{name:e,value:t}}function Pfe(e,t){this.config=e||{},this.options=t||{},this.bindings=[],this.field={},this.signals={},this.lambdas={},this.scales={},this.events={},this.data={},this.streams=[],this.updates=[],this.operators=[],this.eventConfig=null,this.locale=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function Lfe(e){this.config=e.config,this.options=e.options,this.legends=e.legends,this.field=Object.create(e.field),this.signals=Object.create(e.signals),this.lambdas=Object.create(e.lambdas),this.scales=Object.create(e.scales),this.events=Object.create(e.events),this.data=Object.create(e.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++e._nextsub[0],this._nextsub=e._nextsub,this._parent=e._parent.slice(),this._encode=e._encode.slice(),this._lookup=e._lookup.slice(),this._markpath=e._markpath}function O4(e){return(te(e)?nnt:int)(e)}function nnt(e){const t=e.length;let n="[";for(let i=0;i0?",":"")+(we(r)?r.signal||O4(r):ge(r))}return n+"]"}function int(e){let i,r,t="{",n=0;for(i in e)r=e[i],t+=(++n>1?",":"")+ge(i)+":"+(we(r)?r.signal||O4(r):ge(r));return t+"}"}function ont(e,t,n){return we(e)||J("Input Vega specification must be an object."),function ent(e,t){const n=t.config,i=Pe(t.root=t.add(VA())),r=function tnt(e,t){const n=s=>Fa(e[s],t[s]),i=[$b("background",n("background")),$b("autosize",hJe(n("autosize"))),$b("padding",gJe(n("padding"))),$b("width",n("width")||0),$b("height",n("height")||0)],r=i.reduce((s,a)=>(s[a.name]=a,s),{}),o={};return Ee(e.signals).forEach(s=>{De(r,s.name)?s=rt(r[s.name],s):i.push(s),o[s.name]=s}),Ee(t.signals).forEach(s=>{!De(o,s.name)&&!De(r,s.name)&&i.push(s)}),i}(e,n);r.forEach(c=>Qde(c,t)),t.description=e.description||n.description,t.eventConfig=n.events,t.legends=t.objectProperty(n.legend&&n.legend.layout),t.locale=n.locale;const o=t.add(Pa()),s=t.add(ife(Kde(Jtt(e.encode),qA,u4,e.style,t,{pulse:Pe(o)}))),a=t.add(sfe({layout:t.objectProperty(e.layout),legends:t.legends,autosize:t.signalRef("autosize"),mark:i,pulse:Pe(s)}));t.operators.pop(),t.pushState(Pe(s),Pe(a),null),Ffe(e,t,r),t.operators.push(a);let l=t.add(tfe({mark:i,pulse:Pe(a)}));return l=t.add(ofe({pulse:Pe(l)})),l=t.add(Xh({pulse:Pe(l)})),t.addData("root",new Zh(t,o,o,l)),t}(e,new Pfe(t=Sm(function rnt(){const e="sans-serif",i="#4c78a8",r="#000",o="#888",s="#ddd";return{description:"Vega visualization",padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:i},area:{fill:i},image:null,line:{stroke:i,strokeWidth:2},path:{stroke:i},rect:{fill:i},rule:{stroke:r},shape:{stroke:i},symbol:{fill:i,size:64},text:{fill:r,font:e,fontSize:11},trail:{fill:i,size:2},style:{"guide-label":{fill:r,font:e,fontSize:10},"guide-title":{fill:r,font:e,fontSize:11,fontWeight:"bold"},"group-title":{fill:r,font:e,fontSize:13,fontWeight:"bold"},"group-subtitle":{fill:r,font:e,fontSize:12},point:{size:30,strokeWidth:2,shape:"circle"},circle:{size:30,strokeWidth:2},square:{size:30,strokeWidth:2,shape:"square"},cell:{fill:"transparent",stroke:s},view:{fill:"transparent"}},title:{orient:"top",anchor:"middle",offset:4,subtitlePadding:3},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:!0,domainWidth:1,domainColor:o,grid:!1,gridWidth:1,gridColor:s,labels:!0,labelAngle:0,labelLimit:180,labelOffset:0,labelPadding:2,ticks:!0,tickColor:o,tickOffset:0,tickRound:!0,tickSize:5,tickWidth:1,titlePadding:4},axisBand:{tickOffset:-.5},projection:{type:"mercator"},legend:{orient:"right",padding:0,gridAlign:"each",columnPadding:10,rowPadding:2,symbolDirection:"vertical",gradientDirection:"vertical",gradientLength:200,gradientThickness:16,gradientStrokeColor:s,gradientStrokeWidth:0,gradientLabelOffset:2,labelAlign:"left",labelBaseline:"middle",labelLimit:160,labelOffset:4,labelOverlap:!0,symbolLimit:30,symbolType:"circle",symbolSize:100,symbolOffset:0,symbolStrokeWidth:1.5,symbolBaseFillColor:"transparent",symbolBaseStrokeColor:o,titleLimit:180,titleOrient:"top",titlePadding:5,layout:{offset:18,direction:"horizontal",left:{direction:"vertical"},right:{direction:"vertical"}}},range:{category:{scheme:"tableau10"},ordinal:{scheme:"blues"},heatmap:{scheme:"yellowgreenblue"},ramp:{scheme:"blues"},diverging:{scheme:"blueorange",extent:[1,0]},symbol:["circle","square","triangle-up","cross","diamond","triangle-right","triangle-down","triangle-left"]}}}(),t,e.config),n)).toRuntime()}Pfe.prototype=Lfe.prototype={parse(e){return Ffe(e,this)},fork(){return new Lfe(this)},isSubscope(){return this._subid>0},toRuntime(){return this.finish(),{description:this.description,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig,locale:this.locale}},id(){return(this._subid?this._subid+":":0)+this._id++},add(e){return this.operators.push(e),e.id=this.id(),e.refs&&(e.refs.forEach(t=>{t.$ref=e.id}),e.refs=null),e},proxy(e){const t=e instanceof h4?Pe(e):e;return this.add(_et({value:t}))},addStream(e){return this.streams.push(e),e.id=this.id(),e},addUpdate(e){return this.updates.push(e),e},finish(){let e,t;for(e in this.root&&(this.root.root=!0),this.signals)this.signals[e].signal=e;for(e in this.scales)this.scales[e].scale=e;function n(i,r,o){let s,a;i&&(s=i.data||(i.data={}),a=s[r]||(s[r]=[]),a.push(o))}for(e in this.data){t=this.data[e],n(t.input,e,"input"),n(t.output,e,"output"),n(t.values,e,"values");for(const i in t.index)n(t.index[i],e,"index:"+i)}return this},pushState(e,t,n){this._encode.push(Pe(this.add(Xh({pulse:e})))),this._parent.push(t),this._lookup.push(n?Pe(this.proxy(n)):null),this._markpath.push(-1)},popState(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},parent(){return yt(this._parent)},encode(){return yt(this._encode)},lookup(){return yt(this._lookup)},markpath(){const e=this._markpath;return++e[e.length-1]},fieldRef(e,t){if(Ce(e))return kb(e,t);e.signal||J("Unsupported field reference: "+ge(e));const n=e.signal;let i=this.field[n];if(!i){const r={name:this.signalRef(n)};t&&(r.as=t),this.field[n]=i=Pe(this.add(set(r)))}return i},compareRef(e){let t=!1;const n=o=>Si(o)?(t=!0,this.signalRef(o.signal)):function GJe(e){return e&&e.expr}(o)?(t=!0,this.exprRef(o.expr)):o,i=Ee(e.field).map(n),r=Ee(e.order).map(n);return t?Pe(this.add(nfe({fields:i,orders:r}))):Zde(i,r)},keyRef(e,t){let n=!1;const r=this.signals;return e=Ee(e).map(o=>Si(o)?(n=!0,Pe(r[o.signal])):o),n?Pe(this.add(aet({fields:e,flat:t}))):function VJe(e,t){const n={$key:e};return t&&(n.$flat=!0),n}(e,t)},sortRef(e){if(!e)return e;const t=UA(e.op,e.field),n=e.order||"ascending";return n.signal?Pe(this.add(nfe({fields:t,orders:this.signalRef(n.signal)}))):Zde(t,n)},event(e,t){const n=e+":"+t;if(!this.events[n]){const i=this.id();this.streams.push({id:i,source:e,type:t}),this.events[n]=i}return this.events[n]},hasOwnSignal(e){return De(this.signals,e)},addSignal(e,t){this.hasOwnSignal(e)&&J("Duplicate signal name: "+ge(e));const n=t instanceof h4?t:this.add(VA(t));return this.signals[e]=n},getSignal(e){return this.signals[e]||J("Unrecognized signal name: "+ge(e)),this.signals[e]},signalRef(e){return this.signals[e]?Pe(this.signals[e]):(De(this.lambdas,e)||(this.lambdas[e]=this.add(VA(null))),Pe(this.lambdas[e]))},parseLambdas(){const e=Object.keys(this.lambdas);for(let t=0,n=e.length;te*t,"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"%":(e,t)=>e%t,">":(e,t)=>e>t,"<":(e,t)=>ee<=t,">=":(e,t)=>e>=t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,"===":(e,t)=>e===t,"!==":(e,t)=>e!==t,"&":(e,t)=>e&t,"|":(e,t)=>e|t,"^":(e,t)=>e^t,"<<":(e,t)=>e<>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t},unt={"+":e=>+e,"-":e=>-e,"~":e=>~e,"!":e=>!e};const dnt=Array.prototype.slice,ep=(e,t,n)=>{const i=n?n(t[0]):t[0];return i[e].apply(i,dnt.call(t,1))};var hnt={isNaN:Number.isNaN,isFinite:Number.isFinite,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,atan2:Math.atan2,ceil:Math.ceil,cos:Math.cos,exp:Math.exp,floor:Math.floor,log:Math.log,max:Math.max,min:Math.min,pow:Math.pow,random:Math.random,round:Math.round,sin:Math.sin,sqrt:Math.sqrt,tan:Math.tan,clamp:(e,t,n)=>Math.max(t,Math.min(n,e)),now:Date.now,utc:Date.UTC,datetime:(e,t,n,i,r,o,s)=>new Date(e,t||0,n??1,i||0,r||0,o||0,s||0),date:e=>new Date(e).getDate(),day:e=>new Date(e).getDay(),year:e=>new Date(e).getFullYear(),month:e=>new Date(e).getMonth(),hours:e=>new Date(e).getHours(),minutes:e=>new Date(e).getMinutes(),seconds:e=>new Date(e).getSeconds(),milliseconds:e=>new Date(e).getMilliseconds(),time:e=>new Date(e).getTime(),timezoneoffset:e=>new Date(e).getTimezoneOffset(),utcdate:e=>new Date(e).getUTCDate(),utcday:e=>new Date(e).getUTCDay(),utcyear:e=>new Date(e).getUTCFullYear(),utcmonth:e=>new Date(e).getUTCMonth(),utchours:e=>new Date(e).getUTCHours(),utcminutes:e=>new Date(e).getUTCMinutes(),utcseconds:e=>new Date(e).getUTCSeconds(),utcmilliseconds:e=>new Date(e).getUTCMilliseconds(),length:e=>e.length,join:function(){return ep("join",arguments)},indexof:function(){return ep("indexOf",arguments)},lastindexof:function(){return ep("lastIndexOf",arguments)},slice:function(){return ep("slice",arguments)},reverse:e=>e.slice().reverse(),parseFloat,parseInt,upper:e=>String(e).toUpperCase(),lower:e=>String(e).toLowerCase(),substring:function(){return ep("substring",arguments,String)},split:function(){return ep("split",arguments,String)},replace:function(){return ep("replace",arguments,String)},trim:e=>String(e).trim(),regexp:RegExp,test:(e,t)=>RegExp(e).test(t)};const pnt=["view","item","group","xy","x","y"],R4=new Set([Function,eval,setTimeout,setInterval]);"function"==typeof setImmediate&&R4.add(setImmediate);const gnt={Literal:(e,t)=>t.value,Identifier:(e,t)=>{const n=t.name;return e.memberDepth>0?n:"datum"===n?e.datum:"event"===n?e.event:"item"===n?e.item:lnt[n]||e.params["$"+n]},MemberExpression:(e,t)=>{const n=!t.computed,i=e(t.object);n&&(e.memberDepth+=1);const r=e(t.property);if(n&&(e.memberDepth-=1),!R4.has(i[r]))return i[r];console.error(`Prevented interpretation of member "${r}" which could lead to insecure code execution`)},CallExpression:(e,t)=>{const n=t.arguments;let i=t.callee.name;return i.startsWith("_")&&(i=i.slice(1)),"if"===i?e(n[0])?e(n[1]):e(n[2]):(e.fn[i]||hnt[i]).apply(e.fn,n.map(e))},ArrayExpression:(e,t)=>t.elements.map(e),BinaryExpression:(e,t)=>cnt[t.operator](e(t.left),e(t.right)),UnaryExpression:(e,t)=>unt[t.operator](e(t.argument)),ConditionalExpression:(e,t)=>e(t.test)?e(t.consequent):e(t.alternate),LogicalExpression:(e,t)=>"&&"===t.operator?e(t.left)&&e(t.right):e(t.left)||e(t.right),ObjectExpression:(e,t)=>t.properties.reduce((n,i)=>{e.memberDepth+=1;const r=e(i.key);return e.memberDepth-=1,R4.has(e(i.value))?console.error(`Prevented interpretation of property "${r}" which could lead to insecure code execution`):n[r]=e(i.value),n},{})};function Bb(e,t,n,i,r,o){const s=a=>gnt[a.type](s,a);return s.memberDepth=0,s.fn=Object.create(t),s.params=n,s.datum=i,s.event=r,s.item=o,pnt.forEach(a=>s.fn[a]=function(){return r.vega[a](...arguments)}),s(e)}var mnt={operator(e,t){const n=t.ast,i=e.functions;return r=>Bb(n,i,r)},parameter(e,t){const n=t.ast,i=e.functions;return(r,o)=>Bb(n,i,o,r)},event(e,t){const n=t.ast,i=e.functions;return r=>Bb(n,i,void 0,void 0,r)},handler(e,t){const n=t.ast,i=e.functions;return(r,o)=>Bb(n,i,r,o.item&&o.item.datum,o)},encode(e,t){const{marktype:n,channels:i}=t,r=e.functions,o="group"===n||"image"===n||"rect"===n;return(s,a)=>{const l=s.datum;let u,c=0;for(const d in i)u=Bb(i[d].ast,r,a,l,void 0,s),s[d]!==u&&(s[d]=u,c=1);return"rule"!==n&&function ant(e,t,n){let i;t.x2&&(t.x?(n&&e.x>e.x2&&(i=e.x,e.x=e.x2,e.x2=i),e.width=e.x2-e.x):e.x=e.x2-(e.width||0)),t.xc&&(e.x=e.xc-(e.width||0)/2),t.y2&&(t.y?(n&&e.y>e.y2&&(i=e.y,e.y=e.y2,e.y2=i),e.height=e.y2-e.y):e.y=e.y2-(e.height||0)),t.yc&&(e.y=e.yc-(e.height||0)/2)}(s,i,o),c}}};function F4(e){return ce(e,"or")}function P4(e){return ce(e,"and")}function L4(e){return ce(e,"not")}function JA(e,t){if(L4(e))JA(e.not,t);else if(P4(e))for(const n of e.and)JA(n,t);else if(F4(e))for(const n of e.or)JA(n,t);else t(e)}function P_(e,t){return L4(e)?{not:P_(e.not,t)}:P4(e)?{and:e.and.map(n=>P_(n,t))}:F4(e)?{or:e.or.map(n=>P_(n,t))}:t(e)}const Ze=structuredClone;function $fe(e){throw new Error(e)}function L_(e,t){const n={};for(const i of t)De(e,i)&&(n[i]=e[i]);return n}function Co(e,t){const n={...e};for(const i of t)delete n[i];return n}function gt(e){if(At(e))return e;const t=Ce(e)?e:Jt(e);if(t.length<250)return t;let n=0;for(let i=0;i0===a?s:`[${s}]`),o=r.map((s,a)=>r.slice(0,a+1).join(""));for(const s of o)t.add(s)}return t}function U4(e,t){return void 0===e||void 0===t||j4(V4(e),V4(t))}function Zt(e){return 0===se(e).length}Set.prototype.toJSON=function(){return`Set(${[...this].map(e=>Jt(e)).join(",")})`};const se=Object.keys,nr=Object.values,Hd=Object.entries;function jb(e){return!0===e||!1===e}function Nn(e){const t=e.replace(/\W/g,"_");return(e.match(/^\d+/)?"_":"")+t}function Vb(e,t){return L4(e)?`!(${Vb(e.not,t)})`:P4(e)?`(${e.and.map(n=>Vb(n,t)).join(") && (")})`:F4(e)?`(${e.or.map(n=>Vb(n,t)).join(") || (")})`:t(e)}function eM(e,t){if(0===t.length)return!0;const n=t.shift();return n in e&&eM(e[n],t)&&delete e[n],Zt(e)}function Ub(e){return e.charAt(0).toUpperCase()+e.substr(1)}function z4(e,t="datum"){const n=xl(e),i=[];for(let r=1;r<=n.length;r++){const o=`[${n.slice(0,r).map(ge).join("][")}]`;i.push(`${t}${o}`)}return i.join(" && ")}function Vfe(e,t="datum"){return`${t}[${ge(xl(e).join("."))}]`}function bnt(e){return e.replace(/(\[|\]|\.|'|")/g,"\\$1")}function zs(e){return`${xl(e).map(bnt).join("\\.")}`}function tp(e,t,n){return e.replace(new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),n)}function B_(e){return`${xl(e).join(".")}`}function j_(e){return e?xl(e).length:0}function Xn(...e){return e.find(t=>void 0!==t)}let Ufe=42;function zfe(e){const t=++Ufe;return e?String(e)+t:t}function wnt(){Ufe=42}function Hfe(e){return Gfe(e)?e:`__${e}`}function Gfe(e){return e.startsWith("__")}function zb(e){if(void 0!==e)return(e%360+360)%360}function tM(e){return!!At(e)||!isNaN(e)&&!isNaN(parseFloat(e))}const Wfe=Object.getPrototypeOf(structuredClone({}));function as(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(!as(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const o of e.entries())if(!t.has(o[0]))return!1;for(const o of e.entries())if(!as(o[1],t.get(o[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const o of e.entries())if(!t.has(o[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!==Wfe.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&e.toString!==Wfe.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 o=r[i];if(!as(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function Jt(e){const t=[];return function n(i){if(i&&i.toJSON&&"function"==typeof i.toJSON&&(i=i.toJSON()),void 0===i)return;if("number"==typeof i)return isFinite(i)?""+i:"null";if("object"!=typeof i)return JSON.stringify(i);let r,o;if(Array.isArray(i)){for(o="[",r=0;rcM(e[t])?Nn(`_${t}_${Hd(e[t])}`):Nn(`_${t}_${e[t]}`)).join("")}function mn(e){return!0===e||op(e)&&!e.binned}function ir(e){return"binned"===e||op(e)&&!0===e.binned}function op(e){return we(e)}function cM(e){return ce(e,"param")}function ahe(e){switch(e){case au:case lu:case du:case Do:case tc:case nc:case Yd:case fu:case Wd:case qd:case So:return 6;case Kd:return 4;default:return 10}}function qb(e){return ce(e,"expr")}function rr(e,{level:t}={level:0}){const n=se(e||{}),i={};for(const r of n)i[r]=0===t?ls(e[r]):rr(e[r],{level:t-1});return i}function lhe(e){const{anchor:t,frame:n,offset:i,orient:r,angle:o,limit:s,color:a,subtitleColor:l,subtitleFont:c,subtitleFontSize:u,subtitleFontStyle:d,subtitleFontWeight:f,subtitleLineHeight:h,subtitlePadding:p,...g}=e,_={...t?{anchor:t}:{},...n?{frame:n}:{},...i?{offset:i}:{},...r?{orient:r}:{},...void 0!==o?{angle:o}:{},...void 0!==s?{limit:s}:{}},y={...l?{subtitleColor:l}:{},...c?{subtitleFont:c}:{},...u?{subtitleFontSize:u}:{},...d?{subtitleFontStyle:d}:{},...f?{subtitleFontWeight:f}:{},...h?{subtitleLineHeight:h}:{},...p?{subtitlePadding:p}:{}};return{titleMarkConfig:{...g,...a?{fill:a}:{}},subtitleMarkConfig:L_(e,["align","baseline","dx","dy","limit"]),nonMarkTitleProperties:_,subtitle:y}}function Zd(e){return Ce(e)||te(e)&&Ce(e[0])}function ke(e){return ce(e,"signal")}function sp(e){return ce(e,"step")}function gu(e){return!te(e)&&ce(e,"field")&&ce(e,"data")}const Gnt=se({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}),Wnt={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},t6=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"];function che(e){const t=te(e.condition)?e.condition.map(uhe):uhe(e.condition);return{...ls(e),condition:t}}function ls(e){if(qb(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function uhe(e){if(qb(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function En(e){if(qb(e)){const{expr:t,...n}=e;return{signal:t,...n}}return ke(e)?e:void 0!==e?{value:e}:void 0}function qnt(e){return ke(e)?e.signal:ge(e)}function dhe(e){return ke(e)?e.signal:ge(e.value)}function Ha(e){return ke(e)?e.signal:null==e?null:ge(e)}function Ynt(e,t,n){for(const i of n){const r=oc(i,t.markDef,t.config);void 0!==r&&(e[i]=En(r))}return e}function fhe(e){return[].concat(e.type,e.style??[])}function en(e,t,n,i={}){const{vgChannel:r,ignoreVgConfig:o}=i;return r&&ce(t,r)?t[r]:void 0!==t[e]?t[e]:!o||r&&r!==e?oc(e,t,n,i):void 0}function oc(e,t,n,{vgChannel:i}={}){const r=n6(e,t,n.style);return Xn(i?r:void 0,r,i?n[t.type][i]:void 0,n[t.type][e],i?n.mark[i]:n.mark[e])}function n6(e,t,n){return hhe(e,fhe(t),n)}function hhe(e,t,n){let i;t=Ee(t);for(const r of t){const o=n[r];ce(o,e)&&(i=o[e])}return i}function phe(e,t){return Ee(e).reduce((n,i)=>(n.field.push(ve(i,t)),n.order.push(i.sort??"ascending"),n),{field:[],order:[]})}function ghe(e,t){const n=[...e];return t.forEach(i=>{for(const r of n)if(as(r,i))return;n.push(i)}),n}function mhe(e,t){return as(e,t)||!t?e:e?[...Ee(e),...Ee(t)].join(", "):t}function _he(e,t){const n=e.value,i=t.value;if(null==n||null===i)return{explicit:e.explicit,value:null};if((Zd(n)||ke(n))&&(Zd(i)||ke(i)))return{explicit:e.explicit,value:mhe(n,i)};if(Zd(n)||ke(n))return{explicit:e.explicit,value:n};if(Zd(i)||ke(i))return{explicit:e.explicit,value:i};if(!(Zd(n)||ke(n)||Zd(i)||ke(i)))return{explicit:e.explicit,value:ghe(n,i)};throw new Error("It should never reach here")}function i6(e){return`Invalid specification ${Jt(e)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}const Knt='Autosize "fit" only works for single views and layered views.';function yhe(e){return("width"==e?"Width":"Height")+' "container" only works for single views and layered views.'}function vhe(e){return`${"width"==e?"Width":"Height"} "container" only works well with autosize "fit" or "fit-${"width"==e?"x":"y"}".`}function bhe(e){return e?`Dropping "fit-${e}" because spec has discrete ${To(e)}.`:'Dropping "fit" because spec has discrete size.'}function r6(e){return`Unknown field for ${e}. Cannot calculate view size.`}function whe(e){return`Cannot project a selection on encoding channel "${e}", which has no field.`}function Xnt(e,t){return`Cannot project a selection on encoding channel "${e}" as it uses an aggregate function ("${t}").`}function Ehe(e){return`Selection not supported for ${e} yet.`}function Che(e){return`The "columns" property cannot be used when "${e}" has nested row/column.`}function Dhe(e,t,n){return`An ancestor parsed field "${e}" as ${n} but a child wants to parse the field as ${t}.`}function uit(e){return`Ignoring an invalid transform: ${Jt(e)}.`}function She(e){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${e} are dropped.`}function pit(e){return`${e}Offset dropped because ${e} is continuous`}function The(e){return`Invalid field type "${e}".`}function xhe(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 o6(e,t){return`Dropping ${Jt(e)} from channel "${t}" since it does not contain any data field, datum, value, or signal.`}function uM(e,t,n){return`${e} dropped as it is incompatible with "${t}"${n?` when ${n}`:""}.`}function bit(e){return`${e}-encoding is dropped as ${e} is not a valid encoding channel.`}function wit(e){return`${e} encoding should be discrete (ordinal / nominal / binned).`}function Eit(e){return`${e} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function s6(e,t){return`Using discrete channel "${e}" to encode "${t}" field can be misleading as it does not encode ${"ordinal"===t?"order":"magnitude"}.`}function Mit(e){return`Using unaggregated domain with raw field has no effect (${Jt(e)}).`}function Nit(e){return`Unaggregated domain not applicable for "${e}" since it produces values outside the origin domain of the source data.`}function Iit(e){return`Unaggregated domain is currently unsupported for log scale (${Jt(e)}).`}function Ahe(e,t,n){return`${n}-scale's "${t}" is dropped as it does not work with ${e} scale.`}function Mhe(e){return`The step for "${e}" is dropped because the ${"width"===e?"x":"y"} is continuous.`}const Nhe="Domains that should be unioned has conflicting sort properties. Sort will be set to true.";function dM(e,t){return`Invalid ${e}: ${Jt(t)}.`}function Ihe(e){return`1D error band does not support ${e}.`}function khe(e){return`Channel ${e} is required for "binned" bin.`}const Ohe=EP(wP);let sc=Ohe;function de(...e){sc.warn(...e)}function ap(e){if(e&&we(e))for(const t of l6)if(ce(e,t))return!0;return!1}const Fhe=["january","february","march","april","may","june","july","august","september","october","november","december"],trt=Fhe.map(e=>e.substr(0,3)),Phe=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],nrt=Phe.map(e=>e.substr(0,3));function a6(e,t){const n=[];if(t&&void 0!==e.day&&se(e).length>1&&(de(function Git(e){return`Dropping day from datetime ${Jt(e)} as day cannot be combined with other units.`}(e)),delete(e=Ze(e)).day),n.push(void 0!==e.year?e.year:2012),void 0!==e.month){const i=t?function rrt(e){if(tM(e)&&(e=+e),At(e))return e-1;{const t=e.toLowerCase(),n=Fhe.indexOf(t);if(-1!==n)return n;const i=t.substr(0,3),r=trt.indexOf(i);if(-1!==r)return r;throw new Error(dM("month",e))}}(e.month):e.month;n.push(i)}else if(void 0!==e.quarter){const i=t?function irt(e){if(tM(e)&&(e=+e),At(e))return e>4&&de(dM("quarter",e)),e-1;throw new Error(dM("quarter",e))}(e.quarter):e.quarter;n.push(At(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 ort(e){if(tM(e)&&(e=+e),At(e))return e%7;{const t=e.toLowerCase(),n=Phe.indexOf(t);if(-1!==n)return n;const i=t.substr(0,3),r=nrt.indexOf(i);if(-1!==r)return r;throw new Error(dM("day",e))}}(e.day):e.day;n.push(At(i)?i+1:`${i}+1`)}else n.push(1);for(const i of["hours","minutes","seconds","milliseconds"]){const r=e[i];n.push(typeof r>"u"?0:r)}return n}function lp(e){const n=a6(e,!0).join(", ");return e.utc?`utc(${n})`:`datetime(${n})`}const Lhe={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},l6=se(Lhe);function cp(e){return we(e)?e.binned:$he(e)}function $he(e){return e&&e.startsWith("binned")}function c6(e){return e.startsWith("utc")}const urt={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function fM(e){return l6.filter(t=>jhe(e,t))}function Bhe(e){const t=fM(e);return t[t.length-1]}function jhe(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 Vhe(e){if(e)return`timeUnitSpecifier(${Jt(fM(e))}, ${Jt(urt)})`}function Pi(e){if(!e)return;let t;return Ce(e)?t=$he(e)?{unit:e.substring(6),binned:!0}:{unit:e}:we(e)&&(t={...e,...e.unit?{unit:e.unit}:{}}),c6(t.unit)&&(t.utc=!0,t.unit=function crt(e){return e.substring(3)}(t.unit)),t}function Uhe(e,t=n=>n){const n=Pi(e),i=Bhe(n.unit);if(i&&"day"!==i){const r={year:2001,month:1,date:1,hours:0,minutes:0,seconds:0,milliseconds:0},{step:o,part:s}=zhe(i,n.step);return`${t(lp({...r,[s]:+r[s]+o}))} - ${t(lp(r))}`}}const prt={year:1,month:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1};function zhe(e,t=1){if(function grt(e){return De(prt,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 u6(e){return!!e?.field&&void 0!==e.equal}function d6(e){return!!e?.field&&void 0!==e.lt}function f6(e){return!!e?.field&&void 0!==e.lte}function h6(e){return!!e?.field&&void 0!==e.gt}function p6(e){return!!e?.field&&void 0!==e.gte}function g6(e){if(e?.field){if(te(e.range)&&2===e.range.length)return!0;if(ke(e.range))return!0}return!1}function m6(e){return!!e?.field&&(te(e.oneOf)||te(e.in))}function Hhe(e){return m6(e)||u6(e)||g6(e)||d6(e)||h6(e)||f6(e)||p6(e)}function ac(e,t){return MM(e,{timeUnit:t,wrapTime:!0})}function Ghe(e,t=!0){const{field:n}=e,i=Pi(e.timeUnit),{unit:r,binned:o}=i||{},s=ve(e,{expr:"datum"}),a=r?`time(${o?s:function drt(e,t,{end:n}={end:!1}){const i=z4(t),r=c6(e)?"utc":"";function o(l){return"quarter"===l?`(${r}quarter(${i})-1)`:`${r}${l}(${i})`}let s;const a={};for(const l of l6)jhe(e,l)&&(a[l]=o(l),s=l);return n&&(a[s]+="+1"),function srt(e){const n=a6(e,!1).join(", ");return e.utc?`utc(${n})`:`datetime(${n})`}(a)}(r,n)})`:s;if(u6(e))return`${a}===${ac(e.equal,r)}`;if(d6(e))return`${a}<${ac(e.lt,r)}`;if(h6(e))return`${a}>${ac(e.gt,r)}`;if(f6(e))return`${a}<=${ac(e.lte,r)}`;if(p6(e))return`${a}>=${ac(e.gte,r)}`;if(m6(e))return`indexof([${function yrt(e,t){return e.map(n=>ac(n,t))}(e.oneOf,r).join(",")}], ${a}) !== -1`;if(function _rt(e){return!!e?.field&&void 0!==e.valid}(e))return hM(a,e.valid);if(g6(e)){const{range:l}=rr(e),c=ke(l)?{signal:`${l.signal}[0]`}:l[0],u=ke(l)?{signal:`${l.signal}[1]`}:l[1];if(null!==c&&null!==u&&t)return"inrange("+a+", ["+ac(c,r)+", "+ac(u,r)+"])";const d=[];return null!==c&&d.push(`${a} >= ${ac(c,r)}`),null!==u&&d.push(`${a} <= ${ac(u,r)}`),d.length>0?d.join(" && "):"true"}throw new Error(`Invalid field predicate: ${Jt(e)}`)}function hM(e,t=!0){return t?`isValid(${e}) && isFinite(+${e})`:`!isValid(${e}) || !isFinite(+${e})`}function vrt(e){return Hhe(e)&&e.timeUnit?{...e,timeUnit:Pi(e.timeUnit)}:e}const up={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"};function brt(e){return"quantitative"===e||"temporal"===e}function Whe(e){return"ordinal"===e||"nominal"===e}const dp=up.quantitative,_6=up.ordinal,H_=up.temporal,y6=up.nominal,G_=up.geojson;se(up);const or={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"},pM={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 Ert(e,t){const n=pM[e],i=pM[t];return n===i||"ordinal-position"===n&&"time"===i||"ordinal-position"===i&&"time"===n}se(pM);const Crt={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 qhe(e){return Crt[e]}const Yhe=new Set(["linear","log","pow","sqrt","symlog"]),Khe=new Set([...Yhe,"time","utc"]);function Xhe(e){return Yhe.has(e)}const Qhe=new Set(["quantile","quantize","threshold"]),Drt=new Set([...Khe,...Qhe,"sequential","identity"]),Srt=new Set(["ordinal","bin-ordinal","point","band"]);function Li(e){return Srt.has(e)}function Ga(e){return Drt.has(e)}function lc(e){return Khe.has(e)}function W_(e){return Qhe.has(e)}function Zhe(e){return ce(e,"param")}const Jhe={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:p2t,domain:g2t,range:m2t,rangeMax:_2t,rangeMin:y2t,scheme:v2t,...Nrt}=(se(Jhe),Jhe),Irt=se(Nrt);function v6(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 lc(e)||"band"===e||"point"===e;case"padding":case"rangeMin":case"rangeMax":return lc(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 lc(e);case"nice":return lc(e)||"quantize"===e||"threshold"===e;case"exponent":return"pow"===e;case"base":return"log"===e;case"constant":return"symlog"===e;case"zero":return Ga(e)&&!pt(["log","time","utc","threshold","quantile"],e)}}function epe(e,t){switch(t){case"interpolate":case"scheme":case"domainMid":return z_(e)?void 0:function xit(e){return`Cannot use the scale property "${e}" with non-color channel.`}(t);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 Dr={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"},tpe=Dr.arc,gM=Dr.area,mM=Dr.bar,Frt=Dr.image,_M=Dr.line,yM=Dr.point,Prt=Dr.rect,vM=Dr.rule,npe=Dr.text,b6=Dr.tick,Lrt=Dr.trail,w6=Dr.circle,E6=Dr.square,ipe=Dr.geoshape;function ef(e){return["line","area","trail"].includes(e)}function Kb(e){return["rect","bar","image","arc","tick"].includes(e)}const rpe=new Set(se(Dr));function Wa(e){return ce(e,"type")}const jrt=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit","fill","fillOpacity"],ope=se({color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBandSize:1,timeUnitBandPosition:1}),C6=["binSpacing","continuousBandSize","discreteBandSize","minBandSize"],Vrt={area:["line","point"],bar:C6,rect:C6,line:["point"],tick:["bandSize","thickness",...C6]},spe=se({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 fp(e){return ce(e,"band")}const zrt={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]},D6={binSpacing:0,continuousBandSize:5,minBandSize:.25,timeUnitBandPosition:.5},Hrt={...D6,binSpacing:1},Grt={...D6,thickness:1};function ape(e,{isPath:t}){return void 0===e||"break-paths-show-path-domains"===e?t?"break-paths-show-domains":"filter":null===e?"show":e}function S6({markDef:e,config:t,scaleChannel:n,scaleType:i,isCountAggregate:r}){if(!i||!Ga(i)||r)return"always-valid";const o=ape(en("invalid",e,t),{isPath:ef(e.type)});return void 0!==t.scale?.invalid?.[n]?"show":o}function lpe({scaleName:e,scale:t,mode:n}){const i=`domain('${e}')`;if(!t||!e)return;const r=`${i}[0]`,o=`peek(${i})`,s=t.domainHasZero();return"definitely"===s?{scale:e,value:0}:"maybe"===s?{signal:`scale('${e}', inrange(0, ${i}) ? 0 : ${"zeroOrMin"===n?r:o})`}:{signal:`scale('${e}', ${"zeroOrMin"===n?r:o})`}}function cpe({scaleChannel:e,channelDef:t,scale:n,scaleName:i,markDef:r,config:o}){const s=n?.get("type"),a=Ka(t),c=S6({scaleChannel:e,markDef:r,config:o,scaleType:s,isCountAggregate:lM(a?.aggregate)});if(a&&"show"===c){const u=o.scale.invalid?.[e]??"zero-or-min";return{test:hM(ve(a,{expr:"datum"}),!1),...Yrt(u,n,i)}}}function Yrt(e,t,n){if(function Rrt(e){return we(e)&&"value"in e}(e)){const{value:i}=e;return ke(i)?{signal:i.signal}:{value:i}}return lpe({scale:t,scaleName:n,mode:"zeroOrMin"})}function T6(e){const{channel:t,channelDef:n,markDef:i,scale:r,scaleName:o,config:s}=e,a=rp(t),l=x6(e),c=cpe({scaleChannel:a,channelDef:n,scale:r,scaleName:o,markDef:i,config:s});return void 0!==c?[c,l]:l}function hp(e,t,n,i){const r={};if(t&&(r.scale=t),cc(e)){const{datum:o}=e;ap(o)?r.signal=lp(o):ke(o)?r.signal=o.signal:qb(o)?r.signal=o.expr:r.value=o}else r.field=ve(e,n);if(i){const{offset:o,band:s}=i;o&&(r.offset=o),s&&(r.band=s)}return r}function bM({scaleName:e,fieldOrDatumDef:t,fieldOrDatumDef2:n,offset:i,startSuffix:r,endSuffix:o="end",bandPosition:s=.5}){const a=!ke(s)&&0Nn(`${"unit"===i?"":`_${i}_`}${n[i]}`)).join(""):(t?"utc":"")+"timeunit"+se(n).map(i=>Nn(`_${i}_${n[i]}`)).join("")}(c),r=(!["range","mid"].includes(t.binSuffix)&&t.binSuffix||"")+(t.suffix??""))}s&&(n=n?`${s}_${n}`:s)}return r&&(n=`${n}_${r}`),i&&(n=`${i}_${n}`),t.forAs?B_(n):t.expr?Vfe(n,t.expr)+o:zs(n)+o}function SM(e){switch(e.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return he(e)&&!!e.bin;case"temporal":return!1}throw new Error(The(e.type))}const Spe=(e,t)=>{switch(t.fieldTitle){case"plain":return e.field;case"functional":return function uot(e){const{aggregate:t,bin:n,timeUnit:i,field:r}=e;if(Qd(t))return`${r} for argmax(${t.argmax})`;if(pu(t))return`${r} for argmin(${t.argmin})`;const o=i&&!cp(i)?Pi(i):void 0,s=t||o?.unit||o?.maxbins&&"timeunit"||mn(n)&&"bin";return s?`${s.toUpperCase()}(${r})`:r}(e);default:return function cot(e,t){const{field:n,bin:i,timeUnit:r,aggregate:o}=e;if("count"===o)return t.countTitle;if(mn(i))return`${n} (binned)`;if(r&&!cp(r)){const s=Pi(r)?.unit;if(s)return`${n} (${fM(s).join("-")})`}else if(o)return Qd(o)?`${n} for max ${o.argmax}`:pu(o)?`${n} for min ${o.argmin}`:`${Ub(o)} of ${n}`;return n}(e,t)}};let Tpe=Spe;function xpe(e){Tpe=e}function K_(e,t,{allowDisabling:n,includeDefault:i=!0}){const r=k6(e)?.title;if(!he(e))return r??e.title;const o=e,s=i?O6(o,t):void 0;return n?Xn(r,o.title,s):r??o.title??s}function k6(e){return Y_(e)&&e.axis?e.axis:Cpe(e)&&e.legend?e.legend:N6(e)&&e.header?e.header:void 0}function O6(e,t){return Tpe(e,t)}function TM(e){if(Dpe(e)){const{format:t,formatType:n}=e;return{format:t,formatType:n}}{const t=k6(e)??{},{format:n,formatType:i}=t;return{format:n,formatType:i}}}function Ka(e){return he(e)?e:CM(e)?e.condition:void 0}function Ti(e){return tt(e)?e:ew(e)?e.condition:void 0}function Ape(e,t,n,i={}){return Ce(e)||At(e)||td(e)?(de(function git(e,t,n){return`Channel ${e} is a ${t}. Converted to {value: ${Jt(n)}}.`}(t,Ce(e)?"string":At(e)?"number":"boolean",e)),{value:e}):tt(e)?xM(e,t,n,i):ew(e)?{...e,condition:xM(e.condition,t,n,i)}:e}function xM(e,t,n,i){if(Dpe(e)){const{format:r,formatType:o,...s}=e;if(pp(o)&&!n.customFormatTypes)return de(She(t)),xM(s,t,n,i)}else{const r=Y_(e)?"axis":Cpe(e)?"legend":N6(e)?"header":null;if(r&&e[r]){const{format:o,formatType:s,...a}=e[r];if(pp(s)&&!n.customFormatTypes)return de(She(t)),xM({...e,[r]:a},t,n,i)}}return he(e)?R6(e,t,i):function hot(e){let t=e.type;if(t)return e;const{datum:n}=e;return t=At(n)?"quantitative":Ce(n)?"nominal":ap(n)?"temporal":void 0,{...e,type:t}}(e)}function R6(e,t,{compositeMark:n=!1}={}){const{aggregate:i,timeUnit:r,bin:o,field:s}=e,a={...e};if(!n&&i&&!e6(i)&&!Qd(i)&&!pu(i)&&(de(function _it(e){return`Invalid aggregation operator "${e}".`}(i)),delete a.aggregate),r&&(a.timeUnit=Pi(r)),s&&(a.field=`${s}`),mn(o)&&(a.bin=AM(o,t)),ir(o)&&!Qn(t)&&de(function Kit(e){return`Channel ${e} should not be used with "binned" bin.`}(t)),eo(a)){const{type:l}=a,c=function wrt(e){if(e)switch(e=e.toLowerCase(),e){case"q":case dp:return"quantitative";case"t":case H_:return"temporal";case"o":case _6:return"ordinal";case"n":case y6:return"nominal";case G_:return"geojson"}}(l);l!==c&&(a.type=c),"quantitative"!==l&&lM(i)&&(de(function mit(e,t){return`Invalid field type "${e}" for aggregate: "${t}", using "quantitative" instead.`}(l,i)),a.type="quantitative")}else if(!the(t)){const l=function fot(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(I6(e)&&te(e.sort))return"ordinal";const{aggregate:n,bin:i,timeUnit:r}=e;if(r)return"temporal";if(i||n&&!Qd(n)&&!pu(n))return"quantitative";if(gp(e)&&e.scale?.type)switch(pM[e.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}(a,t);a.type=l}if(eo(a)){const{compatible:l,warning:c}=function pot(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 au:case lu:case nM:return SM(e)?X_:{compatible:!1,warning:wit(t)};case In:case Fi:case Gd:case V_:case Do:case tc:case nc:case Hb:case Gb:case iM:case ip:case rM:case oM:case np:case Hs:case ja:case sM:return X_;case Ua:case Gs:case Va:case za:return n!==dp?{compatible:!1,warning:`Channel ${t} should be used with a quantitative field only, not ${e.type} field.`}:X_;case fu:case Wd:case qd:case Yd:case du:case uu:case cu:case Ba:case ec:return"nominal"!==n||e.sort?X_:{compatible:!1,warning:`Channel ${t} should not be used with an unsorted discrete field.`};case So:case Kd:return SM(e)||function aot(e){return gp(e)&&W_(e.scale?.type)}(e)?X_:{compatible:!1,warning:Eit(t)};case U_:return"nominal"!==e.type||"sort"in e?X_:{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}}}(a,t)||{};!1===l&&de(c)}if(I6(a)&&Ce(a.sort)){const{sort:l}=a;if(mpe(l))return{...a,sort:{encoding:l}};const c=l.substring(1);if("-"===l.charAt(0)&&mpe(c))return{...a,sort:{encoding:c,order:"descending"}}}if(N6(a)){const{header:l}=a;if(l){const{orient:c,...u}=l;if(c)return{...a,header:{...u,labelOrient:l.labelOrient||c,titleOrient:l.titleOrient||c}}}}return a}function AM(e,t){return td(e)?{maxbins:ahe(t)}:"binned"===e?{binned:!0}:e.maxbins||e.step?e:{...e,maxbins:ahe(t)}}const X_={compatible:!0};function Q_(e){const{formatType:t}=TM(e);return"time"===t||!t&&function got(e){return e&&("temporal"===e.type||he(e)&&!!e.timeUnit)}(e)}function MM(e,{timeUnit:t,type:n,wrapTime:i,undefinedIfExprNotRequired:r}){const o=t&&Pi(t)?.unit;let a,s=o||"temporal"===n;return qb(e)?a=e.expr:ke(e)?a=e.signal:ap(e)?(s=!0,a=lp(e)):(Ce(e)||At(e))&&s&&(a=`datetime(${Jt(e)})`,function lrt(e){return De(Lhe,e)}(o)&&(At(e)&&e<1e4||Ce(e)&&isNaN(Date.parse(e)))&&(a=lp({[o]:e}))),a?i&&s?`time(${a})`:a:r?void 0:Jt(e)}function Mpe(e,t){const{type:n}=e;return t.map(i=>{const o=MM(i,{timeUnit:he(e)&&!cp(e.timeUnit)?e.timeUnit:void 0,type:n,undefinedIfExprNotRequired:!0});return void 0!==o?{signal:o}:i})}function tw(e,t){return mn(e.bin)?rc(t)&&["ordinal","nominal"].includes(e.type):(console.warn("Only call this method for binned field defs."),!1)}const Npe={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 nw(e){return e?.condition}const Ipe=["domain","grid","labels","ticks","title"],mot={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"},kpe={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},Ope={...kpe,style:1,labelExpr:1,encoding:1};function Rpe(e){return De(Ope,e)}se(Ope);const Fpe=se({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 _u(e){return ce(e,"mark")}class NM{constructor(t,n){this.name=t,this.run=n}hasMatchingType(t){return!!_u(t)&&function Wrt(e){return Wa(e)?e.type:e}(t.mark)===this.name}}function mp(e,t){const n=e&&e[t];return!!n&&(te(n)?$_(n,i=>!!i.field):he(n)||CM(n))}function Ppe(e,t){const n=e&&e[t];return!!n&&(te(n)?$_(n,i=>!!i.field):he(n)||cc(n)||ew(n))}function Lpe(e,t){if(Qn(t)){const n=e[t];if((he(n)||cc(n))&&(Whe(n.type)||he(n)&&n.timeUnit))return Ppe(e,q4(t))}return!1}function $pe(e){return $_(Dnt,t=>{if(mp(e,t)){const n=e[t];if(te(n))return $_(n,i=>!!i.aggregate);{const i=Ka(n);return i&&!!i.aggregate}}return!1})}function Bpe(e,t){const n=[],i=[],r=[],o=[],s={};return F6(e,(a,l)=>{if(he(a)){const{field:c,aggregate:u,bin:d,timeUnit:f,...h}=a;if(u||f||d){const g=k6(a)?.title;let m=ve(a,{forAs:!0});const _={...g?[]:{title:K_(a,t,{allowDisabling:!0})},...h,field:m};if(u){let y;if(Qd(u)?(y="argmax",m=ve({op:"argmax",field:u.argmax},{forAs:!0}),_.field=`${m}.${c}`):pu(u)?(y="argmin",m=ve({op:"argmin",field:u.argmin},{forAs:!0}),_.field=`${m}.${c}`):"boxplot"!==u&&"errorbar"!==u&&"errorband"!==u&&(y=u),y){const v={op:y,as:m};c&&(v.field=c),o.push(v)}}else if(n.push(m),eo(a)&&mn(d))i.push({bin:d,field:c,as:m}),n.push(ve(a,{binSuffix:"end"})),tw(a,l)&&n.push(ve(a,{binSuffix:"range"})),Qn(l)&&(s[`${l}2`]={field:`${m}_end`}),_.bin="binned",the(l)||(_.type=dp);else if(f&&!cp(f)){r.push({timeUnit:f,field:c,as:m});const y=eo(a)&&a.type!==H_&&"time";y&&(l===Hb||l===ip?_.formatType=y:function knt(e){return De(Y4,e)}(l)?_.legend={formatType:y,..._.legend}:Qn(l)&&(_.axis={formatType:y,..._.axis}))}s[l]=_}else n.push(c),s[l]=e[l]}else s[l]=e[l]}),{bins:i,timeUnits:r,aggregate:o,groupby:n,encoding:s}}function _ot(e,t,n){const i=function Rnt(e,t){return function Pnt(e){switch(e){case Do:case tc:case nc:case sM:case Gb:case iM:case ip:case rM:case U_:case fu:case Wd:case qd:case Yd:case nM:case au:case lu:return ohe;case In:case Fi:case Gd:case V_:case Va:case Ua:return Fnt;case Ba:case ec:case za:case Gs:return{area:"always",bar:"always",image:"always",rect:"always",rule:"always",circle:"binned",point:"binned",square:"binned",tick:"binned",line:"binned",trail:"binned"};case du:return{point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",text:"always",line:"always",trail:"always"};case Kd:return{line:"always",point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",geoshape:"always"};case So:return{point:"always",geoshape:"always"};case Hb:return{text:"always"};case np:return{point:"always",square:"always",text:"always"};case oM:return{image:"always"};case Hs:case ja:return{text:"always",arc:"always"};case uu:case cu:return{arc:"always"}}}(e)[t]}(t,n);if(!i)return!1;if("binned"===i){const r=e[t===Ba?In:Fi];return!!(he(r)&&he(e[t])&&ir(r.bin))}return!0}function IM(e,t){const n={};for(const i of se(e)){const r=Ape(e[i],i,t,{compositeMark:!0});n[i]=r}return n}function F6(e,t,n){if(e)for(const i of se(e)){const r=e[i];if(te(r))for(const o of r)t.call(n,o,i);else t.call(n,r,i)}}function jpe(e,t){return se(t).reduce((n,i)=>{switch(i){case In:case Fi:case rM:case sM:case oM:case Ba:case ec:case Gd:case V_:case Hs:case uu:case ja:case cu:case Va:case Ua:case za:case Gs:case Hb:case So:case np:case ip:return n;case U_:if("line"===e||"trail"===e)return n;case Gb:case iM:{const r=t[i];if(te(r)||he(r))for(const o of Ee(r))o.aggregate||n.push(ve(o,{}));return n}case du:if("trail"===e)return n;case Do:case tc:case nc:case fu:case Wd:case qd:case Kd:case Yd:{const r=Ka(t[i]);return r&&!r.aggregate&&n.push(ve(r,{})),n}}},[])}function P6(e,t,n,i=!0){if("tooltip"in n)return{tooltip:n.tooltip};const r=e.map(({fieldPrefix:s,titlePrefix:a})=>{const l=i?` of ${L6(t)}`:"";return{field:s+t.field,type:t.type,title:ke(a)?{signal:`${a}"${escape(l)}"`}:a+l}}),o=function vot(e){const t=[];for(const n of se(e))if(mp(e,n)){const r=Ee(e[n]);for(const o of r)he(o)?t.push(o):CM(o)&&t.push(o.condition)}return t}(n).map(oot);return{tooltip:[...r,...Jl(o,gt)]}}function L6(e){const{title:t,field:n}=e;return Xn(t,n)}function $6(e,t,n,i,r){const{scale:o,axis:s}=n;return({partName:a,mark:l,positionPrefix:c,endPositionPrefix:u,extraEncoding:d={}})=>{const f=L6(n);return Vpe(e,a,r,{mark:l,encoding:{[t]:{field:`${c}_${n.field}`,type:n.type,...void 0!==f?{title:f}:{},...void 0!==o?{scale:o}:{},...void 0!==s?{axis:s}:{}},...Ce(u)?{[`${t}2`]:{field:`${u}_${n.field}`}}:{},...i,...d}})}}function Vpe(e,t,n,i){const{clip:r,color:o,opacity:s}=e,a=e.type;return e[t]||void 0===e[t]&&n[t]?[{...i,mark:{...n[t],...r?{clip:r}:{},...o?{color:o}:{},...s?{opacity:s}:{},...Wa(i.mark)?i.mark:{type:i.mark},style:`${a}-${String(t)}`,...td(e[t])?{}:e[t]}}]:[]}function Upe(e,t,n){const{encoding:i}=e,r="vertical"===t?"y":"x",s=i[`${r}2`],a=i[`${r}Error`],l=i[`${r}Error2`];return{continuousAxisChannelDef:kM(i[r],n),continuousAxisChannelDef2:kM(s,n),continuousAxisChannelDefError:kM(a,n),continuousAxisChannelDefError2:kM(l,n),continuousAxis:r}}function kM(e,t){if(e?.aggregate){const{aggregate:n,...i}=e;return n!==t&&de(function Yit(e,t){return`Continuous axis should not have customized aggregation function ${e}; ${t} already agregates the axis.`}(n,t)),i}return e}function zpe(e,t){const{mark:n,encoding:i}=e,{x:r,y:o}=i;if(Wa(n)&&n.orient)return n.orient;if(nf(r)){if(nf(o)){const s=he(r)&&r.aggregate,a=he(o)&&o.aggregate;if(!s&&a===t)return"vertical";if(!a&&s===t)return"horizontal";if(s===t&&a===t)throw new Error("Both x and y cannot have aggregate");return Q_(o)&&!Q_(r)?"horizontal":"vertical"}return"horizontal"}if(nf(o))return"vertical";throw new Error(`Need a valid continuous axis for ${t}s`)}const OM="boxplot",Cot=new NM(OM,Gpe);function Hpe(e){return At(e)?"tukey":e}function Gpe(e,{config:t}){e={...e,encoding:IM(e.encoding,t)};const{mark:n,encoding:i,params:r,projection:o,...s}=e,a=Wa(n)?n:{type:n};r&&de(Ehe("boxplot"));const l=a.extent??t.boxplot.extent,c=en("size",a,t),u=a.invalid,d=Hpe(l),{bins:f,timeUnits:h,transform:p,continuousAxisChannelDef:g,continuousAxis:m,groupby:_,aggregate:y,encodingWithoutContinuousAxis:v,ticksOrient:b,boxOrient:w,customTooltipWithoutAggregatedField:C}=function Dot(e,t,n){const i=zpe(e,OM),{continuousAxisChannelDef:r,continuousAxis:o}=Upe(e,i,OM),s=r.field,a=B_(s),l=Hpe(t),c=[...Wpe(s),{op:"median",field:s,as:`mid_box_${a}`},{op:"min",field:s,as:("min-max"===l?"lower_whisker_":"min_")+a},{op:"max",field:s,as:("min-max"===l?"upper_whisker_":"max_")+a}],u="min-max"===l||"tukey"===l?[]:[{calculate:`datum["upper_box_${a}"] - datum["lower_box_${a}"]`,as:`iqr_${a}`},{calculate:`min(datum["upper_box_${a}"] + datum["iqr_${a}"] * ${t}, datum["max_${a}"])`,as:`upper_whisker_${a}`},{calculate:`max(datum["lower_box_${a}"] - datum["iqr_${a}"] * ${t}, datum["min_${a}"])`,as:`lower_whisker_${a}`}],{[o]:d,...f}=e.encoding,{customTooltipWithoutAggregatedField:h,filteredEncoding:p}=function wot(e){const{tooltip:t,...n}=e;if(!t)return{filteredEncoding:n};let i,r;if(te(t)){for(const o of t)o.aggregate?(i||(i=[]),i.push(o)):(r||(r=[]),r.push(o));i&&(n.tooltip=i)}else t.aggregate?n.tooltip=t:r=t;return te(r)&&1===r.length&&(r=r[0]),{customTooltipWithoutAggregatedField:r,filteredEncoding:n}}(f),{bins:g,timeUnits:m,aggregate:_,groupby:y,encoding:v}=Bpe(p,n),b="vertical"===i?"horizontal":"vertical",w=i;return{bins:g,timeUnits:m,transform:[...g,...m,{aggregate:[..._,...c],groupby:y},...u],groupby:y,aggregate:_,continuousAxisChannelDef:r,continuousAxis:o,encodingWithoutContinuousAxis:v,ticksOrient:b,boxOrient:w,customTooltipWithoutAggregatedField:h}}(e,l,t),E=B_(g.field),{color:D,size:M,...k}=v,R=Et=>$6(a,m,g,Et,t.boxplot),F=R(k),P=R(v),T=(we(t.boxplot.box)?t.boxplot.box.color:t.mark.color)||"#4c78a8",S=R({...k,...M?{size:M}:{},color:{condition:{test:`datum['lower_box_${g.field}'] >= datum['upper_box_${g.field}']`,...D||{value:T}}}}),x=P6([{fieldPrefix:"min-max"===d?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:"min-max"===d?"lower_whisker_":"min_",titlePrefix:"Min"}],g,v),I={type:"tick",color:"black",opacity:1,orient:b,invalid:u,aria:!1},A="min-max"===d?x:P6([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],g,v),N=[...F({partName:"rule",mark:{type:"rule",invalid:u,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:A}),...F({partName:"rule",mark:{type:"rule",invalid:u,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:A}),...F({partName:"ticks",mark:I,positionPrefix:"lower_whisker",extraEncoding:A}),...F({partName:"ticks",mark:I,positionPrefix:"upper_whisker",extraEncoding:A})],O=[..."tukey"!==d?N:[],...P({partName:"box",mark:{type:"bar",...c?{size:c}:{},orient:w,invalid:u,ariaRoleDescription:"box"},positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:x}),...S({partName:"median",mark:{type:"tick",invalid:u,...we(t.boxplot.median)&&t.boxplot.median.color?{color:t.boxplot.median.color}:{},...c?{size:c}:{},orient:b,aria:!1},positionPrefix:"mid_box",extraEncoding:x})];if("min-max"===d)return{...s,transform:(s.transform??[]).concat(p),layer:O};const $=`datum["lower_box_${g.field}"]`,B=`datum["upper_box_${g.field}"]`,V=`(${B} - ${$})`,j=`${$} - ${l} * ${V}`,H=`${B} + ${l} * ${V}`,oe=`datum["${g.field}"]`,Y={joinaggregate:Wpe(g.field),groupby:_},ue={transform:[{filter:`(${j} <= ${oe}) && (${oe} <= ${H})`},{aggregate:[{op:"min",field:g.field,as:`lower_whisker_${E}`},{op:"max",field:g.field,as:`upper_whisker_${E}`},{op:"min",field:`lower_box_${g.field}`,as:`lower_box_${E}`},{op:"max",field:`upper_box_${g.field}`,as:`upper_box_${E}`},...y],groupby:_}],layer:N},{tooltip:W,...ne}=k,{scale:ie,axis:G}=g,ye=L6(g),Se=Co(G,["title"]),Ue=Vpe(a,"outliers",t.boxplot,{transform:[{filter:`(${oe} < ${j}) || (${oe} > ${H})`}],mark:"point",encoding:{[m]:{field:g.field,type:g.type,...void 0!==ye?{title:ye}:{},...void 0!==ie?{scale:ie}:{},...Zt(Se)?{}:{axis:Se}},...ne,...D?{color:D}:{},...C?{tooltip:C}:{}}})[0];let Te;const Oe=[...f,...h,Y];return Ue?Te={transform:Oe,layer:[Ue,ue]}:(Te=ue,Te.transform.unshift(...Oe)),{...s,layer:[Te,{transform:p,layer:O}]}}function Wpe(e){const t=B_(e);return[{op:"q1",field:e,as:`lower_box_${t}`},{op:"q3",field:e,as:`upper_box_${t}`}]}const B6="errorbar",Tot=new NM(B6,qpe);function qpe(e,{config:t}){e={...e,encoding:IM(e.encoding,t)};const{transform:n,continuousAxisChannelDef:i,continuousAxis:r,encodingWithoutContinuousAxis:o,ticksOrient:s,markDef:a,outerSpec:l,tooltipEncoding:c}=Ype(e,B6,t);delete o.size;const u=$6(a,r,i,o,t.errorbar),d=a.thickness,f=a.size,h={type:"tick",orient:s,aria:!1,...void 0!==d?{thickness:d}:{},...void 0!==f?{size:f}:{}},p=[...u({partName:"ticks",mark:h,positionPrefix:"lower",extraEncoding:c}),...u({partName:"ticks",mark:h,positionPrefix:"upper",extraEncoding:c}),...u({partName:"rule",mark:{type:"rule",ariaRoleDescription:"errorbar",...void 0!==d?{size:d}:{}},positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:c})];return{...l,transform:n,...p.length>1?{layer:p}:{...p[0]}}}function Ype(e,t,n){const{mark:i,encoding:r,params:o,projection:s,...a}=e,l=Wa(i)?i:{type:i};o&&de(Ehe(t));const{orient:c,inputType:u}=function xot(e,t){const{encoding:n}=e;if(function Aot(e){return(tt(e.x)||tt(e.y))&&!tt(e.x2)&&!tt(e.y2)&&!tt(e.xError)&&!tt(e.xError2)&&!tt(e.yError)&&!tt(e.yError2)}(n))return{orient:zpe(e,t),inputType:"raw"};const i=function Mot(e){return tt(e.x2)||tt(e.y2)}(n),r=function Not(e){return tt(e.xError)||tt(e.xError2)||tt(e.yError)||tt(e.yError2)}(n),o=n.x,s=n.y;if(i){if(r)throw new Error(`${t} cannot be both type aggregated-upper-lower and aggregated-error`);const a=n.x2,l=n.y2;if(tt(a)&&tt(l))throw new Error(`${t} cannot have both x2 and y2`);if(tt(a)){if(nf(o))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${t}`)}if(tt(l)){if(nf(s))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${t}`)}throw new Error("No ranged axis")}{const a=n.xError,c=n.yError,u=n.yError2;if(tt(n.xError2)&&!tt(a))throw new Error(`${t} cannot have xError2 without xError`);if(tt(u)&&!tt(c))throw new Error(`${t} cannot have yError2 without yError`);if(tt(a)&&tt(c))throw new Error(`${t} cannot have both xError and yError with both are quantiative`);if(tt(a)){if(nf(o))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}if(tt(c)){if(nf(s))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}(e,t),{continuousAxisChannelDef:d,continuousAxisChannelDef2:f,continuousAxisChannelDefError:h,continuousAxisChannelDefError2:p,continuousAxis:g}=Upe(e,c,t),{errorBarSpecificAggregate:m,postAggregateCalculates:_,tooltipSummary:y,tooltipTitleWithFieldName:v}=function Iot(e,t,n,i,r,o,s,a){let l=[],c=[];const u=t.field;let d,f=!1;if("raw"===o){const h=e.center?e.center:e.extent?"iqr"===e.extent?"median":"mean":a.errorbar.center,p=e.extent?e.extent:"mean"===h?"stderr":"iqr";if("median"===h!=("iqr"===p)&&de(function qit(e,t,n){return`${e} is not usually used with ${t} for ${n}.`}(h,p,s)),"stderr"===p||"stdev"===p)l=[{op:p,field:u,as:`extent_${u}`},{op:h,field:u,as:`center_${u}`}],c=[{calculate:`datum["center_${u}"] + datum["extent_${u}"]`,as:`upper_${u}`},{calculate:`datum["center_${u}"] - datum["extent_${u}"]`,as:`lower_${u}`}],d=[{fieldPrefix:"center_",titlePrefix:Ub(h)},{fieldPrefix:"upper_",titlePrefix:Kpe(h,p,"+")},{fieldPrefix:"lower_",titlePrefix:Kpe(h,p,"-")}],f=!0;else{let g,m,_;"ci"===p?(g="mean",m="ci0",_="ci1"):(g="median",m="q1",_="q3"),l=[{op:m,field:u,as:`lower_${u}`},{op:_,field:u,as:`upper_${u}`},{op:g,field:u,as:`center_${u}`}],d=[{fieldPrefix:"upper_",titlePrefix:K_({field:u,aggregate:_,type:"quantitative"},a,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:K_({field:u,aggregate:m,type:"quantitative"},a,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:K_({field:u,aggregate:g,type:"quantitative"},a,{allowDisabling:!1})}]}}else{(e.center||e.extent)&&de(function Wit(e,t){return`${t?"extent ":""}${t&&e?"and ":""}${e?"center ":""}${t&&e?"are ":"is "}not needed when data are aggregated.`}(e.center,e.extent)),"aggregated-upper-lower"===o?(d=[],c=[{calculate:`datum["${n.field}"]`,as:`upper_${u}`},{calculate:`datum["${u}"]`,as:`lower_${u}`}]):"aggregated-error"===o&&(d=[{fieldPrefix:"",titlePrefix:u}],c=[{calculate:`datum["${u}"] + datum["${i.field}"]`,as:`upper_${u}`}],c.push(r?{calculate:`datum["${u}"] + datum["${r.field}"]`,as:`lower_${u}`}:{calculate:`datum["${u}"] - datum["${i.field}"]`,as:`lower_${u}`}));for(const h of c)d.push({fieldPrefix:h.as.substring(0,6),titlePrefix:tp(tp(h.calculate,'datum["',""),'"]',"")})}return{postAggregateCalculates:c,errorBarSpecificAggregate:l,tooltipSummary:d,tooltipTitleWithFieldName:f}}(l,d,f,h,p,u,t,n),{[g]:b,["x"===g?"x2":"y2"]:w,["x"===g?"xError":"yError"]:C,["x"===g?"xError2":"yError2"]:E,...D}=r,{bins:M,timeUnits:k,aggregate:R,groupby:F,encoding:P}=Bpe(D,n),T=[...R,...m],S="raw"!==u?[]:F,x=P6(y,d,P,v);return{transform:[...a.transform??[],...M,...k,...0===T.length?[]:[{aggregate:T,groupby:S}],..._],groupby:S,continuousAxisChannelDef:d,continuousAxis:g,encodingWithoutContinuousAxis:P,ticksOrient:"vertical"===c?"horizontal":"vertical",markDef:l,outerSpec:a,tooltipEncoding:x}}function Kpe(e,t,n){return`${Ub(e)} ${n} ${t}`}const j6="errorband",Oot=new NM(j6,Xpe);function Xpe(e,{config:t}){e={...e,encoding:IM(e.encoding,t)};const{transform:n,continuousAxisChannelDef:i,continuousAxis:r,encodingWithoutContinuousAxis:o,markDef:s,outerSpec:a,tooltipEncoding:l}=Ype(e,j6,t),c=s,u=$6(c,r,i,o,t.errorband),d=void 0!==e.encoding.x&&void 0!==e.encoding.y;let f={type:d?"area":"rect"},h={type:d?"line":"rule"};const p={...c.interpolate?{interpolate:c.interpolate}:{},...c.tension&&c.interpolate?{tension:c.tension}:{}};return d?(f={...f,...p,ariaRoleDescription:"errorband"},h={...h,...p,aria:!1}):c.interpolate?de(Ihe("interpolate")):c.tension&&de(Ihe("tension")),{...a,transform:n,layer:[...u({partName:"band",mark:f,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:l}),...u({partName:"borders",mark:h,positionPrefix:"lower",extraEncoding:l}),...u({partName:"borders",mark:h,positionPrefix:"upper",extraEncoding:l})]}}const V6={};function U6(e,t,n){const i=new NM(e,t);V6[e]={normalizer:i,parts:n}}U6(OM,Gpe,["box","median","outliers","rule","ticks"]),U6(B6,qpe,["ticks","rule"]),U6(j6,Xpe,["band","borders"]);const Fot=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],Qpe={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"},Zpe={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"},Pot=se(Qpe),Lot=se(Zpe),Jpe=se({header:1,headerRow:1,headerColumn:1,headerFacet:1}),ege=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],tge={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},Xa=(se(tge),"_vgsid_"),Bot={point:{on:"click",fields:[Xa],toggle:"event.shiftKey",resolve:"global",clear:"dblclick"},interval:{on:"[pointerdown, window:pointerup] > window:pointermove!",encodings:["x","y"],translate:"[pointerdown, window:pointerup] > window:pointermove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}};function z6(e){return"legend"===e||!!e?.legend}function H6(e){return z6(e)&&we(e)}function G6(e){return!!e?.select}function nge(e){const t=[];for(const n of e||[]){if(G6(n))continue;const{expr:i,bind:r,...o}=n;if(r&&i){const s={...o,bind:r,init:i};t.push(s)}else{const s={...o,...i?{update:i}:{},...r?{bind:r}:{}};t.push(s)}}return t}function W6(e){return ce(e,"concat")}function RM(e){return ce(e,"vconcat")}function q6(e){return ce(e,"hconcat")}function ige({step:e,offsetIsDiscrete:t}){return t?e.for??"offset":"position"}function uc(e){return ce(e,"step")}function rge(e){return ce(e,"view")||ce(e,"width")||ce(e,"height")}const Vot=se({align:1,bounds:1,center:1,columns:1,spacing:1});function Y6(e,t){return e[t]??e["width"===t?"continuousWidth":"continuousHeight"]}function K6(e,t){const n=FM(e,t);return uc(n)?n.step:sge}function FM(e,t){return Xn(e[t]??e["width"===t?"discreteWidth":"discreteHeight"],{step:e.step})}const sge=20,Hot={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:{continuousWidth:200,continuousHeight:200,step:sge},mark:{color:"#4c78a8",invalid:"break-paths-show-path-domains",timeUnitBandSize:1},arc:{},area:{},bar:Hrt,circle:{},geoshape:{},image:{},line:{},point:{},rect:D6,rule:{color:"black"},square:{},text:{color:"black"},tick:Grt,trail:{},boxplot:{size:14,extent:1.5,box:{},median:{color:"white"},outliers:{},rule:{},ticks:null},errorbar:{center:"mean",rule:!0,ticks:!1},errorband:{band:{opacity:.3},borders:!1},scale:{pointPadding:.5,barBandPaddingInner:.1,rectBandPaddingInner:0,tickBandPaddingInner:.25,bandWithNestedOffsetPaddingInner:.2,bandWithNestedOffsetPaddingOuter:.2,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:4,minStrokeWidth:1,maxStrokeWidth:4,quantileCount:4,quantizeCount:4,zero:!0},projection:{},legend:{gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},header:{titlePadding:10,labelPadding:10},headerColumn:{},headerRow:{},headerFacet:{},selection:Bot,style:{},title:{},facet:{spacing:20},concat:{spacing:20},normalizedNumberFormat:".0%"},yu=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],age={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},lge={blue:yu[0],orange:yu[1],red:yu[2],teal:yu[3],green:yu[4],yellow:yu[5],purple:yu[6],pink:yu[7],brown:yu[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 cge(e){const t=se(e||{}),n={};for(const i of t){const r=e[i];n[i]=nw(r)?che(r):ls(r)}return n}const Kot=[...spe,...Fpe,...Jpe,"background","padding","legend","lineBreak","scale","style","title","view"];function uge(e={}){const{color:t,font:n,fontSize:i,selection:r,...o}=e,s=Sm({},Ze(Hot),n?function qot(e){return{text:{font:e},style:{"guide-label":{font:e},"guide-title":{font:e},"group-title":{font:e},"group-subtitle":{font:e}}}}(n):{},t?function Got(e={}){return{signals:[{name:"color",value:we(e)?{...lge,...e}:lge}],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"}]}}}(t):{},i?function Wot(e){return{signals:[{name:"fontSize",value:we(e)?{...age,...e}:age}],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"}}}}}(i):{},o||{});r&&Tm(s,"selection",r,!0);const a=Co(s,Kot);for(const l of["background","lineBreak","padding"])s[l]&&(a[l]=ls(s[l]));for(const l of spe)s[l]&&(a[l]=rr(s[l]));for(const l of Fpe)s[l]&&(a[l]=cge(s[l]));for(const l of Jpe)s[l]&&(a[l]=rr(s[l]));if(s.legend&&(a.legend=rr(s.legend)),s.scale){const{invalid:l,...c}=s.scale,u=rr(l,{level:1});a.scale={...rr(c),...se(u).length>0?{invalid:u}:{}}}return s.style&&(a.style=function Yot(e){const t=se(e),n={};for(const i of t)n[i]=cge(e[i]);return n}(s.style)),s.title&&(a.title=rr(s.title)),s.view&&(a.view=rr(s.view)),a}const Xot=new Set(["view",...rpe]),Qot=["color","fontSize","background","padding","facet","concat","numberFormat","numberFormatType","normalizedNumberFormat","normalizedNumberFormatType","timeFormat","countTitle","header","axisQuantitative","axisTemporal","axisDiscrete","axisPoint","axisXBand","axisXPoint","axisXDiscrete","axisXQuantitative","axisXTemporal","axisYBand","axisYPoint","axisYDiscrete","axisYQuantitative","axisYTemporal","scale","selection","overlay"],Zot={view:["continuousWidth","continuousHeight","discreteWidth","discreteHeight","step"],...Vrt};function tst(e,t,n,i){"view"===t&&(n="cell");const o={...i?e[t][i]:e[t],...e.style[n??t]};Zt(o)||(e.style[n??t]=o),i||delete e[t]}function PM(e){return ce(e,"layer")}class X6{map(t,n){return EM(t)?this.mapFacet(t,n):function nst(e){return ce(e,"repeat")}(t)?this.mapRepeat(t,n):q6(t)?this.mapHConcat(t,n):RM(t)?this.mapVConcat(t,n):W6(t)?this.mapConcat(t,n):this.mapLayerOrUnit(t,n)}mapLayerOrUnit(t,n){if(PM(t))return this.mapLayer(t,n);if(_u(t))return this.mapUnit(t,n);throw new Error(i6(t))}mapLayer(t,n){return{...t,layer:t.layer.map(i=>this.mapLayerOrUnit(i,n))}}mapHConcat(t,n){return{...t,hconcat:t.hconcat.map(i=>this.map(i,n))}}mapVConcat(t,n){return{...t,vconcat:t.vconcat.map(i=>this.map(i,n))}}mapConcat(t,n){const{concat:i,...r}=t;return{...r,concat:i.map(o=>this.map(o,n))}}mapFacet(t,n){return{...t,spec:this.map(t.spec,n)}}mapRepeat(t,n){return{...t,spec:this.map(t.spec,n)}}}const rst={zero:1,center:1,normalize:1},sst=new Set([tpe,mM,gM,vM,yM,w6,E6,_M,npe,b6]),ast=new Set([mM,gM,tpe]);function Z_(e){return he(e)&&"quantitative"===q_(e)&&!e.bin}function dge(e,t,{orient:n,type:i}){const r="x"===t?"y":"radius",o="x"===t&&["bar","area"].includes(i),s=e[t],a=e[r];if(he(s)&&he(a))if(Z_(s)&&Z_(a)){if(s.stack)return t;if(a.stack)return r;const l=he(s)&&!!s.aggregate;if(l!==(he(a)&&!!a.aggregate))return l?t:r;if(o){if("vertical"===n)return r;if("horizontal"===n)return t}}else{if(Z_(s))return t;if(Z_(a))return r}else{if(Z_(s))return o&&"vertical"===n?void 0:t;if(Z_(a))return o&&"horizontal"===n?void 0:r}}function fge(e,t){const n=Wa(e)?e:{type:e},i=n.type;if(!sst.has(i))return null;const r=dge(t,"x",n)||dge(t,"theta",n);if(!r)return null;const o=t[r],s=he(o)?ve(o,{}):void 0,a=function lst(e){switch(e){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}(r),l=[],c=new Set;if(t[a]){const g=t[a],m=he(g)?ve(g,{}):void 0;m&&m!==s&&(l.push(a),c.add(m))}const u="x"===a?"xOffset":"yOffset",d=t[u],f=he(d)?ve(d,{}):void 0;f&&f!==s&&(l.push(u),c.add(f));const h=Mnt.reduce((g,m)=>{if("tooltip"!==m&&mp(t,m)){const _=t[m];for(const y of Ee(_)){const v=Ka(y);if(v.aggregate)continue;const b=ve(v,{});(!b||!c.has(b))&&g.push({channel:m,fieldDef:v})}}return g},[]);let p;return void 0!==o.stack?p=td(o.stack)?o.stack?"zero":null:o.stack:ast.has(i)&&(p="zero"),!p||!function ost(e){return De(rst,e)}(p)||$pe(t)&&0===h.length?null:(o?.scale?.type&&o?.scale?.type!==or.LINEAR&&o?.stack&&de(function zit(e){return`Stack is applied to a non-linear scale (${e}).`}(o.scale.type)),tt(t[ic(r)])?(void 0!==o.stack&&de(function Uit(e){return`Cannot stack "${e}" if there is already "${e}2".`}(r)),null):(he(o)&&o.aggregate&&!Vnt.has(o.aggregate)&&de(function Hit(e){return`Stacking is applied even though the aggregate function is non-summative ("${e}").`}(o.aggregate)),{groupbyChannels:l,groupbyFields:c,fieldChannel:r,impute:null!==o.impute&&ef(i),stackBy:h,offset:p}))}function hge(e,t,n){const i=rr(e),r=en("orient",i,n);if(i.orient=function fst(e,t,n){switch(e){case yM:case w6:case E6:case npe:case Prt:case Frt:return}const{x:i,y:r,x2:o,y2:s}=t;switch(e){case mM:if(he(i)&&(ir(i.bin)||he(r)&&r.aggregate&&!i.aggregate))return"vertical";if(he(r)&&(ir(r.bin)||he(i)&&i.aggregate&&!r.aggregate))return"horizontal";if(s||o){if(n)return n;if(!o)return(he(i)&&i.type===dp&&!mn(i.bin)||DM(i))&&he(r)&&ir(r.bin)?"horizontal":"vertical";if(!s)return(he(r)&&r.type===dp&&!mn(r.bin)||DM(r))&&he(i)&&ir(i.bin)?"vertical":"horizontal"}case vM:if(o&&(!he(i)||!ir(i.bin))&&s&&(!he(r)||!ir(r.bin)))return;case gM:if(s)return he(r)&&ir(r.bin)?"horizontal":"vertical";if(o)return he(i)&&ir(i.bin)?"vertical":"horizontal";if(e===vM){if(i&&!r)return"vertical";if(r&&!i)return"horizontal"}case _M:case b6:{const a=Epe(i),l=Epe(r);if(n)return n;if(a&&!l)return"tick"!==e?"horizontal":"vertical";if(!a&&l)return"tick"!==e?"vertical":"horizontal";if(a&&l)return"vertical";{const c=eo(i)&&i.type===H_,u=eo(r)&&r.type===H_;if(c&&!u)return"vertical";if(!c&&u)return"horizontal"}return}}return"vertical"}(i.type,t,r),void 0!==r&&r!==i.orient&&de(function Tit(e,t){return`Specified orient "${e}" overridden with "${t}".`}(i.orient,r)),"bar"===i.type&&i.orient){const l=en("cornerRadiusEnd",i,n);if(void 0!==l){const c="horizontal"===i.orient&&t.x2||"vertical"===i.orient&&t.y2?["cornerRadius"]:zrt[i.orient];for(const u of c)i[u]=l;void 0!==i.cornerRadiusEnd&&delete i.cornerRadiusEnd}}const o=en("opacity",i,n),s=en("fillOpacity",i,n);return void 0===o&&void 0===s&&(i.opacity=function ust(e,t){if(pt([yM,b6,w6,E6],e)&&!$pe(t))return.7}(i.type,t)),void 0===en("cursor",i,n)&&(i.cursor=function cst(e,t,n){return t.href||e.href||en("href",e,n)?"pointer":e.cursor}(i,t,n)),i}function hst(e){const{point:t,line:n,...i}=e;return se(i).length>1?i:i.type}function pst(e){for(const t of["line","area","rule","trail"])e[t]&&(e={...e,[t]:Co(e[t],["point","line"])});return e}function Q6(e,t={},n){return"transparent"===e.point?{opacity:0}:e.point?we(e.point)?e.point:{}:void 0!==e.point?null:t.point||n.shape?we(t.point)?t.point:{}:void 0}function pge(e,t={}){return e.line?!0===e.line?{}:e.line:void 0!==e.line?null:t.line?!0===t.line?{}:t.line:void 0}class gst{constructor(){this.name="path-overlay"}hasMatchingType(t,n){if(_u(t)){const{mark:i,encoding:r}=t,o=Wa(i)?i:{type:i};switch(o.type){case"line":case"rule":case"trail":return!!Q6(o,n[o.type],r);case"area":return!!Q6(o,n[o.type],r)||!!pge(o,n[o.type])}}return!1}run(t,n,i){const{config:r}=n,{params:o,projection:s,mark:a,name:l,encoding:c,...u}=t,d=IM(c,r),f=Wa(a)?a:{type:a},h=Q6(f,r[f.type],d),p="area"===f.type&&pge(f,r[f.type]),g=[{name:l,...o?{params:o}:{},mark:hst({..."area"===f.type&&void 0===f.opacity&&void 0===f.fillOpacity?{opacity:.7}:{},...f}),encoding:Co(d,["shape"])}],m=fge(hge(f,d,r),d);let _=d;if(m){const{fieldChannel:y,offset:v}=m;_={...d,[y]:{...d[y],...v?{stack:v}:{}}}}return _=Co(_,["y2","x2"]),p&&g.push({...s?{projection:s}:{},mark:{type:"line",...L_(f,["clip","interpolate","tension","tooltip"]),...p},encoding:_}),h&&g.push({...s?{projection:s}:{},mark:{type:"point",opacity:1,filled:!0,...L_(f,["clip","tooltip"]),...h},encoding:_}),i({...u,layer:g},{...n,config:pst(r)})}}function mst(e,t){return t?Zb(e)?yge(e,t):gge(e,t):e}function Z6(e,t){return t?yge(e,t):e}function J6(e,t,n){const i=t[e];return function iot(e){return!Ce(e)&&ce(e,"repeat")}(i)?i.repeat in n?{...t,[e]:n[i.repeat]}:void de(function sit(e){return`Unknown repeated value "${e}".`}(i.repeat)):t}function gge(e,t){if(void 0!==(e=J6("field",e,t))){if(null===e)return null;if(I6(e)&&mu(e.sort)){const n=J6("field",e.sort,t);e={...e,...n?{sort:n}:{}}}return e}}function mge(e,t){if(he(e))return gge(e,t);{const n=J6("datum",e,t);return n!==e&&!n.type&&(n.type="nominal"),n}}function _ge(e,t){if(!tt(e)){if(ew(e)){const n=mge(e.condition,t);if(n)return{...e,condition:n};{const{condition:i,...r}=e;return r}}return e}{const n=mge(e,t);if(n)return n;if(Jb(e))return{condition:e.condition}}}function yge(e,t){const n={};for(const i in e)if(ce(e,i)){const r=e[i];if(te(r))n[i]=r.map(o=>_ge(o,t)).filter(o=>o);else{const o=_ge(r,t);void 0!==o&&(n[i]=o)}}return n}class _st{constructor(){this.name="RuleForRangedLine"}hasMatchingType(t){if(_u(t)){const{encoding:n,mark:i}=t;if("line"===i||Wa(i)&&"line"===i.type)for(const r of Tnt){const s=n[rp(r)];if(n[r]&&(he(s)&&!ir(s.bin)||cc(s)))return!0}}return!1}run(t,n,i){const{encoding:r,mark:o}=t;return de(function Sit(e,t){return`Line mark is for continuous lines and thus cannot be used with ${e&&t?"x2 and y2":e?"x2":"y2"}. We will use the rule mark (line segments) instead.`}(!!r.x2,!!r.y2)),i({...t,mark:we(o)?{...o,type:"rule"}:"rule"},n)}}function vge({parentEncoding:e,encoding:t={},layer:n}){let i={};if(e){const r=new Set([...se(e),...se(t)]);for(const o of r){const s=t[o],a=e[o];if(tt(s)){const l={...a,...s};i[o]=l}else ew(s)?i[o]={...s,condition:{...a,...s.condition}}:s||null===s?i[o]=s:(n||Ya(a)||ke(a)||tt(a)||te(a))&&(i[o]=a)}}else i=t;return!i||Zt(i)?void 0:i}function bge(e){const{parentProjection:t,projection:n}=e;return t&&n&&de(function fit(e){const{parentProjection:t,projection:n}=e;return`Layer's shared projection ${Jt(t)} is overridden by a child projection ${Jt(n)}.`}({parentProjection:t,projection:n})),n??t}function ej(e){return ce(e,"filter")}function wge(e){return ce(e,"lookup")}function Est(e){return ce(e,"pivot")}function Cst(e){return ce(e,"density")}function Dst(e){return ce(e,"quantile")}function Sst(e){return ce(e,"regression")}function Tst(e){return ce(e,"loess")}function xst(e){return ce(e,"sample")}function Ast(e){return ce(e,"window")}function Mst(e){return ce(e,"joinaggregate")}function Nst(e){return ce(e,"flatten")}function Ist(e){return ce(e,"calculate")}function Ege(e){return ce(e,"bin")}function kst(e){return ce(e,"impute")}function Ost(e){return ce(e,"timeUnit")}function Rst(e){return ce(e,"aggregate")}function Fst(e){return ce(e,"stack")}function Pst(e){return ce(e,"fold")}function Lst(e){return ce(e,"extent")&&!ce(e,"density")&&!ce(e,"regression")}function Cge(e,t){const{transform:n,...i}=e;return n?{...i,transform:n.map(o=>{if(ej(o))return{filter:tj(o,t)};if(Ege(o)&&op(o.bin))return{...o,bin:Sge(o.bin)};if(wge(o)){const{selection:s,...a}=o.from;return s?{...o,from:{param:s,...a}}:o}return o})}:e}function Dge(e,t){const n=Ze(e);if(he(n)&&op(n.bin)&&(n.bin=Sge(n.bin)),gp(n)&&n.scale?.domain?.selection){const{selection:i,...r}=n.scale.domain;n.scale.domain={...r,...i?{param:i}:{}}}if(Jb(n))if(te(n.condition))n.condition=n.condition.map(i=>{const{selection:r,param:o,test:s,...a}=i;return o?i:{...a,test:tj(i,t)}});else{const{selection:i,param:r,test:o,...s}=Dge(n.condition,t);n.condition=r?n.condition:{...s,test:tj(n.condition,t)}}return n}function Sge(e){const t=e.extent;if(t?.selection){const{selection:n,...i}=t;return{...e,extent:{...i,param:n}}}return e}function tj(e,t){const n=i=>P_(i,r=>{var o;const a={param:r,empty:t.emptySelections[r]??!0};return(o=t.selectionPredicates)[r]??(o[r]=[]),t.selectionPredicates[r].push(a),a});return e.selection?n(e.selection):P_(e.test||e.filter,i=>i.selection?n(i.selection):i)}class nj extends X6{map(t,n){const i=n.selections??[];if(t.params&&!_u(t)){const r=[];for(const o of t.params)G6(o)?i.push(o):r.push(o);t.params=r}return n.selections=i,super.map(t,n)}mapUnit(t,n){const i=n.selections;if(!i||!i.length)return t;const r=(n.path??[]).concat(t.name),o=[];for(const s of i)if(s.views&&s.views.length)for(const a of s.views)(Ce(a)&&(a===t.name||r.includes(a))||te(a)&&a.map(l=>r.indexOf(l)).every((l,c,u)=>-1!==l&&(0===c||l>u[c-1])))&&o.push(s);else o.push(s);return o.length&&(t.params=o),t}}for(const e of["mapFacet","mapRepeat","mapHConcat","mapVConcat","mapLayer"]){const t=nj.prototype[e];nj.prototype[e]=function(n,i){return t.call(this,n,jst(n,i))}}function jst(e,t){return e.name?{...t,path:(t.path??[]).concat(e.name)}:t}function Tge(e,t){void 0===t&&(t=uge(e.config));const n=function Hst(e,t={}){const n={config:t};return zst.map(Vst.map(Ust.map(e,n),n),n)}(e,t),{width:i,height:r}=e,o=function Gst(e,t,n){let{width:i,height:r}=t;const o=_u(e)||PM(e),s={};o?"container"==i&&"container"==r?(s.type="fit",s.contains="padding"):"container"==i?(s.type="fit-x",s.contains="padding"):"container"==r&&(s.type="fit-y",s.contains="padding"):("container"==i&&(de(yhe("width")),i=void 0),"container"==r&&(de(yhe("height")),r=void 0));const a={type:"pad",...s,...n?xge(n.autosize):{},...xge(e.autosize)};if("fit"===a.type&&!o&&(de(Knt),a.type="pad"),"container"==i&&!("fit"==a.type||"fit-x"==a.type)&&de(vhe("width")),"container"==r&&!("fit"==a.type||"fit-y"==a.type)&&de(vhe("height")),!as(a,{type:"pad"}))return a}(n,{width:i,height:r,autosize:e.autosize},t);return{...n,...o?{autosize:o}:{}}}const Vst=new class yst extends X6{constructor(){super(...arguments),this.nonFacetUnitNormalizers=[Cot,Tot,Oot,new gst,new _st]}map(t,n){if(_u(t)){const i=mp(t.encoding,au),r=mp(t.encoding,lu),o=mp(t.encoding,nM);if(i||r||o)return this.mapFacetedUnit(t,n)}return super.map(t,n)}mapUnit(t,n){const{parentEncoding:i,parentProjection:r}=n,o=Z6(t.encoding,n.repeater),s={...t,...t.name?{name:[n.repeaterPrefix,t.name].filter(l=>l).join("_")}:{},...o?{encoding:o}:{}};if(i||r)return this.mapUnitWithParentEncodingOrProjection(s,n);const a=this.mapLayerOrUnit.bind(this);for(const l of this.nonFacetUnitNormalizers)if(l.hasMatchingType(s,n.config))return l.run(s,n,a);return s}mapRepeat(t,n){return function ist(e){return!te(e.repeat)&&ce(e.repeat,"layer")}(t)?this.mapLayerRepeat(t,n):this.mapNonLayerRepeat(t,n)}mapLayerRepeat(t,n){const{repeat:i,spec:r,...o}=t,{row:s,column:a,layer:l}=i,{repeater:c={},repeaterPrefix:u=""}=n;return s||a?this.mapRepeat({...t,repeat:{...s?{row:s}:{},...a?{column:a}:{}},spec:{repeat:{layer:l},spec:r}},n):{...o,layer:l.map(d=>{const f={...c,layer:d},h=`${(r.name?`${r.name}_`:"")+u}child__layer_${Nn(d)}`,p=this.mapLayerOrUnit(r,{...n,repeater:f,repeaterPrefix:h});return p.name=h,p})}}mapNonLayerRepeat(t,n){const{repeat:i,spec:r,data:o,...s}=t;!te(i)&&t.columns&&(t=Co(t,["columns"]),de(Che("repeat")));const a=[],{repeater:l={},repeaterPrefix:c=""}=n,u=!te(i)&&i.row||[l?l.row:null],d=!te(i)&&i.column||[l?l.column:null],f=te(i)&&i||[l?l.repeat:null];for(const p of f)for(const g of u)for(const m of d){const _={repeat:p,row:g,column:m,layer:l.layer},y=(r.name?`${r.name}_`:"")+c+"child__"+(te(i)?`${Nn(p)}`:(i.row?`row_${Nn(g)}`:"")+(i.column?`column_${Nn(m)}`:"")),v=this.map(r,{...n,repeater:_,repeaterPrefix:y});v.name=y,a.push(Co(v,["data"]))}const h=te(i)?t.columns:i.column?i.column.length:1;return{data:r.data??o,align:"all",...s,columns:h,concat:a}}mapFacet(t,n){const{facet:i}=t;return Zb(i)&&t.columns&&(t=Co(t,["columns"]),de(Che("facet"))),super.mapFacet(t,n)}mapUnitWithParentEncodingOrProjection(t,n){const{encoding:i,projection:r}=t,{parentEncoding:o,parentProjection:s,config:a}=n,l=bge({parentProjection:s,projection:r}),c=vge({parentEncoding:o,encoding:Z6(i,n.repeater)});return this.mapUnit({...t,...l?{projection:l}:{},...c?{encoding:c}:{}},{config:a})}mapFacetedUnit(t,n){const{row:i,column:r,facet:o,...s}=t.encoding,{mark:a,width:l,projection:c,height:u,view:d,params:f,encoding:h,...p}=t,{facetMapping:g,layout:m}=this.getFacetMappingAndLayout({row:i,column:r,facet:o},n),_=Z6(s,n.repeater);return this.mapFacet({...p,...m,facet:g,spec:{...l?{width:l}:{},...u?{height:u}:{},...d?{view:d}:{},...c?{projection:c}:{},mark:a,encoding:_,...f?{params:f}:{}}},n)}getFacetMappingAndLayout(t,n){const{row:i,column:r,facet:o}=t;if(i||r){o&&de(function Cit(e){return`Facet encoding dropped as ${e.join(" and ")} ${e.length>1?"are":"is"} also specified.`}([...i?[au]:[],...r?[lu]:[]]));const s={},a={};for(const l of[au,lu]){const c=t[l];if(c){const{align:u,center:d,spacing:f,columns:h,...p}=c;s[l]=p;for(const g of["align","center","spacing"])void 0!==c[g]&&(a[g]??(a[g]={}),a[g][l]=c[g])}}return{facetMapping:s,layout:a}}{const{align:s,center:a,spacing:l,columns:c,...u}=o;return{facetMapping:mst(u,n.repeater),layout:{...s?{align:s}:{},...a?{center:a}:{},...l?{spacing:l}:{},...c?{columns:c}:{}}}}}mapLayer(t,{parentEncoding:n,parentProjection:i,...r}){const{encoding:o,projection:s,...a}=t,l={...r,parentEncoding:vge({parentEncoding:n,encoding:o,layer:!0}),parentProjection:bge({parentProjection:i,projection:s})};return super.mapLayer({...a,...t.name?{name:[l.repeaterPrefix,t.name].filter(c=>c).join("_")}:{}},l)}},Ust=new class Bst extends X6{map(t,n){return n.emptySelections??(n.emptySelections={}),n.selectionPredicates??(n.selectionPredicates={}),t=Cge(t,n),super.map(t,n)}mapLayerOrUnit(t,n){if((t=Cge(t,n)).encoding){const i={};for(const[r,o]of Hd(t.encoding))i[r]=Dge(o,n);t={...t,encoding:i}}return super.mapLayerOrUnit(t,n)}mapUnit(t,n){const{selection:i,...r}=t;return i?{...r,params:Hd(i).map(([o,s])=>{const{init:a,bind:l,empty:c,...u}=s;"single"===u.type?(u.type="point",u.toggle=!1):"multi"===u.type&&(u.type="point"),n.emptySelections[o]="none"!==c;for(const d of nr(n.selectionPredicates[o]??{}))d.empty="none"!==c;return{name:o,value:a,select:u,bind:l}})}:t}},zst=new nj;function xge(e){return Ce(e)?{type:e}:e??{}}const Yst=["background","padding"];function Age(e,t){const n={};for(const i of Yst)e&&void 0!==e[i]&&(n[i]=ls(e[i]));return t&&(n.params=e.params),n}class vu{constructor(t={},n={}){this.explicit=t,this.implicit=n}clone(){return new vu(Ze(this.explicit),Ze(this.implicit))}combine(){return{...this.explicit,...this.implicit}}get(t){return Xn(this.explicit[t],this.implicit[t])}getWithExplicit(t){return void 0!==this.explicit[t]?{explicit:!0,value:this.explicit[t]}:void 0!==this.implicit[t]?{explicit:!1,value:this.implicit[t]}:{explicit:!1,value:void 0}}setWithExplicit(t,{value:n,explicit:i}){void 0!==n&&this.set(t,n,i)}set(t,n,i){return delete this[i?"implicit":"explicit"][t],this[i?"explicit":"implicit"][t]=n,this}copyKeyFromSplit(t,{explicit:n,implicit:i}){void 0!==n[t]?this.set(t,n[t],!0):void 0!==i[t]&&this.set(t,i[t],!1)}copyKeyFromObject(t,n){void 0!==n[t]&&this.set(t,n[t],!0)}copyAll(t){for(const n of se(t.combine())){const i=t.getWithExplicit(n);this.setWithExplicit(n,i)}}}function dc(e){return{explicit:!0,value:e}}function cs(e){return{explicit:!1,value:e}}function Mge(e){return(t,n,i,r)=>{const o=e(t.value,n.value);return o>0?t:o<0?n:LM(t,n,i,r)}}function LM(e,t,n,i){return e.explicit&&t.explicit&&de(function Fit(e,t,n,i){return`Conflicting ${t.toString()} property "${e.toString()}" (${Jt(n)} and ${Jt(i)}). Using ${Jt(n)}.`}(n,i,e.value,t.value)),e}function rf(e,t,n,i,r=LM){return void 0===e||void 0===e.value?t:e.explicit&&!t.explicit?e:t.explicit&&!e.explicit?t:as(e.value,t.value)?e:r(e,t,n,i)}class Kst extends vu{constructor(t={},n={},i=!1){super(t,n),this.explicit=t,this.implicit=n,this.parseNothing=i}clone(){const t=super.clone();return t.parseNothing=this.parseNothing,t}}function J_(e){return ce(e,"url")}function iw(e){return ce(e,"values")}function Nge(e){return ce(e,"name")&&!J_(e)&&!iw(e)&&!sf(e)}function sf(e){return e&&(Ige(e)||kge(e)||ij(e))}function Ige(e){return ce(e,"sequence")}function kge(e){return ce(e,"sphere")}function ij(e){return ce(e,"graticule")}var Zn=function(e){return e[e.Raw=0]="Raw",e[e.Main=1]="Main",e[e.Row=2]="Row",e[e.Column=3]="Column",e[e.Lookup=4]="Lookup",e[e.PreFilterInvalid=5]="PreFilterInvalid",e[e.PostFilterInvalid=6]="PostFilterInvalid",e}(Zn||{});function Oge({invalid:e,isPath:t}){switch(ape(e,{isPath:t})){case"filter":return{marks:"exclude-invalid-values",scales:"exclude-invalid-values"};case"break-paths-show-domains":return{marks:t?"include-invalid-values":"exclude-invalid-values",scales:"include-invalid-values"};case"break-paths-filter-domains":return{marks:t?"include-invalid-values":"exclude-invalid-values",scales:"exclude-invalid-values"};case"show":return{marks:"include-invalid-values",scales:"include-invalid-values"}}}function Rge(e){const{signals:t,hasLegend:n,index:i,...r}=e;return r.field=zs(r.field),r}function _p(e,t=!0,n=hr){if(te(e)){const i=e.map(r=>_p(r,t,n));return t?`[${i.join(", ")}]`:i}return ap(e)?n(t?lp(e):function art(e){const t=a6(e,!0);return e.utc?+new Date(Date.UTC(...t)):+new Date(...t)}(e)):t?n(Jt(e)):e}function Qst(e,t){for(const n of nr(e.component.selection??{})){const i=n.name;let r=`${i}${af}, ${"global"===n.resolve?"true":`{unit: ${vp(e)}}`}`;for(const o of HM)o.defined(n)&&(o.signals&&(t=o.signals(e,n,t)),o.modifyExpr&&(r=o.modifyExpr(e,n,r)));t.push({name:i+Aat,on:[{events:{signal:n.name+af},update:`modify(${ge(n.name+yp)}, ${r})`}]})}return rj(t)}function Zst(e,t){if(e.component.selection&&se(e.component.selection).length){const n=ge(e.getName("cell"));t.unshift({name:"facet",value:{},on:[{events:Ud("pointermove","scope"),update:`isTuple(facet) ? facet : group(${n}).datum`}]})}return rj(t)}function Fge(e,t){for(const n of nr(e.component.selection??{}))for(const i of HM)i.defined(n)&&i.marks&&(t=i.marks(e,n,t));return t}function rj(e){return e.map(t=>(t.on&&!t.on.length&&delete t.on,t))}class Kt{constructor(t,n){this.debugName=n,this._children=[],this._parent=null,t&&(this.parent=t)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(t){this._parent=t,t&&t.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(t,n){this._children.includes(t)?de("Attempt to add the same child twice."):void 0!==n?this._children.splice(n,0,t):this._children.push(t)}removeChild(t){const n=this._children.indexOf(t);return this._children.splice(n,1),n}remove(){let t=this._parent.removeChild(this);for(const n of this._children)n._parent=this._parent,this._parent.addChild(n,t++)}insertAsParentOf(t){const n=t.parent;n.removeChild(this),this.parent=n,t.parent=this}swapWithParent(){const t=this._parent,n=t.parent;for(const r of this._children)r.parent=t;this._children=[],t.removeChild(this);const i=t.parent.removeChild(t);this._parent=n,n.addChild(this,i),t.parent=this}}class xo extends Kt{clone(){const t=new this.constructor;return t.debugName=`clone_${this.debugName}`,t._source=this._source,t._name=`clone_${this._name}`,t.type=this.type,t.refCounts=this.refCounts,t.refCounts[t._name]=0,t}constructor(t,n,i,r){super(t,n),this.type=i,this.refCounts=r,this._source=this._name=n,this.refCounts&&!(this._name in this.refCounts)&&(this.refCounts[this._name]=0)}dependentFields(){return new Set}producedFields(){return new Set}hash(){return void 0===this._hash&&(this._hash=`Output ${zfe()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(t){this._source=t}}function oj(e){return void 0!==e.as}function Pge(e){return`${e}_end`}class fc extends Kt{clone(){return new fc(null,Ze(this.timeUnits))}constructor(t,n){super(t),this.timeUnits=n}static makeFromEncoding(t,n){const i=n.reduceFieldDef((r,o,s)=>{const{field:a,timeUnit:l}=o;if(l){let c;if(cp(l)){if(On(n)){const{mark:u,markDef:d,config:f}=n,h=tf({fieldDef:o,markDef:d,config:f});(Kb(u)||h)&&(c={timeUnit:Pi(l),field:a})}}else c={as:ve(o,{forAs:!0}),field:a,timeUnit:l};if(On(n)){const{mark:u,markDef:d,config:f}=n,h=tf({fieldDef:o,markDef:d,config:f});Kb(u)&&Qn(s)&&.5!==h&&(c.rectBandPosition=h)}c&&(r[gt(c)]=c)}return r},{});return Zt(i)?null:new fc(t,i)}static makeFromTransform(t,n){const{timeUnit:i,...r}={...n},s={...r,timeUnit:Pi(i)};return new fc(t,{[gt(s)]:s})}merge(t){this.timeUnits={...this.timeUnits};for(const n in t.timeUnits)this.timeUnits[n]||(this.timeUnits[n]=t.timeUnits[n]);for(const n of t.children)t.removeChild(n),n.parent=this;t.remove()}removeFormulas(t){const n={};for(const[i,r]of Hd(this.timeUnits)){const o=oj(r)?r.as:`${r.field}_end`;t.has(o)||(n[i]=r)}this.timeUnits=n}producedFields(){return new Set(nr(this.timeUnits).map(t=>oj(t)?t.as:Pge(t.field)))}dependentFields(){return new Set(nr(this.timeUnits).map(t=>t.field))}hash(){return`TimeUnit ${gt(this.timeUnits)}`}assemble(){const t=[];for(const n of nr(this.timeUnits)){const{rectBandPosition:i}=n,r=Pi(n.timeUnit);if(oj(n)){const{field:o,as:s}=n,{unit:a,utc:l,...c}=r,u=[s,`${s}_end`];t.push({field:zs(o),type:"timeunit",...a?{units:fM(a)}:{},...l?{timezone:"utc"}:{},...c,as:u}),t.push(...$ge(u,i,r))}else if(n){const{field:o}=n,s=o.replaceAll("\\.","."),a=Lge({timeUnit:r,field:s}),l=Pge(s);t.push({type:"formula",expr:a,as:l}),t.push(...$ge([s,l],i,r))}}return t}}const $M="offsetted_rect_start",BM="offsetted_rect_end";function Lge({timeUnit:e,field:t,reverse:n}){const{unit:i,utc:r}=e,o=Bhe(i),{part:s,step:a}=zhe(o,e.step);return`${r?"utcOffset":"timeOffset"}('${s}', datum['${t}'], ${n?-a:a})`}function $ge([e,t],n,i){if(void 0!==n&&.5!==n){const r=`datum['${e}']`,o=`datum['${t}']`;return[{type:"formula",expr:Bge([Lge({timeUnit:i,field:e,reverse:!0}),r],n+.5),as:`${e}_${$M}`},{type:"formula",expr:Bge([r,o],n+.5),as:`${e}_${BM}`}]}return[]}function Bge([e,t],n){return`${1-n} * ${e} + ${n} * ${t}`}const rw="_tuple_fields";class iat{constructor(...t){this.items=t,this.hasChannel={},this.hasField={},this.hasSelectionId=!1}}const rat={defined:()=>!0,parse:(e,t,n)=>{const i=t.name,r=t.project??(t.project=new iat),o={},s={},a=new Set,l=(p,g)=>{const m="visual"===g?p.channel:p.field;let _=Nn(`${i}_${m}`);for(let y=1;a.has(_);y++)_=Nn(`${i}_${m}_${y}`);return a.add(_),{[g]:_}},c=t.type,u=e.config.selection[c],d=void 0!==n.value?Ee(n.value):null;let{fields:f,encodings:h}=we(n.select)?n.select:{};if(!f&&!h&&d)for(const p of d)if(we(p))for(const g of se(p))Snt(g)?(h||(h=[])).push(g):"interval"===c?(de('Interval selections should be initialized using "x", "y", "longitude", or "latitude" keys.'),h=u.encodings):(f??(f=[])).push(g);!f&&!h&&(h=u.encodings,"fields"in u&&(f=u.fields));for(const p of h??[]){const g=e.fieldDef(p);if(g){let m=g.field;if(g.aggregate){de(Xnt(p,g.aggregate));continue}if(!m){de(whe(p));continue}if(g.timeUnit&&!cp(g.timeUnit)){m=e.vgField(p);const _={timeUnit:g.timeUnit,as:m,field:g.field};s[gt(_)]=_}if(!o[m]){const y={field:m,channel:p,type:"interval"===c&&rc(p)&&Ga(e.getScaleComponent(p).get("type"))?"R":g.bin?"R-RE":"E",index:r.items.length};y.signals={...l(y,"data"),...l(y,"visual")},r.items.push(o[m]=y),r.hasField[m]=o[m],r.hasSelectionId=r.hasSelectionId||m===Xa,Xfe(p)?(y.geoChannel=p,y.channel=Kfe(p),r.hasChannel[y.channel]=o[m]):r.hasChannel[p]=o[m]}}else de(whe(p))}for(const p of f??[]){if(r.hasField[p])continue;const g={type:"E",field:p,index:r.items.length};g.signals={...l(g,"data")},r.items.push(g),r.hasField[p]=g,r.hasSelectionId=r.hasSelectionId||p===Xa}d&&(t.init=d.map(p=>r.items.map(g=>we(p)?void 0!==p[g.geoChannel||g.channel]?p[g.geoChannel||g.channel]:p[g.field]:p))),Zt(s)||(r.timeUnit=new fc(null,s))},signals:(e,t,n)=>{const i=t.name+rw;return n.filter(o=>o.name===i).length>0||t.project.hasSelectionId?n:n.concat({name:i,value:t.project.items.map(Rge)})}},bu={defined:e=>"interval"===e.type&&"global"===e.resolve&&e.bind&&"scales"===e.bind,parse:(e,t)=>{const n=t.scales=[];for(const i of t.project.items){const r=i.channel;if(!rc(r))continue;const o=e.getScaleComponent(r),s=o?o.get("type"):void 0;"sequential"==s&&de("Sequntial scales are deprecated. The available quantitative scale type values are linear, log, pow, sqrt, symlog, time and utc"),o&&Ga(s)?(o.set("selectionExtent",{param:t.name,field:i.field},!0),n.push(i)):de("Scale bindings are currently only supported for scales with unbinned, continuous domains.")}},topLevelSignals:(e,t,n)=>{const i=t.scales.filter(s=>0===n.filter(a=>a.name===s.signals.data).length);if(!e.parent||jge(e)||0===i.length)return n;const r=n.find(s=>s.name===t.name);let o=r.update;if(o.includes(ume))r.update=`{${i.map(s=>`${ge(zs(s.field))}: ${s.signals.data}`).join(", ")}}`;else{for(const s of i){const a=`${ge(zs(s.field))}: ${s.signals.data}`;o.includes(a)||(o=`${o.substring(0,o.length-1)}, ${a}}`)}r.update=o}return n.concat(i.map(s=>({name:s.signals.data})))},signals:(e,t,n)=>{if(e.parent&&!jge(e))for(const i of t.scales){const r=n.find(o=>o.name===i.signals.data);r.push="outer",delete r.value,delete r.update}return n}};function sj(e,t){return`domain(${ge(e.scaleName(t))})`}function jge(e){return e.parent&&uy(e.parent)&&!e.parent.parent}const ey="_brush",Vge="_scale_trigger",ow="geo_interval_init_tick",sat={defined:e=>"interval"===e.type,parse:(e,t,n)=>{var i;if(e.hasProjection){const r={...we(n.select)?n.select:{}};r.fields=[Xa],r.encodings||(r.encodings=n.value?se(n.value):[Ua,Va]),n.select={type:"interval",...r}}if(t.translate&&!bu.defined(t)){const r=`!event.item || event.item.mark.name !== ${ge(t.name+ey)}`;for(const o of t.events){if(!o.between){de(`${o} is not an ordered event stream for interval selections.`);continue}const s=Ee((i=o.between[0]).filter??(i.filter=[]));s.includes(r)||s.push(r)}}},signals:(e,t,n)=>{const i=t.name,r=i+af,o=nr(t.project.hasChannel).filter(a=>a.channel===In||a.channel===Fi),s=t.init?t.init[0]:null;if(n.push(...o.reduce((a,l)=>a.concat(function aat(e,t,n,i){const r=!e.hasProjection,o=n.channel,s=n.signals.visual,a=ge(r?e.scaleName(o):e.projectionName()),l=f=>`scale(${a}, ${f})`,c=e.getSizeSignalRef(o===In?"width":"height").signal,u=`${o}(unit)`,d=t.events.reduce((f,h)=>[...f,{events:h.between[0],update:`[${u}, ${u}]`},{events:h,update:`[${s}[0], clamp(${u}, 0, ${c})]`}],[]);if(r){const f=n.signals.data,h=bu.defined(t),p=e.getScaleComponent(o),g=p?p.get("type"):void 0,m=i?{init:_p(i,!0,l)}:{value:[]};return d.push({events:{signal:t.name+Vge},update:Ga(g)?`[${l(`${f}[0]`)}, ${l(`${f}[1]`)}]`:"[0, 0]"}),h?[{name:f,on:[]}]:[{name:s,...m,on:d},{name:f,...i?{init:_p(i)}:{},on:[{events:{signal:s},update:`${s}[0] === ${s}[1] ? null : invert(${a}, ${s})`}]}]}{const f=o===In?0:1,h=t.name+"_init";return[{name:s,...i?{init:`[${h}[0][${f}], ${h}[1][${f}]]`}:{value:[]},on:d}]}}(e,t,l,s&&s[l.index])),[])),e.hasProjection){const a=ge(e.projectionName()),l=e.projectionName()+"_center",{x:c,y:u}=t.project.hasChannel,d=c&&c.signals.visual,f=u&&u.signals.visual,h=c?s&&s[c.index]:`${l}[0]`,p=u?s&&s[u.index]:`${l}[1]`,g=w=>e.getSizeSignalRef(w).signal,m=`[[${d?d+"[0]":"0"}, ${f?f+"[0]":"0"}],[${d?d+"[1]":g("width")}, ${f?f+"[1]":g("height")}]]`;s&&(n.unshift({name:i+"_init",init:`[scale(${a}, [${c?h[0]:h}, ${u?p[0]:p}]), scale(${a}, [${c?h[1]:h}, ${u?p[1]:p}])]`}),(!c||!u)&&(n.find(C=>C.name===l)||n.unshift({name:l,update:`invert(${a}, [${g("width")}/2, ${g("height")}/2])`})));const v=`vlSelectionTuples(intersect(${m}, {markname: ${ge(e.getName("marks"))}}, unit.mark), {unit: ${vp(e)}})`,b=o.map(w=>w.signals.visual);return n.concat({name:r,on:[{events:[...b.length?[{signal:b.join(" || ")}]:[],...s?[{signal:ow}]:[]],update:v}]})}{if(!bu.defined(t)){const c=i+Vge,u=o.map(d=>{const f=d.channel,{data:h,visual:p}=d.signals,g=ge(e.scaleName(f)),_=Ga(e.getScaleComponent(f).get("type"))?"+":"";return`(!isArray(${h}) || (${_}invert(${g}, ${p})[0] === ${_}${h}[0] && ${_}invert(${g}, ${p})[1] === ${_}${h}[1]))`});u.length&&n.push({name:c,value:{},on:[{events:o.map(d=>({scale:e.scaleName(d.channel)})),update:u.join(" && ")+` ? ${c} : {}`}]})}const a=o.map(c=>c.signals.data),l=`unit: ${vp(e)}, fields: ${i+rw}, values`;return n.concat({name:r,...s?{init:`{${l}: ${_p(s)}}`}:{},...a.length?{on:[{events:[{signal:a.join(" || ")}],update:`${a.join(" && ")} ? {${l}: [${a}]} : null`}]}:{}})}},topLevelSignals:(e,t,n)=>(On(e)&&e.hasProjection&&t.init&&(n.filter(r=>r.name===ow).length||n.unshift({name:ow,value:null,on:[{events:"timer{1}",update:`${ow} === null ? {} : ${ow}`}]})),n),marks:(e,t,n)=>{const i=t.name,{x:r,y:o}=t.project.hasChannel,s=r?.signals.visual,a=o?.signals.visual,l=`data(${ge(t.name+yp)})`;if(bu.defined(t)||!r&&!o)return n;const c={x:void 0!==r?{signal:`${s}[0]`}:{value:0},y:void 0!==o?{signal:`${a}[0]`}:{value:0},x2:void 0!==r?{signal:`${s}[1]`}:{field:{group:"width"}},y2:void 0!==o?{signal:`${a}[1]`}:{field:{group:"height"}}};if("global"===t.resolve)for(const m of se(c))c[m]=[{test:`${l}.length && ${l}[0].unit === ${vp(e)}`,...c[m]},{value:0}];const{fill:u,fillOpacity:d,cursor:f,...h}=t.mark,p=se(h).reduce((m,_)=>(m[_]=[{test:[void 0!==r&&`${s}[0] !== ${s}[1]`,void 0!==o&&`${a}[0] !== ${a}[1]`].filter(y=>y).join(" && "),value:h[_]},{value:null}],m),{}),g=f??(t.translate?"move":null);return[{name:`${i+ey}_bg`,type:"rect",clip:!0,encode:{enter:{fill:{value:u},fillOpacity:{value:d}},update:c}},...n,{name:i+ey,type:"rect",clip:!0,encode:{enter:{...g?{cursor:{value:g}}:{},fill:{value:"transparent"}},update:{...c,...p}}}]}},lat={defined:e=>"point"===e.type,signals:(e,t,n)=>{const i=t.name,r=i+rw,o=t.project,s="(item().isVoronoi ? datum.datum : datum)",a=nr(e.component.selection??{}).reduce((d,f)=>"interval"===f.type?d.concat(f.name+ey):d,[]).map(d=>`indexof(item().mark.name, '${d}') < 0`).join(" && "),l="datum && item().mark.marktype !== 'group' && indexof(item().mark.role, 'legend') < 0"+(a?` && ${a}`:"");let c=`unit: ${vp(e)}, `;c+=t.project.hasSelectionId?`${Xa}: ${s}[${ge(Xa)}]`:`fields: ${r}, values: [${o.items.map(f=>e.fieldDef(f.channel)?.bin?`[${s}[${ge(e.vgField(f.channel,{}))}], ${s}[${ge(e.vgField(f.channel,{binSuffix:"end"}))}]]`:`${s}[${ge(f.field)}]`).join(", ")}]`;const u=t.events;return n.concat([{name:i+af,on:u?[{events:u,update:`${l} ? {${c}} : null`,force:!0}]:[]}])}};function ty({model:e,channelDef:t,vgChannel:n,invalidValueRef:i,mainRefFn:r}){const o=Jb(t)&&t.condition;let s=[];o&&(s=Ee(o).map(c=>{const u=r(c);if(function not(e){return ce(e,"param")}(c)){const{param:d,empty:f}=c;return{test:pme(e,{param:d,empty:f}),...u}}return{test:GM(e,c.test),...u}})),void 0!==i&&s.push(i);const a=r(t);return void 0!==a&&s.push(a),s.length>1||1===s.length&&s[0].test?{[n]:s}:1===s.length?{[n]:s[0]}:{}}function aj(e,t="text"){return ty({model:e,channelDef:e.encoding[t],vgChannel:t,mainRefFn:i=>jM(i,e.config),invalidValueRef:void 0})}function jM(e,t,n="datum"){if(e){if(Ya(e))return En(e.value);if(tt(e)){const{format:i,formatType:r}=TM(e);return A6({fieldOrDatumDef:e,format:i,formatType:r,expr:n,config:t})}}}function zge(e,t={}){const{encoding:n,markDef:i,config:r,stack:o}=e,s=n.tooltip;if(te(s))return{tooltip:Gge({tooltip:s},o,r,t)};{const a=t.reactiveGeom?"datum.datum":"datum";return ty({model:e,channelDef:s,vgChannel:"tooltip",mainRefFn:c=>{const u=jM(c,r,a);if(u)return u;if(null===c)return;let d=en("tooltip",i,r);return!0===d&&(d={content:"encoding"}),Ce(d)?{value:d}:we(d)?ke(d)?d:"encoding"===d.content?Gge(n,o,r,t):{signal:a}:void 0},invalidValueRef:void 0})}}function Hge(e,t,n,{reactiveGeom:i}={}){const r={...n,...n.tooltipFormat},o=new Set,s=i?"datum.datum":"datum",a=[];function l(u,d){const f=rp(d),h=eo(u)?u:{...u,type:e[f].type},g=Ee(h.title||O6(h,r)).join(", ").replaceAll(/"/g,'\\"');let m;if(Qn(d)){const _="x"===d?"x2":"y2",y=Ka(e[_]);if(ir(h.bin)&&y){const v=ve(h,{expr:s}),b=ve(y,{expr:s}),{format:w,formatType:C}=TM(h);m=Qb(v,b,w,C,r),o.add(_)}}if((Qn(d)||d===Hs||d===ja)&&t&&t.fieldChannel===d&&"normalize"===t.offset){const{format:_,formatType:y}=TM(h);m=A6({fieldOrDatumDef:h,format:_,formatType:y,expr:s,config:r,normalizeStack:!0}).signal}m??(m=jM(h,r,s).signal),a.push({channel:d,key:g,value:m})}F6(e,(u,d)=>{he(u)?l(u,d):CM(u)&&l(u.condition,d)});const c={};for(const{channel:u,key:d,value:f}of a)!o.has(u)&&!c[d]&&(c[d]=f);return c}function Gge(e,t,n,{reactiveGeom:i}={}){const r=Hge(e,t,n,{reactiveGeom:i}),o=Hd(r).map(([s,a])=>`"${s}": ${a}`);return o.length>0?{signal:`{${o.join(", ")}}`}:void 0}function cat(e){const{markDef:t,config:n}=e,i=en("aria",t,n);return!1===i?{}:{...i?{aria:i}:{},...uat(e),...dat(e)}}function uat(e){const{mark:t,markDef:n,config:i}=e;if(!1===i.aria)return{};const r=en("ariaRoleDescription",n,i);return null!=r?{ariaRoleDescription:{value:r}}:De(Wnt,t)?{}:{ariaRoleDescription:{value:t}}}function dat(e){const{encoding:t,markDef:n,config:i,stack:r}=e,o=t.description;if(o)return ty({model:e,channelDef:o,vgChannel:"description",mainRefFn:l=>jM(l,e.config),invalidValueRef:void 0});const s=en("description",n,i);if(null!=s)return{description:En(s)};if(!1===i.aria)return{};const a=Hge(t,r,i);return Zt(a)?void 0:{description:{signal:Hd(a).map(([l,c],u)=>`"${u>0?"; ":""}${l}: " + (${c})`).join(" + ")}}}function sr(e,t,n={}){const{markDef:i,encoding:r,config:o}=t,{vgChannel:s}=n;let{defaultRef:a,defaultValue:l}=n;const c=r[e];void 0===a&&(l??(l=en(e,i,o,{vgChannel:s,ignoreVgConfig:!Jb(c)})),void 0!==l&&(a=En(l)));const u={markDef:i,config:o,scaleName:t.scaleName(e),scale:t.getScaleComponent(e)},d=cpe({...u,scaleChannel:e,channelDef:c});return ty({model:t,channelDef:c,vgChannel:s??e,invalidValueRef:d,mainRefFn:h=>x6({...u,channel:e,channelDef:h,stack:null,defaultRef:a})})}function Wge(e,t={filled:void 0}){const{markDef:n,encoding:i,config:r}=e,{type:o}=n,s=t.filled??en("filled",n,r),a=pt(["bar","point","circle","square","geoshape"],o)?"transparent":void 0,l=en(!0===s?"color":void 0,n,r,{vgChannel:"fill"})??r.mark[!0===s&&"color"]??a,c=en(!1===s?"color":void 0,n,r,{vgChannel:"stroke"})??r.mark[!1===s&&"color"],u=s?"fill":"stroke",d={...l?{fill:En(l)}:{},...c?{stroke:En(c)}:{}};return n.color&&(s?n.fill:n.stroke)&&de(xhe("property",{fill:"fill"in n,stroke:"stroke"in n})),{...d,...sr("color",e,{vgChannel:u,defaultValue:s?l:c}),...sr("fill",e,{defaultValue:i.fill?l:void 0}),...sr("stroke",e,{defaultValue:i.stroke?c:void 0})}}function fat(e){const{encoding:t,mark:n}=e,i=t.order;return!ef(n)&&Ya(i)?ty({model:e,channelDef:i,vgChannel:"zindex",mainRefFn:r=>En(r.value),invalidValueRef:void 0}):{}}function ny({channel:e,markDef:t,encoding:n={},model:i,bandPosition:r}){const o=`${e}Offset`,s=t[o],a=n[o];if(("xOffset"===o||"yOffset"===o)&&a)return{offsetType:"encoding",offset:x6({channel:o,channelDef:a,markDef:t,config:i?.config,scaleName:i.scaleName(o),scale:i.getScaleComponent(o),stack:null,defaultRef:En(s),bandPosition:r})};const l=t[o];return l?{offsetType:"visual",offset:l}:{}}function to(e,t,{defaultPos:n,vgChannel:i}){const{encoding:r,markDef:o,config:s,stack:a}=t,l=r[e],c=r[ic(e)],u=t.scaleName(e),d=t.getScaleComponent(e),{offset:f,offsetType:h}=ny({channel:e,markDef:o,encoding:r,model:t,bandPosition:.5}),p=lj({model:t,defaultPos:n,channel:e,scaleName:u,scale:d}),g=!l&&Qn(e)&&(r.latitude||r.longitude)?{field:t.getName(e)}:function hat(e){const{channel:t,channelDef:n,scaleName:i,stack:r,offset:o,markDef:s}=e;if(tt(n)&&r&&t===r.fieldChannel){if(he(n)){let a=n.bandPosition;if(void 0===a&&"text"===s.type&&("radius"===t||"theta"===t)&&(a=.5),void 0!==a)return bM({scaleName:i,fieldOrDatumDef:n,startSuffix:"start",bandPosition:a,offset:o})}return hp(n,i,{suffix:"end"},{offset:o})}return T6(e)}({channel:e,channelDef:l,channel2Def:c,markDef:o,config:s,scaleName:u,scale:d,stack:a,offset:f,defaultRef:p,bandPosition:"encoding"===h?0:void 0});return g?{[i||e]:g}:void 0}function lj({model:e,defaultPos:t,channel:n,scaleName:i,scale:r}){const{markDef:o,config:s}=e;return()=>{const a=rp(n),l=Xd(n),c=en(n,o,s,{vgChannel:l});if(void 0!==c)return Xb(n,c);switch(t){case"zeroOrMin":return qge({scaleName:i,scale:r,mode:"zeroOrMin",mainChannel:a,config:s});case"zeroOrMax":return qge({scaleName:i,scale:r,mode:{zeroOrMax:{widthSignal:e.width.signal,heightSignal:e.height.signal}},mainChannel:a,config:s});case"mid":return{...e[To(n)],mult:.5}}}}function qge({mainChannel:e,config:t,...n}){const i=lpe(n),{mode:r}=n;if(i)return i;switch(e){case"radius":{if("zeroOrMin"===r)return{value:0};const{widthSignal:o,heightSignal:s}=r.zeroOrMax;return{signal:`min(${o},${s})/2`}}case"theta":return"zeroOrMin"===r?{value:0}:{signal:"2*PI"};case"x":return"zeroOrMin"===r?{value:0}:{field:{group:"width"}};case"y":return"zeroOrMin"===r?{field:{group:"height"}}:{value:0}}}const pat={left:"x",center:"xc",right:"x2"},gat={top:"y",middle:"yc",bottom:"y2"};function Yge(e,t,n,i="middle"){if("radius"===e||"theta"===e)return Xd(e);const r="x"===e?"align":"baseline",o=en(r,t,n);let s;return ke(o)?(de(function Dit(e){return`The ${e} for range marks cannot be an expression`}(r)),s=void 0):s=o,"x"===e?pat[s||("top"===i?"left":"center")]:gat[s||i]}function VM(e,t,{defaultPos:n,defaultPos2:i,range:r}){return r?Kge(e,t,{defaultPos:n,defaultPos2:i}):to(e,t,{defaultPos:n})}function Kge(e,t,{defaultPos:n,defaultPos2:i}){const{markDef:r,config:o}=t,s=ic(e),a=To(e),l=function mat(e,t,n){const{encoding:i,mark:r,markDef:o,stack:s,config:a}=e,l=rp(n),c=To(n),u=Xd(n),d=i[l],f=e.scaleName(l),h=e.getScaleComponent(l),{offset:p}=ny(n in i||n in o?{channel:n,markDef:o,encoding:i,model:e}:{channel:l,markDef:o,encoding:i,model:e});if(!d&&("x2"===n||"y2"===n)&&(i.latitude||i.longitude)){const m=To(n),_=e.markDef[m];return null!=_?{[m]:{value:_}}:{[u]:{field:e.getName(n)}}}const g=function _at({channel:e,channelDef:t,channel2Def:n,markDef:i,config:r,scaleName:o,scale:s,stack:a,offset:l,defaultRef:c}){return tt(t)&&a&&e.charAt(0)===a.fieldChannel.charAt(0)?hp(t,o,{suffix:"start"},{offset:l}):T6({channel:e,channelDef:n,scaleName:o,scale:s,stack:a,markDef:i,config:r,offset:l,defaultRef:c})}({channel:n,channelDef:d,channel2Def:i[n],markDef:o,config:a,scaleName:f,scale:h,stack:s,offset:p,defaultRef:void 0});return void 0!==g?{[u]:g}:UM(n,o)||UM(n,{[n]:n6(n,o,a.style),[c]:n6(c,o,a.style)})||UM(n,a[r])||UM(n,a.mark)||{[u]:lj({model:e,defaultPos:t,channel:n,scaleName:f,scale:h})()}}(t,i,s);return{...to(e,t,{defaultPos:n,vgChannel:l[a]?Yge(e,r,o):Xd(e)}),...l}}function UM(e,t){const n=To(e),i=Xd(e);if(void 0!==t[i])return{[i]:Xb(e,t[i])};if(void 0!==t[e])return{[i]:Xb(e,t[e])};if(t[n]){const r=t[n];if(!fp(r))return{[n]:Xb(e,r)};de(function yit(e){return`Position range does not support relative band size for ${e}.`}(n))}}function wu(e,t){const{config:n,encoding:i,markDef:r}=e,o=r.type,s=ic(t),a=To(t),l=i[t],c=i[s],u=e.getScaleComponent(t),d=u?u.get("type"):void 0,f=r.orient,h=i[a]??i.size??en("size",r,n,{vgChannel:a}),p=nhe(t),g="bar"===o&&("x"===t?"vertical"===f:"horizontal"===f)||"tick"===o&&("y"===t?"vertical"===f:"horizontal"===f);return!he(l)||!(mn(l.bin)||ir(l.bin)||l.timeUnit&&!c)||h&&!fp(h)||i[p]||Li(d)?(tt(l)&&Li(d)||g)&&!c?function vat(e,t,n){const{markDef:i,encoding:r,config:o,stack:s}=n,a=i.orient,l=n.scaleName(t),c=n.getScaleComponent(t),u=To(t),d=ic(t),f=nhe(t),h=n.scaleName(f),p=n.getScaleComponent(q4(t)),g="tick"===i.type||"horizontal"===a&&"y"===t||"vertical"===a&&"x"===t;let m;(r.size||i.size)&&(g?m=sr("size",n,{vgChannel:u,defaultRef:En(i.size)}):de(function kit(e){return`Cannot apply size to non-oriented mark "${e}".`}(i.type)));const _=!!m,y=vpe({channel:t,fieldDef:e,markDef:i,config:o,scaleType:(c||p)?.get("type"),useVlSizeChannel:g});m=m||{[u]:yat(u,h||l,p||c,o,y,!!e,i.type)};const b=Yge(t,i,o,"band"===(c||p)?.get("type")&&fp(y)&&!_?"top":"middle"),w="xc"===b||"yc"===b,{offset:C,offsetType:E}=ny({channel:t,markDef:i,encoding:r,model:n,bandPosition:w?.5:0}),D=T6({channel:t,channelDef:e,markDef:i,config:o,scaleName:l,scale:c,stack:s,offset:C,defaultRef:lj({model:n,defaultPos:"mid",channel:t,scaleName:l,scale:c}),bandPosition:w?"encoding"===E?0:.5:ke(y)?{signal:`(1-${y})/2`}:fp(y)?(1-y.band)/2:0});if(u)return{[b]:D,...m};{const M=Xd(d),k=m[u],R=C?{...k,offset:C}:k;return{[b]:D,[M]:te(D)?[D[0],{...D[1],offset:R}]:{...D,offset:R}}}}(l,t,e):Kge(t,e,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"}):function bat({fieldDef:e,fieldDef2:t,channel:n,model:i}){const{config:r,markDef:o,encoding:s}=i,a=i.getScaleComponent(n),l=i.scaleName(n),c=a?a.get("type"):void 0,u=a.get("reverse"),d=vpe({channel:n,fieldDef:e,markDef:o,config:r,scaleType:c}),h=i.component.axes[n]?.[0]?.get("translate")??.5,p=Qn(n)?en("binSpacing",o,r)??0:0,g=ic(n),m=Xd(n),_=Xd(g),y=oc("minBandSize",o,r),{offset:v}=ny({channel:n,markDef:o,encoding:s,model:i,bandPosition:0}),{offset:b}=ny({channel:g,markDef:o,encoding:s,model:i,bandPosition:0}),w=function Xrt({scaleName:e,fieldDef:t}){const n=ve(t,{expr:"datum"});return`abs(scale("${e}", ${ve(t,{expr:"datum",suffix:"end"})}) - scale("${e}", ${n}))`}({fieldDef:e,scaleName:l}),C=Xge(n,p,u,h,v,y,w),E=Xge(g,p,u,h,b??v,y,w),D=ke(d)?{signal:`(1-${d.signal})/2`}:fp(d)?(1-d.band)/2:.5,M=tf({fieldDef:e,fieldDef2:t,markDef:o,config:r});if(mn(e.bin)||e.timeUnit){const k=e.timeUnit&&.5!==M;return{[_]:Qge({fieldDef:e,scaleName:l,bandPosition:D,offset:E,useRectOffsetField:k}),[m]:Qge({fieldDef:e,scaleName:l,bandPosition:ke(D)?{signal:`1-${D.signal}`}:1-D,offset:C,useRectOffsetField:k})}}if(ir(e.bin)){const k=hp(e,l,{},{offset:E});if(he(t))return{[_]:k,[m]:hp(t,l,{},{offset:C})};if(op(e.bin)&&e.bin.step)return{[_]:k,[m]:{signal:`scale("${l}", ${ve(e,{expr:"datum"})} + ${e.bin.step})`,offset:C}}}de(khe(g))}({fieldDef:l,fieldDef2:c,channel:t,model:e})}function yat(e,t,n,i,r,o,s){if(fp(r)){if(!n)return{mult:r.band,field:{group:e}};{const l=n.get("type");if("band"===l){let c=`bandwidth('${t}')`;1!==r.band&&(c=`${r.band} * ${c}`);const u=oc("minBandSize",{type:s},i);return{signal:u?`max(${Ha(u)}, ${c})`:c}}1!==r.band&&(de(function Ait(e){return`Cannot use the relative band size with ${e} scale.`}(l)),r=void 0)}}else{if(ke(r))return r;if(r)return{value:r}}if(n){const l=n.get("range");if(sp(l)&&At(l.step))return{value:l.step-2}}if(!o){const{bandPaddingInner:l,barBandPaddingInner:c,rectBandPaddingInner:u,tickBandPaddingInner:d}=i.scale,f=Xn(l,"tick"===s?d:"bar"===s?c:u);if(ke(f))return{signal:`(1 - (${f.signal})) * ${e}`};if(At(f))return{signal:`${1-f} * ${e}`}}return{value:K6(i.view,e)-2}}function Xge(e,t,n,i,r,o,s){if(Yfe(e))return 0;const a="x"===e||"y2"===e,l=a?-t/2:t/2;if(ke(n)||ke(r)||ke(i)||o){const c=Ha(n),u=Ha(r),d=Ha(i),f=Ha(o),p=o?`(${s} < ${f} ? ${a?"":"-"}0.5 * (${f} - (${s})) : ${l})`:l;return{signal:(d?`${d} + `:"")+(c?`(${c} ? -1 : 1) * `:"")+(u?`(${u} + ${p})`:p)}}return r=r||0,i+(n?-r-l:+r+l)}function Qge({fieldDef:e,scaleName:t,bandPosition:n,offset:i,useRectOffsetField:r}){return bM({scaleName:t,fieldOrDatumDef:e,bandPosition:n,offset:i,...r?{startSuffix:$M,endSuffix:BM}:{}})}const wat=new Set(["aria","width","height"]);function qs(e,t){const{fill:n,stroke:i}="include"===t.color?Wge(e):{};return{...Eat(e.markDef,t),...Zge("fill",n),...Zge("stroke",i),...sr("opacity",e),...sr("fillOpacity",e),...sr("strokeOpacity",e),...sr("strokeWidth",e),...sr("strokeDash",e),...fat(e),...zge(e),...aj(e,"href"),...cat(e)}}function Zge(e,t){return t?{[e]:t}:{}}function Eat(e,t){return Gnt.reduce((n,i)=>(!wat.has(i)&&ce(e,i)&&"ignore"!==t[i]&&(n[i]=En(e[i])),n),{})}function cj(e){const{config:t,markDef:n}=e,i=new Set;if(e.forEachFieldDef((r,o)=>{let s;if(!rc(o)||!(s=e.getScaleType(o)))return;const a=lM(r.aggregate);if(function qrt(e){return"break-paths-filter-domains"===e||"break-paths-show-domains"===e}(S6({scaleChannel:o,markDef:n,config:t,scaleType:s,isCountAggregate:a}))){const c=e.vgField(o,{expr:"datum",binSuffix:e.stack?.impute?"mid":void 0});c&&i.add(c)}}),i.size>0)return{defined:{signal:[...i].map(o=>hM(o,!0)).join(" && ")}}}function Jge(e,t){if(void 0!==t)return{[e]:En(t)}}const uj="voronoi",eme={defined:e=>"point"===e.type&&e.nearest,parse:(e,t)=>{if(t.events)for(const n of t.events)n.markname=e.getName(uj)},marks:(e,t,n)=>{const{x:i,y:r}=t.project.hasChannel,o=e.mark;if(ef(o))return de(function Qnt(e){return`The "nearest" transform is not supported for ${e} marks.`}(o)),n;const s={name:e.getName(uj),type:"path",interactive:!0,from:{data:e.getName("marks")},encode:{update:{fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0},...zge(e,{reactiveGeom:!0})}},transform:[{type:"voronoi",x:{expr:i||!r?"datum.datum.x || 0":"0"},y:{expr:r||!i?"datum.datum.y || 0":"0"},size:[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]}]};let a=0,l=!1;return n.forEach((c,u)=>{const d=c.name??"";d===e.component.mark[0].name?a=u:d.includes(uj)&&(l=!0)}),l||n.splice(a+1,0,s),n}},tme={defined:e=>"point"===e.type&&"global"===e.resolve&&e.bind&&"scales"!==e.bind&&!z6(e.bind),parse:(e,t,n)=>dme(t,n),topLevelSignals:(e,t,n)=>{const i=t.name,r=t.project,o=t.bind,s=t.init&&t.init[0],a=eme.defined(t)?"(item().isVoronoi ? datum.datum : datum)":"datum";return r.items.forEach((l,c)=>{const u=Nn(`${i}_${l.field}`);n.filter(f=>f.name===u).length||n.unshift({name:u,...s?{init:_p(s[c])}:{value:null},on:t.events?[{events:t.events,update:`datum && item().mark.marktype !== 'group' ? ${a}[${ge(l.field)}] : null`}]:[],bind:o[l.field]??o[l.channel]??o})}),n},signals:(e,t,n)=>{const i=t.name,r=t.project,o=n.find(c=>c.name===i+af),s=i+rw,a=r.items.map(c=>Nn(`${i}_${c.field}`)),l=a.map(c=>`${c} !== null`).join(" && ");return a.length&&(o.update=`${l} ? {fields: ${s}, values: [${a.join(", ")}]} : null`),delete o.value,delete o.on,n}},zM="_toggle",nme={defined:e=>"point"===e.type&&!!e.toggle,signals:(e,t,n)=>n.concat({name:t.name+zM,value:!1,on:[{events:t.events,update:t.toggle}]}),modifyExpr:(e,t)=>{const n=t.name+af,i=t.name+zM;return`${i} ? null : ${n}, `+("global"===t.resolve?`${i} ? null : true, `:`${i} ? null : {unit: ${vp(e)}}, `)+`${i} ? ${n} : null`}},Cat={defined:e=>void 0!==e.clear&&!1!==e.clear,parse:(e,t)=>{t.clear&&(t.clear=Ce(t.clear)?Ud(t.clear,"view"):t.clear)},topLevelSignals:(e,t,n)=>{if(tme.defined(t))for(const i of t.project.items){const r=n.findIndex(o=>o.name===Nn(`${t.name}_${i.field}`));-1!==r&&n[r].on.push({events:t.clear,update:"null"})}return n},signals:(e,t,n)=>{function i(r,o){-1!==r&&n[r].on&&n[r].on.push({events:t.clear,update:o})}if("interval"===t.type)for(const r of t.project.items){const o=n.findIndex(s=>s.name===r.signals.visual);i(o,"[0, 0]"),-1===o&&i(n.findIndex(a=>a.name===r.signals.data),"null")}else{let r=n.findIndex(o=>o.name===t.name+af);i(r,"null"),nme.defined(t)&&(r=n.findIndex(o=>o.name===t.name+zM),i(r,"false"))}return n}},ime={defined:e=>{const t="global"===e.resolve&&e.bind&&z6(e.bind),n=1===e.project.items.length&&e.project.items[0].field!==Xa;return t&&!n&&de("Legend bindings are only supported for selections over an individual field or encoding channel."),t&&n},parse:(e,t,n)=>{const i=Ze(n);if(i.select=Ce(i.select)?{type:i.select,toggle:t.toggle}:{...i.select,toggle:t.toggle},dme(t,i),we(n.select)&&(n.select.on||n.select.clear)){const s='event.item && indexof(event.item.mark.role, "legend") < 0';for(const a of t.events)a.filter=Ee(a.filter??[]),a.filter.includes(s)||a.filter.push(s)}const r=H6(t.bind)?t.bind.legend:"click",o=Ce(r)?Ud(r,"view"):Ee(r);t.bind={legend:{merge:o}}},topLevelSignals:(e,t,n)=>{const i=t.name,r=H6(t.bind)&&t.bind.legend,o=s=>a=>{const l=Ze(a);return l.markname=s,l};for(const s of t.project.items){if(!s.hasLegend)continue;const a=`${Nn(s.field)}_legend`,l=`${i}_${a}`;if(0===n.filter(u=>u.name===l).length){const u=r.merge.map(o(`${a}_symbols`)).concat(r.merge.map(o(`${a}_labels`))).concat(r.merge.map(o(`${a}_entries`)));n.unshift({name:l,...t.init?{}:{value:null},on:[{events:u,update:"isDefined(datum.value) ? datum.value : item().items[0].items[0].datum.value",force:!0},{events:r.merge,update:`!event.item || !datum ? null : ${l}`,force:!0}]})}}return n},signals:(e,t,n)=>{const i=t.name,r=t.project,o=n.find(f=>f.name===i+af),s=i+rw,a=r.items.filter(f=>f.hasLegend).map(f=>Nn(`${i}_${Nn(f.field)}_legend`)),c=`${a.map(f=>`${f} !== null`).join(" && ")} ? {fields: ${s}, values: [${a.join(", ")}]} : null`;t.events&&a.length>0?o.on.push({events:a.map(f=>({signal:f})),update:c}):a.length>0&&(o.update=c,delete o.value,delete o.on);const u=n.find(f=>f.name===i+zM),d=H6(t.bind)&&t.bind.legend;return u&&(t.events?u.on.push({...u.on[0],events:d}):u.on[0].events=d),n}},rme="_translate_anchor",ome="_translate_delta",Tat={defined:e=>"interval"===e.type&&e.translate,signals:(e,t,n)=>{const i=t.name,r=bu.defined(t),o=i+rme,{x:s,y:a}=t.project.hasChannel;let l=Ud(t.translate,"scope");return r||(l=l.map(c=>(c.between[0].markname=i+ey,c))),n.push({name:o,value:{},on:[{events:l.map(c=>c.between[0]),update:"{x: x(unit), y: y(unit)"+(void 0!==s?`, extent_x: ${r?sj(e,In):`slice(${s.signals.visual})`}`:"")+(void 0!==a?`, extent_y: ${r?sj(e,Fi):`slice(${a.signals.visual})`}`:"")+"}"}]},{name:i+ome,value:{},on:[{events:l,update:`{x: ${o}.x - x(unit), y: ${o}.y - y(unit)}`}]}),void 0!==s&&sme(e,t,s,"width",n),void 0!==a&&sme(e,t,a,"height",n),n}};function sme(e,t,n,i,r){const o=t.name,s=o+rme,a=o+ome,l=n.channel,c=bu.defined(t),u=r.find(w=>w.name===n.signals[c?"data":"visual"]),d=e.getSizeSignalRef(i).signal,f=e.getScaleComponent(l),h=f&&f.get("type"),p=f&&f.get("reverse"),m=`${s}.extent_${l}`,b=`${c&&f?"log"===h?"panLog":"symlog"===h?"panSymlog":"pow"===h?"panPow":"panLinear":"panLinear"}(${m}, ${c?l===In?p?"":"-":p?"-":"":""}${a}.${l} / ${c?`${d}`:`span(${m})`}${c?"pow"===h?`, ${f.get("exponent")??1}`:"symlog"===h?`, ${f.get("constant")??1}`:"":""})`;u.on.push({events:{signal:a},update:c?b:`clampRange(${b}, 0, ${d})`})}const ame="_zoom_anchor",lme="_zoom_delta",xat={defined:e=>"interval"===e.type&&e.zoom,signals:(e,t,n)=>{const i=t.name,r=bu.defined(t),o=i+lme,{x:s,y:a}=t.project.hasChannel,l=ge(e.scaleName(In)),c=ge(e.scaleName(Fi));let u=Ud(t.zoom,"scope");return r||(u=u.map(d=>(d.markname=i+ey,d))),n.push({name:i+ame,on:[{events:u,update:r?"{"+[l?`x: invert(${l}, x(unit))`:"",c?`y: invert(${c}, y(unit))`:""].filter(d=>d).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:o,on:[{events:u,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),void 0!==s&&cme(e,t,s,"width",n),void 0!==a&&cme(e,t,a,"height",n),n}};function cme(e,t,n,i,r){const o=t.name,s=n.channel,a=bu.defined(t),l=r.find(y=>y.name===n.signals[a?"data":"visual"]),c=e.getSizeSignalRef(i).signal,u=e.getScaleComponent(s),d=u&&u.get("type"),f=a?sj(e,s):l.name,h=o+lme,_=`${a&&u?"log"===d?"zoomLog":"symlog"===d?"zoomSymlog":"pow"===d?"zoomPow":"zoomLinear":"zoomLinear"}(${f}, ${o}${ame}.${s}, ${h}${a?"pow"===d?`, ${u.get("exponent")??1}`:"symlog"===d?`, ${u.get("constant")??1}`:"":""})`;l.on.push({events:{signal:h},update:a?_:`clampRange(${_}, 0, ${c})`})}const yp="_store",af="_tuple",Aat="_modify",ume="vlSelectionResolve",HM=[lat,sat,rat,nme,tme,bu,ime,Cat,Tat,xat,eme];function vp(e,{escape:t}={escape:!0}){let n=t?ge(e.name):e.name;const i=function Mat(e){let t=e.parent;for(;t&&!us(t);)t=t.parent;return t}(e);if(i){const{facet:r}=i;for(const o of Ws)r[o]&&(n+=` + '__facet_${o}_' + (facet[${ge(i.vgField(o))}])`)}return n}function dj(e){return nr(e.component.selection??{}).reduce((t,n)=>t||n.project.hasSelectionId,!1)}function dme(e,t){(Ce(t.select)||!t.select.on)&&delete e.events,(Ce(t.select)||!t.select.clear)&&delete e.clear,(Ce(t.select)||!t.select.toggle)&&delete e.toggle}function fj(e){const t=[];return"Identifier"===e.type?[e.name]:"Literal"===e.type?[e.value]:("MemberExpression"===e.type&&(t.push(...fj(e.object)),t.push(...fj(e.property))),t)}function fme(e){return"MemberExpression"===e.object.type?fme(e.object):"datum"===e.object.name}function hme(e){const t=M8(e),n=new Set;return t.visit(i=>{"MemberExpression"===i.type&&fme(i)&&n.add(fj(i).slice(1).join("."))}),n}class iy extends Kt{clone(){return new iy(null,this.model,Ze(this.filter))}constructor(t,n,i){super(t),this.model=n,this.filter=i,this.expr=GM(this.model,this.filter,this),this._dependentFields=hme(this.expr)}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}function pme(e,t,n,i="datum"){const r=Ce(t)?t:t.param,o=Nn(r),s=ge(o+yp);let a;try{a=e.getSelectionComponent(o,r)}catch{return`!!${o}`}if(a.project.timeUnit){const f=n??e.component.data.raw,h=a.project.timeUnit.clone();f.parent?h.insertAsParentOf(f):f.parent=h}const u=`${a.project.hasSelectionId?"vlSelectionIdTest(":"vlSelectionTest("}${s}, ${i}${"global"===a.resolve?")":`, ${ge(a.resolve)})`}`,d=`length(data(${s}))`;return!1===t.empty?`${d} && ${u}`:`!${d} || ${u}`}function gme(e,t,n){const i=Nn(t),r=n.encoding;let s,o=n.field;try{s=e.getSelectionComponent(i,t)}catch{return i}if(r||o){if(r&&!o){const a=s.project.items.filter(l=>l.channel===r);!a.length||a.length>1?(o=s.project.items[0].field,de((a.length?"Multiple ":"No ")+`matching ${ge(r)} encoding found for selection ${ge(n.param)}. Using "field": ${ge(o)}.`)):o=a[0].field}}else o=s.project.items[0].field,s.project.items.length>1&&de(`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${ge(o)}.`);return`${s.name}[${ge(zs(o))}]`}function GM(e,t,n){return Vb(t,i=>Ce(i)?i:function mrt(e){return ce(e,"param")}(i)?pme(e,i,n):Ghe(i))}function hj(e,t,n,i){var r,o;e.encode??(e.encode={}),(r=e.encode)[t]??(r[t]={}),(o=e.encode[t]).update??(o.update={}),e.encode[t].update[n]=i}function sw(e,t,n,i={header:!1}){const{disable:r,orient:o,scale:s,labelExpr:a,title:l,zindex:c,...u}=e.combine();if(!r){for(const d in u){const f=d,h=mot[f],p=u[f];if(h&&h!==t&&"both"!==h)delete u[f];else if(nw(p)){const{condition:g,...m}=p,_=Ee(g),y=Npe[f];if(y){const{vgProp:v,part:b}=y;hj(u,b,v,[..._.map(C=>{const{test:E,...D}=C;return{test:GM(null,E),...D}}),m]),delete u[f]}else if(null===y){const v={signal:_.map(b=>{const{test:w,...C}=b;return`${GM(null,w)} ? ${dhe(C)} : `}).join("")+dhe(m)};u[f]=v}}else if(ke(p)){const g=Npe[f];if(g){const{vgProp:m,part:_}=g;hj(u,_,m,p),delete u[f]}}pt(["labelAlign","labelBaseline"],f)&&null===u[f]&&delete u[f]}if("grid"===t){if(!u.grid)return;if(u.encode){const{grid:d}=u.encode;u.encode={...d?{grid:d}:{}},Zt(u.encode)&&delete u.encode}return{scale:s,orient:o,...u,domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:Xn(c,0)}}{if(!i.header&&e.mainExtracted)return;if(void 0!==a){let f=a;u.encode?.labels?.update&&ke(u.encode.labels.update.text)&&(f=tp(a,"datum.label",u.encode.labels.update.text.signal)),hj(u,"labels","text",{signal:f})}if(null===u.labelAlign&&delete u.labelAlign,u.encode){for(const f of Ipe)e.hasAxisPart(f)||delete u.encode[f];Zt(u.encode)&&delete u.encode}const d=function kat(e,t){if(e)return te(e)&&!Zd(e)?e.map(n=>O6(n,t)).join(", "):e}(l,n);return{scale:s,orient:o,grid:!1,...d?{title:d}:{},...u,...!1===n.aria?{aria:!1}:{},zindex:Xn(c,0)}}}}function mme(e){const{axes:t}=e.component,n=[];for(const i of hu)if(t[i])for(const r of t[i])if(!r.get("disable")&&!r.get("gridScale")){const o="x"===i?"height":"width",s=e.getSizeSignalRef(o).signal;o!==s&&n.push({name:o,update:s})}return n}function _me(e,t,n,i){return Object.assign.apply(null,[{},...e.map(r=>{if("axisOrient"===r){const o="x"===n?"bottom":"left",s=t["x"===n?"axisBottom":"axisLeft"]||{},a=t["x"===n?"axisTop":"axisRight"]||{},l=new Set([...se(s),...se(a)]),c={};for(const u of l.values())c[u]={signal:`${i.signal} === "${o}" ? ${Ha(s[u])} : ${Ha(a[u])}`};return c}return t[r]})])}function Fat(e,t){const n=[{}];for(const i of e){let r=t[i]?.style;if(r){r=Ee(r);for(const o of r)n.push(t.style[o])}}return Object.assign.apply(null,n)}function pj(e,t,n,i={}){const r=hhe(e,n,t);if(void 0!==r)return{configFrom:"style",configValue:r};for(const o of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(void 0!==i[o]?.[e])return{configFrom:o,configValue:i[o][e]};return{}}const yme={scale:({model:e,channel:t})=>e.scaleName(t),format:({format:e})=>e,formatType:({formatType:e})=>e,grid:({fieldOrDatumDef:e,axis:t,scaleType:n})=>t.grid??function Pat(e,t){return!Li(e)&&he(t)&&!mn(t?.bin)&&!ir(t?.bin)}(n,e),gridScale:({model:e,channel:t})=>function Lat(e,t){const n="x"===t?"y":"x";if(e.getScaleComponent(n))return e.scaleName(n)}(e,t),labelAlign:({axis:e,labelAngle:t,orient:n,channel:i})=>e.labelAlign||bme(t,n,i),labelAngle:({labelAngle:e})=>e,labelBaseline:({axis:e,labelAngle:t,orient:n,channel:i})=>e.labelBaseline||vme(t,n,i),labelFlush:({axis:e,fieldOrDatumDef:t,channel:n})=>e.labelFlush??function Bat(e,t){if("x"===t&&pt(["quantitative","temporal"],e))return!0}(t.type,n),labelOverlap:({axis:e,fieldOrDatumDef:t,scaleType:n})=>e.labelOverlap??function jat(e,t,n,i){if(n&&!we(i)||"nominal"!==e&&"ordinal"!==e)return"log"!==t&&"symlog"!==t||"greedy"}(t.type,n,he(t)&&!!t.timeUnit,he(t)?t.sort:void 0),orient:({orient:e})=>e,tickCount:({channel:e,model:t,axis:n,fieldOrDatumDef:i,scaleType:r})=>{const o="x"===e?"width":"y"===e?"height":void 0,s=o?t.getSizeSignalRef(o):void 0;return n.tickCount??function Uat({fieldOrDatumDef:e,scaleType:t,size:n,values:i}){if(!i&&!Li(t)&&"log"!==t){if(he(e)){if(mn(e.bin))return{signal:`ceil(${n.signal}/10)`};if(e.timeUnit&&pt(["month","hours","day","quarter"],Pi(e.timeUnit)?.unit))return}return{signal:`ceil(${n.signal}/40)`}}}({fieldOrDatumDef:i,scaleType:r,size:s,values:n.values})},tickMinStep:function zat({format:e,fieldOrDatumDef:t}){if("d"===e)return 1;if(he(t)){const{timeUnit:n}=t;if(n){const i=Uhe(n);if(i)return{signal:i}}}},title:({axis:e,model:t,channel:n})=>{if(void 0!==e.title)return e.title;const i=wme(t,n);if(void 0!==i)return i;const r=t.typedFieldDef(n),s=t.fieldDef("x"===n?"x2":"y2");return ghe(r?[ype(r)]:[],he(s)?[ype(s)]:[])},values:({axis:e,fieldOrDatumDef:t})=>function Hat(e,t){const n=e.values;return te(n)?Mpe(t,n):ke(n)?n:void 0}(e,t),zindex:({axis:e,fieldOrDatumDef:t,mark:n})=>e.zindex??function Gat(e,t){return"rect"===e&&SM(t)?1:0}(n,t)};function gj(e){return`(((${e.signal} % 360) + 360) % 360)`}function vme(e,t,n,i){if(void 0!==e){if("x"===n){if(ke(e)){const r=gj(e);return{signal:`(45 < ${r} && ${r} < 135) || (225 < ${r} && ${r} < 315) ? "middle" :(${r} <= 45 || 315 <= ${r}) === ${ke(t)?`(${t.signal} === "top")`:"top"===t} ? "bottom" : "top"`}}return 45{if(gp(i)&&_pe(i.sort)){const{field:o,timeUnit:s}=i,a=i.sort,l=a.map((c,u)=>`${Ghe({field:o,timeUnit:s,equal:c})} ? ${u} : `).join("")+a.length;t=new ry(t,{calculate:l,as:oy(i,r,{forAs:!0})})}}),t}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 ${gt(this.transform)}`}}function oy(e,t,n){return ve(e,{prefix:t,suffix:"sort_index",...n})}function WM(e,t){return pt(["top","bottom"],t)?"column":pt(["left","right"],t)||"row"===e?"row":"column"}function sy(e,t,n,i){return Xn((t||{})[e],("row"===i?n.headerRow:"column"===i?n.headerColumn:n.headerFacet)[e],n.header[e])}function qM(e,t,n,i){const r={};for(const o of e){const s=sy(o,t||{},n,i);void 0!==s&&(r[o]=s)}return r}const mj=["row","column"],_j=["header","footer"];function Wat(e,t){const n=e.component.layoutHeaders[t].title,i=e.config?e.config:void 0,r=e.component.layoutHeaders[t].facetFieldDef?e.component.layoutHeaders[t].facetFieldDef:void 0,{titleAnchor:o,titleAngle:s,titleOrient:a}=qM(["titleAnchor","titleAngle","titleOrient"],r.header,i,t),l=WM(t,a),c=zb(s);return{name:`${t}-title`,type:"group",role:`${l}-title`,title:{text:n,..."row"===t?{orient:"left"}:{},style:"guide-title",...Cme(c,l),...Eme(l,c,o),...Dme(i,r,t,Pot,Qpe)}}}function Eme(e,t,n="middle"){switch(n){case"start":return{align:"left"};case"end":return{align:"right"}}const i=bme(t,"row"===e?"left":"top","row"===e?"y":"x");return i?{align:i}:{}}function Cme(e,t){const n=vme(e,"row"===t?"left":"top","row"===t?"y":"x",!0);return n?{baseline:n}:{}}function qat(e,t){const n=e.component.layoutHeaders[t],i=[];for(const r of _j)if(n[r])for(const o of n[r]){const s=Kat(e,t,r,n,o);null!=s&&i.push(s)}return i}function Yat(e,t){const{sort:n}=e;return mu(n)?{field:ve(n,{expr:"datum"}),order:n.order??"ascending"}:te(n)?{field:oy(e,t,{expr:"datum"}),order:"ascending"}:{field:ve(e,{expr:"datum"}),order:n??"ascending"}}function yj(e,t,n){const{format:i,formatType:r,labelAngle:o,labelAnchor:s,labelOrient:a,labelExpr:l}=qM(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],e.header,n,t),c=A6({fieldOrDatumDef:e,format:i,formatType:r,expr:"parent",config:n}).signal,u=WM(t,a);return{text:{signal:l?tp(tp(l,"datum.label",c),"datum.value",ve(e,{expr:"parent"})):c},..."row"===t?{orient:"left"}:{},style:"guide-label",frame:"group",...Cme(o,u),...Eme(u,o,s),...Dme(n,e,t,Lot,Zpe)}}function Kat(e,t,n,i,r){if(r){let o=null;const{facetFieldDef:s}=i,a=e.config?e.config:void 0;if(s&&r.labels){const{labelOrient:d}=qM(["labelOrient"],s.header,a,t);("row"===t&&!pt(["top","bottom"],d)||"column"===t&&!pt(["left","right"],d))&&(o=yj(s,t,a))}const l=us(e)&&!Zb(e.facet),c=r.axes,u=c?.length>0;if(o||u){const d="row"===t?"height":"width";return{name:e.getName(`${t}_${n}`),type:"group",role:`${t}-${n}`,...i.facetFieldDef?{from:{data:e.getName(`${t}_domain`)},sort:Yat(s,t)}:{},...u&&l?{from:{data:e.getName(`facet_domain_${t}`)}}:{},...o?{title:o}:{},...r.sizeSignal?{encode:{update:{[d]:r.sizeSignal}}}:{},...u?{axes:c}:{}}}}return null}const Xat={column:{start:0,end:1},row:{start:1,end:0}};function Qat(e,t){return Xat[t][e]}function Dme(e,t,n,i,r){const o={};for(const s of i){if(!r[s])continue;const a=sy(s,t?.header,e,n);void 0!==a&&(o[r[s]]=a)}return o}function vj(e){return[...YM(e,"width"),...YM(e,"height"),...YM(e,"childWidth"),...YM(e,"childHeight")]}function YM(e,t){const n="width"===t?"x":"y",i=e.component.layoutSize.get(t);if(!i||"merged"===i)return[];const r=e.getSizeSignalRef(t).signal;if("step"===i){const o=e.getScaleComponent(n);if(o){const s=o.get("type"),a=o.get("range");if(Li(s)&&sp(a)){const l=e.scaleName(n);return us(e.parent)&&"independent"===e.parent.component.resolve.scale[n]?[Sme(l,a)]:[Sme(l,a),{name:r,update:Tme(l,o,`domain('${l}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}if("container"==i){const o=r.endsWith("width"),s=o?"containerSize()[0]":"containerSize()[1]",l=`isFinite(${s}) ? ${s} : ${Y6(e.config.view,o?"width":"height")}`;return[{name:r,init:l,on:[{update:l,events:"window:resize"}]}]}return[{name:r,value:i}]}function Sme(e,t){const n=`${e}_step`;return ke(t.step)?{name:n,update:t.step.signal}:{name:n,value:t.step}}function Tme(e,t,n){const i=t.get("type"),r=t.get("padding"),o=Xn(t.get("paddingOuter"),r);let s=t.get("paddingInner");return s="band"===i?void 0!==s?s:r:1,`bandspace(${n}, ${Ha(s)}, ${Ha(o)}) * ${e}_step`}function xme(e){return"childWidth"===e?"width":"childHeight"===e?"height":e}function Ame(e,t){return se(e).reduce((n,i)=>({...n,...ty({model:t,channelDef:e[i],vgChannel:i,mainRefFn:r=>En(r.value),invalidValueRef:void 0})}),{})}function Mme(e,t){if(us(t))return"theta"===e?"independent":"shared";if(uy(t))return"shared";if(Fj(t))return Qn(e)||"theta"===e||"radius"===e?"independent":"shared";throw new Error("invalid model type for resolve")}function bj(e,t){const n=e.scale[t],i=Qn(t)?"axis":"legend";return"independent"===n?("shared"===e[i][t]&&de(function Lit(e){return`Setting the scale to be independent for "${e}" means we also have to set the guide (axis or legend) to be independent.`}(t)),"independent"):e[i][t]||"shared"}const Jat={...tge,disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1},Nme=se(Jat);class elt extends vu{}const Ime={symbols:function tlt(e,{fieldOrDatumDef:t,model:n,channel:i,legendCmpt:r,legendType:o}){if("symbol"!==o)return;const{markDef:s,encoding:a,config:l,mark:c}=n,u=s.filled&&"trail"!==c;let d={...Ynt({},n,jrt),...Wge(n,{filled:u})};const f=r.get("symbolOpacity")??l.legend.symbolOpacity,h=r.get("symbolFillColor")??l.legend.symbolFillColor,p=r.get("symbolStrokeColor")??l.legend.symbolStrokeColor,g=void 0===f?kme(a.opacity)??s.opacity:void 0;if(d.fill)if("fill"===i||u&&i===Do)delete d.fill;else if(ce(d.fill,"field"))h?delete d.fill:(d.fill=En(l.legend.symbolBaseFillColor??"black"),d.fillOpacity=En(g??1));else if(te(d.fill)){const m=wj(a.fill??a.color)??s.fill??(u&&s.color);m&&(d.fill=En(m))}if(d.stroke)if("stroke"===i||!u&&i===Do)delete d.stroke;else if(ce(d.stroke,"field")||p)delete d.stroke;else if(te(d.stroke)){const m=Xn(wj(a.stroke||a.color),s.stroke,u?s.color:void 0);m&&(d.stroke={value:m})}if(i!==fu){const m=he(t)&&Rme(0,r,t);m?d.opacity=[{test:m,...En(g??1)},En(l.legend.unselectedOpacity)]:g&&(d.opacity=En(g))}return d={...d,...e},Zt(d)?void 0:d},gradient:function nlt(e,{model:t,legendType:n,legendCmpt:i}){if("gradient"!==n)return;const{config:r,markDef:o,encoding:s}=t;let a={};const c=void 0===(i.get("gradientOpacity")??r.legend.gradientOpacity)?kme(s.opacity)||o.opacity:void 0;return c&&(a.opacity=En(c)),a={...a,...e},Zt(a)?void 0:a},labels:function ilt(e,{fieldOrDatumDef:t,model:n,channel:i,legendCmpt:r}){const o=n.legend(i)||{},s=n.config,a=he(t)?Rme(0,r,t):void 0,l=a?[{test:a,value:1},{value:s.legend.unselectedOpacity}]:void 0,{format:c,formatType:u}=o;let d;pp(u)?d=qa({fieldOrDatumDef:t,field:"datum.value",format:c,formatType:u,config:s}):void 0===c&&void 0===u&&s.customFormatTypes&&("quantitative"===t.type&&s.numberFormatType?d=qa({fieldOrDatumDef:t,field:"datum.value",format:s.numberFormat,formatType:s.numberFormatType,config:s}):"temporal"===t.type&&s.timeFormatType&&he(t)&&void 0===t.timeUnit&&(d=qa({fieldOrDatumDef:t,field:"datum.value",format:s.timeFormat,formatType:s.timeFormatType,config:s})));const f={...l?{opacity:l}:{},...d?{text:d}:{},...e};return Zt(f)?void 0:f},entries:function rlt(e,{legendCmpt:t}){return t.get("selections")?.length?{...e,fill:{value:"transparent"}}:e}};function kme(e){return Ome(e,(t,n)=>Math.max(t,n.value))}function wj(e){return Ome(e,(t,n)=>Xn(t,n.value))}function Ome(e,t){return function rot(e){const t=e?.condition;return!!t&&(te(t)||Ya(t))}(e)?Ee(e.condition).reduce(t,e.value):Ya(e)?e.value:void 0}function Rme(e,t,n){const i=t.get("selections");if(!i?.length)return;const r=ge(n.field);return i.map(o=>`(!length(data(${ge(Nn(o)+yp)})) || (${o}[${r}] && indexof(${o}[${r}], datum.value) >= 0))`).join(" || ")}const Fme={direction:({direction:e})=>e,format:({fieldOrDatumDef:e,legend:t,config:n})=>{const{format:i,formatType:r}=t;return fpe(e,e.type,i,r,n,!1)},formatType:({legend:e,fieldOrDatumDef:t,scaleType:n})=>{const{formatType:i}=e;return hpe(i,t,n)},gradientLength:e=>{const{legend:t,legendConfig:n}=e;return t.gradientLength??n.gradientLength??function dlt({legendConfig:e,model:t,direction:n,orient:i,scaleType:r}){const{gradientHorizontalMaxLength:o,gradientHorizontalMinLength:s,gradientVerticalMaxLength:a,gradientVerticalMinLength:l}=e;if(lc(r))return"horizontal"===n?"top"===i||"bottom"===i?Pme(t,"width",s,o):s:Pme(t,"height",l,a)}(e)},labelOverlap:({legend:e,legendConfig:t,scaleType:n})=>e.labelOverlap??t.labelOverlap??function flt(e){if(pt(["quantile","threshold","log","symlog"],e))return"greedy"}(n),symbolType:({legend:e,markDef:t,channel:n,encoding:i})=>e.symbolType??function slt(e,t,n,i){if("shape"!==t){const r=wj(n)??i;if(r)return r}switch(e){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}(t.type,n,i.shape,t.shape),title:({fieldOrDatumDef:e,config:t})=>K_(e,t,{allowDisabling:!0}),type:({legendType:e,scaleType:t,channel:n})=>{if(z_(n)&&lc(t)){if("gradient"===e)return}else if("symbol"===e)return;return e},values:({fieldOrDatumDef:e,legend:t})=>function olt(e,t){const n=e.values;return te(n)?Mpe(t,n):ke(n)?n:void 0}(t,e)};function Pme(e,t,n,i){return{signal:`clamp(${e.getSizeSignalRef(t).signal}, ${n}, ${i})`}}function Lme(e){const t=On(e)?function hlt(e){const{encoding:t}=e,n={};for(const i of[Do,...ege]){const r=Ti(t[i]);!r||!e.getScaleComponent(i)||i===So&&he(r)&&r.type===G_||(n[i]=mlt(e,i))}return n}(e):function _lt(e){const{legends:t,resolve:n}=e.component;for(const i of e.children){Lme(i);for(const r of se(i.component.legends))n.legend[r]=bj(e.component.resolve,r),"shared"===n.legend[r]&&(t[r]=$me(t[r],i.component.legends[r]),t[r]||(n.legend[r]="independent",delete t[r]))}for(const i of se(t))for(const r of e.children)r.component.legends[i]&&"shared"===n.legend[i]&&delete r.component.legends[i];return t}(e);return e.component.legends=t,t}function glt(e,t,n,i){switch(t){case"disable":return void 0!==n;case"values":return!!n?.values;case"title":if("title"===t&&e===i?.title)return!0}return e===(n||{})[t]}function mlt(e,t){let n=e.legend(t);const{markDef:i,encoding:r,config:o}=e,s=o.legend,a=new elt({},function plt(e,t){const n=e.scaleName(t);if("trail"===e.mark){if("color"===t)return{stroke:n};if("size"===t)return{strokeWidth:n}}return"color"===t?e.markDef.filled?{fill:n}:{stroke:n}:{[t]:n}}(e,t));!function Sat(e,t,n){const i=e.fieldDef(t)?.field;for(const r of nr(e.component.selection??{})){const o=r.project.hasField[i]??r.project.hasChannel[t];if(o&&ime.defined(r)){const s=n.get("selections")??[];s.push(r.name),n.set("selections",s,!1),o.hasLegend=!0}}}(e,t,a);const l=void 0!==n?!n:s.disable;if(a.set("disable",l,void 0!==n),l)return a;n=n||{};const c=e.getScaleComponent(t).get("type"),u=Ti(r[t]),d=he(u)?Pi(u.timeUnit)?.unit:void 0,f=n.orient||o.legend.orient||"right",h=function alt(e){const{legend:t}=e;return Xn(t.type,function llt({channel:e,timeUnit:t,scaleType:n}){if(z_(e)){if(pt(["quarter","month","day"],t))return"symbol";if(lc(n))return"gradient"}return"symbol"}(e))}({legend:n,channel:t,timeUnit:d,scaleType:c}),p=function clt({legendConfig:e,legendType:t,orient:n,legend:i}){return i.direction??e[t?"gradientDirection":"symbolDirection"]??function ult(e,t){switch(e){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return"gradient"===t?"horizontal":void 0}}(n,t)}({legend:n,legendType:h,orient:f,legendConfig:s}),g={legend:n,channel:t,model:e,markDef:i,encoding:r,fieldOrDatumDef:u,legendConfig:s,config:o,scaleType:c,orient:f,legendType:h,direction:p};for(const b of Nme){if("gradient"===h&&b.startsWith("symbol")||"symbol"===h&&b.startsWith("gradient"))continue;const w=b in Fme?Fme[b](g):n[b];if(void 0!==w){const C=glt(w,b,n,e.fieldDef(t));(C||void 0===o.legend[b])&&a.set(b,w,C)}}const m=n?.encoding??{},_=a.get("selections"),y={},v={fieldOrDatumDef:u,model:e,channel:t,legendCmpt:a,legendType:h};for(const b of["labels","legend","title","symbols","gradient","entries"]){const w=Ame(m[b]??{},e),C=b in Ime?Ime[b](w,v):w;void 0!==C&&!Zt(C)&&(y[b]={..._?.length&&he(u)?{name:`${Nn(u.field)}_legend_${b}`}:{},..._?.length?{interactive:!!_}:{},update:C})}return Zt(y)||a.set("encode",y,!!n?.encoding),a}function $me(e,t){if(!e)return t.clone();const n=e.getWithExplicit("orient"),i=t.getWithExplicit("orient");if(n.explicit&&i.explicit&&n.value!==i.value)return;let r=!1;for(const o of Nme){const s=rf(e.getWithExplicit(o),t.getWithExplicit(o),o,"legend",(a,l)=>{switch(o){case"symbolType":return ylt(a,l);case"title":return _he(a,l);case"type":return r=!0,cs("symbol")}return LM(a,l,o,"legend")});e.setWithExplicit(o,s)}return r&&(e.implicit?.encode?.gradient&&eM(e.implicit,["encode","gradient"]),e.explicit?.encode?.gradient&&eM(e.explicit,["encode","gradient"])),e}function ylt(e,t){return"circle"===t.value?t:e}function Bme(e){const t=e.component.legends,n={};for(const r of se(t)){const s=Jt(e.getScaleComponent(r).get("domains"));if(n[s])for(const a of n[s])$me(a,t[r])||n[s].push(t[r]);else n[s]=[t[r].clone()]}return nr(n).flat().map(r=>function blt(e,t){const{disable:n,labelExpr:i,selections:r,...o}=e.combine();if(!n){if(!1===t.aria&&null==o.aria&&(o.aria=!1),o.encode?.symbols){const s=o.encode.symbols.update;s.fill&&"transparent"!==s.fill.value&&!s.stroke&&!o.stroke&&(s.stroke={value:"transparent"});for(const a of ege)o[a]&&delete s[a]}if(o.title||delete o.title,void 0!==i){let s=i;o.encode?.labels?.update&&ke(o.encode.labels.update.text)&&(s=tp(i,"datum.label",o.encode.labels.update.text.signal)),function vlt(e,t,n,i){var r,o;e.encode??(e.encode={}),(r=e.encode)[t]??(r[t]={}),(o=e.encode[t]).update??(o.update={}),e.encode[t].update[n]=i}(o,"labels","text",{signal:s})}return o}}(r,e.config)).filter(r=>void 0!==r)}function jme(e){const t=e.component.projection;if(!t||t.merged)return[];const n=t.combine(),{name:i}=n;if(t.data){const r={signal:`[${t.size.map(s=>s.signal).join(", ")}]`},o=t.data.reduce((s,a)=>{const l=ke(a)?a.signal:`data('${e.lookupDataSource(a)}')`;return pt(s,l)||s.push(l),s},[]);if(o.length<=0)throw new Error("Projection's fit didn't find any data sources");return[{name:i,size:r,fit:{signal:o.length>1?`[${o.join(", ")}]`:o[0]},...n}]}return[{name:i,translate:{signal:"[width / 2, height / 2]"},...n}]}const Clt=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];class Vme extends vu{constructor(t,n,i,r){super({...n},{name:t}),this.specifiedProjection=n,this.size=i,this.data=r,this.merged=!1}get isFit(){return!!this.data}}function Ume(e){e.component.projection=On(e)?function Dlt(e){if(e.hasProjection){const t=rr(e.specifiedProjection),n=!(t&&(null!=t.scale||null!=t.translate)),i=n?[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]:void 0,r=n?function Slt(e){const t=[],{encoding:n}=e;for(const i of[[Ua,Va],[Gs,za]])(Ti(n[i[0]])||Ti(n[i[1]]))&&t.push({signal:e.getName(`geojson_${t.length}`)});return e.channelHasField(So)&&e.typedFieldDef(So).type===G_&&t.push({signal:e.getName(`geojson_${t.length}`)}),0===t.length&&t.push(e.requestDataName(Zn.Main)),t}(e):void 0,o=new Vme(e.projectionName(!0),{...rr(e.config.projection),...t},i,r);return o.get("type")||o.set("type","equalEarth",!1),o}}(e):function xlt(e){if(0===e.children.length)return;let t;for(const i of e.children)Ume(i);const n=B4(e.children,i=>{const r=i.component.projection;if(r){if(t){const o=function Tlt(e,t){const n=B4(Clt,r=>!!(!De(e.explicit,r)&&!De(t.explicit,r)||De(e.explicit,r)&&De(t.explicit,r)&&as(e.get(r),t.get(r))));if(as(e.size,t.size)){if(n)return e;if(as(e.explicit,{}))return t;if(as(t.explicit,{}))return e}return null}(t,r);return o&&(t=o),!!o}return t=r,!0}return!0});if(t&&n){const i=e.projectionName(!0),r=new Vme(i,t.specifiedProjection,t.size,Ze(t.data));for(const o of e.children){const s=o.component.projection;s&&(s.isFit&&r.data.push(...o.component.projection.data),o.renameProjection(s.get("name"),i),s.merged=!0)}return r}}(e)}function Alt(e,t,n,i){if(tw(t,n)){const r=On(e)?e.axis(n)??e.legend(n)??{}:{},o=ve(t,{expr:"datum"}),s=ve(t,{expr:"datum",binSuffix:"end"});return{formulaAs:ve(t,{binSuffix:"range",forAs:!0}),formula:Qb(o,s,r.format,r.formatType,i)}}return{}}function zme(e,t){return`${she(e)}_${t}`}function Ej(e,t,n){const r=zme(AM(n,void 0)??{},t);return e.getName(`${r}_bins`)}function Hme(e,t,n){let i,r;i=function Nlt(e){return"as"in e}(e)?Ce(e.as)?[e.as,`${e.as}_end`]:[e.as[0],e.as[1]]:[ve(e,{forAs:!0}),ve(e,{binSuffix:"end",forAs:!0})];const o={...AM(t,void 0)},s=zme(o,e.field),{signal:a,extentSignal:l}=function Mlt(e,t){return{signal:e.getName(`${t}_bins`),extentSignal:e.getName(`${t}_extent`)}}(n,s);if(cM(o.extent)){const u=o.extent;r=gme(n,u.param,u),delete o.extent}return{key:s,binComponent:{bin:o,field:e.field,as:[i],...a?{signal:a}:{},...l?{extentSignal:l}:{},...r?{span:r}:{}}}}class hc extends Kt{clone(){return new hc(null,Ze(this.bins))}constructor(t,n){super(t),this.bins=n}static makeFromEncoding(t,n){const i=n.reduceFieldDef((r,o,s)=>{if(eo(o)&&mn(o.bin)){const{key:a,binComponent:l}=Hme(o,o.bin,n);r[a]={...l,...r[a],...Alt(n,o,s,n.config)}}return r},{});return Zt(i)?null:new hc(t,i)}static makeFromTransform(t,n,i){const{key:r,binComponent:o}=Hme(n,n.bin,i);return new hc(t,{[r]:o})}merge(t,n){for(const i of se(t.bins))i in this.bins?(n(t.bins[i].signal,this.bins[i].signal),this.bins[i].as=Jl([...this.bins[i].as,...t.bins[i].as],gt)):this.bins[i]=t.bins[i];for(const i of t.children)t.removeChild(i),i.parent=this;t.remove()}producedFields(){return new Set(nr(this.bins).map(t=>t.as).flat(2))}dependentFields(){return new Set(nr(this.bins).map(t=>t.field))}hash(){return`Bin ${gt(this.bins)}`}assemble(){return nr(this.bins).flatMap(t=>{const n=[],[i,...r]=t.as,{extent:o,...s}=t.bin,a={type:"bin",field:zs(t.field),as:i,signal:t.signal,...cM(o)?{extent:null}:{extent:o},...t.span?{span:{signal:`span(${t.span})`}}:{},...s};!o&&t.extentSignal&&(n.push({type:"extent",field:zs(t.field),signal:t.extentSignal}),a.extent={signal:t.extentSignal}),n.push(a);for(const l of r)for(let c=0;c<2;c++)n.push({type:"formula",expr:ve({field:i[c]},{expr:"datum"}),as:l[c]});return t.formula&&n.push({type:"formula",expr:t.formula,as:t.formulaAs}),n})}}class Qa extends Kt{clone(){return new Qa(null,new Set(this.dimensions),Ze(this.measures))}constructor(t,n,i){super(t),this.dimensions=n,this.measures=i}get groupBy(){return this.dimensions}static makeFromEncoding(t,n){let i=!1;n.forEachFieldDef(s=>{s.aggregate&&(i=!0)});const r={},o=new Set;return i&&(n.forEachFieldDef((s,a)=>{const{aggregate:l,field:c}=s;if(l)if("count"===l)r["*"]??(r["*"]={}),r["*"].count=new Set([ve(s,{forAs:!0})]);else{if(pu(l)||Qd(l)){const u=pu(l)?"argmin":"argmax",d=l[u];r[d]??(r[d]={}),r[d][u]=new Set([ve({op:u,field:d},{forAs:!0})])}else r[c]??(r[c]={}),r[c][l]=new Set([ve(s,{forAs:!0})]);rc(a)&&"unaggregated"===n.scaleDomain(a)&&(r[c]??(r[c]={}),r[c].min=new Set([ve({field:c,aggregate:"min"},{forAs:!0})]),r[c].max=new Set([ve({field:c,aggregate:"max"},{forAs:!0})]))}else!function Ilt(e,t,n,i){const r=On(i)?i.encoding[ic(t)]:void 0;if(eo(n)&&On(i)&&bpe(n,r,i.markDef,i.config)){e.add(ve(n,{})),e.add(ve(n,{suffix:"end"}));const{mark:o,markDef:s,config:a}=i,l=tf({fieldDef:n,markDef:s,config:a});Kb(o)&&.5!==l&&Qn(t)&&(e.add(ve(n,{suffix:$M})),e.add(ve(n,{suffix:BM}))),n.bin&&tw(n,t)&&e.add(ve(n,{binSuffix:"range"}))}else if(Xfe(t)){const o=Kfe(t);e.add(i.getName(o))}else e.add(ve(n));return gp(n)&&function Mrt(e){return we(e)&&"field"in e}(n.scale?.range)&&e.add(n.scale.range.field),e}(o,a,s,n)}),o.size+se(r).length!==0)?new Qa(t,o,r):null}static makeFromTransform(t,n){var i;const r=new Set,o={};for(const s of n.aggregate){const{op:a,field:l,as:c}=s;a&&("count"===a?(o["*"]??(o["*"]={}),o["*"].count=new Set([c||ve(s,{forAs:!0})])):(o[l]??(o[l]={}),(i=o[l])[a]??(i[a]=new Set),o[l][a].add(c||ve(s,{forAs:!0}))))}for(const s of n.groupby??[])r.add(s);return r.size+se(o).length===0?null:new Qa(t,r,o)}merge(t){return jfe(this.dimensions,t.dimensions)?(function klt(e,t){for(const n of se(t)){const i=t[n];for(const r of se(i))n in e?e[n][r]=new Set([...e[n][r]??[],...i[r]]):e[n]={[r]:i[r]}}}(this.measures,t.measures),!0):(function ert(...e){sc.debug(...e)}("different dimensions, cannot merge"),!1)}addDimensions(t){t.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...se(this.measures)])}producedFields(){const t=new Set;for(const n of se(this.measures))for(const i of se(this.measures[n])){const r=this.measures[n][i];0===r.size?t.add(`${i}_${n}`):r.forEach(t.add,t)}return t}hash(){return`Aggregate ${gt({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const t=[],n=[],i=[];for(const o of se(this.measures))for(const s of se(this.measures[o]))for(const a of this.measures[o][s])i.push(a),t.push(s),n.push("*"===o?null:zs(o));return{type:"aggregate",groupby:[...this.dimensions].map(zs),ops:t,fields:n,as:i}}}class ay extends Kt{constructor(t,n,i,r){super(t),this.model=n,this.name=i,this.data=r;for(const o of Ws){const s=n.facet[o];if(s){const{bin:a,sort:l}=s;this[o]={name:n.getName(`${o}_domain`),fields:[ve(s),...mn(a)?[ve(s,{binSuffix:"end"})]:[]],...mu(l)?{sortField:l}:te(l)?{sortIndexField:oy(s,o)}:{}}}}this.childModel=n.child}hash(){let t="Facet";for(const n of Ws)this[n]&&(t+=` ${n.charAt(0)}:${gt(this[n])}`);return t}get fields(){const t=[];for(const n of Ws)this[n]?.fields&&t.push(...this[n].fields);return t}dependentFields(){const t=new Set(this.fields);for(const n of Ws)this[n]&&(this[n].sortField&&t.add(this[n].sortField.field),this[n].sortIndexField&&t.add(this[n].sortIndexField));return t}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const t={};for(const n of hu){const i=this.childModel.component.scales[n];if(i&&!i.merged){const r=i.get("type"),o=i.get("range");if(Li(r)&&sp(o)){const a=Oj(XM(this.childModel,n));a?t[n]=a:de(r6(n))}}}return t}assembleRowColumnHeaderData(t,n,i){const r={row:"y",column:"x",facet:void 0}[t],o=[],s=[],a=[];r&&i&&i[r]&&(n?(o.push(`distinct_${i[r]}`),s.push("max")):(o.push(i[r]),s.push("distinct")),a.push(`distinct_${i[r]}`));const{sortField:l,sortIndexField:c}=this[t];if(l){const{op:u=wM,field:d}=l;o.push(d),s.push(u),a.push(ve(l,{forAs:!0}))}else c&&(o.push(c),s.push("max"),a.push(c));return{name:this[t].name,source:n??this.data,transform:[{type:"aggregate",groupby:this[t].fields,...o.length?{fields:o,ops:s,as:a}:{}}]}}assembleFacetHeaderData(t){const{columns:n}=this.model.layout,{layoutHeaders:i}=this.model.component,r=[],o={};for(const l of mj){for(const c of _j){const u=(i[l]&&i[l][c])??[];for(const d of u)if(d.axes?.length>0){o[l]=!0;break}}if(o[l]){const c=`length(data("${this.facet.name}"))`;r.push({name:`${this.facet.name}_${l}`,transform:[{type:"sequence",start:0,stop:"row"===l?n?{signal:`ceil(${c} / ${n})`}:1:n?{signal:`min(${c}, ${n})`}:{signal:c}}]})}}const{row:s,column:a}=o;return(s||a)&&r.unshift(this.assembleRowColumnHeaderData("facet",null,t)),r}assemble(){const t=[];let n=null;const i=this.getChildIndependentFieldsWithStep(),{column:r,row:o,facet:s}=this;if(r&&o&&(i.x||i.y)){n=`cross_${this.column.name}_${this.row.name}`;const a=[].concat(i.x??[],i.y??[]),l=a.map(()=>"distinct");t.push({name:n,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:a,ops:l}]})}for(const a of[lu,au])this[a]&&t.push(this.assembleRowColumnHeaderData(a,n,i));if(s){const a=this.assembleFacetHeaderData(i);a&&t.push(...a)}return t}}function Gme(e){return e.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}function Rlt(e){const t={};return JA(e.filter,n=>{if(Hhe(n)){let i=null;u6(n)?i=ls(n.equal):f6(n)?i=ls(n.lte):d6(n)?i=ls(n.lt):h6(n)?i=ls(n.gt):p6(n)?i=ls(n.gte):g6(n)?i=n.range[0]:m6(n)&&(i=(n.oneOf??n.in)[0]),i&&(ap(i)?t[n.field]="date":At(i)?t[n.field]="number":Ce(i)&&(t[n.field]="string")),n.timeUnit&&(t[n.field]="date")}}),t}class Sr extends Kt{clone(){return new Sr(null,Ze(this._parse))}constructor(t,n){super(t),this._parse=n}hash(){return`Parse ${gt(this._parse)}`}static makeExplicit(t,n,i){let r={};const o=n.data;return!sf(o)&&o?.format?.parse&&(r=o.format.parse),this.makeWithAncestors(t,r,{},i)}static makeWithAncestors(t,n,i,r){for(const a of se(i)){const l=r.getWithExplicit(a);void 0!==l.value&&(l.explicit||l.value===i[a]||"derived"===l.value||"flatten"===i[a]?delete i[a]:de(Dhe(a,i[a],l.value)))}for(const a of se(n)){const l=r.get(a);void 0!==l&&(l===n[a]?delete n[a]:de(Dhe(a,n[a],l)))}const o=new vu(n,i);r.copyAll(o);const s={};for(const a of se(o.combine())){const l=o.get(a);null!==l&&(s[a]=l)}return 0===se(s).length||r.parseNothing?null:new Sr(t,s)}get parse(){return this._parse}merge(t){this._parse={...this._parse,...t.parse},t.remove()}assembleFormatParse(){const t={};for(const n of se(this._parse)){const i=this._parse[n];1===j_(n)&&(t[n]=i)}return t}producedFields(){return new Set(se(this._parse))}dependentFields(){return new Set(se(this._parse))}assembleTransforms(t=!1){return se(this._parse).filter(n=>!t||j_(n)>1).map(n=>{const i=function Olt(e,t){const n=z4(e);return"number"===t?`toNumber(${n})`:"boolean"===t?`toBoolean(${n})`:"string"===t?`toString(${n})`:"date"===t?`toDate(${n})`:"flatten"===t?n:t.startsWith("date:")?`timeParse(${n},'${Gme(t.slice(5,t.length))}')`:t.startsWith("utc:")?`utcParse(${n},'${Gme(t.slice(4,t.length))}')`:(de(function lit(e){return`Unrecognized parse "${e}".`}(t)),null)}(n,this._parse[n]);return i?{type:"formula",expr:i,as:B_(n)}:null}).filter(n=>null!==n)}}class lf extends Kt{clone(){return new lf(null)}constructor(t){super(t)}dependentFields(){return new Set}producedFields(){return new Set([Xa])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:Xa}}}class aw extends Kt{clone(){return new aw(null,this.params)}constructor(t,n){super(t),this.params=n}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${gt(this.params)}`}assemble(){return{type:"graticule",...!0===this.params?{}:this.params}}}class lw extends Kt{clone(){return new lw(null,this.params)}constructor(t,n){super(t),this.params=n}dependentFields(){return new Set}producedFields(){return new Set([this.params.as??"data"])}hash(){return`Hash ${gt(this.params)}`}assemble(){return{type:"sequence",...this.params}}}class bp extends Kt{constructor(t){let n;if(super(null),t??(t={name:"source"}),sf(t)||(n=t.format?{...Co(t.format,["parse"])}:{}),iw(t))this._data={values:t.values};else if(J_(t)){if(this._data={url:t.url},!n.type){let i=/(?:\.([^.]+))?$/.exec(t.url)[1];pt(["json","csv","tsv","dsv","topojson"],i)||(i="json"),n.type=i}}else kge(t)?this._data={values:[{type:"Sphere"}]}:(Nge(t)||sf(t))&&(this._data={});this._generator=sf(t),t.name&&(this._name=t.name),n&&!Zt(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(t){this._name=t}set parent(t){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{name:this._name,...this._data,transform:[]}}}var cw,Wme=function(e,t,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n};function Cj(e){return e instanceof bp||e instanceof aw||e instanceof lw}class Dj{constructor(){cw.set(this,void 0),Wme(this,cw,!1,"f")}setModified(){Wme(this,cw,!0,"f")}get modifiedFlag(){return function(e,t){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}(this,cw)}}cw=new WeakMap;class wp extends Dj{getNodeDepths(t,n,i){i.set(t,n);for(const r of t.children)this.getNodeDepths(r,n+1,i);return i}optimize(t){const i=[...this.getNodeDepths(t,0,new Map).entries()].sort((r,o)=>o[1]-r[1]);for(const r of i)this.run(r[0]);return this.modifiedFlag}}class Sj extends Dj{optimize(t){this.run(t);for(const n of t.children)this.optimize(n);return this.modifiedFlag}}class $lt extends Sj{mergeNodes(t,n){const i=n.shift();for(const r of n)t.removeChild(r),r.parent=i,r.remove()}run(t){const n=t.children.map(r=>r.hash()),i={};for(let r=0;r1&&(this.setModified(),this.mergeNodes(t,i[r]))}}class Blt extends Sj{constructor(t){super(),this.requiresSelectionId=t&&dj(t)}run(t){t instanceof lf&&(this.requiresSelectionId&&(Cj(t.parent)||t.parent instanceof Qa||t.parent instanceof Sr)||(this.setModified(),t.remove()))}}class jlt extends Dj{optimize(t){return this.run(t,new Set),this.modifiedFlag}run(t,n){let i=new Set;t instanceof fc&&(i=t.producedFields(),j4(i,n)&&(this.setModified(),t.removeFormulas(n),0===t.producedFields.length&&t.remove()));for(const r of t.children)this.run(r,new Set([...n,...i]))}}class Vlt extends Sj{constructor(){super()}run(t){t instanceof xo&&!t.isRequired()&&(this.setModified(),t.remove())}}class Ult extends wp{run(t){if(!(Cj(t)||t.numChildren()>1))for(const n of t.children)if(n instanceof Sr)if(t instanceof Sr)this.setModified(),t.merge(n);else{if(U4(t.producedFields(),n.dependentFields()))continue;this.setModified(),n.swapWithParent()}}}class zlt extends wp{run(t){const n=[...t.children],i=t.children.filter(r=>r instanceof Sr);if(t.numChildren()>1&&i.length>=1){const r={},o=new Set;for(const s of i){const a=s.parse;for(const l of se(a))l in r?r[l]!==a[l]&&o.add(l):r[l]=a[l]}for(const s of o)delete r[s];if(!Zt(r)){this.setModified();const s=new Sr(t,r);for(const a of n){if(a instanceof Sr)for(const l of se(r))delete a.parse[l];t.removeChild(a),a.parent=s,a instanceof Sr&&0===se(a.parse).length&&a.remove()}}}}}class Hlt extends wp{run(t){t instanceof xo||t.numChildren()>0||t instanceof ay||t instanceof bp||(this.setModified(),t.remove())}}class Glt extends wp{run(t){const n=t.children.filter(r=>r instanceof fc),i=n.pop();for(const r of n)this.setModified(),i.merge(r)}}class Wlt extends wp{run(t){const n=t.children.filter(r=>r instanceof Qa),i={};for(const r of n){const o=gt(r.groupBy);o in i||(i[o]=[]),i[o].push(r)}for(const r of se(i)){const o=i[r];if(o.length>1){const s=o.pop();for(const a of o)s.merge(a)&&(t.removeChild(a),a.parent=s,a.remove(),this.setModified())}}}}class qlt extends wp{constructor(t){super(),this.model=t}run(t){const n=!(Cj(t)||t instanceof iy||t instanceof Sr||t instanceof lf),i=[],r=[];for(const o of t.children)o instanceof hc&&(n&&!U4(t.producedFields(),o.dependentFields())?i.push(o):r.push(o));if(i.length>0){const o=i.pop();for(const s of i)o.merge(s,this.model.renameSignal.bind(this.model));this.setModified(),t instanceof hc?t.merge(o,this.model.renameSignal.bind(this.model)):o.swapWithParent()}if(r.length>1){const o=r.pop();for(const s of r)o.merge(s,this.model.renameSignal.bind(this.model));this.setModified()}}}class Ylt extends wp{run(t){const n=[...t.children];if(!$_(n,s=>s instanceof xo)||t.numChildren()<=1)return;const r=[];let o;for(const s of n)if(s instanceof xo){let a=s;for(;1===a.numChildren();){const[l]=a.children;if(!(l instanceof xo))break;a=l}r.push(...a.children),o?(t.removeChild(s),s.parent=o.parent,o.parent.removeChild(o),o.parent=a,this.setModified()):o=a}else r.push(s);if(r.length){this.setModified();for(const s of r)s.parent.removeChild(s),s.parent=o}}}class Ep extends Kt{clone(){return new Ep(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=Jl(this.transform.groupby.concat(t),n=>n)}dependentFields(){const t=new Set;return this.transform.groupby&&this.transform.groupby.forEach(t.add,t),this.transform.joinaggregate.map(n=>n.field).filter(n=>void 0!==n).forEach(t.add,t),t}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(t){return t.as??ve(t)}hash(){return`JoinAggregateTransform ${gt(this.transform)}`}assemble(){const t=[],n=[],i=[];for(const o of this.transform.joinaggregate)n.push(o.op),i.push(this.getDefaultName(o)),t.push(void 0===o.field?null:o.field);const r=this.transform.groupby;return{type:"joinaggregate",as:i,ops:n,fields:t,...void 0!==r?{groupby:r}:{}}}}class ly extends Kt{clone(){return new ly(null,{...this.filter})}constructor(t,n){super(t),this.filter=n}static make(t,n,i){const{config:r,markDef:o}=n,{marks:s,scales:a}=i;if("include-invalid-values"===s&&"include-invalid-values"===a)return null;const l=n.reduceFieldDef((c,u,d)=>{const f=rc(d)&&n.getScaleComponent(d);if(f){const h=f.get("type"),{aggregate:p}=u,g=S6({scaleChannel:d,markDef:o,config:r,scaleType:h,isCountAggregate:lM(p)});"show"!==g&&"always-valid"!==g&&(c[u.field]=u)}return c},{});return se(l).length?new ly(t,l):null}dependentFields(){return new Set(se(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${gt(this.filter)}`}assemble(){const t=se(this.filter).reduce((n,i)=>{const r=this.filter[i],o=ve(r,{expr:"datum"});return null!==r&&("temporal"===r.type?n.push(`(isDate(${o}) || (${Tj(o)}))`):"quantitative"===r.type&&n.push(Tj(o))),n},[]);return t.length>0?{type:"filter",expr:t.join(" && ")}:null}}function Tj(e){return`isValid(${e}) && isFinite(+${e})`}class Eu extends Kt{clone(){return new Eu(null,Ze(this._stack))}constructor(t,n){super(t),this._stack=n}static makeFromTransform(t,n){const{stack:i,groupby:r,as:o,offset:s="zero"}=n,a=[],l=[];if(void 0!==n.sort)for(const d of n.sort)a.push(d.field),l.push(Xn(d.order,"ascending"));const c={field:a,order:l};let u;return u=function Xlt(e){return te(e)&&e.every(t=>Ce(t))&&e.length>1}(o)?o:Ce(o)?[o,`${o}_end`]:[`${n.stack}_start`,`${n.stack}_end`],new Eu(t,{dimensionFieldDefs:[],stackField:i,groupby:r,offset:s,sort:c,facetby:[],as:u})}static makeFromEncoding(t,n){const i=n.stack,{encoding:r}=n;if(!i)return null;const{groupbyChannels:o,fieldChannel:s,offset:a,impute:l}=i,c=o.map(h=>Ka(r[h])).filter(h=>!!h),u=function Klt(e){return e.stack.stackBy.reduce((t,n)=>{const r=ve(n.fieldDef);return r&&t.push(r),t},[])}(n),d=n.encoding.order;let f;if(te(d)||he(d))f=phe(d);else{const h=wpe(d)?d.sort:"y"===s?"descending":"ascending";f=u.reduce((p,g)=>(p.field.includes(g)||(p.field.push(g),p.order.push(h)),p),{field:[],order:[]})}return new Eu(t,{dimensionFieldDefs:c,stackField:n.vgField(s),facetby:[],stackby:u,sort:f,offset:a,impute:l,as:[n.vgField(s,{suffix:"start",forAs:!0}),n.vgField(s,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(t){this._stack.facetby.push(...t)}dependentFields(){const t=new Set;return t.add(this._stack.stackField),this.getGroupbyFields().forEach(t.add,t),this._stack.facetby.forEach(t.add,t),this._stack.sort.field.forEach(t.add,t),t}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${gt(this._stack)}`}getGroupbyFields(){const{dimensionFieldDefs:t,impute:n,groupby:i}=this._stack;return t.length>0?t.map(r=>r.bin?n?[ve(r,{binSuffix:"mid"})]:[ve(r,{}),ve(r,{binSuffix:"end"})]:[ve(r)]).flat():i??[]}assemble(){const t=[],{facetby:n,dimensionFieldDefs:i,stackField:r,stackby:o,sort:s,offset:a,impute:l,as:c}=this._stack;if(l)for(const u of i){const{bandPosition:d=.5,bin:f}=u;if(f){const h=ve(u,{expr:"datum"}),p=ve(u,{expr:"datum",binSuffix:"end"});t.push({type:"formula",expr:`${Tj(h)} ? ${d}*${h}+${1-d}*${p} : ${h}`,as:ve(u,{binSuffix:"mid",forAs:!0})})}t.push({type:"impute",field:r,groupby:[...o,...n],key:ve(u,{binSuffix:"mid"}),method:"value",value:0})}return t.push({type:"stack",groupby:[...this.getGroupbyFields(),...n],field:r,sort:s,as:c,offset:a}),t}}class cy extends Kt{clone(){return new cy(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=Jl(this.transform.groupby.concat(t),n=>n)}dependentFields(){const t=new Set;return(this.transform.groupby??[]).forEach(t.add,t),(this.transform.sort??[]).forEach(n=>t.add(n.field)),this.transform.window.map(n=>n.field).filter(n=>void 0!==n).forEach(t.add,t),t}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(t){return t.as??ve(t)}hash(){return`WindowTransform ${gt(this.transform)}`}assemble(){const t=[],n=[],i=[],r=[];for(const d of this.transform.window)n.push(d.op),i.push(this.getDefaultName(d)),r.push(void 0===d.param?null:d.param),t.push(void 0===d.field?null:d.field);const o=this.transform.frame,s=this.transform.groupby;if(o&&null===o[0]&&null===o[1]&&n.every(d=>e6(d)))return{type:"joinaggregate",as:i,ops:n,fields:t,...void 0!==s?{groupby:s}:{}};const a=[],l=[];if(void 0!==this.transform.sort)for(const d of this.transform.sort)a.push(d.field),l.push(d.order??"ascending");const u=this.transform.ignorePeers;return{type:"window",params:r,as:i,ops:n,fields:t,sort:{field:a,order:l},...void 0!==u?{ignorePeers:u}:{},...void 0!==s?{groupby:s}:{},...void 0!==o?{frame:o}:{}}}}function xj(e){if(e instanceof ay)if(1!==e.numChildren()||e.children[0]instanceof xo){const t=e.model.component.data.main;qme(t);const n=function Qlt(e){return function t(n){if(!(n instanceof ay)){const i=n.clone();if(i instanceof xo){const r=Aj+i.getSource();i.setSource(r),e.model.component.data.outputNodes[r]=i}else(i instanceof Qa||i instanceof Eu||i instanceof cy||i instanceof Ep)&&i.addDimensions(e.fields);for(const r of n.children.flatMap(t))r.parent=i;return[i]}return n.children.flatMap(t)}}(e),i=e.children.map(n).flat();for(const r of i)r.parent=t}else{const t=e.children[0];(t instanceof Qa||t instanceof Eu||t instanceof cy||t instanceof Ep)&&t.addDimensions(e.fields),t.swapWithParent(),xj(e)}else e.children.map(xj)}function qme(e){if(e instanceof xo&&e.type===Zn.Main&&1===e.numChildren()){const t=e.children[0];t instanceof ay||(t.swapWithParent(),qme(e))}}const Aj="scale_",KM=5;function Mj(e){for(const t of e){for(const n of t.children)if(n.parent!==t)return!1;if(!Mj(t.children))return!1}return!0}function Za(e,t){let n=!1;for(const i of t)n=e.optimize(i)||n;return n}function Yme(e,t,n){let i=e.sources,r=!1;return r=Za(new Vlt,i)||r,r=Za(new Blt(t),i)||r,i=i.filter(o=>o.numChildren()>0),r=Za(new Hlt,i)||r,i=i.filter(o=>o.numChildren()>0),n||(r=Za(new Ult,i)||r,r=Za(new qlt(t),i)||r,r=Za(new jlt,i)||r,r=Za(new zlt,i)||r,r=Za(new Wlt,i)||r,r=Za(new Glt,i)||r,r=Za(new $lt,i)||r,r=Za(new Ylt,i)||r),e.sources=i,r}class $i{constructor(t){Object.defineProperty(this,"signal",{enumerable:!0,get:t})}static fromName(t,n){return new $i(()=>t(n))}}function Kme(e){On(e)?function Jlt(e){const t=e.component.scales;for(const n of se(t)){const i=nct(e,n);if(t[n].setWithExplicit("domains",i),rct(e,n),e.component.data.isFaceted){let o=e;for(;!us(o)&&o.parent;)o=o.parent;if("shared"===o.component.resolve.scale[n])for(const a of i.value)gu(a)&&(a.data=Aj+a.data.replace(Aj,""))}}}(e):function ect(e){for(const n of e.children)Kme(n);const t=e.component.scales;for(const n of se(t)){let i,r=null;for(const o of e.children){const s=o.component.scales[n];if(s){i=void 0===i?s.getWithExplicit("domains"):rf(i,s.getWithExplicit("domains"),"domains","scale",kj);const a=s.get("selectionExtent");r&&a&&r.param!==a.param&&de("The same selection must be used to override scale domains in a layered view."),r=a}}t[n].setWithExplicit("domains",i),r&&t[n].set("selectionExtent",r,!0)}}(e)}function nct(e,t){const n=e.getScaleComponent(t).get("type"),{encoding:i}=e,r=function tct(e,t,n,i){if("unaggregated"===e){const{valid:r,reason:o}=Xme(t,n);if(!r)return void de(o)}else if(void 0===e&&i.useUnaggregatedDomain){const{valid:r}=Xme(t,n);if(r)return"unaggregated"}return e}(e.scaleDomain(t),e.typedFieldDef(t),n,e.config.scale);return r!==e.scaleDomain(t)&&(e.specifiedScales[t]={...e.specifiedScales[t],domain:r}),"x"===t&&Ti(i.x2)?Ti(i.x)?rf(cf(n,r,e,"x"),cf(n,r,e,"x2"),"domain","scale",kj):cf(n,r,e,"x2"):"y"===t&&Ti(i.y2)?Ti(i.y)?rf(cf(n,r,e,"y"),cf(n,r,e,"y2"),"domain","scale",kj):cf(n,r,e,"y2"):cf(n,r,e,t)}function Nj(e,t,n){const i=Pi(n)?.unit;return"temporal"===t||i?function ict(e,t,n){return e.map(i=>({signal:`{data: ${MM(i,{timeUnit:n,type:t})}}`}))}(e,t,i):[e]}function cf(e,t,n,i){const{encoding:r,markDef:o,mark:s,config:a,stack:l}=n,c=Ti(r[i]),{type:u}=c,d=c.timeUnit,f=function Xst(e){const{marks:t,scales:n}=Oge(e);return t===n?Zn.Main:"include-invalid-values"===n?Zn.PreFilterInvalid:Zn.PostFilterInvalid}({invalid:oc("invalid",o,a),isPath:ef(s)});if(function Art(e){return ce(e,"unionWith")}(t)){const g=cf(e,void 0,n,i);return dc([...Nj(t.unionWith,u,d),...g.value])}if(ke(t))return dc([t]);if(t&&"unaggregated"!==t&&!Zhe(t))return dc(Nj(t,u,d));if(l&&i===l.fieldChannel){if("normalize"===l.offset)return cs([[0,1]]);const g=n.requestDataName(f);return cs([{data:g,field:n.vgField(i,{suffix:"start"})},{data:g,field:n.vgField(i,{suffix:"end"})}])}const h=rc(i)&&he(c)?function oct(e,t,n){if(!Li(n))return;const i=e.fieldDef(t),r=i.sort;if(_pe(r))return{op:"min",field:oy(i,t),order:"ascending"};const{stack:o}=e,s=o?new Set([...o.groupbyFields,...o.stackBy.map(a=>a.fieldDef.field)]):void 0;if(mu(r))return Ij(r,o&&!s.has(r.field));if(function tot(e){return ce(e,"encoding")}(r)){const{encoding:a,order:l}=r,c=e.fieldDef(a),{aggregate:u,field:d}=c,f=o&&!s.has(d);if(pu(u)||Qd(u))return Ij({field:ve(c),order:l},f);if(e6(u)||!u)return Ij({op:u,field:d,order:l},f)}else{if("descending"===r)return{op:"min",field:e.vgField(t),order:"descending"};if(pt(["ascending",void 0],r))return!0}}(n,i,e):void 0;if(cc(c))return cs(Nj([c.datum],u,d));const p=c;if("unaggregated"===t){const{field:g}=c;return cs([{data:n.requestDataName(f),field:ve({field:g,aggregate:"min"})},{data:n.requestDataName(f),field:ve({field:g,aggregate:"max"})}])}if(mn(p.bin)){if(Li(e))return cs("bin-ordinal"===e?[]:[{data:jb(h)?n.requestDataName(f):n.requestDataName(Zn.Raw),field:n.vgField(i,tw(p,i)?{binSuffix:"range"}:{}),sort:!0!==h&&we(h)?h:{field:n.vgField(i,{}),op:"min"}}]);{const{bin:g}=p;if(mn(g)){const m=Ej(n,p.field,g);return cs([new $i(()=>{const _=n.getSignalName(m);return`[${_}.start, ${_}.stop]`})])}return cs([{data:n.requestDataName(f),field:n.vgField(i,{})}])}}if(p.timeUnit&&pt(["time","utc"],e)){const g=r[ic(i)];if(bpe(p,g,o,a)){const m=n.requestDataName(f),_=tf({fieldDef:p,fieldDef2:g,markDef:o,config:a}),y=Kb(s)&&.5!==_&&Qn(i);return cs([{data:m,field:n.vgField(i,y?{suffix:$M}:{})},{data:m,field:n.vgField(i,{suffix:y?BM:"end"})}])}}return cs(h?[{data:jb(h)?n.requestDataName(f):n.requestDataName(Zn.Raw),field:n.vgField(i),sort:h}]:[{data:n.requestDataName(f),field:n.vgField(i)}])}function Ij(e,t){const{op:n,field:i,order:r}=e;return{op:n??(t?"sum":wM),...i?{field:zs(i)}:{},...r?{order:r}:{}}}function rct(e,t){const n=e.component.scales[t],i=e.specifiedScales[t].domain,r=e.fieldDef(t)?.bin,o=Zhe(i)?i:void 0,s=op(r)&&cM(r.extent)?r.extent:void 0;(o||s)&&n.set("selectionExtent",o??s,!0)}function Xme(e,t){const{aggregate:n,type:i}=e;return n?Ce(n)&&!Unt.has(n)?{valid:!1,reason:Nit(n)}:"quantitative"===i&&"log"===t?{valid:!1,reason:Iit(e)}:{valid:!0}:{valid:!1,reason:Mit(e)}}function kj(e,t,n,i){return e.explicit&&t.explicit&&de(function Pit(e,t,n,i){return`Conflicting ${t.toString()} property "${e.toString()}" (${Jt(n)} and ${Jt(i)}). Using the union of the two domains.`}(n,i,e.value,t.value)),{explicit:e.explicit,value:[...e.value,...t.value]}}function Oj(e){if(gu(e)&&Ce(e.field))return e.field;if(function znt(e){return!te(e)&&ce(e,"fields")&&!ce(e,"data")}(e)){let t;for(const n of e.fields)if(gu(n)&&Ce(n.field))if(t){if(t!==n.field)return de("Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect."),t}else t=n.field;return de("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."),t}if(function Hnt(e){return!te(e)&&ce(e,"fields")&&ce(e,"data")}(e)){de("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.");const t=e.fields[0];return Ce(t)?t:void 0}}function XM(e,t){return function sct(e){const t=Jl(e.map(s=>{if(gu(s)){const{sort:a,...l}=s;return l}return s}),gt),n=Jl(e.map(s=>{if(gu(s)){const a=s.sort;return void 0!==a&&!jb(a)&&("op"in a&&"count"===a.op&&delete a.field,"ascending"===a.order&&delete a.order),a}}).filter(s=>void 0!==s),gt);if(0===t.length)return;if(1===t.length){const s=e[0];if(gu(s)&&n.length>0){let a=n[0];if(n.length>1){de(Nhe);const l=n.filter(c=>we(c)&&"op"in c&&"min"!==c.op);a=!n.every(c=>we(c)&&"op"in c)||1!==l.length||l[0]}else we(a)&&"field"in a&&s.field===a.field&&(a=!a.order||{order:a.order});return{...s,sort:a}}return s}const i=Jl(n.map(s=>jb(s)||!("op"in s)||Ce(s.op)&&De($nt,s.op)?s:(de(function $it(e){return`Dropping sort property ${Jt(e)} as unioned domains only support boolean or op "count", "min", and "max".`}(s)),!0)),gt);let r;1===i.length?r=i[0]:i.length>1&&(de(Nhe),r=!0);const o=Jl(e.map(s=>gu(s)?s.data:null),s=>s);return 1===o.length&&null!==o[0]?{data:o[0],fields:t.map(a=>a.field),...r?{sort:r}:{}}:{fields:t,...r?{sort:r}:{}}}(e.component.scales[t].get("domains").map(r=>(gu(r)&&(r.data=e.lookupDataSource(r.data)),r)))}function Qme(e){return uy(e)||Fj(e)?e.children.reduce((t,n)=>t.concat(Qme(n)),Zme(e)):Zme(e)}function Zme(e){return se(e.component.scales).reduce((t,n)=>{const i=e.component.scales[n];if(i.merged)return t;const r=i.combine(),{name:o,type:s,selectionExtent:a,domains:l,range:c,reverse:u,...d}=r,f=function act(e,t,n,i){if(Qn(n)){if(sp(e))return{step:{signal:`${t}_step`}}}else if(we(e)&&gu(e))return{...e,data:i.lookupDataSource(e.data)};return e}(r.range,o,n,e),h=XM(e,n),p=a?function nat(e,t,n,i){const r=gme(e,t.param,t);return{signal:Ga(n.get("type"))&&te(i)&&i[0]>i[1]?`isValid(${r}) && reverse(${r})`:r}}(e,a,i,h):null;return t.push({name:o,type:s,...h?{domain:h}:{},...p?{domainRaw:p}:{},range:f,...void 0!==u?{reverse:u}:{},...d}),t},[])}class Jme extends vu{constructor(t,n){super({},{name:t}),this.merged=!1,this.setWithExplicit("type",n)}domainHasZero(){const t=this.get("type");if(pt([or.LOG,or.TIME,or.UTC],t))return"definitely-not";const n=this.get("zero");if(!0===n||void 0===n&&pt([or.LINEAR,or.SQRT,or.POW],t))return"definitely";const i=this.get("domains");if(i.length>0){let r=!1,o=!1,s=!1;for(const a of i){if(te(a)){const l=a[0],c=a[a.length-1];if(At(l)&&At(c)){if(l<=0&&c>=0){r=!0;continue}o=!0;continue}}s=!0}if(r)return"definitely";if(o&&!s)return"definitely-not"}return"maybe"}}const lct=["range","scheme"];function e_e(e,t){const n=e.fieldDef(t);if(n?.bin){const{bin:i,field:r}=n,o=To(t),s=e.getName(o);if(we(i)&&i.binned&&void 0!==i.step)return new $i(()=>{const a=e.scaleName(t),l=`(domain("${a}")[1] - domain("${a}")[0]) / ${i.step}`;return`${e.getSignalName(s)} / (${l})`});if(mn(i)){const a=Ej(e,r,i);return new $i(()=>{const l=e.getSignalName(a),c=`(${l}.stop - ${l}.start) / ${l}.step`;return`${e.getSignalName(s)} / (${c})`})}}}function uct(e,t){const n=t.specifiedScales[e],{size:i}=t,o=t.getScaleComponent(e).get("type");for(const d of lct)if(void 0!==n[d]){const f=v6(o,d),h=epe(e,d);if(f)if(h)de(h);else switch(d){case"range":{const p=n.range;if(te(p)){if(Qn(e))return dc(p.map(g=>{if("width"===g||"height"===g){const m=t.getName(g),_=t.getSignalName.bind(t);return $i.fromName(_,m)}return g}))}else if(we(p))return dc({data:t.requestDataName(Zn.Main),field:p.field,sort:{op:"min",field:t.vgField(e)}});return dc(p)}case"scheme":return dc(dct(n[d]))}else de(Ahe(o,d,e))}const s=e===In||"xOffset"===e?"width":"height",a=i[s];if(uc(a))if(Qn(e))if(Li(o)){const d=n_e(a,t,e);if(d)return dc({step:d})}else de(Mhe(s));else if(Wb(e)&&"band"===t.getScaleComponent(e===Gd?"x":"y").get("type")){const p=i_e(a,o);if(p)return dc(p)}const{rangeMin:l,rangeMax:c}=n,u=function fct(e,t){const{size:n,config:i,mark:r,encoding:o}=t,{type:s}=Ti(o[e]),l=t.getScaleComponent(e).get("type"),{domain:c,domainMid:u}=t.specifiedScales[e];switch(e){case In:case Fi:if(pt(["point","band"],l)){const d=r_e(e,n,i.view);if(uc(d))return{step:n_e(d,t,e)}}return t_e(e,t,l);case Gd:case V_:return function hct(e,t,n){const i=e===Gd?"x":"y",r=t.getScaleComponent(i);if(!r)return t_e(i,t,n,{center:!0});const o=r.get("type"),s=t.scaleName(i),{markDef:a,config:l}=t;if("band"===o){const c=r_e(i,t.size,t.config.view);if(uc(c)){const u=i_e(c,n);if(u)return u}return[0,{signal:`bandwidth('${s}')`}]}{const c=t.encoding[i];if(he(c)&&c.timeUnit){const u=Uhe(c.timeUnit,p=>`scale('${s}', ${p})`),d=t.config.scale.bandWithNestedOffsetPaddingInner,f=tf({fieldDef:c,markDef:a,config:l})-.5,h=0!==f?` + ${f}`:"";return d?[{signal:`${ke(d)?`${d.signal}/2`+h:`${d/2+f}`} * (${u})`},{signal:`${ke(d)?`(1 - ${d.signal}/2)`+h:`${1-d/2+f}`} * (${u})`}]:[0,{signal:u}]}return $fe(`Cannot use ${e} scale if ${i} scale is not discrete.`)}}(e,t,l);case du:{const d=function mct(e,t){switch(e){case"bar":case"tick":return t.scale.minBandSize;case"line":case"trail":case"rule":return t.scale.minStrokeWidth;case"text":return t.scale.minFontSize;case"point":case"square":case"circle":return t.scale.minSize}throw new Error(uM("size",e))}(r,i),f=function _ct(e,t,n,i){const r={x:e_e(n,"x"),y:e_e(n,"y")};switch(e){case"bar":case"tick":{if(void 0!==i.scale.maxBandSize)return i.scale.maxBandSize;const o=s_e(t,r,i.view);return At(o)?o-1:new $i(()=>`${o.signal} - 1`)}case"line":case"trail":case"rule":return i.scale.maxStrokeWidth;case"text":return i.scale.maxFontSize;case"point":case"square":case"circle":{if(i.scale.maxSize)return i.scale.maxSize;const o=s_e(t,r,i.view);return At(o)?Math.pow(o_e*o,2):new $i(()=>`pow(${o_e} * ${o.signal}, 2)`)}}throw new Error(uM("size",e))}(r,n,t,i);return W_(l)?function gct(e,t,n){const i=()=>{const r=Ha(t),o=Ha(e),s=`(${r} - ${o}) / (${n} - 1)`;return`sequence(${o}, ${r} + ${s}, ${s})`};return ke(t)?new $i(i):{signal:i()}}(d,f,function pct(e,t,n,i){switch(e){case"quantile":return t.scale.quantileCount;case"quantize":return t.scale.quantizeCount;case"threshold":return void 0!==n&&te(n)?n.length+1:(de(function Xit(e){return`Domain for ${e} is required for threshold scale.`}(i)),3)}}(l,i,c,e)):[d,f]}case Hs:return[0,2*Math.PI];case np:return[0,360];case ja:return[0,new $i(()=>`min(${t.getSignalName(us(t.parent)?"child_width":"width")},${t.getSignalName(us(t.parent)?"child_height":"height")})/2`)];case Yd:return[i.scale.minStrokeWidth,i.scale.maxStrokeWidth];case Kd:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case So:return"symbol";case Do:case tc:case nc:return"ordinal"===l?"nominal"===s?"category":"ordinal":void 0!==u?"diverging":"rect"===r||"geoshape"===r?"heatmap":"ramp";case fu:case Wd:case qd:return[i.scale.minOpacity,i.scale.maxOpacity]}}(e,t);return(void 0!==l||void 0!==c)&&v6(o,"rangeMin")&&te(u)&&2===u.length?dc([l??u[0],c??u[1]]):cs(u)}function dct(e){return function xrt(e){return!Ce(e)&&ce(e,"name")}(e)?{scheme:e.name,...Co(e,["name"])}:{scheme:e}}function t_e(e,t,n,{center:i}={}){const r=To(e),o=t.getName(r),s=t.getSignalName.bind(t);return e===Fi&&Ga(n)?i?[$i.fromName(a=>`${s(a)}/2`,o),$i.fromName(a=>`-${s(a)}/2`,o)]:[$i.fromName(s,o),0]:i?[$i.fromName(a=>`-${s(a)}/2`,o),$i.fromName(a=>`${s(a)}/2`,o)]:[0,$i.fromName(s,o)]}function n_e(e,t,n){const{encoding:i}=t,r=t.getScaleComponent(n),o=q4(n),s=i[o];if("offset"===ige({step:e,offsetIsDiscrete:tt(s)&&Whe(s.type)})&&Ppe(i,o)){const l=t.getScaleComponent(o);let u=`domain('${t.scaleName(o)}').length`;"band"===l.get("type")&&(u=`bandspace(${u}, ${l.get("paddingInner")??l.get("padding")??0}, ${l.get("paddingOuter")??l.get("padding")??0})`);const d=r.get("paddingInner")??r.get("padding");return{signal:`${e.step} * ${u} / (1-${qnt(d)})`}}return e.step}function i_e(e,t){if("offset"===ige({step:e,offsetIsDiscrete:Li(t)}))return{step:e.step}}function r_e(e,t,n){const i=e===In?"width":"height";return t[i]||FM(n,i)}const o_e=.95;function s_e(e,t,n){const i=uc(e.width)?e.width.step:K6(n,"width"),r=uc(e.height)?e.height.step:K6(n,"height");return t.x||t.y?new $i(()=>`min(${[t.x?t.x.signal:i,t.y?t.y.signal:r].join(", ")})`):Math.min(i,r)}function a_e(e,t){On(e)?function yct(e,t){const n=e.component.scales,{config:i,encoding:r,markDef:o,specifiedScales:s}=e;for(const a of se(n)){const l=s[a],c=n[a],u=e.getScaleComponent(a),d=Ti(r[a]),f=l[t],h=u.get("type"),p=u.get("padding"),g=u.get("paddingInner"),m=v6(h,t),_=epe(a,t);if(void 0!==f&&(m?_&&de(_):de(Ahe(h,t,a))),m&&void 0===_)if(void 0!==f){const y=d.timeUnit,v=d.type;switch(t){case"domainMax":case"domainMin":ap(l[t])||"temporal"===v||y?c.set(t,{signal:MM(l[t],{type:v,timeUnit:y})},!0):c.set(t,l[t],!0);break;default:c.copyKeyFromObject(t,l)}}else{const y=ce(l_e,t)?l_e[t]({model:e,channel:a,fieldOrDatumDef:d,scaleType:h,scalePadding:p,scalePaddingInner:g,domain:l.domain,domainMin:l.domainMin,domainMax:l.domainMax,markDef:o,config:i,hasNestedOffsetScale:Lpe(r,a),hasSecondaryRangeChannel:!!r[ic(a)]}):i.scale[t];void 0!==y&&c.set(t,y,!1)}}}(e,t):u_e(e,t)}const l_e={bins:({model:e,fieldOrDatumDef:t})=>he(t)?function vct(e,t){const n=t.bin;if(mn(n)){const i=Ej(e,t.field,n);return new $i(()=>e.getSignalName(i))}if(ir(n)&&op(n)&&void 0!==n.step)return{step:n.step}}(e,t):void 0,interpolate:({channel:e,fieldOrDatumDef:t})=>function bct(e,t){if(pt([Do,tc,nc],e)&&"nominal"!==t)return"hcl"}(e,t.type),nice:({scaleType:e,channel:t,domain:n,domainMin:i,domainMax:r,fieldOrDatumDef:o})=>function wct(e,t,n,i,r,o){if(!(Ka(o)?.bin||te(n)||null!=r||null!=i||pt([or.TIME,or.UTC],e)))return!!Qn(t)||void 0}(e,t,n,i,r,o),padding:({channel:e,scaleType:t,fieldOrDatumDef:n,markDef:i,config:r})=>function Ect(e,t,n,i,r,o){if(Qn(e)){if(lc(t)){if(void 0!==n.continuousPadding)return n.continuousPadding;const{type:s,orient:a}=r;if("bar"===s&&(!he(i)||!i.bin&&!i.timeUnit)&&("vertical"===a&&"x"===e||"horizontal"===a&&"y"===e))return o.continuousBandSize}if(t===or.POINT)return n.pointPadding}}(e,t,r.scale,n,i,r.bar),paddingInner:({scalePadding:e,channel:t,markDef:n,scaleType:i,config:r,hasNestedOffsetScale:o})=>function Cct(e,t,n,i,r,o=!1){if(void 0===e){if(Qn(t)){const{bandPaddingInner:s,barBandPaddingInner:a,rectBandPaddingInner:l,tickBandPaddingInner:c,bandWithNestedOffsetPaddingInner:u}=r;return o?u:Xn(s,"bar"===n?a:"tick"===n?c:l)}if(Wb(t)&&i===or.BAND)return r.offsetBandPaddingInner}}(e,t,n.type,i,r.scale,o),paddingOuter:({scalePadding:e,channel:t,scaleType:n,scalePaddingInner:i,config:r,hasNestedOffsetScale:o})=>function Dct(e,t,n,i,r,o=!1){if(void 0===e)if(Qn(t)){const{bandPaddingOuter:s,bandWithNestedOffsetPaddingOuter:a}=r;if(o)return a;if(n===or.BAND)return Xn(s,ke(i)?{signal:`${i.signal}/2`}:i/2)}else if(Wb(t)){if(n===or.POINT)return.5;if(n===or.BAND)return r.offsetBandPaddingOuter}}(e,t,n,i,r.scale,o),reverse:({fieldOrDatumDef:e,scaleType:t,channel:n,config:i})=>function Sct(e,t,n,i){return"x"===n&&void 0!==i.xReverse?Ga(e)&&"descending"===t?ke(i.xReverse)?{signal:`!${i.xReverse.signal}`}:!i.xReverse:i.xReverse:!(!Ga(e)||"descending"!==t)||void 0}(t,he(e)?e.sort:void 0,n,i.scale),zero:({channel:e,fieldOrDatumDef:t,domain:n,markDef:i,scaleType:r,config:o,hasSecondaryRangeChannel:s})=>function Tct(e,t,n,i,r,o,s){if(n&&"unaggregated"!==n&&Ga(r)){if(te(n)){const l=n[0],c=n[n.length-1];if(At(l)&&l<=0&&At(c)&&c>=0)return!0}return!1}if("size"===e&&"quantitative"===t.type&&!W_(r))return!0;if((!he(t)||!t.bin)&&pt([...hu,...Nnt],e)){const{orient:l,type:c}=i;return(!pt(["bar","area","line","trail"],c)||!("horizontal"===l&&"y"===e||"vertical"===l&&"x"===e))&&(!(!pt(["bar","area"],c)||s)||o?.zero)}return!1}(e,t,n,i,r,o.scale,s)};function c_e(e){On(e)?function cct(e){const t=e.component.scales;for(const n of Z4){const i=t[n];if(!i)continue;const r=uct(n,e);i.setWithExplicit("range",r)}}(e):u_e(e,"range")}function u_e(e,t){const n=e.component.scales;for(const i of e.children)"range"===t?c_e(i):a_e(i,t);for(const i of se(n)){let r;for(const o of e.children){const s=o.component.scales[i];s&&(r=rf(r,s.getWithExplicit(t),t,"scale",Mge((l,c)=>"range"===t&&l.step&&c.step?l.step-c.step:0)))}n[i].setWithExplicit(t,r)}}function xct(e,t,n,i,r=!1){const o=function Act(e,t,n,i){switch(t.type){case"nominal":case"ordinal":if(z_(e)||"discrete"===J4(e))return"shape"===e&&"ordinal"===t.type&&de(s6(e,"ordinal")),"ordinal";if(Qn(e)||Wb(e)){if(pt(["rect","bar","image","rule","tick"],n.type)||i)return"band"}else if("arc"===n.type&&e in X4)return"band";return fp(n[To(e)])||Y_(t)&&t.axis?.tickBand?"band":"point";case"temporal":return z_(e)?"time":"discrete"===J4(e)?(de(s6(e,"temporal")),"ordinal"):he(t)&&t.timeUnit&&Pi(t.timeUnit).utc?"utc":"time";case"quantitative":return z_(e)?he(t)&&mn(t.bin)?"bin-ordinal":"linear":"discrete"===J4(e)?(de(s6(e,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error(The(t.type))}(t,n,i,r),{type:s}=e;return rc(t)?void 0!==s?function Ort(e,t,n=!1){if(!rc(e))return!1;switch(e){case In:case Fi:case Gd:case V_:case Hs:case ja:return!(!lc(t)&&"band"!==t)||"point"===t&&!n;case du:case Yd:case fu:case Wd:case qd:case np:return lc(t)||W_(t)||pt(["band","point","ordinal"],t);case Do:case tc:case nc:return"band"!==t;case Kd:case So:return"ordinal"===t||W_(t)}}(t,s)?he(n)&&!function krt(e,t){return pt([_6,y6],t)?void 0===e||Li(e):t===H_?pt([or.TIME,or.UTC,void 0],e):t!==dp||Xhe(e)||W_(e)||void 0===e}(s,n.type)?(de(function Rit(e,t){return`FieldDef does not work with "${e}" scale. We are using "${t}" scale instead.`}(s,o)),o):s:(de(function Oit(e,t,n){return`Channel "${e}" does not work with "${t}" scale. We are using "${n}" scale instead.`}(t,s,o)),o):o:null}function d_e(e){e.component.scales=On(e)?function Nct(e){const{encoding:t,mark:n,markDef:i}=e,r={};for(const o of Z4){const s=Ti(t[o]);if(s&&n===ipe&&o===So&&s.type===G_)continue;let a=s&&s.scale;if(s&&null!==a&&!1!==a){a??(a={});const c=xct(a,o,s,i,Lpe(t,o));r[o]=new Jme(e.scaleName(`${o}`,!0),{value:c,explicit:a.type===c})}}return r}(e):function kct(e){var t;const n=e.component.scales={},i={},r=e.component.resolve;for(const o of e.children){d_e(o);for(const s of se(o.component.scales))if((t=r.scale)[s]??(t[s]=Mme(s,e)),"shared"===r.scale[s]){const a=i[s],l=o.component.scales[s].getWithExplicit("type");a?Ert(a.value,l.value)?i[s]=rf(a,l,"type","scale",Ict):(r.scale[s]="independent",delete i[s]):i[s]=l}}for(const o of se(i)){const s=e.scaleName(o,!0);n[o]=new Jme(s,i[o]);for(const l of e.children){const c=l.component.scales[o];c&&(l.renameScale(c.get("name"),s),c.merged=!0)}}return n}(e)}const Ict=Mge((e,t)=>qhe(e)-qhe(t));class Rj{constructor(){this.nameMap={}}rename(t,n){this.nameMap[t]=n}has(t){return void 0!==this.nameMap[t]}get(t){for(;this.nameMap[t]&&t!==this.nameMap[t];)t=this.nameMap[t];return t}}function On(e){return"unit"===e?.type}function us(e){return"facet"===e?.type}function Fj(e){return"concat"===e?.type}function uy(e){return"layer"===e?.type}class Pj{constructor(t,n,i,r,o,s,a){this.type=n,this.parent=i,this.config=o,this.correctDataNames=l=>(l.from?.data&&(l.from.data=this.lookupDataSource(l.from.data)),l.from?.facet?.data&&(l.from.facet.data=this.lookupDataSource(l.from.facet.data)),l),this.parent=i,this.config=o,this.view=rr(a),this.name=t.name??r,this.title=Zd(t.title)?{text:t.title}:t.title?rr(t.title):void 0,this.scaleNameMap=i?i.scaleNameMap:new Rj,this.projectionNameMap=i?i.projectionNameMap:new Rj,this.signalNameMap=i?i.signalNameMap:new Rj,this.data=t.data,this.description=t.description,this.transforms=function $st(e){return e.map(t=>ej(t)?{filter:P_(t.filter,vrt)}:t)}(t.transform??[]),this.layout="layer"===n||"unit"===n?{}:function Uot(e,t,n){const i=n[t],r={},{spacing:o,columns:s}=i;void 0!==o&&(r.spacing=o),void 0!==s&&(EM(e)&&!Zb(e.facet)||W6(e))&&(r.columns=s),RM(e)&&(r.columns=1);for(const a of Vot)if(void 0!==e[a])if("spacing"===a){const l=e[a];r[a]=At(l)?l:{row:l.row??o,column:l.column??o}}else r[a]=e[a];return r}(t,n,o),this.component={data:{sources:i?i.component.data.sources:[],outputNodes:i?i.component.data.outputNodes:{},outputNodeRefCounts:i?i.component.data.outputNodeRefCounts:{},isFaceted:EM(t)||i?.component.data.isFaceted&&void 0===t.data},layoutSize:new vu,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:{scale:{},axis:{},legend:{},...s?Ze(s):{}},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(){!function Mct(e,{ignoreRange:t}={}){d_e(e),Kme(e);for(const n of Irt)a_e(e,n);t||c_e(e)}(this)}parseProjection(){Ume(this)}renameTopLevelLayoutSizeSignal(){"width"!==this.getName("width")&&this.renameSignal(this.getName("width"),"width"),"height"!==this.getName("height")&&this.renameSignal(this.getName("height"),"height")}parseLegends(){Lme(this)}assembleEncodeFromView(t){const{style:n,...i}=t,r={};for(const o of se(i)){const s=i[o];void 0!==s&&(r[o]=En(s))}return r}assembleGroupEncodeEntry(t){let n={};return this.view&&(n=this.assembleEncodeFromView(this.view)),t||(this.description&&(n.description=En(this.description)),"unit"!==this.type&&"layer"!==this.type)?Zt(n)?void 0:n:{width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height"),...n}}assembleLayout(){if(!this.layout)return;const{spacing:t,...n}=this.layout,{component:i,config:r}=this,o=function Zat(e,t){const n={};for(const i of Ws){const r=e[i];if(r?.facetFieldDef){const{titleAnchor:o,titleOrient:s}=qM(["titleAnchor","titleOrient"],r.facetFieldDef.header,t,i),a=WM(i,s),l=Qat(o,a);void 0!==l&&(n[a]=l)}}return Zt(n)?void 0:n}(i.layoutHeaders,r);return{padding:t,...this.assembleDefaultLayout(),...n,...o?{titleBand:o}:{}}}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:t}=this.component;let n=[];for(const i of Ws)t[i].title&&n.push(Wat(this,i));for(const i of mj)n=n.concat(qat(this,i));return n}assembleAxes(){return function Oat(e,t){const{x:n=[],y:i=[]}=e;return[...n.map(r=>sw(r,"grid",t)),...i.map(r=>sw(r,"grid",t)),...n.map(r=>sw(r,"main",t)),...i.map(r=>sw(r,"main",t))].filter(r=>r)}(this.component.axes,this.config)}assembleLegends(){return Bme(this)}assembleProjections(){return function wlt(e){return uy(e)||Fj(e)?function Elt(e){return e.children.reduce((t,n)=>t.concat(n.assembleProjections()),jme(e))}(e):jme(e)}(this)}assembleTitle(){const{encoding:t,...n}=this.title??{},i={...lhe(this.config.title).nonMarkTitleProperties,...n,...t?{encode:{update:t}}:{}};if(i.text)return pt(["unit","layer"],this.type)?pt(["middle",void 0],i.anchor)&&(i.frame??(i.frame="group")):i.anchor??(i.anchor="start"),Zt(i)?void 0:i}assembleGroup(t=[]){const n={};(t=t.concat(this.assembleSignals())).length>0&&(n.signals=t);const i=this.assembleLayout();i&&(n.layout=i),n.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const r=!this.parent||us(this.parent)?Qme(this):[];r.length>0&&(n.scales=r);const o=this.assembleAxes();o.length>0&&(n.axes=o);const s=this.assembleLegends();return s.length>0&&(n.legends=s),n}getName(t){return Nn((this.name?`${this.name}_`:"")+t)}getDataName(t){return this.getName(Zn[t].toLowerCase())}requestDataName(t){const n=this.getDataName(t),i=this.component.data.outputNodeRefCounts;return i[n]=(i[n]||0)+1,n}getSizeSignalRef(t){if(us(this.parent)){const i=aM(xme(t)),r=this.component.scales[i];if(r&&!r.merged){const o=r.get("type"),s=r.get("range");if(Li(o)&&sp(s)){const a=r.get("name"),c=Oj(XM(this,i));return c?{signal:Tme(a,r,ve({aggregate:"distinct",field:c},{expr:"datum"}))}:(de(r6(i)),null)}}}return{signal:this.signalNameMap.get(this.getName(t))}}lookupDataSource(t){const n=this.component.data.outputNodes[t];return n?n.getSource():t}getSignalName(t){return this.signalNameMap.get(t)}renameSignal(t,n){this.signalNameMap.rename(t,n)}renameScale(t,n){this.scaleNameMap.rename(t,n)}renameProjection(t,n){this.projectionNameMap.rename(t,n)}scaleName(t,n){return n?this.getName(t):ehe(t)&&rc(t)&&this.component.scales[t]||this.scaleNameMap.has(this.getName(t))?this.scaleNameMap.get(this.getName(t)):void 0}projectionName(t){return t?this.getName("projection"):this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection"))?this.projectionNameMap.get(this.getName("projection")):void 0}getScaleComponent(t){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[t];return n&&!n.merged?n:this.parent?this.parent.getScaleComponent(t):void 0}getScaleType(t){const n=this.getScaleComponent(t);return n?n.get("type"):void 0}getSelectionComponent(t,n){let i=this.component.selection[t];if(!i&&this.parent&&(i=this.parent.getSelectionComponent(t,n)),!i)throw new Error(function Znt(e){return`Cannot find a selection named "${e}".`}(n));return i}hasAxisOrientSignalRef(){return this.component.axes.x?.some(t=>t.hasOrientSignalRef())||this.component.axes.y?.some(t=>t.hasOrientSignalRef())}}class f_e extends Pj{vgField(t,n={}){const i=this.fieldDef(t);if(i)return ve(i,n)}reduceFieldDef(t,n){return function bot(e,t,n,i){return e?se(e).reduce((r,o)=>{const s=e[o];return te(s)?s.reduce((a,l)=>t.call(i,a,l,o),r):t.call(i,r,s,o)},n):n}(this.getMapping(),(i,r,o)=>{const s=Ka(r);return s?t(i,s,o):i},n)}forEachFieldDef(t,n){F6(this.getMapping(),(i,r)=>{const o=Ka(i);o&&t(o,r)},n)}}class QM extends Kt{clone(){return new QM(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ze(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"value",i[1]??"density"],this.transform.resolve=this.transform.resolve??"shared"}dependentFields(){return new Set([this.transform.density,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`DensityTransform ${gt(this.transform)}`}assemble(){const{density:t,...n}=this.transform,i={type:"kde",field:t,...n};return i.resolve=this.transform.resolve,i}}class ZM extends Kt{clone(){return new ZM(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ze(n)}dependentFields(){return new Set([this.transform.extent])}producedFields(){return new Set([])}hash(){return`ExtentTransform ${gt(this.transform)}`}assemble(){const{extent:t,param:n}=this.transform;return{type:"extent",field:t,signal:n}}}class JM extends Kt{clone(){return new JM(this.parent,Ze(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ze(n);const{flatten:i,as:r=[]}=this.transform;this.transform.as=i.map((o,s)=>r[s]??o)}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${gt(this.transform)}`}assemble(){const{flatten:t,as:n}=this.transform;return{type:"flatten",fields:t,as:n}}}class eN extends Kt{clone(){return new eN(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ze(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"key",i[1]??"value"]}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${gt(this.transform)}`}assemble(){const{fold:t,as:n}=this.transform;return{type:"fold",fields:t,as:n}}}class dy extends Kt{clone(){return new dy(null,Ze(this.fields),this.geojson,this.signal)}static parseAll(t,n){if(n.component.projection&&!n.component.projection.isFit)return t;let i=0;for(const r of[[Ua,Va],[Gs,za]]){const o=r.map(s=>{const a=Ti(n.encoding[s]);return he(a)?a.field:cc(a)?{expr:`${a.datum}`}:Ya(a)?{expr:`${a.value}`}:void 0});(o[0]||o[1])&&(t=new dy(t,o,null,n.getName("geojson_"+i++)))}if(n.channelHasField(So)){const r=n.typedFieldDef(So);r.type===G_&&(t=new dy(t,null,r.field,n.getName("geojson_"+i++)))}return t}constructor(t,n,i,r){super(t),this.fields=n,this.geojson=i,this.signal=r}dependentFields(){const t=(this.fields??[]).filter(Ce);return new Set([...this.geojson?[this.geojson]:[],...t])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${gt(this.fields)}`}assemble(){return[...this.geojson?[{type:"filter",expr:`isValid(datum["${this.geojson}"])`}]:[],{type:"geojson",...this.fields?{fields:this.fields}:{},...this.geojson?{geojson:this.geojson}:{},signal:this.signal}]}}class uw extends Kt{clone(){return new uw(null,this.projection,Ze(this.fields),Ze(this.as))}constructor(t,n,i,r){super(t),this.projection=n,this.fields=i,this.as=r}static parseAll(t,n){if(!n.projectionName())return t;for(const i of[[Ua,Va],[Gs,za]]){const r=i.map(s=>{const a=Ti(n.encoding[s]);return he(a)?a.field:cc(a)?{expr:`${a.datum}`}:Ya(a)?{expr:`${a.value}`}:void 0}),o=i[0]===Gs?"2":"";(r[0]||r[1])&&(t=new uw(t,n.projectionName(),r,[n.getName(`x${o}`),n.getName(`y${o}`)]))}return t}dependentFields(){return new Set(this.fields.filter(Ce))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${gt(this.fields)} ${gt(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}class Cp extends Kt{clone(){return new Cp(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n}dependentFields(){return new Set([this.transform.impute,this.transform.key,...this.transform.groupby??[]])}producedFields(){return new Set([this.transform.impute])}processSequence(t){const{start:n=0,stop:i,step:r}=t;return{signal:`sequence(${[n,i,...r?[r]:[]].join(",")})`}}static makeFromTransform(t,n){return new Cp(t,n)}static makeFromEncoding(t,n){const i=n.encoding,r=i.x,o=i.y;if(he(r)&&he(o)){const s=r.impute?r:o.impute?o:void 0;if(void 0===s)return;const a=r.impute?o:o.impute?r:void 0,{method:l,value:c,frame:u,keyvals:d}=s.impute,f=jpe(n.mark,i);return new Cp(t,{impute:s.field,key:a.field,...l?{method:l}:{},...void 0!==c?{value:c}:{},...u?{frame:u}:{},...void 0!==d?{keyvals:d}:{},...f.length?{groupby:f}:{}})}return null}hash(){return`Impute ${gt(this.transform)}`}assemble(){const{impute:t,key:n,keyvals:i,method:r,groupby:o,value:s,frame:a=[null,null]}=this.transform,l={type:"impute",field:t,key:n,...i?{keyvals:(e=i,ce(e,"stop")?this.processSequence(i):i)}:{},method:"value",...o?{groupby:o}:{},value:r&&"value"!==r?null:s};var e;return r&&"value"!==r?[l,{type:"window",as:[`imputed_${t}_value`],ops:[r],fields:[t],frame:a,ignorePeers:!1,...o?{groupby:o}:{}},{type:"formula",expr:`datum.${t} === null ? datum.imputed_${t}_value : datum.${t}`,as:t}]:[l]}}class tN extends Kt{clone(){return new tN(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ze(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??n.on,i[1]??n.loess]}dependentFields(){return new Set([this.transform.loess,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`LoessTransform ${gt(this.transform)}`}assemble(){const{loess:t,on:n,...i}=this.transform;return{type:"loess",x:n,y:t,...i}}}class dw extends Kt{clone(){return new dw(null,Ze(this.transform),this.secondary)}constructor(t,n,i){super(t),this.transform=n,this.secondary=i}static make(t,n,i,r){const o=n.component.data.sources,{from:s}=i;let a=null;if(function bst(e){return ce(e,"data")}(s)){let l=m_e(s.data,o);l||(l=new bp(s.data),o.push(l));const c=n.getName(`lookup_${r}`);a=new xo(l,c,Zn.Lookup,n.component.data.outputNodeRefCounts),n.component.data.outputNodes[c]=a}else if(function wst(e){return ce(e,"param")}(s)){const l=s.param;let c;i={as:l,...i};try{c=n.getSelectionComponent(Nn(l),l)}catch{throw new Error(function nit(e){return`Lookups can only be performed on selection parameters. "${e}" is a variable parameter.`}(l))}if(a=c.materialized,!a)throw new Error(function iit(e){return`Cannot define and lookup the "${e}" selection in the same view. Try moving the lookup into a second, layered view?`}(l))}return new dw(t,i,a.getSource())}dependentFields(){return new Set([this.transform.lookup])}producedFields(){return new Set(this.transform.as?Ee(this.transform.as):this.transform.from.fields)}hash(){return`Lookup ${gt({transform:this.transform,secondary:this.secondary})}`}assemble(){let t;if(this.transform.from.fields)t={values:this.transform.from.fields,...this.transform.as?{as:Ee(this.transform.as)}:{}};else{let n=this.transform.as;Ce(n)||(de('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.'),n="_lookup"),t={as:[n]}}return{type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup],...t,...this.transform.default?{default:this.transform.default}:{}}}}class nN extends Kt{clone(){return new nN(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ze(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"prob",i[1]??"value"]}dependentFields(){return new Set([this.transform.quantile,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`QuantileTransform ${gt(this.transform)}`}assemble(){const{quantile:t,...n}=this.transform;return{type:"quantile",field:t,...n}}}class iN extends Kt{clone(){return new iN(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ze(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??n.on,i[1]??n.regression]}dependentFields(){return new Set([this.transform.regression,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`RegressionTransform ${gt(this.transform)}`}assemble(){const{regression:t,on:n,...i}=this.transform;return{type:"regression",x:n,y:t,...i}}}class rN extends Kt{clone(){return new rN(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=Jl((this.transform.groupby??[]).concat(t),n=>n)}producedFields(){}dependentFields(){return new Set([this.transform.pivot,this.transform.value,...this.transform.groupby??[]])}hash(){return`PivotTransform ${gt(this.transform)}`}assemble(){const{pivot:t,value:n,groupby:i,limit:r,op:o}=this.transform;return{type:"pivot",field:t,value:n,...void 0!==r?{limit:r}:{},...void 0!==o?{op:o}:{},...void 0!==i?{groupby:i}:{}}}}class oN extends Kt{clone(){return new oN(null,Ze(this.transform))}constructor(t,n){super(t),this.transform=n}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${gt(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}function h_e(e){let t=0;return function n(i,r){if(i instanceof bp&&!i.isGenerator&&!J_(i.data)&&(e.push(r),r={name:null,source:r.name,transform:[]}),i instanceof Sr&&(i.parent instanceof bp&&!r.source?(r.format={...r.format,parse:i.assembleFormatParse()},r.transform.push(...i.assembleTransforms(!0))):r.transform.push(...i.assembleTransforms())),i instanceof ay)return r.name||(r.name="data_"+t++),!r.source||r.transform.length>0?(e.push(r),i.data=r.name):i.data=r.source,void e.push(...i.assemble());switch((i instanceof aw||i instanceof lw||i instanceof ly||i instanceof iy||i instanceof ry||i instanceof uw||i instanceof Qa||i instanceof dw||i instanceof cy||i instanceof Ep||i instanceof eN||i instanceof JM||i instanceof QM||i instanceof tN||i instanceof nN||i instanceof iN||i instanceof lf||i instanceof oN||i instanceof rN||i instanceof ZM)&&r.transform.push(i.assemble()),(i instanceof hc||i instanceof fc||i instanceof Cp||i instanceof Eu||i instanceof dy)&&r.transform.push(...i.assemble()),i instanceof xo&&(r.source&&0===r.transform.length?i.setSource(r.source):i.parent instanceof xo?i.setSource(r.name):(r.name||(r.name="data_"+t++),i.setSource(r.name),1===i.numChildren()&&(e.push(r),r={name:null,source:r.name,transform:[]}))),i.numChildren()){case 0:i instanceof xo&&(!r.source||r.transform.length>0)&&e.push(r);break;case 1:n(i.children[0],r);break;default:{r.name||(r.name="data_"+t++);let o=r.name;!r.source||r.transform.length>0?e.push(r):o=r.source;for(const s of i.children)n(s,{name:null,source:o,transform:[]});break}}}}function Fct(e){return"top"===e||"left"===e||ke(e)?"header":"footer"}function Lct(e,t){const{facet:n,config:i,child:r,component:o}=e;if(e.channelHasField(t)){const s=n[t],a=sy("title",null,i,t);let l=K_(s,i,{allowDisabling:!0,includeDefault:void 0===a||!!a});r.component.layoutHeaders[t].title&&(l=te(l)?l.join(", "):l,l+=` / ${r.component.layoutHeaders[t].title}`,r.component.layoutHeaders[t].title=null);const c=sy("labelOrient",s.header,i,t),u=null!==s.header&&Xn(s.header?.labels,i.header.labels,!0),d=pt(["bottom","right"],c)?"footer":"header";o.layoutHeaders[t]={title:null!==s.header?l:null,facetFieldDef:s,[d]:"facet"===t?[]:[p_e(e,t,u)]}}}function p_e(e,t,n){const i="row"===t?"height":"width";return{labels:n,sizeSignal:e.child.component.layoutSize.get(i)?e.child.getSizeSignalRef(i):void 0,axes:[]}}function g_e(e,t){const{child:n}=e;if(n.component.axes[t]){const{layoutHeaders:i,resolve:r}=e.component;if(r.axis[t]=bj(r,t),"shared"===r.axis[t]){const o="x"===t?"column":"row",s=i[o];for(const a of n.component.axes[t]){const l=Fct(a.get("orient"));s[l]??(s[l]=[p_e(e,o,!1)]);const c=sw(a,"main",e.config,{header:!0});c&&s[l][0].axes.push(c),a.mainExtracted=!0}}}}function Lj(e){for(const t of e.children)t.parseLayoutSize()}function sN(e,t){const n=xme(t),i=aM(n),r=e.component.resolve,o=e.component.layoutSize;let s;for(const a of e.children){const l=a.component.layoutSize.getWithExplicit(n),c=r.scale[i]??Mme(i,e);if("independent"===c&&"step"===l.value){s=void 0;break}if(s){if("independent"===c&&s.value!==l.value){s=void 0;break}s=rf(s,l,n,"")}else s=l}if(s){for(const a of e.children)e.renameSignal(a.getName(n),e.getName(t)),a.component.layoutSize.set(n,"merged",!1);o.setWithExplicit(t,s)}else o.setWithExplicit(t,{explicit:!1,value:void 0})}function Vct(e,t){const i=e.config,r=e.getScaleComponent("width"===t?"x":"y");if(r){const o=r.get("type"),s=r.get("range");if(Li(o)){const a=FM(i.view,t);return sp(s)||uc(a)?"step":a}return Y6(i.view,t)}if(e.hasProjection||"arc"===e.mark)return Y6(i.view,t);{const o=FM(i.view,t);return uc(o)?o.step:o}}function $j(e,t,n){return ve(t,{suffix:`by_${ve(e)}`,...n})}class fw extends f_e{constructor(t,n,i,r){super(t,"facet",n,i,r,t.resolve),this.child=zj(t.spec,this,this.getName("child"),void 0,r),this.children=[this.child],this.facet=this.initFacet(t.facet)}initFacet(t){if(!Zb(t))return{facet:this.initFacetFieldDef(t,"facet")};const n=se(t),i={};for(const r of n){if(![au,lu].includes(r)){de(uM(r,"facet"));break}const o=t[r];if(void 0===o.field){de(o6(o,r));break}i[r]=this.initFacetFieldDef(o,r)}return i}initFacetFieldDef(t,n){const i=R6(t,n);return i.header?i.header=rr(i.header):null===i.header&&(i.header=null),i}channelHasField(t){return ce(this.facet,t)}fieldDef(t){return this.facet[t]}parseData(){this.component.data=aN(this),this.child.parseData()}parseLayoutSize(){Lj(this)}parseSelections(){this.child.parseSelections(),this.component.selection=this.child.component.selection}parseMarkGroup(){this.child.parseMarkGroup()}parseAxesAndHeaders(){this.child.parseAxesAndHeaders(),function Pct(e){for(const t of Ws)Lct(e,t);g_e(e,"x"),g_e(e,"y")}(this)}assembleSelectionTopLevelSignals(t){return this.child.assembleSelectionTopLevelSignals(t)}assembleSignals(){return this.child.assembleSignals(),[]}assembleSelectionData(t){return this.child.assembleSelectionData(t)}getHeaderLayoutMixins(){const t={};for(const n of Ws)for(const i of _j){const r=this.component.layoutHeaders[n],o=r[i],{facetFieldDef:s}=r;if(s){const a=sy("titleOrient",s.header,this.config,n);if(["right","bottom"].includes(a)){const l=WM(n,a);t.titleAnchor??(t.titleAnchor={}),t.titleAnchor[l]="end"}}if(o?.[0]){const l="header"===i?"headerBand":"footerBand";"facet"!==n&&!this.child.component.layoutSize.get("row"===n?"height":"width")&&(t[l]??(t[l]={}),t[l][n]=.5),r.title&&(t.offset??(t.offset={}),t.offset["row"===n?"rowTitle":"columnTitle"]=10)}}return t}assembleDefaultLayout(){const{column:t,row:n}=this.facet,i=t?this.columnDistinctSignal():n?1:void 0;let r="all";return(!n&&"independent"===this.component.resolve.scale.x||!t&&"independent"===this.component.resolve.scale.y)&&(r="none"),{...this.getHeaderLayoutMixins(),...i?{columns:i}:{},bounds:"full",align:r}}assembleLayoutSignals(){return this.child.assembleLayoutSignals()}columnDistinctSignal(){if(!(this.parent&&this.parent instanceof fw))return{signal:`length(data('${this.getName("column_domain")}'))`}}assembleGroupStyle(){}assembleGroup(t){return this.parent&&this.parent instanceof fw?{...this.channelHasField("column")?{encode:{update:{columns:{field:ve(this.facet.column,{prefix:"distinct"})}}}}:{},...super.assembleGroup(t)}:super.assembleGroup(t)}getCardinalityAggregateForChild(){const t=[],n=[],i=[];if(this.child instanceof fw){if(this.child.channelHasField("column")){const r=ve(this.child.facet.column);t.push(r),n.push("distinct"),i.push(`distinct_${r}`)}}else for(const r of hu){const o=this.child.component.scales[r];if(o&&!o.merged){const s=o.get("type"),a=o.get("range");if(Li(s)&&sp(a)){const c=Oj(XM(this.child,r));c?(t.push(c),n.push("distinct"),i.push(`distinct_${c}`)):de(r6(r))}}}return{fields:t,ops:n,as:i}}assembleFacet(){const{name:t,data:n}=this.component.data.facetRoot,{row:i,column:r}=this.facet,{fields:o,ops:s,as:a}=this.getCardinalityAggregateForChild(),l=[];for(const u of Ws){const d=this.facet[u];if(d){l.push(ve(d));const{bin:f,sort:h}=d;if(mn(f)&&l.push(ve(d,{binSuffix:"end"})),mu(h)){const{field:p,op:g=wM}=h,m=$j(d,h);i&&r?(o.push(m),s.push("max"),a.push(m)):(o.push(p),s.push(g),a.push(m))}else if(te(h)){const p=oy(d,u);o.push(p),s.push("max"),a.push(p)}}}const c=!!i&&!!r;return{name:t,data:n,groupby:l,...c||o.length>0?{aggregate:{...c?{cross:c}:{},...o.length?{fields:o,ops:s,as:a}:{}}}:{}}}facetSortFields(t){const{facet:n}=this,i=n[t];return i?mu(i.sort)?[$j(i,i.sort,{expr:"datum"})]:te(i.sort)?[oy(i,t,{expr:"datum"})]:[ve(i,{expr:"datum"})]:[]}facetSortOrder(t){const{facet:n}=this,i=n[t];if(i){const{sort:r}=i;return[(mu(r)?r.order:!te(r)&&r)||"ascending"]}return[]}assembleLabelTitle(){const{facet:t,config:n}=this;if(t.facet)return yj(t.facet,"facet",n);const i={row:["top","bottom"],column:["left","right"]};for(const r of mj)if(t[r]){const o=sy("labelOrient",t[r]?.header,n,r);if(i[r].includes(o))return yj(t[r],r,n)}}assembleMarks(){const{child:t}=this,i=function Oct(e){const t=[],n=h_e(t);for(const i of e.children)n(i,{source:e.name,name:null,transform:[]});return t}(this.component.data.facetRoot),r=t.assembleGroupEncodeEntry(!1),o=this.assembleLabelTitle()||t.assembleTitle(),s=t.assembleGroupStyle();return[{name:this.getName("cell"),type:"group",...o?{title:o}:{},...s?{style:s}:{},from:{facet:this.assembleFacet()},sort:{field:Ws.map(l=>this.facetSortFields(l)).flat(),order:Ws.map(l=>this.facetSortOrder(l)).flat()},...i.length>0?{data:i}:{},...r?{encode:{update:r}}:{},...t.assembleGroup(Zst(this,[]))}]}getMapping(){return this.facet}}function m_e(e,t){for(const n of t){const i=n.data;if(e.name&&n.hasName()&&e.name!==n.dataName)continue;const r=e.format?.mesh,o=i.format?.feature;if(r&&o)continue;const s=e.format?.feature;if((s||o)&&s!==o)continue;const a=i.format?.mesh;if(!r&&!a||r===a)if(iw(e)&&iw(i)){if(as(e.values,i.values))return n}else if(J_(e)&&J_(i)){if(e.url===i.url)return n}else if(Nge(e)&&e.name===n.dataName)return n}return null}function aN(e){let t=function zct(e,t){if(e.data||!e.parent){if(null===e.data){const i=new bp({values:[]});return t.push(i),i}const n=m_e(e.data,t);if(n)return sf(e.data)||(n.data.format=Bfe({},e.data.format,n.data.format)),!n.hasName()&&e.data.name&&(n.dataName=e.data.name),n;{const i=new bp(e.data);return t.push(i),i}}return e.parent.component.data.facetRoot?e.parent.component.data.facetRoot:e.parent.component.data.main}(e,e.component.data.sources);const{outputNodes:n,outputNodeRefCounts:i}=e.component.data,r=e.data,s=r&&(sf(r)||J_(r)||iw(r))||!e.parent?new Kst:e.parent.component.data.ancestorParse.clone();sf(r)?(Ige(r)?t=new lw(t,r.sequence):ij(r)&&(t=new aw(t,r.graticule)),s.parseNothing=!0):null===r?.format?.parse&&(s.parseNothing=!0),t=Sr.makeExplicit(t,e,s)??t,t=new lf(t);const a=e.parent&&uy(e.parent);(On(e)||us(e))&&a&&(t=hc.makeFromEncoding(t,e)??t),e.transforms.length>0&&(t=function Hct(e,t,n){let i=0;for(const r of t.transforms){let o,s;if(Ist(r))s=e=new ry(e,r),o="derived";else if(ej(r)){const a=Rlt(r);s=e=Sr.makeWithAncestors(e,{},a,n)??e,e=new iy(e,t,r.filter)}else if(Ege(r))s=e=hc.makeFromTransform(e,r,t),o="number";else if(Ost(r))o="date",void 0===n.getWithExplicit(r.field).value&&(e=new Sr(e,{[r.field]:o}),n.set(r.field,o,!1)),s=e=fc.makeFromTransform(e,r);else if(Rst(r))s=e=Qa.makeFromTransform(e,r),o="number",dj(t)&&(e=new lf(e));else if(wge(r))s=e=dw.make(e,t,r,i++),o="derived";else if(Ast(r))s=e=new cy(e,r),o="number";else if(Mst(r))s=e=new Ep(e,r),o="number";else if(Fst(r))s=e=Eu.makeFromTransform(e,r),o="derived";else if(Pst(r))s=e=new eN(e,r),o="derived";else if(Lst(r))s=e=new ZM(e,r),o="derived";else if(Nst(r))s=e=new JM(e,r),o="derived";else if(Est(r))s=e=new rN(e,r),o="derived";else if(xst(r))e=new oN(e,r);else if(kst(r))s=e=Cp.makeFromTransform(e,r),o="derived";else if(Cst(r))s=e=new QM(e,r),o="derived";else if(Dst(r))s=e=new nN(e,r),o="derived";else if(Sst(r))s=e=new iN(e,r),o="derived";else{if(!Tst(r)){de(uit(r));continue}s=e=new tN(e,r),o="derived"}if(s&&void 0!==o)for(const a of s.producedFields()??[])n.set(a,o,!1)}return e}(t,e,s));const l=function Plt(e){const t={};if(On(e)&&e.component.selection)for(const n of se(e.component.selection)){const i=e.component.selection[n];for(const r of i.project.items)!r.channel&&j_(r.field)>1&&(t[r.field]="flatten")}return t}(e),c=function Flt(e){const t={};function n(i){Q_(i)?t[i.field]="date":"quantitative"===i.type&&function jnt(e){return Ce(e)&&pt(["min","max"],e)}(i.aggregate)?t[i.field]="number":j_(i.field)>1?i.field in t||(t[i.field]="flatten"):gp(i)&&mu(i.sort)&&j_(i.sort.field)>1&&(i.sort.field in t||(t[i.sort.field]="flatten"))}if((On(e)||us(e))&&e.forEachFieldDef((i,r)=>{if(eo(i))n(i);else{const o=rp(r),s=e.fieldDef(o);n({...i,type:s.type})}}),On(e)){const{mark:i,markDef:r,encoding:o}=e;if(ef(i)&&!e.encoding.order){const a=o["horizontal"===r.orient?"y":"x"];he(a)&&"quantitative"===a.type&&!(a.field in t)&&(t[a.field]="number")}}return t}(e);t=Sr.makeWithAncestors(t,{},{...l,...c},s)??t,On(e)&&(t=dy.parseAll(t,e),t=uw.parseAll(t,e)),(On(e)||us(e))&&(a||(t=hc.makeFromEncoding(t,e)??t),t=fc.makeFromEncoding(t,e)??t,t=ry.parseAllForSortIndex(t,e));const u=t=lN(Zn.Raw,e,t);if(On(e)){const m=Qa.makeFromEncoding(t,e);m&&(t=m,dj(e)&&(t=new lf(t))),t=Cp.makeFromEncoding(t,e)??t,t=Eu.makeFromEncoding(t,e)??t}let d,f;if(On(e)){const{markDef:m,mark:_,config:y}=e,v=en("invalid",m,y),{marks:b,scales:w}=f=Oge({invalid:v,isPath:ef(_)});b!==w&&"include-invalid-values"===w&&(d=t=lN(Zn.PreFilterInvalid,e,t)),"exclude-invalid-values"===b&&(t=ly.make(t,e,f)??t)}const h=t=lN(Zn.Main,e,t);let p;if(On(e)&&f){const{marks:m,scales:_}=f;"include-invalid-values"===m&&"exclude-invalid-values"===_&&(t=ly.make(t,e,f)??t,p=t=lN(Zn.PostFilterInvalid,e,t))}On(e)&&function Iat(e,t){for(const[n,i]of Hd(e.component.selection??{})){const r=e.getName(`lookup_${n}`);e.component.data.outputNodes[r]=i.materialized=new xo(new iy(t,e,{param:n}),r,Zn.Lookup,e.component.data.outputNodeRefCounts)}}(e,h);let g=null;if(us(e)){const m=e.getName("facet");t=function Uct(e,t){const{row:n,column:i}=t;if(n&&i){let r=null;for(const o of[n,i])if(mu(o.sort)){const{field:s,op:a=wM}=o.sort;e=r=new Ep(e,{joinaggregate:[{op:a,field:s,as:$j(o,o.sort,{forAs:!0})}],groupby:[ve(o)]})}return r}return null}(t,e.facet)??t,g=new ay(t,e,m,h.getSource()),n[m]=g}return{...e.component.data,outputNodes:n,outputNodeRefCounts:i,raw:u,main:h,facetRoot:g,ancestorParse:s,preFilterInvalid:d,postFilterInvalid:p}}function lN(e,t,n){const{outputNodes:i,outputNodeRefCounts:r}=t.component.data,o=t.getDataName(e),s=new xo(n,o,e,r);return i[o]=s,s}class Gct extends Pj{constructor(t,n,i,r){super(t,"concat",n,i,r,t.resolve),("shared"===t.resolve?.axis?.x||"shared"===t.resolve?.axis?.y)&&de("Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415)."),this.children=this.getChildren(t).map((o,s)=>zj(o,this,this.getName(`concat_${s}`),void 0,r))}parseData(){this.component.data=aN(this);for(const t of this.children)t.parseData()}parseSelections(){this.component.selection={};for(const t of this.children){t.parseSelections();for(const n of se(t.component.selection))this.component.selection[n]=t.component.selection[n]}}parseMarkGroup(){for(const t of this.children)t.parseMarkGroup()}parseAxesAndHeaders(){for(const t of this.children)t.parseAxesAndHeaders()}getChildren(t){return RM(t)?t.vconcat:q6(t)?t.hconcat:t.concat}parseLayoutSize(){!function Bct(e){Lj(e);const n=void 0===e.layout.columns?"height":"childHeight";sN(e,1===e.layout.columns?"width":"childWidth"),sN(e,n)}(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(t){return this.children.reduce((n,i)=>i.assembleSelectionTopLevelSignals(n),t)}assembleSignals(){return this.children.forEach(t=>t.assembleSignals()),[]}assembleLayoutSignals(){const t=vj(this);for(const n of this.children)t.push(...n.assembleLayoutSignals());return t}assembleSelectionData(t){return this.children.reduce((n,i)=>i.assembleSelectionData(n),t)}assembleMarks(){return this.children.map(t=>{const n=t.assembleTitle(),i=t.assembleGroupStyle(),r=t.assembleGroupEncodeEntry(!1);return{type:"group",name:t.getName("group"),...n?{title:n}:{},...i?{style:i}:{},...r?{encode:{update:r}}:{},...t.assembleGroup()}})}assembleGroupStyle(){}assembleDefaultLayout(){const t=this.layout.columns;return{...null!=t?{columns:t}:{},bounds:"full",align:"each"}}}const qct={disable:1,gridScale:1,scale:1,...kpe,labelExpr:1,encode:1},__e=se(qct);class Bj extends vu{constructor(t={},n={},i=!1){super(),this.explicit=t,this.implicit=n,this.mainExtracted=i}clone(){return new Bj(Ze(this.explicit),Ze(this.implicit),this.mainExtracted)}hasAxisPart(t){return"axis"===t||("grid"===t||"title"===t?!!this.get(t):!function Wct(e){return!1===e||null===e}(this.get(t)))}hasOrientSignalRef(){return ke(this.explicit.orient)}}const Xct={bottom:"top",top:"bottom",left:"right",right:"left"};function Zct(e,t){if(!e)return t.map(n=>n.clone());{if(e.length!==t.length)return;const n=e.length;for(let i=0;i{switch(n){case"title":return _he(r,o);case"gridScale":return{explicit:r.explicit,value:Xn(r.value,o.value)}}return LM(r,o,n,"axis")});e.setWithExplicit(n,i)}return e}function eut(e,t,n,i,r){if("disable"===t)return void 0!==n;switch(n=n||{},t){case"titleAngle":case"labelAngle":return e===(ke(n.labelAngle)?n.labelAngle:zb(n.labelAngle));case"values":return!!n.values;case"encode":return!!n.encoding||!!n.labelAngle;case"title":if(e===wme(i,r))return!0}return e===n[t]}const tut=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function nut(e,t){let n=t.axis(e);const i=new Bj,r=Ti(t.encoding[e]),{mark:o,config:s}=t,a=n?.orient||s["x"===e?"axisX":"axisY"]?.orient||s.axis?.orient||function Vat(e){return"x"===e?"bottom":"left"}(e),l=t.getScaleComponent(e).get("type"),c=function Rat(e,t,n,i){const r="band"===t?["axisDiscrete","axisBand"]:"point"===t?["axisDiscrete","axisPoint"]:Xhe(t)?["axisQuantitative"]:"time"===t||"utc"===t?["axisTemporal"]:[],o="x"===e?"axisX":"axisY",s=ke(n)?"axisOrient":`axis${Ub(n)}`,a=[...r,...r.map(c=>o+c.substr(4))],l=["axis",s,o];return{vlOnlyAxisConfig:_me(a,i,e,n),vgAxisConfig:_me(l,i,e,n),axisConfigStyle:Fat([...l,...a],i)}}(e,l,a,t.config),u=void 0!==n?!n:pj("disable",s.style,n?.style,c).configValue;if(i.set("disable",u,void 0!==n),u)return i;n=n||{};const d=function $at(e,t,n,i,r){const o=t?.labelAngle;if(void 0!==o)return ke(o)?o:zb(o);{const{configValue:s}=pj("labelAngle",i,t?.style,r);return void 0!==s?zb(s):n!==In||!pt([y6,_6],e.type)||he(e)&&e.timeUnit?void 0:270}}(r,n,e,s.style,c),f=hpe(n.formatType,r,l),h=fpe(r,r.type,n.format,n.formatType,s,!0),p={fieldOrDatumDef:r,axis:n,channel:e,model:t,scaleType:l,orient:a,labelAngle:d,format:h,formatType:f,mark:o,config:s};for(const _ of __e){const y=_ in yme?yme[_](p):Rpe(_)?n[_]:void 0,v=void 0!==y,b=eut(y,_,n,t,e);if(v&&b)i.set(_,y,b);else{const{configValue:w,configFrom:C}=Rpe(_)&&"values"!==_?pj(_,s.style,n.style,c):{},E=void 0!==w;v&&!E?i.set(_,y,b):("vgAxisConfig"!==C||tut.has(_)&&E||nw(w)||ke(w))&&i.set(_,w,!1)}}const g=n.encoding??{},m=Ipe.reduce((_,y)=>{if(!i.hasAxisPart(y))return _;const v=Ame(g[y]??{},t),b="labels"===y?function Yct(e,t,n){const{encoding:i,config:r}=e,o=Ti(i[t])??Ti(i[ic(t)]),s=e.axis(t)||{},{format:a,formatType:l}=s;if(pp(l))return{text:qa({fieldOrDatumDef:o,field:"datum.value",format:a,formatType:l,config:r}),...n};if(void 0===a&&void 0===l&&r.customFormatTypes){if("quantitative"===q_(o)){if(Y_(o)&&"normalize"===o.stack&&r.normalizedNumberFormatType)return{text:qa({fieldOrDatumDef:o,field:"datum.value",format:r.normalizedNumberFormat,formatType:r.normalizedNumberFormatType,config:r}),...n};if(r.numberFormatType)return{text:qa({fieldOrDatumDef:o,field:"datum.value",format:r.numberFormat,formatType:r.numberFormatType,config:r}),...n}}if("temporal"===q_(o)&&r.timeFormatType&&he(o)&&!o.timeUnit)return{text:qa({fieldOrDatumDef:o,field:"datum.value",format:r.timeFormat,formatType:r.timeFormatType,config:r}),...n}}return n}(t,e,v):v;return void 0!==b&&!Zt(b)&&(_[y]={update:b}),_},{});return Zt(m)||i.set("encode",m,!!n.encoding||void 0!==n.labelAngle),i}function jj(e,t){const{config:n}=e;return{...qs(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...to("x",e,{defaultPos:"mid"}),...to("y",e,{defaultPos:"mid"}),...sr("size",e),...sr("angle",e),...dut(e,0,t)}}function dut(e,t,n){return n?{shape:{value:n}}:sr("shape",e)}function yut(e,t,n){if(void 0===en("align",e,n))return"center"}function vut(e,t,n){if(void 0===en("baseline",e,n))return"middle"}const cN={arc:{vgMark:"arc",encodeEntry:e=>({...qs(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...to("x",e,{defaultPos:"mid"}),...to("y",e,{defaultPos:"mid"}),...wu(e,"radius"),...wu(e,"theta")})},area:{vgMark:"area",encodeEntry:e=>({...qs(e,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"}),...VM("x",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"horizontal"===e.markDef.orient}),...VM("y",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"vertical"===e.markDef.orient}),...cj(e)})},bar:{vgMark:"rect",encodeEntry:e=>({...qs(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...wu(e,"x"),...wu(e,"y")})},circle:{vgMark:"symbol",encodeEntry:e=>jj(e,"circle")},geoshape:{vgMark:"shape",encodeEntry:e=>({...qs(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})}),postEncodingTransform:e=>{const{encoding:t}=e,n=t.shape;return[{type:"geoshape",projection:e.projectionName(),...n&&he(n)&&n.type===G_?{field:ve(n,{expr:"datum"})}:{}}]}},image:{vgMark:"image",encodeEntry:e=>({...qs(e,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"}),...wu(e,"x"),...wu(e,"y"),...aj(e,"url")})},line:{vgMark:"line",encodeEntry:e=>({...qs(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...to("x",e,{defaultPos:"mid"}),...to("y",e,{defaultPos:"mid"}),...sr("size",e,{vgChannel:"strokeWidth"}),...cj(e)})},point:{vgMark:"symbol",encodeEntry:e=>jj(e)},rect:{vgMark:"rect",encodeEntry:e=>({...qs(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...wu(e,"x"),...wu(e,"y")})},rule:{vgMark:"rule",encodeEntry:e=>{const{markDef:t}=e,n=t.orient;return e.encoding.x||e.encoding.y||e.encoding.latitude||e.encoding.longitude?{...qs(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...VM("x",e,{defaultPos:"horizontal"===n?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"vertical"!==n}),...VM("y",e,{defaultPos:"vertical"===n?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"horizontal"!==n}),...sr("size",e,{vgChannel:"strokeWidth"})}:{}}},square:{vgMark:"symbol",encodeEntry:e=>jj(e,"square")},text:{vgMark:"text",encodeEntry:e=>{const{config:t,encoding:n}=e;return{...qs(e,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"}),...to("x",e,{defaultPos:"mid"}),...to("y",e,{defaultPos:"mid"}),...aj(e),...sr("size",e,{vgChannel:"fontSize"}),...sr("angle",e),...Jge("align",yut(e.markDef,0,t)),...Jge("baseline",vut(e.markDef,0,t)),...to("radius",e,{defaultPos:null}),...to("theta",e,{defaultPos:null})}}},tick:{vgMark:"rect",encodeEntry:e=>{const{config:t,markDef:n}=e,i=n.orient,r="horizontal"===i?"x":"y",o="horizontal"===i?"y":"x",s="horizontal"===i?"height":"width";return{...qs(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...wu(e,r),...to(o,e,{defaultPos:"mid",vgChannel:"y"===o?"yc":"xc"}),[s]:En(en("thickness",n,t))}}},trail:{vgMark:"trail",encodeEntry:e=>({...qs(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...to("x",e,{defaultPos:"mid"}),...to("y",e,{defaultPos:"mid"}),...sr("size",e),...cj(e)})}};const y_e="faceted_path_",v_e="stack_group_";function Vj(e,t={fromPrefix:""}){const{mark:n,markDef:i,encoding:r,config:o}=e,s=Xn(i.clip,function Dut(e){const t=e.getScaleComponent("x"),n=e.getScaleComponent("y");return!(!t?.get("selectionExtent")&&!n?.get("selectionExtent"))||void 0}(e),function Sut(e){const t=e.component.projection;return!(!t||t.isFit)||void 0}(e)),a=fhe(i),l=r.key,c=function Cut(e){const{encoding:t,stack:n,mark:i,markDef:r,config:o}=e,s=t.order;if(!(!te(s)&&Ya(s)&&$4(s.value)||!s&&$4(en("order",r,o)))){if((te(s)||he(s))&&!n)return phe(s,{expr:"datum"});if(ef(i)){const a="horizontal"===r.orient?"y":"x";if(he(t[a]))return{field:a}}}}(e),u=function Tut(e){if(!e.component.selection)return null;const t=se(e.component.selection).length;let n=t,i=e.parent;for(;i&&0===n;)n=se(i.component.selection).length,i=i.parent;return n?{interactive:t>0||"geoshape"===e.mark||!!e.encoding.tooltip||!!e.markDef.tooltip}:null}(e),d=en("aria",i,o),f=cN[n].postEncodingTransform?cN[n].postEncodingTransform(e):null;return[{name:e.getName("marks"),type:cN[n].vgMark,...s?{clip:s}:{},...a?{style:a}:{},...l?{key:l.field}:{},...c?{sort:c}:{},...u||{},...!1===d?{aria:d}:{},from:{data:t.fromPrefix+e.requestDataName(Zn.Main)},encode:{update:cN[n].encodeEntry(e)},...f?{transform:f}:{}}]}class b_e extends f_e{constructor(t,n,i,r={},o){super(t,"unit",n,i,o,void 0,rge(t)?t.view:void 0),this.specifiedScales={},this.specifiedAxes={},this.specifiedLegends={},this.specifiedProjection={},this.selection=[],this.children=[];const s=Wa(t.mark)?{...t.mark}:{type:t.mark},a=s.type;void 0===s.filled&&(s.filled=function dst(e,t,{graticule:n}){if(n)return!1;const i=oc("filled",e,t),r=e.type;return Xn(i,r!==yM&&r!==_M&&r!==vM)}(s,o,{graticule:t.data&&ij(t.data)}));const l=this.encoding=function yot(e,t,n,i){const r={};for(const o of se(e))ehe(o)||de(bit(o));for(let o of Ant){if(!e[o])continue;const s=e[o];if(Wb(o)){const a=xnt(o),l=r[a];if(he(l)&&brt(l.type)&&he(s)&&!l.timeUnit){de(pit(a));continue}}if("angle"===o&&"arc"===t&&!e.theta&&(de("Arc marks uses theta channel rather than angle, replacing angle with theta."),o=Hs),_ot(e,o,t))if(o===du&&"line"===t&&Ka(e[o])?.aggregate)de("Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.");else if(o===Do&&(n?"fill"in e:"stroke"in e))de(xhe("encoding",{fill:"fill"in e,stroke:"stroke"in e}));else if(o===Gb||o===U_&&!te(s)&&!Ya(s)||o===ip&&te(s)){if(s){if(o===U_){const a=e[o];if(wpe(a)){r[o]=a;continue}}r[o]=Ee(s).reduce((a,l)=>(he(l)?a.push(R6(l,o)):de(o6(l,o)),a),[])}}else{if(o===ip&&null===s)r[o]=null;else if(!(he(s)||cc(s)||Ya(s)||Jb(s)||ke(s))){de(o6(s,o));continue}r[o]=Ape(s,o,i)}else de(uM(o,t))}return r}(t.encoding||{},a,s.filled,o);this.markDef=hge(s,l,o),this.size=function iut({encoding:e,size:t}){for(const n of hu){const i=To(n);uc(t[i])&&nf(e[n])&&(delete t[i],de(Mhe(i)))}return t}({encoding:l,size:rge(t)?{...r,...t.width?{width:t.width}:{},...t.height?{height:t.height}:{}}:r}),this.stack=fge(this.markDef,l),this.specifiedScales=this.initScales(a,l),this.specifiedAxes=this.initAxes(l),this.specifiedLegends=this.initLegends(l),this.specifiedProjection=t.projection,this.selection=(t.params??[]).filter(c=>G6(c))}get hasProjection(){const{encoding:t}=this,n=this.mark===ipe,i=t&&Cnt.some(r=>tt(t[r]));return n||i}scaleDomain(t){const n=this.specifiedScales[t];return n?n.domain:void 0}axis(t){return this.specifiedAxes[t]}legend(t){return this.specifiedLegends[t]}initScales(t,n){return Z4.reduce((i,r)=>{const o=Ti(n[r]);return o&&(i[r]=this.initScale(o.scale??{})),i},{})}initScale(t){const{domain:n,range:i}=t,r=rr(t);return te(n)&&(r.domain=n.map(ls)),te(i)&&(r.range=i.map(ls)),r}initAxes(t){return hu.reduce((n,i)=>{const r=t[i];if(tt(r)||i===In&&tt(t.x2)||i===Fi&&tt(t.y2)){const o=tt(r)?r.axis:void 0;n[i]=o&&this.initAxis({...o})}return n},{})}initAxis(t){const n=se(t),i={};for(const r of n){const o=t[r];i[r]=nw(o)?che(o):ls(o)}return i}initLegends(t){return Int.reduce((n,i)=>{const r=Ti(t[i]);if(r&&function Ont(e){switch(e){case Do:case tc:case nc:case du:case So:case fu:case Yd:case Kd:return!0;case Wd:case qd:case np:return!1}}(i)){const o=r.legend;n[i]=o&&rr(o)}return n},{})}parseData(){this.component.data=aN(this)}parseLayoutSize(){!function jct(e){const{size:t,component:n}=e;for(const i of hu){const r=To(i);if(t[r]){const o=t[r];n.layoutSize.set(r,uc(o)?"step":o,!0)}else{const o=Vct(e,r);n.layoutSize.set(r,o,!1)}}}(this)}parseSelections(){this.component.selection=function Nat(e,t){const n={},i=e.config.selection;if(!t||!t.length)return n;for(const r of t){const o=Nn(r.name),s=r.select,a=Ce(s)?s:s.type,l=we(s)?Ze(s):{type:a},c=i[a];for(const f in c)"fields"===f||"encodings"===f||("mark"===f&&(l.mark={...c.mark,...l.mark}),(void 0===l[f]||!0===l[f])&&(l[f]=Ze(c[f]??l[f])));const u=n[o]={...l,name:o,type:a,init:r.value,bind:r.bind,events:Ce(l.on)?Ud(l.on,"scope"):Ee(Ze(l.on))},d=Ze(r);for(const f of HM)f.defined(u)&&f.parse&&f.parse(e,u,d)}return n}(this,this.selection)}parseMarkGroup(){this.component.mark=function but(e){if(pt([_M,gM,Lrt],e.mark)){const t=jpe(e.mark,e.encoding);if(t.length>0)return function wut(e,t){return[{name:e.getName("pathgroup"),type:"group",from:{facet:{name:y_e+e.requestDataName(Zn.Main),data:e.requestDataName(Zn.Main),groupby:t}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:Vj(e,{fromPrefix:y_e})}]}(e,t)}else if(e.mark===mM){const t=t6.some(n=>en(n,e.markDef,e.config));if(e.stack&&!e.fieldDef("size")&&t)return function Eut(e){const[t]=Vj(e,{fromPrefix:v_e}),n=e.scaleName(e.stack.fieldChannel),i=(c={})=>e.vgField(e.stack.fieldChannel,c),r=(c,u)=>`${c}(${[i({prefix:"min",suffix:"start",expr:u}),i({prefix:"max",suffix:"start",expr:u}),i({prefix:"min",suffix:"end",expr:u}),i({prefix:"max",suffix:"end",expr:u})].map(f=>`scale('${n}',${f})`).join(",")})`;let o,s;"x"===e.stack.fieldChannel?(o={...L_(t.encode.update,["y","yc","y2","height",...t6]),x:{signal:r("min","datum")},x2:{signal:r("max","datum")},clip:{value:!0}},s={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},t.encode.update={...Co(t.encode.update,["y","yc","y2"]),height:{field:{group:"height"}}}):(o={...L_(t.encode.update,["x","xc","x2","width"]),y:{signal:r("min","datum")},y2:{signal:r("max","datum")},clip:{value:!0}},s={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},t.encode.update={...Co(t.encode.update,["x","xc","x2"]),width:{field:{group:"width"}}});for(const c of t6){const u=oc(c,e.markDef,e.config);t.encode.update[c]?(o[c]=t.encode.update[c],delete t.encode.update[c]):u&&(o[c]=En(u)),u&&(t.encode.update[c]={value:0})}const a=[];if(e.stack.groupbyChannels?.length>0)for(const c of e.stack.groupbyChannels){const u=e.fieldDef(c),d=ve(u);d&&a.push(d),(u?.bin||u?.timeUnit)&&a.push(ve(u,{binSuffix:"end"}))}return o=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce((c,u)=>{if(t.encode.update[u])return{...c,[u]:t.encode.update[u]};{const d=oc(u,e.markDef,e.config);return void 0!==d?{...c,[u]:En(d)}:c}},o),o.stroke&&(o.strokeForeground={value:!0},o.strokeOffset={value:0}),[{type:"group",from:{facet:{data:e.requestDataName(Zn.Main),name:v_e+e.requestDataName(Zn.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:s},marks:[t]}]}]}(e)}return Vj(e)}(this)}parseAxesAndHeaders(){this.component.axes=function Kct(e){return hu.reduce((t,n)=>(e.component.scales[n]&&(t[n]=[nut(n,e)]),t),{})}(this)}assembleSelectionTopLevelSignals(t){return function Jst(e,t){let n=!1;for(const i of nr(e.component.selection??{})){const r=i.name,o=ge(r+yp);if(0===t.filter(a=>a.name===r).length){const l="point"===i.type?", true, true)":")";t.push({name:i.name,update:`${ume}(${o}, ${ge("global"===i.resolve?"union":i.resolve)}${l}`})}n=!0;for(const a of HM)a.defined(i)&&a.topLevelSignals&&(t=a.topLevelSignals(e,i,t))}return n&&0===t.filter(r=>"unit"===r.name).length&&t.unshift({name:"unit",value:{},on:[{events:"pointermove",update:"isTuple(group()) ? group() : unit"}]}),rj(t)}(this,t)}assembleSignals(){return[...mme(this),...Qst(this,[])]}assembleSelectionData(t){return function eat(e,t){const n=[...t],i=vp(e,{escape:!1});for(const r of nr(e.component.selection??{})){const o={name:r.name+yp};if(r.project.hasSelectionId&&(o.transform=[{type:"collect",sort:{field:Xa}}]),r.init){const a=r.project.items.map(Rge);o.values=r.init.map(r.project.hasSelectionId?l=>({unit:i,[Xa]:_p(l,!1)[0]}):l=>({unit:i,fields:a,values:_p(l,!1)}))}n.filter(a=>a.name===r.name+yp).length||n.push(o)}return n}(this,t)}assembleLayout(){return null}assembleLayoutSignals(){return vj(this)}assembleMarks(){let t=this.component.mark??[];return(!this.parent||!uy(this.parent))&&(t=Fge(this,t)),t.map(this.correctDataNames)}assembleGroupStyle(){const{style:t}=this.view||{};return void 0!==t?t:this.encoding.x||this.encoding.y?"cell":"view"}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(t){return mp(this.encoding,t)}fieldDef(t){return Ka(this.encoding[t])}typedFieldDef(t){const n=this.fieldDef(t);return eo(n)?n:null}}class Uj extends Pj{constructor(t,n,i,r,o){super(t,"layer",n,i,o,t.resolve,t.view);const s={...r,...t.width?{width:t.width}:{},...t.height?{height:t.height}:{}};this.children=t.layer.map((a,l)=>{if(PM(a))return new Uj(a,this,this.getName(`layer_${l}`),s,o);if(_u(a))return new b_e(a,this,this.getName(`layer_${l}`),s,o);throw new Error(i6(a))})}parseData(){this.component.data=aN(this);for(const t of this.children)t.parseData()}parseLayoutSize(){!function $ct(e){Lj(e),sN(e,"width"),sN(e,"height")}(this)}parseSelections(){this.component.selection={};for(const t of this.children){t.parseSelections();for(const n of se(t.component.selection))this.component.selection[n]=t.component.selection[n]}}parseMarkGroup(){for(const t of this.children)t.parseMarkGroup()}parseAxesAndHeaders(){!function Qct(e){const{axes:t,resolve:n}=e.component,i={top:0,bottom:0,right:0,left:0};for(const r of e.children){r.parseAxesAndHeaders();for(const o of se(r.component.axes))n.axis[o]=bj(e.component.resolve,o),"shared"===n.axis[o]&&(t[o]=Zct(t[o],r.component.axes[o]),t[o]||(n.axis[o]="independent",delete t[o]))}for(const r of hu){for(const o of e.children)if(o.component.axes[r]){if("independent"===n.axis[r]){t[r]=(t[r]??[]).concat(o.component.axes[r]);for(const s of o.component.axes[r]){const{value:a,explicit:l}=s.getWithExplicit("orient");if(!ke(a)){if(i[a]>0&&!l){const c=Xct[a];i[a]>i[c]&&s.set("orient",c,!1)}i[a]++}}}delete o.component.axes[r]}if("independent"===n.axis[r]&&t[r]&&t[r].length>1)for(const[o,s]of(t[r]||[]).entries())o>0&&s.get("grid")&&!s.explicit.grid&&(s.implicit.grid=!1)}}(this)}assembleSelectionTopLevelSignals(t){return this.children.reduce((n,i)=>i.assembleSelectionTopLevelSignals(n),t)}assembleSignals(){return this.children.reduce((t,n)=>t.concat(n.assembleSignals()),mme(this))}assembleLayoutSignals(){return this.children.reduce((t,n)=>t.concat(n.assembleLayoutSignals()),vj(this))}assembleSelectionData(t){return this.children.reduce((n,i)=>i.assembleSelectionData(n),t)}assembleGroupStyle(){const t=new Set;for(const i of this.children)for(const r of Ee(i.assembleGroupStyle()))t.add(r);const n=Array.from(t);return n.length>1?n:1===n.length?n[0]:void 0}assembleTitle(){let t=super.assembleTitle();if(t)return t;for(const n of this.children)if(t=n.assembleTitle(),t)return t}assembleLayout(){return null}assembleMarks(){return function tat(e,t){for(const n of e.children)On(n)&&(t=Fge(n,t));return t}(this,this.children.flatMap(t=>t.assembleMarks()))}assembleLegends(){return this.children.reduce((t,n)=>t.concat(n.assembleLegends()),Bme(this))}}function zj(e,t,n,i,r){if(EM(e))return new fw(e,t,n,r);if(PM(e))return new Uj(e,t,n,i,r);if(_u(e))return new b_e(e,t,n,i,r);if(function jot(e){return RM(e)||q6(e)||W6(e)}(e))return new Gct(e,t,n,r);throw new Error(i6(e))}function xut(e,t={}){t.logger&&function Jit(e){sc=e}(t.logger),t.fieldTitle&&xpe(t.fieldTitle);try{const n=uge(Sm(t.config,e.config)),i=Tge(e,n),r=zj(i,null,"",void 0,n);return r.parse(),function Zlt(e,t){Mj(e.sources);let n=0,i=0;for(let r=0;r"width"!==h.name&&"height"!==h.name||void 0===h.value||(t[h.name]=+h.value,!1));const{params:d,...f}=t;return{$schema:"https://vega.github.io/schema/vega/v5.json",...e.description?{description:e.description}:{},...f,...a?{title:a}:{},...l?{style:l}:{},...c?{encode:{update:c}}:{},data:o,...s.length>0?{projections:s}:{},...e.assembleGroup([...u,...e.assembleSelectionTopLevelSignals([]),...nge(d)]),...r?{config:r}:{},...i?{usermeta:i}:{}}}const Nut="5.21.0",w_e=function Iut(e){const[t,n]=/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1,3);return{library:t,version:n}};const fy="#fff",Qut={background:"#333",view:{stroke:"#888"},title:{color:fy,subtitleColor:fy},style:{"guide-label":{fill:fy},"guide-title":{fill:fy}},axis:{domainColor:fy,gridColor:"#888",tickColor:fy}},Dp="#4572a7",Zut={background:"#fff",arc:{fill:Dp},area:{fill:Dp},line:{stroke:Dp,strokeWidth:2},path:{stroke:Dp},rect:{fill:Dp},shape:{stroke:Dp},symbol:{fill:Dp,strokeWidth:1.5,size:50},axis:{bandPosition:.5,grid:!0,gridColor:"#000000",gridOpacity:1,gridWidth:.5,labelPadding:10,tickSize:5,tickWidth:.5},axisBand:{grid:!1,tickExtra:!0},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:50,symbolType:"square"},range:{category:["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]}},Sp="#30a2da",Hj="#cbcbcb",tdt={arc:{fill:Sp},area:{fill:Sp},axis:{domainColor:Hj,grid:!0,gridColor:Hj,gridWidth:1,labelColor:"#999",labelFontSize:10,titleColor:"#333",tickColor:Hj,tickSize:10,titleFontSize:14,titlePadding:10,labelPadding:4},axisBand:{grid:!1},background:"#f0f0f0",group:{fill:"#f0f0f0"},legend:{labelColor:"#333",labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:"#333",titleFontSize:14,titlePadding:10},line:{stroke:Sp,strokeWidth:2},path:{stroke:Sp,strokeWidth:.5},rect:{fill:Sp},range:{category:["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],diverging:["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],heatmap:["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},point:{filled:!0,shape:"circle"},shape:{stroke:Sp},bar:{binSpacing:2,fill:Sp,stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},Tp="#000",ndt={group:{fill:"#e5e5e5"},arc:{fill:Tp},area:{fill:Tp},line:{stroke:Tp},path:{stroke:Tp},rect:{fill:Tp},shape:{stroke:Tp},symbol:{fill:Tp,size:40},axis:{domain:!1,grid:!0,gridColor:"#FFFFFF",gridOpacity:1,labelColor:"#7F7F7F",labelPadding:4,tickColor:"#7F7F7F",tickSize:5.67,titleFontSize:16,titleFontWeight:"normal"},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:40},range:{category:["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]}},S_e="Benton Gothic, sans-serif",xp="#82c6df",Gj="Benton Gothic Bold, sans-serif",hw={"category-6":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"fire-7":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"fireandice-6":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"],"ice-7":["#edefee","#dadfe2","#c4ccd2","#a6b7c6","#849eae","#607785","#47525d"]},sdt={background:"#ffffff",title:{anchor:"start",color:"#000000",font:Gj,fontSize:22,fontWeight:"normal"},arc:{fill:xp},area:{fill:xp},line:{stroke:xp,strokeWidth:2},path:{stroke:xp},rect:{fill:xp},shape:{stroke:xp},symbol:{fill:xp,size:30},axis:{labelFont:S_e,labelFontSize:11.5,labelFontWeight:"normal",titleFont:Gj,titleFontSize:13,titleFontWeight:"normal"},axisX:{labelAngle:0,labelPadding:4,tickSize:3},axisY:{labelBaseline:"middle",maxExtent:45,minExtent:45,tickSize:2,titleAlign:"left",titleAngle:0,titleX:-45,titleY:-11},legend:{labelFont:S_e,labelFontSize:11.5,symbolType:"square",titleFont:Gj,titleFontSize:13,titleFontWeight:"normal"},range:{category:hw["category-6"],diverging:hw["fireandice-6"],heatmap:hw["fire-7"],ordinal:hw["fire-7"],ramp:hw["fire-7"]}},Ap="#ab5787",uN="#979797",adt={background:"#f9f9f9",arc:{fill:Ap},area:{fill:Ap},line:{stroke:Ap},path:{stroke:Ap},rect:{fill:Ap},shape:{stroke:Ap},symbol:{fill:Ap,size:30},axis:{domainColor:uN,domainWidth:.5,gridWidth:.2,labelColor:uN,tickColor:uN,tickWidth:.2,titleColor:uN},axisBand:{grid:!1},axisX:{grid:!0,tickSize:10},axisY:{domain:!1,grid:!0,tickSize:0},legend:{labelFontSize:11,padding:1,symbolSize:30,symbolType:"square"},range:{category:["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]}},Mp="#3e5c69",ldt={background:"#fff",arc:{fill:Mp},area:{fill:Mp},line:{stroke:Mp},path:{stroke:Mp},rect:{fill:Mp},shape:{stroke:Mp},symbol:{fill:Mp},axis:{domainWidth:.5,grid:!0,labelPadding:2,tickSize:5,tickWidth:.5,titleFontWeight:"normal"},axisBand:{grid:!1},axisX:{gridWidth:.2},axisY:{gridDash:[3],gridWidth:.4},legend:{labelFontSize:11,padding:1,symbolType:"square"},range:{category:["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]}},Ys="#1696d2",dN="Lato",Wj="Lato",pw={"main-colors":["#1696d2","#d2d2d2","#000000","#fdbf11","#ec008b","#55b748","#5c5859","#db2b27"],"shades-blue":["#CFE8F3","#A2D4EC","#73BFE2","#46ABDB","#1696D2","#12719E","#0A4C6A","#062635"],"shades-gray":["#F5F5F5","#ECECEC","#E3E3E3","#DCDBDB","#D2D2D2","#9D9D9D","#696969","#353535"],"shades-yellow":["#FFF2CF","#FCE39E","#FDD870","#FCCB41","#FDBF11","#E88E2D","#CA5800","#843215"],"shades-magenta":["#F5CBDF","#EB99C2","#E46AA7","#E54096","#EC008B","#AF1F6B","#761548","#351123"],"shades-green":["#DCEDD9","#BCDEB4","#98CF90","#78C26D","#55B748","#408941","#2C5C2D","#1A2E19"],"shades-black":["#D5D5D4","#ADABAC","#848081","#5C5859","#332D2F","#262223","#1A1717","#0E0C0D"],"shades-red":["#F8D5D4","#F1AAA9","#E9807D","#E25552","#DB2B27","#A4201D","#6E1614","#370B0A"],"one-group":["#1696d2","#000000"],"two-groups-cat-1":["#1696d2","#000000"],"two-groups-cat-2":["#1696d2","#fdbf11"],"two-groups-cat-3":["#1696d2","#db2b27"],"two-groups-seq":["#a2d4ec","#1696d2"],"three-groups-cat":["#1696d2","#fdbf11","#000000"],"three-groups-seq":["#a2d4ec","#1696d2","#0a4c6a"],"four-groups-cat-1":["#000000","#d2d2d2","#fdbf11","#1696d2"],"four-groups-cat-2":["#1696d2","#ec0008b","#fdbf11","#5c5859"],"four-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a"],"five-groups-cat-1":["#1696d2","#fdbf11","#d2d2d2","#ec008b","#000000"],"five-groups-cat-2":["#1696d2","#0a4c6a","#d2d2d2","#fdbf11","#332d2f"],"five-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a","#000000"],"six-groups-cat-1":["#1696d2","#ec008b","#fdbf11","#000000","#d2d2d2","#55b748"],"six-groups-cat-2":["#1696d2","#d2d2d2","#ec008b","#fdbf11","#332d2f","#0a4c6a"],"six-groups-seq":["#cfe8f3","#a2d4ec","#73bfe2","#46abdb","#1696d2","#12719e"],"diverging-colors":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"]},hdt={background:"#FFFFFF",title:{anchor:"start",fontSize:18,font:dN},axisX:{domain:!0,domainColor:"#000000",domainWidth:1,grid:!1,labelFontSize:12,labelFont:Wj,labelAngle:0,tickColor:"#000000",tickSize:5,titleFontSize:12,titlePadding:10,titleFont:dN},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:"#DEDDDD",gridWidth:1,labelFontSize:12,labelFont:Wj,labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:dN,titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:Wj,symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:dN,orient:"right",offset:10},view:{stroke:"transparent"},range:{category:pw["six-groups-cat-1"],diverging:pw["diverging-colors"],heatmap:pw["diverging-colors"],ordinal:pw["six-groups-seq"],ramp:pw["shades-blue"]},area:{fill:Ys},rect:{fill:Ys},line:{color:Ys,stroke:Ys,strokeWidth:5},trail:{color:Ys,stroke:Ys,strokeWidth:0,size:1},path:{stroke:Ys,strokeWidth:.5},point:{filled:!0},text:{font:"Lato",color:Ys,fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:Ys,stroke:null}},arc:{fill:Ys},shape:{stroke:Ys},symbol:{fill:Ys,size:30}},Np="#3366CC",fN="Arial, sans-serif",pdt={arc:{fill:Np},area:{fill:Np},path:{stroke:Np},rect:{fill:Np},shape:{stroke:Np},symbol:{stroke:Np},circle:{fill:Np},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:fN,fontSize:12},"guide-title":{font:fN,fontSize:12},"group-title":{font:fN,fontSize:12}},title:{font:fN,fontSize:14,fontWeight:"bold",dy:-3,anchor:"start"},axis:{gridColor:"#ccc",tickColor:"#ccc",domain:!1,grid:!0},range:{category:["#4285F4","#DB4437","#F4B400","#0F9D58","#AB47BC","#00ACC1","#FF7043","#9E9D24","#5C6BC0","#F06292","#00796B","#C2185B"],heatmap:["#c6dafc","#5e97f6","#2a56c6"]}},qj=e=>e*(1/3+1),I_e=qj(9),k_e=qj(10),O_e=qj(12),gw="Segoe UI",R_e="wf_standard-font, helvetica, arial, sans-serif",mw="#605E5C",P_e="transparent",Ja="#118DFF",B_e=["#DEEFFF",Ja],Cdt={view:{stroke:P_e},background:P_e,font:gw,header:{titleFont:R_e,titleFontSize:O_e,titleColor:"#252423",labelFont:gw,labelFontSize:k_e,labelColor:mw},axis:{ticks:!1,grid:!1,domain:!1,labelColor:mw,labelFontSize:I_e,titleFont:R_e,titleColor:"#252423",titleFontSize:O_e,titleFontWeight:"normal"},axisQuantitative:{tickCount:3,grid:!0,gridColor:"#C8C6C4",gridDash:[1,5],labelFlush:!1},axisBand:{tickExtra:!0},axisX:{labelPadding:5},axisY:{labelPadding:10},bar:{fill:Ja},line:{stroke:Ja,strokeWidth:3,strokeCap:"round",strokeJoin:"round"},text:{font:gw,fontSize:I_e,fill:mw},arc:{fill:Ja},area:{fill:Ja,line:!0,opacity:.6},path:{stroke:Ja},rect:{fill:Ja},point:{fill:Ja,filled:!0,size:75},shape:{stroke:Ja},symbol:{fill:Ja,strokeWidth:1.5,size:50},legend:{titleFont:gw,titleFontWeight:"bold",titleColor:mw,labelFont:gw,labelFontSize:k_e,labelColor:mw,symbolType:"circle",symbolSize:75},range:{category:[Ja,"#12239E","#E66C37","#6B007B","#E044A7","#744EC2","#D9B300","#D64550"],diverging:B_e,heatmap:B_e,ordinal:["#DEEFFF","#c7e4ff","#b0d9ff","#9aceff","#83c3ff","#6cb9ff","#55aeff","#3fa3ff","#2898ff",Ja]}},Yj='IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,".sfnstext-regular",sans-serif',hN={textPrimary:{g90:"#f4f4f4",g100:"#f4f4f4",white:"#161616",g10:"#161616"},textSecondary:{g90:"#c6c6c6",g100:"#c6c6c6",white:"#525252",g10:"#525252"},layerAccent01:{white:"#e0e0e0",g10:"#e0e0e0",g90:"#525252",g100:"#393939"},gridBg:{white:"#ffffff",g10:"#ffffff",g90:"#161616",g100:"#161616"}},Sdt=["#8a3ffc","#33b1ff","#007d79","#ff7eb6","#fa4d56","#fff1f1","#6fdc8c","#4589ff","#d12771","#d2a106","#08bdba","#bae6ff","#ba4e00","#d4bbff"],Tdt=["#6929c4","#1192e8","#005d5d","#9f1853","#fa4d56","#570408","#198038","#002d9c","#ee538b","#b28600","#009d9a","#012749","#8a3800","#a56eff"];function pN({theme:e,background:t}){const n=["white","g10"].includes(e)?"light":"dark",i=hN.gridBg[e],r=hN.textPrimary[e],o=hN.textSecondary[e],a="dark"===n?"#d4bbff":"#6929c4";return{background:t,arc:{fill:a},area:{fill:a},path:{stroke:a},rect:{fill:a},shape:{stroke:a},symbol:{stroke:a},circle:{fill:a},view:{fill:i,stroke:i},group:{fill:i},title:{color:r,anchor:"start",dy:-15,fontSize:16,font:Yj,fontWeight:600},axis:{labelColor:o,labelFontSize:12,labelFont:'IBM Plex Sans Condensed, system-ui, -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", sans-serif',labelFontWeight:400,titleColor:r,titleFontWeight:600,titleFontSize:12,grid:!0,gridColor:hN.layerAccent01[e],labelAngle:0},axisX:{titlePadding:10},axisY:{titlePadding:2.5},style:{"guide-label":{font:Yj,fill:o,fontWeight:400},"guide-title":{font:Yj,fill:o,fontWeight:400}},range:{category:"dark"===n?Sdt:Tdt,diverging:["#750e13","#a2191f","#da1e28","#fa4d56","#ff8389","#ffb3b8","#ffd7d9","#fff1f1","#e5f6ff","#bae6ff","#82cfff","#33b1ff","#1192e8","#0072c3","#00539a","#003a6d"],heatmap:["#f6f2ff","#e8daff","#d4bbff","#be95ff","#a56eff","#8a3ffc","#6929c4","#491d8b","#31135e","#1c0f30"]}}}const xdt=pN({theme:"white",background:"#ffffff"}),Adt=pN({theme:"g10",background:"#f4f4f4"}),Mdt=pN({theme:"g90",background:"#262626"}),Ndt=pN({theme:"g100",background:"#161616"}),Idt="2.15.0";function j_e(e,t){return JSON.stringify(e,function eft(e){const t=[];return function(n,i){if("object"!=typeof i||null===i)return i;const r=t.indexOf(this)+1;return t.length=r,t.length>e?"[Object]":t.indexOf(i)>=0?"[Circular]":(t.push(i),i)}}(t))}const V_e="vg-tooltip-element",nft={offsetX:10,offsetY:10,id:V_e,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:function ift(e){return String(e).replace(/&/g,"&").replace(/t(Ce(r)?r:j_e(r,n))).join(", ")}]`;if(we(e)){let r="";const{title:o,image:s,...a}=e;o&&(r+=`

${t(o)}

`),s&&(r+=``);const l=Object.keys(a);if(l.length>0){r+="";for(const c of l){let u=a[c];void 0!==u&&(we(u)&&(u=j_e(u,n)),r+=``)}r+="
${t(c)}${t(u)}
"}return r||"{}"}return t(e)},baseURL:"",anchor:"cursor",position:["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"]};function U_e(e,t,{offsetX:n,offsetY:i}){const r=z_e({x1:e.clientX,x2:e.clientX,y1:e.clientY,y2:e.clientY},t,n,i),o=["bottom-right","bottom-left","top-right","top-left"];for(const s of o)if(H_e(r[s],t))return r[s];return r["top-left"]}function z_e(e,t,n,i){const s=e.x1-t.width-n,a=(e.x1+e.x2)/2-t.width/2,l=e.x2+n,c=e.y1-t.height-i,u=(e.y1+e.y2)/2-t.height/2,d=e.y2+i;return{top:{x:a,y:c},bottom:{x:a,y:d},left:{x:s,y:u},right:{x:l,y:u},"top-left":{x:s,y:c},"top-right":{x:l,y:c},"bottom-left":{x:s,y:d},"bottom-right":{x:l,y:d}}}function H_e(e,t){return e.x>=0&&e.y>=0&&e.x+t.width<=window.innerWidth&&e.y+t.height<=window.innerHeight}function aft(e,t,n){return e.clientX>=t.x&&e.clientX<=t.x+n.width&&e.clientY>=t.y&&e.clientY<=t.y+n.height}class G_e{constructor(t){this.options={...nft,...t};const n=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const i=document.createElement("style");i.setAttribute("id",this.options.styleId),i.innerHTML=function rft(e){if(!/^[A-Za-z]+[-:.\w]*$/.test(e))throw new Error("Invalid HTML ID");return"#vg-tooltip-element {\n visibility: hidden;\n padding: 8px;\n position: fixed;\n z-index: 1000;\n font-family: sans-serif;\n font-size: 11px;\n border-radius: 3px;\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);\n /* The default theme is the light theme. */\n background-color: rgba(255, 255, 255, 0.95);\n border: 1px solid #d9d9d9;\n color: black;\n}\n#vg-tooltip-element.visible {\n visibility: visible;\n}\n#vg-tooltip-element h2 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 13px;\n}\n#vg-tooltip-element table {\n border-spacing: 0;\n}\n#vg-tooltip-element table tr {\n border: none;\n}\n#vg-tooltip-element table tr td {\n overflow: hidden;\n text-overflow: ellipsis;\n padding-top: 2px;\n padding-bottom: 2px;\n}\n#vg-tooltip-element table tr td.key {\n color: #808080;\n max-width: 150px;\n text-align: right;\n padding-right: 4px;\n}\n#vg-tooltip-element table tr td.value {\n display: block;\n max-width: 300px;\n max-height: 7em;\n text-align: left;\n}\n#vg-tooltip-element.dark-theme {\n background-color: rgba(32, 32, 32, 0.9);\n border: 1px solid #f5f5f5;\n color: white;\n}\n#vg-tooltip-element.dark-theme td.key {\n color: #bfbfbf;\n}\n".toString().replace(V_e,e)}(n);const r=document.head;r.childNodes.length>0?r.insertBefore(i,r.childNodes[0]):r.appendChild(i)}}tooltipHandler(t,n,i,r){if(this.el=document.getElementById(this.options.id),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip"),(document.fullscreenElement??document.body).appendChild(this.el)),null==r||""===r)return void this.el.classList.remove("visible",`${this.options.theme}-theme`);this.el.innerHTML=this.options.formatTooltip(r,this.options.sanitize,this.options.maxDepth,this.options.baseURL),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:o,y:s}="mark"===this.options.anchor?function oft(e,t,n,i,r){const{position:o,offsetX:s,offsetY:a}=r,u=function sft(e,t,n){const i=n.isVoronoi?n.datum.bounds:n.bounds;let r=e.left+t[0]+i.x1,o=e.top+t[1]+i.y1,s=n;for(;s.mark.group;)s=s.mark.group,r+=s.x??0,o+=s.y??0;return{x1:r,x2:r+(i.x2-i.x1),y1:o,y2:o+(i.y2-i.y1)}}(e._el.getBoundingClientRect(),e._origin,n),d=z_e(u,i,s,a),f=Array.isArray(o)?o:[o];for(const h of f)if(H_e(d[h],i)&&!aft(t,d[h],i))return d[h];return U_e(t,i,r)}(t,n,i,this.el.getBoundingClientRect(),this.options):U_e(n,this.el.getBoundingClientRect(),this.options);this.el.style.top=`${s}px`,this.el.style.left=`${o}px`}}var lft=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var o in r)r.hasOwnProperty(o)&&(i[o]=r[o])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cft=Object.prototype.hasOwnProperty;function Xj(e,t){return cft.call(e,t)}function Qj(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n=48&&i<=57))return!1;t++}return!0}function Ip(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function W_e(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Jj(e){if(void 0===e)return!0;if(e)if(Array.isArray(e)){for(var t=0,n=e.length;t0&&"constructor"==l[u-1]))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&void 0===f&&(void 0===c[h]?f=l.slice(0,u).join("/"):u==d-1&&(f=t.path),void 0!==f&&p(t,0,e,f)),u++,Array.isArray(c)){if("-"===h)h=c.length;else{if(n&&!Zj(h))throw new Vn("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",o,t,e);Zj(h)&&(h=~~h)}if(u>=d){if(n&&"add"===t.op&&h>c.length)throw new Vn("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",o,t,e);if(!1===(s=dft[t.op].call(t,c,h,e)).test)throw new Vn("Test operation failed","TEST_OPERATION_FAILED",o,t,e);return s}}else if(u>=d){if(!1===(s=hy[t.op].call(t,c,h,e)).test)throw new Vn("Test operation failed","TEST_OPERATION_FAILED",o,t,e);return s}if(c=c[h],n&&u0)throw new Vn('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new Vn("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new Vn("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&Jj(e.value))throw new Vn("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n)if("add"==e.op){var r=e.path.split("/").length,o=i.split("/").length;if(r!==o+1&&r!==o)throw new Vn("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==i)throw new Vn("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if("move"===e.op||"copy"===e.op){var a=K_e([{op:"_get",path:e.from,value:void 0}],n);if(a&&"OPERATION_PATH_UNRESOLVABLE"===a.name)throw new Vn("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}function K_e(e,t,n){try{if(!Array.isArray(e))throw new Vn("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)mN(ds(t),ds(e),n||!0);else{n=n||_N;for(var i=0;i0&&(e.patches=[],e.callback&&e.callback(i)),i}function nV(e,t,n,i,r){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var o=Qj(t),s=Qj(e),a=!1,l=s.length-1;l>=0;l--){var u=e[c=s[l]];if(!Xj(t,c)||void 0===t[c]&&void 0!==u&&!1===Array.isArray(t))Array.isArray(e)===Array.isArray(t)?(r&&n.push({op:"test",path:i+"/"+Ip(c),value:ds(u)}),n.push({op:"remove",path:i+"/"+Ip(c)}),a=!0):(r&&n.push({op:"test",path:i,value:e}),n.push({op:"replace",path:i,value:t}));else{var d=t[c];"object"==typeof u&&null!=u&&"object"==typeof d&&null!=d&&Array.isArray(u)===Array.isArray(d)?nV(u,d,n,i+"/"+Ip(c),r):u!==d&&(r&&n.push({op:"test",path:i+"/"+Ip(c),value:ds(u)}),n.push({op:"replace",path:i+"/"+Ip(c),value:ds(d)}))}}if(a||o.length!=s.length)for(l=0;li?"object"!=typeof i?e:i:t}Object.assign({},hft,Object.freeze({__proto__:null,compare:function wft(e,t,n){void 0===n&&(n=!1);var i=[];return nV(e,t,i,"",n),i},generate:tV,observe:function bft(e,t){var i,r=function mft(e){return eV.get(e)}(e);if(r){var o=function _ft(e,t){return e.observers.get(t)}(r,t);i=o&&o.observer}else r=new pft(e),eV.set(e,r);if(i)return i;if(i={},r.value=ds(e),t){i.callback=t,i.next=null;var s=function(){tV(i)},a=function(){clearTimeout(i.next),i.next=setTimeout(s)};typeof window<"u"&&(window.addEventListener("mouseup",a),window.addEventListener("keyup",a),window.addEventListener("mousedown",a),window.addEventListener("keydown",a),window.addEventListener("change",a))}return i.patches=[],i.object=e,i.unobserve=function(){tV(i),clearTimeout(i.next),function yft(e,t){e.observers.delete(t.callback)}(r,i),typeof window<"u"&&(window.removeEventListener("mouseup",a),window.removeEventListener("keyup",a),window.removeEventListener("mousedown",a),window.removeEventListener("keydown",a),window.removeEventListener("change",a))},r.observers.set(t,new gft(t,i)),i},unobserve:function vft(e,t){t.unobserve()}}),{JsonPatchError:Y_e,deepClone:ds,escapePathComponent:Ip,unescapePathComponent:W_e});var sV,Z_e,lV,J_e,eye,uV,tye,dV,nye,hV,iye,pV,rye,gV,oye,mV,sye,_V,aye,yV,lye,vV,cye,bV,uye,wV,dye,EV,fye,CV,pye,yN={exports:{}};function aV(){return Z_e?sV:(Z_e=1,sV={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2})}function vN(){return J_e||(J_e=1,lV="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{}),lV}function cV(){return eye||(eye=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:r}=aV(),o=vN(),s=(t=e.exports={}).re=[],a=t.safeRe=[],l=t.src=[],c=t.t={};let u=0;const d="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",r],[d,i]],p=(g,m,_)=>{const y=(g=>{for(const[m,_]of f)g=g.split(`${m}*`).join(`${m}{0,${_}}`).split(`${m}+`).join(`${m}{1,${_}}`);return g})(m),v=u++;o(g,v,m),c[g]=v,l[v]=m,s[v]=new RegExp(m,_?"g":void 0),a[v]=new RegExp(y,_?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),p("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${l[c.NUMERICIDENTIFIER]}|${l[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NUMERICIDENTIFIERLOOSE]}|${l[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${d}+`),p("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),p("FULL",`^${l[c.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),p("LOOSE",`^${l[c.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),p("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),p("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?(?:${l[c.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",l[c.COERCE],!0),p("COERCERTLFULL",l[c.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(yN,yN.exports)),yN.exports}function fV(){if(nye)return dV;nye=1;const e=vN(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=aV(),{safeRe:i,t:r}=cV(),o=oV(),{compareIdentifiers:s}=function Sft(){if(tye)return uV;tye=1;const e=/^[0-9]+$/,t=(i,r)=>{const o=e.test(i),s=e.test(r);return o&&s&&(i=+i,r=+r),i===r?0:o&&!s?-1:s&&!o?1:it(r,i)}}();class a{constructor(c,u){if(u=o(u),c instanceof a){if(c.loose===!!u.loose&&c.includePrerelease===!!u.includePrerelease)return c;c=c.version}else if("string"!=typeof c)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof c}".`);if(c.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",c,u),this.options=u,this.loose=!!u.loose,this.includePrerelease=!!u.includePrerelease;const d=c.trim().match(u.loose?i[r.LOOSE]:i[r.FULL]);if(!d)throw new TypeError(`Invalid Version: ${c}`);if(this.raw=c,this.major=+d[1],this.minor=+d[2],this.patch=+d[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");this.prerelease=d[4]?d[4].split(".").map(f=>{if(/^[0-9]+$/.test(f)){const h=+f;if(h>=0&&h=0;)"number"==typeof this.prerelease[h]&&(this.prerelease[h]++,h=-2);if(-1===h){if(u===this.prerelease.join(".")&&!1===d)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(f)}}if(u){let h=[u,f];!1===d&&(h=[u]),0===s(this.prerelease[0],u)?isNaN(this.prerelease[1])&&(this.prerelease=h):this.prerelease=h}break}default:throw new Error(`invalid increment argument: ${c}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return dV=a}function py(){if(iye)return hV;iye=1;const e=fV();return hV=(n,i,r)=>new e(n,r).compare(new e(i,r))}function hye(){if(fye)return EV;fye=1;const e=/\s+/g;class t{constructor(S,x){if(x=r(x),S instanceof t)return S.loose===!!x.loose&&S.includePrerelease===!!x.includePrerelease?S:new t(S.raw,x);if(S instanceof o)return this.raw=S.value,this.set=[[S]],this.formatted=void 0,this;if(this.options=x,this.loose=!!x.loose,this.includePrerelease=!!x.includePrerelease,this.raw=S.trim().replace(e," "),this.set=this.raw.split("||").map(I=>this.parseRange(I.trim())).filter(I=>I.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const I=this.set[0];if(this.set=this.set.filter(A=>!g(A[0])),0===this.set.length)this.set=[I];else if(this.set.length>1)for(const A of this.set)if(1===A.length&&m(A[0])){this.set=[A];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let S=0;S0&&(this.formatted+="||");const x=this.set[S];for(let I=0;I0&&(this.formatted+=" "),this.formatted+=x[I].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(S){const I=((this.options.includePrerelease&&h)|(this.options.loose&&p))+":"+S,A=i.get(I);if(A)return A;const N=this.options.loose;S=S.replace(N?l[c.HYPHENRANGELOOSE]:l[c.HYPHENRANGE],F(this.options.includePrerelease)),s("hyphen replace",S),S=S.replace(l[c.COMPARATORTRIM],u),s("comparator trim",S),S=S.replace(l[c.TILDETRIM],d),s("tilde trim",S),S=S.replace(l[c.CARETTRIM],f),s("caret trim",S);let $=S.split(" ").map(H=>y(H,this.options)).join(" ").split(/\s+/).map(H=>R(H,this.options));N&&($=$.filter(H=>(s("loose invalid filter",H,this.options),!!H.match(l[c.COMPARATORLOOSE])))),s("range list",$);const B=new Map,V=$.map(H=>new o(H,this.options));for(const H of V){if(g(H))return[H];B.set(H.value,H)}B.size>1&&B.has("")&&B.delete("");const j=[...B.values()];return i.set(I,j),j}intersects(S,x){if(!(S instanceof t))throw new TypeError("a Range is required");return this.set.some(I=>_(I,x)&&S.set.some(A=>_(A,x)&&I.every(N=>A.every(O=>N.intersects(O,x)))))}test(S){if(!S)return!1;if("string"==typeof S)try{S=new a(S,this.options)}catch{return!1}for(let x=0;x=this.max){const o=this.map.keys().next().value;this.delete(o)}this.map.set(n,i)}return this}})}(),i=new n,r=oV(),o=function Oft(){if(dye)return wV;dye=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(u,d){if(d=n(d),u instanceof t){if(u.loose===!!d.loose)return u;u=u.value}u=u.trim().split(/\s+/).join(" "),s("comparator",u,d),this.options=d,this.loose=!!d.loose,this.parse(u),this.value=this.semver===e?"":this.operator+this.semver.version,s("comp",this)}parse(u){const f=u.match(this.options.loose?i[r.COMPARATORLOOSE]:i[r.COMPARATOR]);if(!f)throw new TypeError(`Invalid comparator: ${u}`);this.operator=void 0!==f[1]?f[1]:"","="===this.operator&&(this.operator=""),this.semver=f[2]?new a(f[2],this.options.loose):e}toString(){return this.value}test(u){if(s("Comparator.test",u,this.options.loose),this.semver===e||u===e)return!0;if("string"==typeof u)try{u=new a(u,this.options)}catch{return!1}return o(u,this.operator,this.semver,this.options)}intersects(u,d){if(!(u instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(u.value,d).test(this.value):""===u.operator?""===u.value||new l(this.value,d).test(u.semver):!((d=n(d)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===u.value)||!d.includePrerelease&&(this.value.startsWith("<0.0.0")||u.value.startsWith("<0.0.0"))||!(this.operator.startsWith(">")&&u.operator.startsWith(">")||this.operator.startsWith("<")&&u.operator.startsWith("<")||this.semver.version===u.semver.version&&this.operator.includes("=")&&u.operator.includes("=")||o(this.semver,"<",u.semver,d)&&this.operator.startsWith(">")&&u.operator.startsWith("<")||o(this.semver,">",u.semver,d)&&this.operator.startsWith("<")&&u.operator.startsWith(">")))}}wV=t;const n=oV(),{safeRe:i,t:r}=cV(),o=function kft(){if(uye)return bV;uye=1;const e=function Tft(){if(rye)return pV;rye=1;const e=py();return pV=(n,i,r)=>0===e(n,i,r)}(),t=function xft(){if(oye)return gV;oye=1;const e=py();return gV=(n,i,r)=>0!==e(n,i,r)}(),n=function Aft(){if(sye)return mV;sye=1;const e=py();return mV=(n,i,r)=>e(n,i,r)>0}(),i=function Mft(){if(aye)return _V;aye=1;const e=py();return _V=(n,i,r)=>e(n,i,r)>=0}(),r=function Nft(){if(lye)return yV;lye=1;const e=py();return yV=(n,i,r)=>e(n,i,r)<0}(),o=function Ift(){if(cye)return vV;cye=1;const e=py();return vV=(n,i,r)=>e(n,i,r)<=0}();return bV=(a,l,c,u)=>{switch(l){case"===":return"object"==typeof a&&(a=a.version),"object"==typeof c&&(c=c.version),a===c;case"!==":return"object"==typeof a&&(a=a.version),"object"==typeof c&&(c=c.version),a!==c;case"":case"=":case"==":return e(a,c,u);case"!=":return t(a,c,u);case">":return n(a,c,u);case">=":return i(a,c,u);case"<":return r(a,c,u);case"<=":return o(a,c,u);default:throw new TypeError(`Invalid operator: ${l}`)}}}(),s=vN(),a=fV(),l=hye();return wV}(),s=vN(),a=fV(),{safeRe:l,t:c,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=cV(),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:p}=aV(),g=T=>"<0.0.0-0"===T.value,m=T=>""===T.value,_=(T,S)=>{let x=!0;const I=T.slice();let A=I.pop();for(;x&&I.length;)x=I.every(N=>A.intersects(N,S)),A=I.pop();return x},y=(T,S)=>(s("comp",T,S),T=C(T,S),s("caret",T),T=b(T,S),s("tildes",T),T=D(T,S),s("xrange",T),T=k(T,S),s("stars",T),T),v=T=>!T||"x"===T.toLowerCase()||"*"===T,b=(T,S)=>T.trim().split(/\s+/).map(x=>w(x,S)).join(" "),w=(T,S)=>T.replace(S.loose?l[c.TILDELOOSE]:l[c.TILDE],(I,A,N,O,$)=>{let B;return s("tilde",T,I,A,N,O,$),v(A)?B="":v(N)?B=`>=${A}.0.0 <${+A+1}.0.0-0`:v(O)?B=`>=${A}.${N}.0 <${A}.${+N+1}.0-0`:$?(s("replaceTilde pr",$),B=`>=${A}.${N}.${O}-${$} <${A}.${+N+1}.0-0`):B=`>=${A}.${N}.${O} <${A}.${+N+1}.0-0`,s("tilde return",B),B}),C=(T,S)=>T.trim().split(/\s+/).map(x=>E(x,S)).join(" "),E=(T,S)=>{s("caret",T,S);const I=S.includePrerelease?"-0":"";return T.replace(S.loose?l[c.CARETLOOSE]:l[c.CARET],(A,N,O,$,B)=>{let V;return s("caret",T,A,N,O,$,B),v(N)?V="":v(O)?V=`>=${N}.0.0${I} <${+N+1}.0.0-0`:v($)?V="0"===N?`>=${N}.${O}.0${I} <${N}.${+O+1}.0-0`:`>=${N}.${O}.0${I} <${+N+1}.0.0-0`:B?(s("replaceCaret pr",B),V="0"===N?"0"===O?`>=${N}.${O}.${$}-${B} <${N}.${O}.${+$+1}-0`:`>=${N}.${O}.${$}-${B} <${N}.${+O+1}.0-0`:`>=${N}.${O}.${$}-${B} <${+N+1}.0.0-0`):(s("no pr"),V="0"===N?"0"===O?`>=${N}.${O}.${$}${I} <${N}.${O}.${+$+1}-0`:`>=${N}.${O}.${$}${I} <${N}.${+O+1}.0-0`:`>=${N}.${O}.${$} <${+N+1}.0.0-0`),s("caret return",V),V})},D=(T,S)=>(s("replaceXRanges",T,S),T.split(/\s+/).map(x=>M(x,S)).join(" ")),M=(T,S)=>(T=T.trim()).replace(S.loose?l[c.XRANGELOOSE]:l[c.XRANGE],(I,A,N,O,$,B)=>{s("xRange",T,I,A,N,O,$,B);const V=v(N),j=V||v(O),H=j||v($);return"="===A&&H&&(A=""),B=S.includePrerelease?"-0":"",V?I=">"===A||"<"===A?"<0.0.0-0":"*":A&&H?(j&&(O=0),$=0,">"===A?(A=">=",j?(N=+N+1,O=0,$=0):(O=+O+1,$=0)):"<="===A&&(A="<",j?N=+N+1:O=+O+1),"<"===A&&(B="-0"),I=`${A+N}.${O}.${$}${B}`):j?I=`>=${N}.0.0${B} <${+N+1}.0.0-0`:H&&(I=`>=${N}.${O}.0${B} <${N}.${+O+1}.0-0`),s("xRange return",I),I}),k=(T,S)=>(s("replaceStars",T,S),T.trim().replace(l[c.STAR],"")),R=(T,S)=>(s("replaceGTE0",T,S),T.trim().replace(l[S.includePrerelease?c.GTE0PRE:c.GTE0],"")),F=T=>(S,x,I,A,N,O,$,B,V,j,H,oe)=>`${x=v(I)?"":v(A)?`>=${I}.0.0${T?"-0":""}`:v(N)?`>=${I}.${A}.0${T?"-0":""}`:O?`>=${x}`:`>=${x}${T?"-0":""}`} ${B=v(V)?"":v(j)?`<${+V+1}.0.0-0`:v(H)?`<${V}.${+j+1}.0-0`:oe?`<=${V}.${j}.${H}-${oe}`:T?`<${V}.${j}.${+H+1}-0`:`<=${B}`}`.trim(),P=(T,S,x)=>{for(let I=0;I0){const A=T[I].semver;if(A.major===S.major&&A.minor===S.minor&&A.patch===S.patch)return!0}return!1}return!0};return EV}var gye=Cft(function Rft(){if(pye)return CV;pye=1;const e=hye();return CV=(n,i,r)=>{try{i=new e(i,r)}catch{return!1}return i.test(n)}}()),Lft='.vega-embed {\n position: relative;\n display: inline-block;\n box-sizing: border-box;\n}\n.vega-embed.has-actions {\n padding-right: 38px;\n}\n.vega-embed details:not([open]) > :not(summary) {\n display: none !important;\n}\n.vega-embed summary {\n list-style: none;\n position: absolute;\n top: 0;\n right: 0;\n padding: 6px;\n z-index: 1000;\n background: white;\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);\n color: #1b1e23;\n border: 1px solid #aaa;\n border-radius: 999px;\n opacity: 0.2;\n transition: opacity 0.4s ease-in;\n cursor: pointer;\n line-height: 0px;\n}\n.vega-embed summary::-webkit-details-marker {\n display: none;\n}\n.vega-embed summary:active {\n box-shadow: #aaa 0px 0px 0px 1px inset;\n}\n.vega-embed summary svg {\n width: 14px;\n height: 14px;\n}\n.vega-embed details[open] summary {\n opacity: 0.7;\n}\n.vega-embed:hover summary, .vega-embed:focus-within summary {\n opacity: 1 !important;\n transition: opacity 0.2s ease;\n}\n.vega-embed .vega-actions {\n position: absolute;\n z-index: 1001;\n top: 35px;\n right: -9px;\n display: flex;\n flex-direction: column;\n padding-bottom: 8px;\n padding-top: 8px;\n border-radius: 4px;\n box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);\n border: 1px solid #d9d9d9;\n background: white;\n animation-duration: 0.15s;\n animation-name: scale-in;\n animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);\n text-align: left;\n}\n.vega-embed .vega-actions a {\n padding: 8px 16px;\n font-family: sans-serif;\n font-size: 14px;\n font-weight: 600;\n white-space: nowrap;\n color: #434a56;\n text-decoration: none;\n}\n.vega-embed .vega-actions a:hover, .vega-embed .vega-actions a:focus {\n background-color: #f7f7f9;\n color: black;\n}\n.vega-embed .vega-actions::before, .vega-embed .vega-actions::after {\n content: "";\n display: inline-block;\n position: absolute;\n}\n.vega-embed .vega-actions::before {\n left: auto;\n right: 14px;\n top: -16px;\n border: 8px solid rgba(0, 0, 0, 0);\n border-bottom-color: #d9d9d9;\n}\n.vega-embed .vega-actions::after {\n left: auto;\n right: 15px;\n top: -14px;\n border: 7px solid rgba(0, 0, 0, 0);\n border-bottom-color: #fff;\n}\n.vega-embed .chart-wrapper.fit-x {\n width: 100%;\n}\n.vega-embed .chart-wrapper.fit-y {\n height: 100%;\n}\n\n.vega-embed-wrapper {\n max-width: 100%;\n overflow: auto;\n padding-right: 14px;\n}\n\n@keyframes scale-in {\n from {\n opacity: 0;\n transform: scale(0.6);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n';function mye(e,...t){for(const n of t)$ft(e,n);return e}function $ft(e,t){for(const n of Object.keys(t))Tm(e,n,t[n],!0)}const pc=f2;let yw=h2;const _ye=typeof window<"u"?window:void 0;void 0===yw&&_ye?.vl?.compile&&(yw=_ye.vl);const aht={export:{svg:!0,png:!0},source:!0,compiled:!0,editor:!0},lht={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"},vw={vega:"Vega","vega-lite":"Vega-Lite"},bN={vega:pc.version,"vega-lite":yw?yw.version:"not available"},cht={vega:e=>e,"vega-lite":(e,t)=>yw.compile(e,{config:t}).spec},uht='\n\n \n \n \n',dht="chart-wrapper";function yye(e,t,n,i){const r=`${t}
`,o=`
${n}`,s=window.open("");s.document.write(r+e+o),s.document.title=`${vw[i]} JSON Source`}function vye(e){return!(!e||!("load"in e))}function bye(e){return vye(e)?e:pc.loader(e)}function gy(e,t){return DV.apply(this,arguments)}function DV(){return DV=qn(function*(e,t,n={}){let i,r;Ce(t)?(r=bye(n.loader),i=JSON.parse(yield r.load(t))):i=t;const o=function pht(e){const t=e.usermeta?.embedOptions??{};return Ce(t.defaultStyle)&&(t.defaultStyle=!1),t}(i),s=o.loader;(!r||s)&&(r=bye(n.loader??s));const a=yield wye(o,r),l=yield wye(n,r),c={...mye(l,a),config:Sm(l.config??{},a.config??{})};return yield function mht(e,t){return TV.apply(this,arguments)}(e,i,c,r)}),DV.apply(this,arguments)}function wye(e,t){return SV.apply(this,arguments)}function SV(){return(SV=qn(function*(e,t){const n=Ce(e.config)?JSON.parse(yield t.load(e.config)):e.config??{},i=Ce(e.patch)?JSON.parse(yield t.load(e.patch)):e.patch;return{...e,...i?{patch:i}:{},...n?{config:n}:{}}})).apply(this,arguments)}function TV(){return TV=qn(function*(e,t,n={},i){const r=n.theme?Sm(p2[n.theme],n.config??{}):n.config,o=td(n.actions)?n.actions:mye({},aht,n.actions??{}),s={...lht,...n.i18n},a=n.renderer??"canvas",l=n.logLevel??pc.Warn,c=n.downloadFileName??"visualization",u="string"==typeof e?document.querySelector(e):e;if(!u)throw new Error(`${e} does not exist`);if(!1!==n.defaultStyle){const w="vega-embed-style",{root:C,rootContainer:E}=function ght(e){const t=e.getRootNode?e.getRootNode():document;return t instanceof ShadowRoot?{root:t,rootContainer:t}:{root:document,rootContainer:document.head??document.body}}(u);if(!C.getElementById(w)){const D=document.createElement("style");D.id=w,D.innerHTML=void 0===n.defaultStyle||!0===n.defaultStyle?Lft.toString():n.defaultStyle,E.appendChild(D)}}const d=function hht(e,t){if(e.$schema){const n=w_e(e.$schema);t&&t!==n.library&&console.warn(`The given visualization spec is written in ${vw[n.library]}, but mode argument sets ${vw[t]??t}.`);const i=n.library;return gye(bN[i],`^${n.version.slice(1)}`)||console.warn(`The input spec uses ${vw[i]} ${n.version}, but the current version of ${vw[i]} is v${bN[i]}.`),i}return"mark"in e||"encoding"in e||"layer"in e||"hconcat"in e||"vconcat"in e||"facet"in e||"repeat"in e?"vega-lite":"marks"in e||"signals"in e||"scales"in e||"axes"in e?"vega":t??"vega"}(t,n.mode);let f=cht[d](t,r);if("vega-lite"===d&&f.$schema){const w=w_e(f.$schema);gye(bN.vega,`^${w.version.slice(1)}`)||console.warn(`The compiled spec uses Vega ${w.version}, but current version is v${bN.vega}.`)}u.classList.add("vega-embed"),o&&u.classList.add("has-actions"),u.innerHTML="";let h=u;if(o){const w=document.createElement("div");w.classList.add(dht),u.appendChild(w),h=w}const p=n.patch;if(p&&(f=p instanceof Function?p(f):mN(f,p,!0,!1).newDocument),n.formatLocale&&pc.formatLocale(n.formatLocale),n.timeFormatLocale&&pc.timeFormatLocale(n.timeFormatLocale),n.expressionFunctions)for(const w in n.expressionFunctions){const C=n.expressionFunctions[w];"fn"in C?pc.expressionFunction(w,C.fn,C.visitor):C instanceof Function&&pc.expressionFunction(w,C)}const{ast:g}=n,m=pc.parse(f,"vega-lite"===d?{}:r,{ast:g}),_=new(n.viewClass||pc.View)(m,{loader:i,logLevel:l,renderer:a,...g?{expr:pc.expressionInterpreter??n.expr??mnt}:{}});if(_.addSignalListener("autosize",(w,C)=>{const{type:E}=C;"fit-x"==E?(h.classList.add("fit-x"),h.classList.remove("fit-y")):"fit-y"==E?(h.classList.remove("fit-x"),h.classList.add("fit-y")):"fit"==E?h.classList.add("fit-x","fit-y"):h.classList.remove("fit-x","fit-y")}),!1!==n.tooltip){const{loader:w,tooltip:C}=n,E=w&&!vye(w)?w?.baseURL:void 0,D=function fht(e){return"function"==typeof e}(C)?C:new G_e({baseURL:E,...!0===C?{}:C}).call;_.tooltip(D)}let v,{hover:y}=n;if(void 0===y&&(y="vega"===d),y){const{hoverSet:w,updateSet:C}="boolean"==typeof y?{}:y;_.hover(w,C)}if(n&&(null!=n.width&&_.width(n.width),null!=n.height&&_.height(n.height),null!=n.padding&&_.padding(n.padding)),yield _.initialize(h,n.bind).runAsync(),!1!==o){let w=u;if(!1!==n.defaultStyle||n.forceActionsMenu){const E=document.createElement("details");E.title=s.CLICK_TO_VIEW_ACTIONS,u.append(E),w=E;const D=document.createElement("summary");D.innerHTML=uht,E.append(D),v=M=>{E.contains(M.target)||E.removeAttribute("open")},document.addEventListener("click",v)}const C=document.createElement("div");if(w.append(C),C.classList.add("vega-actions"),!0===o||!1!==o.export)for(const E of["svg","png"])if(!0===o||!0===o.export||o.export[E]){const D=s[`${E.toUpperCase()}_ACTION`],M=document.createElement("a"),k=we(n.scaleFactor)?n.scaleFactor[E]:n.scaleFactor;M.text=D,M.href="#",M.target="_blank",M.download=`${c}.${E}`,M.addEventListener("mousedown",function(){var R=qn(function*(F){F.preventDefault();const P=yield _.toImageURL(E,k);this.href=P});return function(F){return R.apply(this,arguments)}}()),C.append(M)}if(!0===o||!1!==o.source){const E=document.createElement("a");E.text=s.SOURCE_ACTION,E.href="#",E.addEventListener("click",function(D){yye(vP(t),n.sourceHeader??"",n.sourceFooter??"",d),D.preventDefault()}),C.append(E)}if("vega-lite"===d&&(!0===o||!1!==o.compiled)){const E=document.createElement("a");E.text=s.COMPILED_ACTION,E.href="#",E.addEventListener("click",function(D){yye(vP(f),n.sourceHeader??"",n.sourceFooter??"","vega"),D.preventDefault()}),C.append(E)}if(!0===o||!1!==o.editor){const E=n.editorUrl??"https://vega.github.io/editor/",D=document.createElement("a");D.text=s.EDITOR_ACTION,D.href="#",D.addEventListener("click",function(M){(function Pft(e,t,n){const i=e.open(t),{origin:s}=new URL(t);let a=40;e.addEventListener("message",function l(u){u.source===i&&(a=0,e.removeEventListener("message",l,!1))},!1),setTimeout(function c(){a<=0||(i.postMessage(n,s),setTimeout(c,250),a-=1)},250)})(window,E,{config:r,mode:p?"vega":d,renderer:a,spec:vP(p?f:t)}),M.preventDefault()}),C.append(D)}}return{view:_,spec:t,vgSpec:f,finalize:function b(){v&&document.removeEventListener("click",v),_.finalize()},embedOptions:n}}),TV.apply(this,arguments)}class wN{}class EN{}class Ks{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?"string"==typeof t?this.lazyInit=()=>{this.headers=new Map,t.split("\n").forEach(n=>{const i=n.indexOf(":");if(i>0){const r=n.slice(0,i),o=r.toLowerCase(),s=n.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((n,i)=>{this.setHeaderEntries(i,n)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([n,i])=>{this.setHeaderEntries(n,i)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const n=this.headers.get(t.toLowerCase());return n&&n.length>0?n[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,n){return this.clone({name:t,value:n,op:"a"})}set(t,n){return this.clone({name:t,value:n,op:"s"})}delete(t,n){return this.clone({name:t,value:n,op:"d"})}maybeSetNormalizedName(t,n){this.normalizedNames.has(n)||this.normalizedNames.set(n,t)}init(){this.lazyInit&&(this.lazyInit instanceof Ks?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(n=>{this.headers.set(n,t.headers.get(n)),this.normalizedNames.set(n,t.normalizedNames.get(n))})}clone(t){const n=new Ks;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof Ks?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([t]),n}applyUpdate(t){const n=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(t.name,n);const r=("a"===t.op?this.headers.get(n):void 0)||[];r.push(...i),this.headers.set(n,r);break;case"d":const o=t.value;if(o){let s=this.headers.get(n);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(n),this.normalizedNames.delete(n)):this.headers.set(n,s)}else this.headers.delete(n),this.normalizedNames.delete(n)}}setHeaderEntries(t,n){const i=(Array.isArray(n)?n:[n]).map(o=>o.toString()),r=t.toLowerCase();this.headers.set(r,i),this.maybeSetNormalizedName(t,r)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(n=>t(this.normalizedNames.get(n),this.headers.get(n)))}}class _ht{encodeKey(t){return Eye(t)}encodeValue(t){return Eye(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const vht=/%(\d[a-f0-9])/gi,bht={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Eye(e){return encodeURIComponent(e).replace(vht,(t,n)=>bht[n]??t)}function CN(e){return`${e}`}class uf{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new _ht,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function yht(e,t){const n=new Map;return e.length>0&&e.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,o)),t.decodeValue(r.slice(o+1))],l=n.get(s)||[];l.push(a),n.set(s,l)}),n}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(n=>{const i=t.fromObject[n],r=Array.isArray(i)?i.map(CN):[CN(i)];this.map.set(n,r)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const n=this.map.get(t);return n?n[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,n){return this.clone({param:t,value:n,op:"a"})}appendAll(t){const n=[];return Object.keys(t).forEach(i=>{const r=t[i];Array.isArray(r)?r.forEach(o=>{n.push({param:i,value:o,op:"a"})}):n.push({param:i,value:r,op:"a"})}),this.clone(n)}set(t,n){return this.clone({param:t,value:n,op:"s"})}delete(t,n){return this.clone({param:t,value:n,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const n=this.encoder.encodeKey(t);return this.map.get(t).map(i=>n+"="+this.encoder.encodeValue(i)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const n=new uf({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat(t),n}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const n=("a"===t.op?this.map.get(t.param):void 0)||[];n.push(CN(t.value)),this.map.set(t.param,n);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let i=this.map.get(t.param)||[];const r=i.indexOf(CN(t.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(t.param,i):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}class wht{constructor(){this.map=new Map}set(t,n){return this.map.set(t,n),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}}function Cye(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer}function Dye(e){return typeof Blob<"u"&&e instanceof Blob}function Sye(e){return typeof FormData<"u"&&e instanceof FormData}class bw{constructor(t,n,i,r){let o;if(this.url=n,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function Eht(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),this.headers??=new Ks,this.context??=new wht,this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=n;else{const a=n.indexOf("?");this.urlWithParams=n+(-1===a?"?":af.set(h,t.setHeaders[h]),c)),t.setParams&&(u=Object.keys(t.setParams).reduce((f,h)=>f.set(h,t.setParams[h]),u)),new bw(n,i,s,{params:u,headers:c,context:d,reportProgress:l,responseType:r,withCredentials:a,transferCache:o})}}var df=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}(df||{});class xV{constructor(t,n=200,i="OK"){this.headers=t.headers||new Ks,this.status=void 0!==t.status?t.status:n,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class DN extends xV{constructor(t={}){super(t),this.type=df.ResponseHeader}clone(t={}){return new DN({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class Op extends xV{constructor(t={}){super(t),this.type=df.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new Op({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class my extends xV{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function AV(e,t){return{body:t,headers:e.headers,context:e.context,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials,transferCache:e.transferCache}}let ww=(()=>{class e{constructor(n){this.handler=n}request(n,i,r={}){let o;if(n instanceof bw)o=n;else{let l,c;l=r.headers instanceof Ks?r.headers:new Ks(r.headers),r.params&&(c=r.params instanceof uf?r.params:new uf({fromObject:r.params})),o=new bw(n,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache})}const s=Ge(o).pipe(Kg(l=>this.handler.handle(l)));if(n instanceof bw||"events"===r.observe)return s;const a=s.pipe(Wn(l=>l instanceof Op));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(at(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(at(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(at(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(at(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(n,i={}){return this.request("DELETE",n,i)}get(n,i={}){return this.request("GET",n,i)}head(n,i={}){return this.request("HEAD",n,i)}jsonp(n,i){return this.request("JSONP",n,{params:(new uf).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,i={}){return this.request("OPTIONS",n,i)}patch(n,i,r={}){return this.request("PATCH",n,AV(r,i))}post(n,i,r={}){return this.request("POST",n,AV(r,i))}put(n,i,r={}){return this.request("PUT",n,AV(r,i))}static{this.\u0275fac=function(i){return new(i||e)(Ne(wN))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();const Tht=/^\)\]\}',?\n/;function xye(e){if(e.url)return e.url;const t="X-Request-URL".toLocaleLowerCase();return e.headers.get(t)}let MV=(()=>{class e{constructor(){this.fetchImpl=L(Aht,{optional:!0})?.fetch??((...n)=>globalThis.fetch(...n)),this.ngZone=L(ct)}handle(n){return new cn(i=>{const r=new AbortController;return this.doRequest(n,r.signal,i).then(NV,o=>i.error(new my({error:o}))),()=>r.abort()})}doRequest(n,i,r){var o=this;return qn(function*(){const s=o.createRequestInit(n);let a;try{const p=o.ngZone.runOutsideAngular(()=>o.fetchImpl(n.urlWithParams,{signal:i,...s}));(function Mht(e){e.then(NV,NV)})(p),r.next({type:df.Sent}),a=yield p}catch(p){return void r.error(new my({error:p,status:p.status??0,statusText:p.statusText,url:n.urlWithParams,headers:p.headers}))}const l=new Ks(a.headers),c=a.statusText,u=xye(a)??n.urlWithParams;let d=a.status,f=null;if(n.reportProgress&&r.next(new DN({headers:l,status:d,statusText:c,url:u})),a.body){const p=a.headers.get("content-length"),g=[],m=a.body.getReader();let y,v,_=0;const b=typeof Zone<"u"&&Zone.current;yield o.ngZone.runOutsideAngular(qn(function*(){for(;;){const{done:C,value:E}=yield m.read();if(C)break;if(g.push(E),_+=E.length,n.reportProgress){v="text"===n.responseType?(v??"")+(y??=new TextDecoder).decode(E,{stream:!0}):void 0;const D=()=>r.next({type:df.DownloadProgress,total:p?+p:void 0,loaded:_,partialText:v});b?b.run(D):D()}}}));const w=o.concatChunks(g,_);try{const C=a.headers.get("Content-Type")??"";f=o.parseBody(n,w,C)}catch(C){return void r.error(new my({error:C,headers:new Ks(a.headers),status:a.status,statusText:a.statusText,url:xye(a)??n.urlWithParams}))}}0===d&&(d=f?200:0),d>=200&&d<300?(r.next(new Op({body:f,headers:l,status:d,statusText:c,url:u})),r.complete()):r.error(new my({error:f,headers:l,status:d,statusText:c,url:u}))})()}parseBody(n,i,r){switch(n.responseType){case"json":const o=(new TextDecoder).decode(i).replace(Tht,"");return""===o?null:JSON.parse(o);case"text":return(new TextDecoder).decode(i);case"blob":return new Blob([i],{type:r});case"arraybuffer":return i.buffer}}createRequestInit(n){const i={},r=n.withCredentials?"include":void 0;if(n.headers.forEach((o,s)=>i[o]=s.join(",")),n.headers.has("Accept")||(i.Accept="application/json, text/plain, */*"),!n.headers.has("Content-Type")){const o=n.detectContentTypeHeader();null!==o&&(i["Content-Type"]=o)}return{body:n.serializeBody(),method:n.method,headers:i,credentials:r}}concatChunks(n,i){const r=new Uint8Array(i);let o=0;for(const s of n)r.set(s,o),o+=s.length;return r}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();class Aht{}function NV(){}function Aye(e,t){return t(e)}function Nht(e,t){return(n,i)=>t.intercept(n,{handle:r=>e(r,i)})}const kht=new _e(""),Ew=new _e(""),Mye=new _e(""),Nye=new _e("",{providedIn:"root",factory:()=>!0});function Oht(){let e=null;return(t,n)=>{null===e&&(e=(L(kht,{optional:!0})??[]).reduceRight(Nht,Aye));const i=L(Sc);if(L(Nye)){const o=i.add();return e(t,n).pipe(av(()=>i.remove(o)))}return e(t,n)}}let Iye=(()=>{class e extends wN{constructor(n,i){super(),this.backend=n,this.injector=i,this.chain=null,this.pendingTasks=L(Sc),this.contributeToStability=L(Nye)}handle(n){if(null===this.chain){const i=Array.from(new Set([...this.injector.get(Ew),...this.injector.get(Mye,[])]));this.chain=i.reduceRight((r,o)=>function Iht(e,t,n){return(i,r)=>ol(n,()=>t(i,o=>e(o,r)))}(r,o,this.injector),Aye)}if(this.contributeToStability){const i=this.pendingTasks.add();return this.chain(n,r=>this.backend.handle(r)).pipe(av(()=>this.pendingTasks.remove(i)))}return this.chain(n,i=>this.backend.handle(i))}static{this.\u0275fac=function(i){return new(i||e)(Ne(EN),Ne(ji))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();const $ht=/^\)\]\}',?\n/;let Oye=(()=>{class e{constructor(n){this.xhrFactory=n}handle(n){if("JSONP"===n.method)throw new q(-2800,!1);const i=this.xhrFactory;return(i.\u0275loadImpl?si(i.\u0275loadImpl()):Ge(null)).pipe(Es(()=>new cn(o=>{const s=i.build();if(s.open(n.method,n.urlWithParams),n.withCredentials&&(s.withCredentials=!0),n.headers.forEach((g,m)=>s.setRequestHeader(g,m.join(","))),n.headers.has("Accept")||s.setRequestHeader("Accept","application/json, text/plain, */*"),!n.headers.has("Content-Type")){const g=n.detectContentTypeHeader();null!==g&&s.setRequestHeader("Content-Type",g)}if(n.responseType){const g=n.responseType.toLowerCase();s.responseType="json"!==g?g:"text"}const a=n.serializeBody();let l=null;const c=()=>{if(null!==l)return l;const g=s.statusText||"OK",m=new Ks(s.getAllResponseHeaders()),_=function Bht(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(s)||n.url;return l=new DN({headers:m,status:s.status,statusText:g,url:_}),l},u=()=>{let{headers:g,status:m,statusText:_,url:y}=c(),v=null;204!==m&&(v=typeof s.response>"u"?s.responseText:s.response),0===m&&(m=v?200:0);let b=m>=200&&m<300;if("json"===n.responseType&&"string"==typeof v){const w=v;v=v.replace($ht,"");try{v=""!==v?JSON.parse(v):null}catch(C){v=w,b&&(b=!1,v={error:C,text:v})}}b?(o.next(new Op({body:v,headers:g,status:m,statusText:_,url:y||void 0})),o.complete()):o.error(new my({error:v,headers:g,status:m,statusText:_,url:y||void 0}))},d=g=>{const{url:m}=c(),_=new my({error:g,status:s.status||0,statusText:s.statusText||"Unknown Error",url:m||void 0});o.error(_)};let f=!1;const h=g=>{f||(o.next(c()),f=!0);let m={type:df.DownloadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),"text"===n.responseType&&s.responseText&&(m.partialText=s.responseText),o.next(m)},p=g=>{let m={type:df.UploadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),o.next(m)};return s.addEventListener("load",u),s.addEventListener("error",d),s.addEventListener("timeout",d),s.addEventListener("abort",d),n.reportProgress&&(s.addEventListener("progress",h),null!==a&&s.upload&&s.upload.addEventListener("progress",p)),s.send(a),o.next({type:df.Sent}),()=>{s.removeEventListener("error",d),s.removeEventListener("abort",d),s.removeEventListener("load",u),s.removeEventListener("timeout",d),n.reportProgress&&(s.removeEventListener("progress",h),null!==a&&s.upload&&s.upload.removeEventListener("progress",p)),s.readyState!==s.DONE&&s.abort()}})))}static{this.\u0275fac=function(i){return new(i||e)(Ne(CK))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();const IV=new _e(""),Rye=new _e("",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),Fye=new _e("",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class Pye{}let Uht=(()=>{class e{constructor(n,i,r){this.doc=n,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=hK(n,this.cookieName),this.lastCookieString=n),this.lastToken}static{this.\u0275fac=function(i){return new(i||e)(Ne(Ln),Ne(Tc),Ne(Rye))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();function zht(e,t){const n=e.url.toLowerCase();if(!L(IV)||"GET"===e.method||"HEAD"===e.method||n.startsWith("http://")||n.startsWith("https://"))return t(e);const i=L(Pye).getToken(),r=L(Fye);return null!=i&&!e.headers.has(r)&&(e=e.clone({headers:e.headers.set(r,i)})),t(e)}var ff=function(e){return e[e.Interceptors=0]="Interceptors",e[e.LegacyInterceptors=1]="LegacyInterceptors",e[e.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",e[e.NoXsrfProtection=3]="NoXsrfProtection",e[e.JsonpSupport=4]="JsonpSupport",e[e.RequestsMadeViaParent=5]="RequestsMadeViaParent",e[e.Fetch=6]="Fetch",e}(ff||{});function Rp(e,t){return{\u0275kind:e,\u0275providers:t}}function Hht(...e){const t=[ww,Oye,Iye,{provide:wN,useExisting:Iye},{provide:EN,useFactory:()=>L(MV,{optional:!0})??L(Oye)},{provide:Ew,useValue:zht,multi:!0},{provide:IV,useValue:!0},{provide:Pye,useClass:Uht}];for(const n of e)t.push(...n.\u0275providers);return function Ly(e){return{\u0275providers:e}}(t)}const Lye=new _e(""),ept=["map"],tpt=e=>({"font-style":e});function npt(e,t){if(1&e&&(U(0,"i"),X(1),z()),2&e){const n=Qe();re(),kr("in "+n.selectedYear)}}function ipt(e,t){1&e&&(U(0,"span"),X(1),z()),2&e&&(re(),kr(" based on the most recent available data"))}function rpt(e,t){if(1&e&&(U(0,"option",17),X(1),z()),2&e){const n=t.$implicit;Ae("ngValue",n.id),re(),kr(n.name)}}function opt(e,t){1&e&&(U(0,"div",21),Ke(1,"img",22),U(2,"p",23),X(3,"You explored unresearched areas, no data available."),z()())}let spt=(()=>{class e{constructor(n,i,r){this.http=n,this.apparelService=i,this.renderer=r,this.title="The top 100 apparel companies'",this.apparelTop100=[],this.suppliers=[],this.selectedYear="latest",this.selectedCompany=0,this.apparelTop100=i.getCompanies()}ngOnInit(){this.company=this.apparelService.getCompany(this.selectedCompany),this.title=0!=this.company.id?this.company.name:"The top 100 apparel companies'",this.updateChart()}ngAfterViewInit(){}updateChart(){let n="https://wikirate.org/Commons+Supplied_By+RelationshipAnswer/answer_list.json?filter[company_group]=Apparel%20100%20Companies&filter[year]="+this.selectedYear+"&limit=0";0!=this.company.id&&(n="https://wikirate.org/Commons+Supplied_By+RelationshipAnswer/answer_list.json?filter[subject_company_id]="+this.company.id+"&filter[year]="+this.selectedYear+"&limit=0"),this.suppliers=[],null!=this.suppliers_map&&this.renderer.removeChild(this.mapElement.nativeElement,this.suppliers_map),this.http.get(n).subscribe(i=>{this.suppliers=i,this.suppliers.length>0&&(this.suppliers_map=this.renderer.createElement("div"),this.suppliers_map.id="supplier-map",this.renderer.appendChild(this.mapElement.nativeElement,this.suppliers_map),gy("div#supplier-map",{$schema:"https://vega.github.io/schema/vega/v5.json",description:"Number of Apparel Top 100 Suppliers per Country",width:800,height:520,signals:[{name:"type",value:"equalEarth"},{name:"scale",value:200},{name:"rotate0",value:-15},{name:"rotate1",value:0},{name:"rotate2",value:0},{name:"center0",value:0},{name:"center1",value:0},{name:"translate0",update:"width / 2"},{name:"translate1",update:"height / 2"},{name:"borderWidth",value:2},{name:"hover",value:null,on:[{events:"@circles:mouseover",update:"datum"},{events:"@circles:mouseout",update:"null"}]},{name:"title",value:"Number of Apparel Top 100 Suppliers per Country",update:"hover ? hover.country + ' (' + hover.companies + ')' : 'Number of Apparel Top 100 Suppliers per Country'"},{name:"cell_stroke",value:null,on:[{events:"dblclick",update:"cell_stroke ? null : 'brown'"},{events:"mousedown!",update:"cell_stroke"}]}],data:[{name:"world",url:"assets/world-110m.json",format:{type:"topojson",feature:"countries"},transform:[{type:"geopath",projection:"projection"}]},{name:"suppliers_country",url:"../../assets/content/Core+Country+Answer.json",format:{type:"json",parse:"auto"}},{name:"suppliers",values:this.suppliers,transform:[{type:"lookup",from:"suppliers_country",key:"company",fields:["object_company"],values:["value"],as:["country"]}]},{name:"wikirate_countries",values:[{code:"AD",name:"Andorra",card_id:2917786},{code:"AE",name:"United Arab Emirates",card_id:169529},{code:"AF",name:"Afghanistan",card_id:2917789},{code:"AG",name:"Antigua and Barbuda",card_id:2917790},{code:"AI",name:"Anguilla",card_id:2917791},{code:"AL",name:"Albania",card_id:2917792},{code:"AM",name:"Armenia",card_id:2917793},{code:"AO",name:"Angola",card_id:2917794},{code:"AQ",name:"Antarctica",card_id:2917795},{code:"AR",name:"Argentina",card_id:14400},{code:"AS",name:"American Samoa",card_id:2917796},{code:"AT",name:"Austria",card_id:17233},{code:"AU",name:"Australia",card_id:14405},{code:"AW",name:"Aruba",card_id:2917797},{code:"AX",name:"\xc5land Islands",card_id:2917798},{code:"AZ",name:"Azerbaijan",card_id:2917799},{code:"BA",name:"Bosnia and Herzegovina",card_id:2917800},{code:"BB",name:"Barbados",card_id:2917801},{code:"BD",name:"Bangladesh",card_id:14386},{code:"BE",name:"Belgium",card_id:19867},{code:"BF",name:"Burkina Faso",card_id:14408},{code:"BG",name:"Bulgaria",card_id:13973},{code:"BH",name:"Bahrain",card_id:2917802},{code:"BI",name:"Burundi",card_id:2917803},{code:"BJ",name:"Benin",card_id:2917804},{code:"BL",name:"Saint Barth\xe9lemy",card_id:2917805},{code:"BM",name:"Bermuda",card_id:2917806},{code:"BN",name:"Brunei Darussalam",card_id:2917807},{code:"BO",name:"Bolivia",card_id:2917808},{code:"BQ",name:"Bonaire, Sint Eustatius and Saba",card_id:2917809},{code:"BR",name:"Brazil",card_id:12379},{code:"BS",name:"Bahamas",card_id:2917810},{code:"BT",name:"Bhutan",card_id:2917811},{code:"BV",name:"Bouvet Island",card_id:2917812},{code:"BW",name:"Botswana",card_id:2917813},{code:"BY",name:"Belarus",card_id:2917814},{code:"BZ",name:"Belize",card_id:2917815},{code:"CA",name:"Canada",card_id:14965},{code:"CC",name:"Cocos (Keeling) Islands",card_id:2917828},{code:"CD",name:"Democratic Republic of the Congo",card_id:2917829},{code:"CF",name:"Central African Republic",card_id:2917830},{code:"CG",name:"Congo",card_id:38190},{code:"CH",name:"Switzerland",card_id:15220},{code:"CI",name:"C\xf4te d'Ivoire",card_id:2917831},{code:"CK",name:"Cook Islands",card_id:2917832},{code:"CL",name:"Chile",card_id:14404},{code:"CM",name:"Cameroon",card_id:2917833},{code:"CN",name:"China",card_id:12378},{code:"CO",name:"Colombia",card_id:12320},{code:"CR",name:"Costa Rica",card_id:2917834},{code:"CU",name:"Cuba",card_id:19542},{code:"CV",name:"Cape Verde",card_id:2917835},{code:"CW",name:"Cura\xe7ao",card_id:2917836},{code:"CX",name:"Christmas Island",card_id:2917837},{code:"CY",name:"Cyprus",card_id:2917838},{code:"CZ",name:"Czech Republic",card_id:45425},{code:"DE",name:"Germany",card_id:15272},{code:"DJ",name:"Djibouti",card_id:2917839},{code:"DK",name:"Denmark",card_id:21425},{code:"DM",name:"Dominica",card_id:2917840},{code:"DO",name:"Dominican Republic",card_id:18543},{code:"DZ",name:"Algeria",card_id:2917841},{code:"EC",name:"Ecuador",card_id:2917842},{code:"EE",name:"Estonia",card_id:2917843},{code:"EG",name:"Egypt",card_id:2917844},{code:"EH",name:"Western Sahara",card_id:2917845},{code:"ER",name:"Eritrea",card_id:2917846},{code:"ES",name:"Spain",card_id:12333},{code:"ET",name:"Ethiopia",card_id:14424},{code:"FI",name:"Finland",card_id:2917847},{code:"FJ",name:"Fiji",card_id:2917848},{code:"FK",name:"Falkland Islands (Malvinas)",card_id:2917849},{code:"FM",name:"Micronesia, Federated States of",card_id:2917850},{code:"FO",name:"Faroe Islands",card_id:2917851},{code:"FR",name:"France",card_id:19365},{code:"GA",name:"Gabon",card_id:2917852},{code:"GB",name:"United Kingdom",card_id:14908},{code:"GD",name:"Grenada",card_id:2917853},{code:"GE",name:"Georgia",card_id:2917854},{code:"GF",name:"French Guiana",card_id:2917855},{code:"GG",name:"Guernsey",card_id:2917856},{code:"GH",name:"Ghana",card_id:18541},{code:"GI",name:"Gibraltar",card_id:2917857},{code:"GL",name:"Greenland",card_id:2917858},{code:"GM",name:"Gambia",card_id:2917859},{code:"GN",name:"Guinea",card_id:2917860},{code:"GP",name:"Guadeloupe",card_id:2917861},{code:"GQ",name:"Equatorial Guinea",card_id:2917862},{code:"GR",name:"Greece",card_id:34142},{code:"GS",name:"South Georgia and the South Sandwich Islands",card_id:2917863},{code:"GT",name:"Guatemala",card_id:2917864},{code:"GU",name:"Guam",card_id:2917865},{code:"GW",name:"Guinea-Bissau",card_id:2917866},{code:"GY",name:"Guyana",card_id:2917867},{code:"HK",name:"Hong Kong",card_id:2917868},{code:"HM",name:"Heard Island and McDonald Islands",card_id:2917869},{code:"HN",name:"Honduras",card_id:18094},{code:"HR",name:"Croatia",card_id:2917870},{code:"HT",name:"Haiti",card_id:2917871},{code:"HU",name:"Hungary",card_id:45424},{code:"ID",name:"Indonesia",card_id:14371},{code:"IE",name:"Ireland",card_id:14394},{code:"IL",name:"Israel",card_id:14701},{code:"IM",name:"Isle of Man",card_id:2917872},{code:"IN",name:"India",card_id:14389},{code:"IO",name:"British Indian Ocean Territory",card_id:2917873},{code:"IQ",name:"Iraq",card_id:3913},{code:"IR",name:"Iran",card_id:2917874},{code:"IS",name:"Iceland",card_id:2917875},{code:"IT",name:"Italy",card_id:16175},{code:"JE",name:"Jersey",card_id:2917876},{code:"JM",name:"Jamaica",card_id:2917877},{code:"JO",name:"Jordan",card_id:1812107},{code:"JP",name:"Japan",card_id:14387},{code:"KE",name:"Kenya",card_id:21392},{code:"KG",name:"Kyrgyzstan",card_id:2917878},{code:"KH",name:"Cambodia",card_id:13908},{code:"KI",name:"Kiribati",card_id:2917879},{code:"KM",name:"Comoros",card_id:2917880},{code:"KN",name:"Saint Kitts and Nevis",card_id:2917881},{code:"KP",name:"Korea, Democratic People's Republic of",card_id:2917882},{code:"KR",name:"Korea, Republic of",card_id:2917883},{code:"KW",name:"Kuwait",card_id:2917884},{code:"KY",name:"Cayman Islands",card_id:2917885},{code:"KZ",name:"Kazakhstan",card_id:2917886},{code:"LA",name:"Laos",card_id:2917887},{code:"LB",name:"Lebanon",card_id:2917888},{code:"LC",name:"Saint Lucia",card_id:2917889},{code:"LI",name:"Liechtenstein",card_id:2917890},{code:"LK",name:"Sri Lanka",card_id:2917891},{code:"LR",name:"Liberia",card_id:2917892},{code:"LS",name:"Lesotho",card_id:2917893},{code:"LT",name:"Lithuania",card_id:2917894},{code:"LU",name:"Luxembourg",card_id:20766},{code:"LV",name:"Latvia",card_id:2917895},{code:"LY",name:"Libya",card_id:2917896},{code:"MA",name:"Morocco",card_id:14426},{code:"MC",name:"Monaco",card_id:2917897},{code:"MD",name:"Moldova",card_id:2917898},{code:"ME",name:"Montenegro",card_id:2917899},{code:"MF",name:"Saint Martin (French part)",card_id:2917900},{code:"MG",name:"Madagascar",card_id:40709},{code:"MH",name:"Marshall Islands",card_id:2917901},{code:"MK",name:"North Macedonia",card_id:2917902},{code:"ML",name:"Mali",card_id:20033},{code:"MM",name:"Myanmar",card_id:2917903},{code:"MN",name:"Mongolia",card_id:2917904},{code:"MO",name:"Macao",card_id:2917905},{code:"MP",name:"Northern Mariana Islands",card_id:2917906},{code:"MQ",name:"Martinique",card_id:2917907},{code:"MR",name:"Mauritania",card_id:2917908},{code:"MS",name:"Montserrat",card_id:2917909},{code:"MT",name:"Malta",card_id:2917910},{code:"MU",name:"Mauritius",card_id:2917911},{code:"MV",name:"Maldives",card_id:2917912},{code:"MW",name:"Malawi",card_id:14410},{code:"MX",name:"Mexico",card_id:14403},{code:"MY",name:"Malaysia",card_id:16948},{code:"MZ",name:"Mozambique",card_id:2917913},{code:"NA",name:"Namibia",card_id:2917914},{code:"NC",name:"New Caledonia",card_id:2917915},{code:"NE",name:"Niger",card_id:2917916},{code:"NF",name:"Norfolk Island",card_id:2917917},{code:"NG",name:"Nigeria",card_id:14384},{code:"NI",name:"Nicaragua",card_id:2917918},{code:"NL",name:"Netherlands",card_id:2917919},{code:"NO",name:"Norway",card_id:2917920},{code:"NP",name:"Nepal",card_id:45091},{code:"NR",name:"Nauru",card_id:2917921},{code:"NU",name:"Niue",card_id:2917922},{code:"NZ",name:"New Zealand",card_id:2917923},{code:"OM",name:"Oman",card_id:2917924},{code:"PA",name:"Panama",card_id:2917925},{code:"PE",name:"Peru",card_id:16184},{code:"PF",name:"French Polynesia",card_id:2917926},{code:"PG",name:"Papua New Guinea",card_id:16949},{code:"PH",name:"Philippines",card_id:37238},{code:"PK",name:"Pakistan",card_id:36162},{code:"PL",name:"Poland",card_id:37189},{code:"PM",name:"Saint Pierre and Miquelon",card_id:2917927},{code:"PN",name:"Pitcairn",card_id:2917928},{code:"PR",name:"Puerto Rico",card_id:2917929},{code:"PS",name:"Palestinian Territory",card_id:2917930},{code:"PT",name:"Portugal",card_id:2917931},{code:"PW",name:"Palau",card_id:2917932},{code:"PY",name:"Paraguay",card_id:2917933},{code:"QA",name:"Qatar",card_id:168817},{code:"RE",name:"R\xe9union",card_id:2917934},{code:"RO",name:"Romania",card_id:13974},{code:"RS",name:"Serbia",card_id:2917935},{code:"RU",name:"Russia",card_id:35176},{code:"RW",name:"Rwanda",card_id:2917936},{code:"SA",name:"Saudi Arabia",card_id:43202},{code:"SB",name:"Solomon Islands",card_id:2917937},{code:"SC",name:"Seychelles",card_id:2917938},{code:"SD",name:"Sudan",card_id:14149},{code:"SE",name:"Sweden",card_id:43201},{code:"SG",name:"Singapore",card_id:2917939},{code:"SH",name:"Saint Helena, Ascension and Tristan da Cunha",card_id:2917940},{code:"SI",name:"Slovenia",card_id:20157},{code:"SJ",name:"Svalbard and Jan Mayen",card_id:2917941},{code:"SK",name:"Slovakia",card_id:2917942},{code:"SL",name:"Sierra Leone",card_id:2917943},{code:"SM",name:"San Marino",card_id:2917944},{code:"SN",name:"Senegal",card_id:15492},{code:"SO",name:"Somalia",card_id:2917945},{code:"SR",name:"Suriname",card_id:2917946},{code:"SS",name:"South Sudan",card_id:2917947},{code:"ST",name:"Sao Tome and Principe",card_id:2917948},{code:"SV",name:"El Salvador",card_id:33639},{code:"SX",name:"Sint Maarten (Dutch part)",card_id:2917949},{code:"SY",name:"Syrian Arab Republic",card_id:2917950},{code:"SZ",name:"Swaziland",card_id:2917951},{code:"TC",name:"Turks and Caicos Islands",card_id:2917952},{code:"TD",name:"Chad",card_id:2917953},{code:"TF",name:"French Southern Territories",card_id:2917954},{code:"TG",name:"Togo",card_id:2917955},{code:"TH",name:"Thailand",card_id:14214},{code:"TJ",name:"Tajikistan",card_id:2917956},{code:"TK",name:"Tokelau",card_id:2917957},{code:"TL",name:"Timor-Leste",card_id:2917958},{code:"TM",name:"Turkmenistan",card_id:2917959},{code:"TN",name:"Tunisia",card_id:2917960},{code:"TO",name:"Tonga",card_id:2917961},{code:"TR",name:"Turkey",card_id:13972},{code:"TT",name:"Trinidad and Tobago",card_id:2917962},{code:"TV",name:"Tuvalu",card_id:2917963},{code:"TW",name:"Taiwan, Province of China",card_id:2917964},{code:"TZ",name:"Tanzania",card_id:16808},{code:"UA",name:"Ukraine",card_id:2917965},{code:"UG",name:"Uganda",card_id:40396},{code:"UM",name:"United States Minor Outlying Islands",card_id:2917966},{code:"US",name:"United States",card_id:14551},{code:"UY",name:"Uruguay",card_id:2918018},{code:"UZ",name:"Uzbekistan",card_id:14412},{code:"VA",name:"Holy See (Vatican City State)",card_id:2918019},{code:"VC",name:"Saint Vincent and the Grenadines",card_id:2918020},{code:"VE",name:"Venezuela",card_id:2918021},{code:"VG",name:"British Virgin Islands",card_id:2918022},{code:"VI",name:"U.S. Virgin Islands",card_id:2918023},{code:"VN",name:"Vietnam",card_id:2918024},{code:"VU",name:"Vanuatu",card_id:2918025},{code:"WF",name:"Wallis and Futuna",card_id:2918026},{code:"WS",name:"Samoa",card_id:2918027},{code:"XK",name:"Kosovo",card_id:2918028},{code:"YE",name:"Yemen",card_id:2918029},{code:"YT",name:"Mayotte",card_id:2918030},{code:"ZA",name:"South Africa",card_id:14938},{code:"ZM",name:"Zambia",card_id:2918031},{code:"ZW",name:"Zimbabwe",card_id:2918032}]},{name:"country_codes",values:[{name:"Afghanistan","alpha-2":"AF","country-code":"004"},{name:"\xc5land Islands","alpha-2":"AX","country-code":"248"},{name:"Albania","alpha-2":"AL","country-code":"008"},{name:"Algeria","alpha-2":"DZ","country-code":"012"},{name:"American Samoa","alpha-2":"AS","country-code":"016"},{name:"Andorra","alpha-2":"AD","country-code":"020"},{name:"Angola","alpha-2":"AO","country-code":"024"},{name:"Anguilla","alpha-2":"AI","country-code":"660"},{name:"Antarctica","alpha-2":"AQ","country-code":"010"},{name:"Antigua and Barbuda","alpha-2":"AG","country-code":"028"},{name:"Argentina","alpha-2":"AR","country-code":"032"},{name:"Armenia","alpha-2":"AM","country-code":"051"},{name:"Aruba","alpha-2":"AW","country-code":"533"},{name:"Australia","alpha-2":"AU","country-code":"036"},{name:"Austria","alpha-2":"AT","country-code":"040"},{name:"Azerbaijan","alpha-2":"AZ","country-code":"031"},{name:"Bahamas","alpha-2":"BS","country-code":"044"},{name:"Bahrain","alpha-2":"BH","country-code":"048"},{name:"Bangladesh","alpha-2":"BD","country-code":"050"},{name:"Barbados","alpha-2":"BB","country-code":"052"},{name:"Belarus","alpha-2":"BY","country-code":"112"},{name:"Belgium","alpha-2":"BE","country-code":"056"},{name:"Belize","alpha-2":"BZ","country-code":"084"},{name:"Benin","alpha-2":"BJ","country-code":"204"},{name:"Bermuda","alpha-2":"BM","country-code":"060"},{name:"Bhutan","alpha-2":"BT","country-code":"064"},{name:"Bolivia (Plurinational State of)","alpha-2":"BO","country-code":"068"},{name:"Bonaire, Sint Eustatius and Saba","alpha-2":"BQ","country-code":"535"},{name:"Bosnia and Herzegovina","alpha-2":"BA","country-code":"070"},{name:"Botswana","alpha-2":"BW","country-code":"072"},{name:"Bouvet Island","alpha-2":"BV","country-code":"074"},{name:"Brazil","alpha-2":"BR","country-code":"076"},{name:"British Indian Ocean Territory","alpha-2":"IO","country-code":"086"},{name:"Brunei Darussalam","alpha-2":"BN","country-code":"096"},{name:"Bulgaria","alpha-2":"BG","country-code":"100"},{name:"Burkina Faso","alpha-2":"BF","country-code":"854"},{name:"Burundi","alpha-2":"BI","country-code":"108"},{name:"Cabo Verde","alpha-2":"CV","country-code":"132"},{name:"Cambodia","alpha-2":"KH","country-code":"116"},{name:"Cameroon","alpha-2":"CM","country-code":"120"},{name:"Canada","alpha-2":"CA","country-code":"124"},{name:"Cayman Islands","alpha-2":"KY","country-code":"136"},{name:"Central African Republic","alpha-2":"CF","country-code":"140"},{name:"Chad","alpha-2":"TD","country-code":"148"},{name:"Chile","alpha-2":"CL","country-code":"152"},{name:"China","alpha-2":"CN","country-code":"156"},{name:"Christmas Island","alpha-2":"CX","country-code":"162"},{name:"Cocos (Keeling) Islands","alpha-2":"CC","country-code":"166"},{name:"Colombia","alpha-2":"CO","country-code":"170"},{name:"Comoros","alpha-2":"KM","country-code":"174"},{name:"Congo","alpha-2":"CG","country-code":"178"},{name:"Congo, Democratic Republic of the","alpha-2":"CD","country-code":"180"},{name:"Cook Islands","alpha-2":"CK","country-code":"184"},{name:"Costa Rica","alpha-2":"CR","country-code":"188"},{name:"C\xf4te d'Ivoire","alpha-2":"CI","country-code":"384"},{name:"Croatia","alpha-2":"HR","country-code":"191"},{name:"Cuba","alpha-2":"CU","country-code":"192"},{name:"Cura\xe7ao","alpha-2":"CW","country-code":"531"},{name:"Cyprus","alpha-2":"CY","country-code":"196"},{name:"Czechia","alpha-2":"CZ","country-code":"203"},{name:"Denmark","alpha-2":"DK","country-code":"208"},{name:"Djibouti","alpha-2":"DJ","country-code":"262"},{name:"Dominica","alpha-2":"DM","country-code":"212"},{name:"Dominican Republic","alpha-2":"DO","country-code":"214"},{name:"Ecuador","alpha-2":"EC","country-code":"218"},{name:"Egypt","alpha-2":"EG","country-code":"818"},{name:"El Salvador","alpha-2":"SV","country-code":"222"},{name:"Equatorial Guinea","alpha-2":"GQ","country-code":"226"},{name:"Eritrea","alpha-2":"ER","country-code":"232"},{name:"Estonia","alpha-2":"EE","country-code":"233"},{name:"Eswatini","alpha-2":"SZ","country-code":"748"},{name:"Ethiopia","alpha-2":"ET","country-code":"231"},{name:"Falkland Islands (Malvinas)","alpha-2":"FK","country-code":"238"},{name:"Faroe Islands","alpha-2":"FO","country-code":"234"},{name:"Fiji","alpha-2":"FJ","country-code":"242"},{name:"Finland","alpha-2":"FI","country-code":"246"},{name:"France","alpha-2":"FR","country-code":"250"},{name:"French Guiana","alpha-2":"GF","country-code":"254"},{name:"French Polynesia","alpha-2":"PF","country-code":"258"},{name:"French Southern Territories","alpha-2":"TF","country-code":"260"},{name:"Gabon","alpha-2":"GA","country-code":"266"},{name:"Gambia","alpha-2":"GM","country-code":"270"},{name:"Georgia","alpha-2":"GE","country-code":"268"},{name:"Germany","alpha-2":"DE","country-code":"276"},{name:"Ghana","alpha-2":"GH","country-code":"288"},{name:"Gibraltar","alpha-2":"GI","country-code":"292"},{name:"Greece","alpha-2":"GR","country-code":"300"},{name:"Greenland","alpha-2":"GL","country-code":"304"},{name:"Grenada","alpha-2":"GD","country-code":"308"},{name:"Guadeloupe","alpha-2":"GP","country-code":"312"},{name:"Guam","alpha-2":"GU","country-code":"316"},{name:"Guatemala","alpha-2":"GT","country-code":"320"},{name:"Guernsey","alpha-2":"GG","country-code":"831"},{name:"Guinea","alpha-2":"GN","country-code":"324"},{name:"Guinea-Bissau","alpha-2":"GW","country-code":"624"},{name:"Guyana","alpha-2":"GY","country-code":"328"},{name:"Haiti","alpha-2":"HT","country-code":"332"},{name:"Heard Island and McDonald Islands","alpha-2":"HM","country-code":"334"},{name:"Holy See","alpha-2":"VA","country-code":"336"},{name:"Honduras","alpha-2":"HN","country-code":"340"},{name:"Hong Kong","alpha-2":"HK","country-code":"344"},{name:"Hungary","alpha-2":"HU","country-code":"348"},{name:"Iceland","alpha-2":"IS","country-code":"352"},{name:"India","alpha-2":"IN","country-code":"356"},{name:"Indonesia","alpha-2":"ID","country-code":"360"},{name:"Iran (Islamic Republic of)","alpha-2":"IR","country-code":"364"},{name:"Iraq","alpha-2":"IQ","country-code":"368"},{name:"Ireland","alpha-2":"IE","country-code":"372"},{name:"Isle of Man","alpha-2":"IM","country-code":"833"},{name:"Israel","alpha-2":"IL","country-code":"376"},{name:"Italy","alpha-2":"IT","country-code":"380"},{name:"Jamaica","alpha-2":"JM","country-code":"388"},{name:"Japan","alpha-2":"JP","country-code":"392"},{name:"Jersey","alpha-2":"JE","country-code":"832"},{name:"Jordan","alpha-2":"JO","country-code":"400"},{name:"Kazakhstan","alpha-2":"KZ","country-code":"398"},{name:"Kenya","alpha-2":"KE","country-code":"404"},{name:"Kiribati","alpha-2":"KI","country-code":"296"},{name:"Korea (Democratic People's Republic of)","alpha-2":"KP","country-code":"408"},{name:"Korea, Republic of","alpha-2":"KR","country-code":"410"},{name:"Kuwait","alpha-2":"KW","country-code":"414"},{name:"Kyrgyzstan","alpha-2":"KG","country-code":"417"},{name:"Lao People's Democratic Republic","alpha-2":"LA","country-code":"418"},{name:"Latvia","alpha-2":"LV","country-code":"428"},{name:"Lebanon","alpha-2":"LB","country-code":"422"},{name:"Lesotho","alpha-2":"LS","country-code":"426"},{name:"Liberia","alpha-2":"LR","country-code":"430"},{name:"Libya","alpha-2":"LY","country-code":"434"},{name:"Liechtenstein","alpha-2":"LI","country-code":"438"},{name:"Lithuania","alpha-2":"LT","country-code":"440"},{name:"Luxembourg","alpha-2":"LU","country-code":"442"},{name:"Macao","alpha-2":"MO","country-code":"446"},{name:"Madagascar","alpha-2":"MG","country-code":"450"},{name:"Malawi","alpha-2":"MW","country-code":"454"},{name:"Malaysia","alpha-2":"MY","country-code":"458"},{name:"Maldives","alpha-2":"MV","country-code":"462"},{name:"Mali","alpha-2":"ML","country-code":"466"},{name:"Malta","alpha-2":"MT","country-code":"470"},{name:"Marshall Islands","alpha-2":"MH","country-code":"584"},{name:"Martinique","alpha-2":"MQ","country-code":"474"},{name:"Mauritania","alpha-2":"MR","country-code":"478"},{name:"Mauritius","alpha-2":"MU","country-code":"480"},{name:"Mayotte","alpha-2":"YT","country-code":"175"},{name:"Mexico","alpha-2":"MX","country-code":"484"},{name:"Micronesia (Federated States of)","alpha-2":"FM","country-code":"583"},{name:"Moldova, Republic of","alpha-2":"MD","country-code":"498"},{name:"Monaco","alpha-2":"MC","country-code":"492"},{name:"Mongolia","alpha-2":"MN","country-code":"496"},{name:"Montenegro","alpha-2":"ME","country-code":"499"},{name:"Montserrat","alpha-2":"MS","country-code":"500"},{name:"Morocco","alpha-2":"MA","country-code":"504"},{name:"Mozambique","alpha-2":"MZ","country-code":"508"},{name:"Myanmar","alpha-2":"MM","country-code":"104"},{name:"Namibia","alpha-2":"NA","country-code":"516"},{name:"Nauru","alpha-2":"NR","country-code":"520"},{name:"Nepal","alpha-2":"NP","country-code":"524"},{name:"Netherlands","alpha-2":"NL","country-code":"528"},{name:"New Caledonia","alpha-2":"NC","country-code":"540"},{name:"New Zealand","alpha-2":"NZ","country-code":"554"},{name:"Nicaragua","alpha-2":"NI","country-code":"558"},{name:"Niger","alpha-2":"NE","country-code":"562"},{name:"Nigeria","alpha-2":"NG","country-code":"566"},{name:"Niue","alpha-2":"NU","country-code":"570"},{name:"Norfolk Island","alpha-2":"NF","country-code":"574"},{name:"North Macedonia","alpha-2":"MK","country-code":"807"},{name:"Northern Mariana Islands","alpha-2":"MP","country-code":"580"},{name:"Norway","alpha-2":"NO","country-code":"578"},{name:"Oman","alpha-2":"OM","country-code":"512"},{name:"Pakistan","alpha-2":"PK","country-code":"586"},{name:"Palau","alpha-2":"PW","country-code":"585"},{name:"Palestine, State of","alpha-2":"PS","country-code":"275"},{name:"Panama","alpha-2":"PA","country-code":"591"},{name:"Papua New Guinea","alpha-2":"PG","country-code":"598"},{name:"Paraguay","alpha-2":"PY","country-code":"600"},{name:"Peru","alpha-2":"PE","country-code":"604"},{name:"Philippines","alpha-2":"PH","country-code":"608"},{name:"Pitcairn","alpha-2":"PN","country-code":"612"},{name:"Poland","alpha-2":"PL","country-code":"616"},{name:"Portugal","alpha-2":"PT","country-code":"620"},{name:"Puerto Rico","alpha-2":"PR","country-code":"630"},{name:"Qatar","alpha-2":"QA","country-code":"634"},{name:"R\xe9union","alpha-2":"RE","country-code":"638"},{name:"Romania","alpha-2":"RO","country-code":"642"},{name:"Russian Federation","alpha-2":"RU","country-code":"643"},{name:"Rwanda","alpha-2":"RW","country-code":"646"},{name:"Saint Barth\xe9lemy","alpha-2":"BL","country-code":"652"},{name:"Saint Helena, Ascension and Tristan da Cunha","alpha-2":"SH","country-code":"654"},{name:"Saint Kitts and Nevis","alpha-2":"KN","country-code":"659"},{name:"Saint Lucia","alpha-2":"LC","country-code":"662"},{name:"Saint Martin (French part)","alpha-2":"MF","country-code":"663"},{name:"Saint Pierre and Miquelon","alpha-2":"PM","country-code":"666"},{name:"Saint Vincent and the Grenadines","alpha-2":"VC","country-code":"670"},{name:"Samoa","alpha-2":"WS","country-code":"882"},{name:"San Marino","alpha-2":"SM","country-code":"674"},{name:"Sao Tome and Principe","alpha-2":"ST","country-code":"678"},{name:"Saudi Arabia","alpha-2":"SA","country-code":"682"},{name:"Senegal","alpha-2":"SN","country-code":"686"},{name:"Serbia","alpha-2":"RS","country-code":"688"},{name:"Seychelles","alpha-2":"SC","country-code":"690"},{name:"Sierra Leone","alpha-2":"SL","country-code":"694"},{name:"Singapore","alpha-2":"SG","country-code":"702"},{name:"Sint Maarten (Dutch part)","alpha-2":"SX","country-code":"534"},{name:"Slovakia","alpha-2":"SK","country-code":"703"},{name:"Slovenia","alpha-2":"SI","country-code":"705"},{name:"Solomon Islands","alpha-2":"SB","country-code":"090"},{name:"Somalia","alpha-2":"SO","country-code":"706"},{name:"South Africa","alpha-2":"ZA","country-code":"710"},{name:"South Georgia and the South Sandwich Islands","alpha-2":"GS","country-code":"239"},{name:"South Sudan","alpha-2":"SS","country-code":"728"},{name:"Spain","alpha-2":"ES","country-code":"724"},{name:"Sri Lanka","alpha-2":"LK","country-code":"144"},{name:"Sudan","alpha-2":"SD","country-code":"729"},{name:"Suriname","alpha-2":"SR","country-code":"740"},{name:"Svalbard and Jan Mayen","alpha-2":"SJ","country-code":"744"},{name:"Sweden","alpha-2":"SE","country-code":"752"},{name:"Switzerland","alpha-2":"CH","country-code":"756"},{name:"Syrian Arab Republic","alpha-2":"SY","country-code":"760"},{name:"Taiwan, Province of China","alpha-2":"TW","country-code":"158"},{name:"Tajikistan","alpha-2":"TJ","country-code":"762"},{name:"Tanzania, United Republic of","alpha-2":"TZ","country-code":"834"},{name:"Thailand","alpha-2":"TH","country-code":"764"},{name:"Timor-Leste","alpha-2":"TL","country-code":"626"},{name:"Togo","alpha-2":"TG","country-code":"768"},{name:"Tokelau","alpha-2":"TK","country-code":"772"},{name:"Tonga","alpha-2":"TO","country-code":"776"},{name:"Trinidad and Tobago","alpha-2":"TT","country-code":"780"},{name:"Tunisia","alpha-2":"TN","country-code":"788"},{name:"Turkey","alpha-2":"TR","country-code":"792"},{name:"Turkmenistan","alpha-2":"TM","country-code":"795"},{name:"Turks and Caicos Islands","alpha-2":"TC","country-code":"796"},{name:"Tuvalu","alpha-2":"TV","country-code":"798"},{name:"Uganda","alpha-2":"UG","country-code":"800"},{name:"Ukraine","alpha-2":"UA","country-code":"804"},{name:"United Arab Emirates","alpha-2":"AE","country-code":"784"},{name:"United Kingdom of Great Britain and Northern Ireland","alpha-2":"GB","country-code":"826"},{name:"United States of America","alpha-2":"US","country-code":"840"},{name:"United States Minor Outlying Islands","alpha-2":"UM","country-code":"581"},{name:"Uruguay","alpha-2":"UY","country-code":"858"},{name:"Uzbekistan","alpha-2":"UZ","country-code":"860"},{name:"Vanuatu","alpha-2":"VU","country-code":"548"},{name:"Venezuela (Bolivarian Republic of)","alpha-2":"VE","country-code":"862"},{name:"Viet Nam","alpha-2":"VN","country-code":"704"},{name:"Virgin Islands (British)","alpha-2":"VG","country-code":"092"},{name:"Virgin Islands (U.S.)","alpha-2":"VI","country-code":"850"},{name:"Wallis and Futuna","alpha-2":"WF","country-code":"876"},{name:"Western Sahara","alpha-2":"EH","country-code":"732"},{name:"Yemen","alpha-2":"YE","country-code":"887"},{name:"Zambia","alpha-2":"ZM","country-code":"894"},{name:"Zimbabwe","alpha-2":"ZW","country-code":"716"}],format:{type:"json",parse:{"country-code":"number"}}},{name:"suppliers_per_country",source:"suppliers",transform:[{type:"aggregate",groupby:["country"],fields:["name"],ops:["count"],as:["companies"]},{type:"lookup",from:"wikirate_countries",key:"name",fields:["country"],values:["code"],as:["country_code"]},{type:"lookup",from:"country_codes",key:"alpha-2",fields:["country_code"],values:["country-code"],as:["country_number"]},{type:"lookup",from:"world",key:"id",fields:["country_number"],as:["geo"]},{type:"filter",expr:"datum.geo"},{type:"formula",as:"centroid",expr:"geoCentroid('projection', datum.geo)"}]},{name:"graticule",transform:[{type:"graticule"}]}],projections:[{name:"projection",type:{signal:"type"},scale:{signal:"scale"},rotate:[{signal:"rotate0"},{signal:"rotate1"},{signal:"rotate2"}],center:[{signal:"center0"},{signal:"center1"}],translate:[{signal:"translate0"},{signal:"translate1"}]}],scales:[{name:"size",domain:{data:"suppliers_per_country",field:"companies"},zero:!1,range:[50,2e3]},{name:"color",type:"linear",nice:!0,domain:{data:"suppliers_per_country",field:"companies"},range:["#fef1eb","#F7733D"]}],marks:[{type:"shape",from:{data:"graticule"},encode:{update:{strokeWidth:{value:1},stroke:{signal:"'#ddd'"},fill:{value:null}}},transform:[{type:"geoshape",projection:"projection"}]},{type:"shape",from:{data:"world"},encode:{update:{strokeWidth:{signal:"+borderWidth"},fill:{value:"#171832"},zindex:{value:0}}},transform:[{type:"geoshape",projection:"projection"}]},{name:"circles",type:"symbol",from:{data:"suppliers_per_country"},encode:{enter:{x:{field:"centroid[0]"},y:{field:"centroid[1]"},size:{scale:"size",field:"companies"},strokeWidth:{value:.7},tooltip:{signal:"{'title': datum.country, 'Number of Companies': datum.companies}"}},update:{fill:{scale:"color",field:"companies"},stroke:{value:"#171832"}},hover:{fill:{value:"#912E06"},stroke:{value:"#171832"}}},transform:[{type:"force",static:!0,forces:[{force:"collide",radius:{expr:"1 + sqrt(datum.size) / 2"}},{force:"x",x:"datum.centroid[0]"},{force:"y",y:"datum.centroid[1]"}]}]}],legends:[{fill:"color",orient:"bottom-left",title:"No. of Suppliers"}]},{renderer:"svg",actions:{source:!1,editor:!1}}))},i=>{})}onSelectYear(){this.updateChart()}onSelectCompany(){this.company=this.apparelService.getCompany(this.selectedCompany),this.title=0!=this.company.id?this.company.name:"The top 100 apparel companies'",this.updateChart()}static{this.\u0275fac=function(i){return new(i||e)(ee(ww),ee(sm),ee(aa))}}static{this.\u0275cmp=Cn({type:e,selectors:[["app-suppliers-map"]],viewQuery:function(i,r){if(1&i&&ua(ept,5),2&i){let o;Wt(o=qt())&&(r.mapElement=o.first)}},decls:31,vars:14,consts:[["map",""],[1,"wikirate-creme-box"],[1,"wikirate-container"],[1,"row"],[1,"col-md-8"],[1,"showcase-title"],[1,"showcase-subtitle"],[3,"ngStyle"],[4,"ngIf"],[1,"filters","col-md-4"],[1,"row","col","justify-content-md-end"],[1,"company-filter","mt-1","mr-1"],["id","inputCompany",1,"form-control","form-control-sm",3,"ngModelChange","change","ngModel"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"year-filter","mt-1"],["id","inputYear",1,"form-control","form-control-sm",3,"ngModelChange","change","ngModel"],["selected","",3,"ngValue"],[3,"ngValue"],[1,"row","mb-2","no-gutters","mt-2","col-12"],[1,"col-md"],["id","no_data","class","mt-4 text-center",4,"ngIf"],["id","no_data",1,"mt-4","text-center"],["src","assets/moon.svg","width","60px",1,"mb-1"],[1,"mt-2","showcase-main-text"]],template:function(i,r){if(1&i){const o=$o();U(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h2",5),X(5," Suppliers per country "),z(),U(6,"h3",6)(7,"span",7),X(8),z(),X(9," suppliers' locations "),mt(10,npt,2,1,"i",8)(11,ipt,2,1,"span",8),z()(),U(12,"div",9)(13,"div",10)(14,"div",11)(15,"select",12),kc("ngModelChange",function(a){return Fn(o),zu(r.selectedCompany,a)||(r.selectedCompany=a),Pn(a)}),nt("change",function(){return Fn(o),Pn(r.onSelectCompany())}),mt(16,rpt,2,2,"option",13),z()(),U(17,"div",14)(18,"select",15),kc("ngModelChange",function(a){return Fn(o),zu(r.selectedYear,a)||(r.selectedYear=a),Pn(a)}),nt("change",function(){return Fn(o),Pn(r.updateChart())}),U(19,"option",16),X(20,"latest"),z(),U(21,"option",17),X(22,"2020"),z(),U(23,"option",17),X(24,"2019"),z(),U(25,"option",17),X(26,"2018"),z()()()()(),U(27,"div",18,0)(29,"div",19),mt(30,opt,4,0,"div",20),z()()()()()}2&i&&(re(7),Ae("ngStyle",function Vg(e,t,n,i){return Oq(Q(),Mr(),e,t,n,i)}(12,tpt,0!=r.selectedCompany?"italic":"normal")),re(),kr(r.title),re(2),Ae("ngIf","latest"!==r.selectedYear),re(),Ae("ngIf","latest"===r.selectedYear),re(4),Ic("ngModel",r.selectedCompany),re(),Ae("ngForOf",r.apparelTop100),re(2),Ic("ngModel",r.selectedYear),re(),Ae("ngValue","latest"),re(2),Ae("ngValue",2020),re(2),Ae("ngValue",2019),re(2),Ae("ngValue",2018),re(5),Ae("ngIf",r.suppliers&&0==r.suppliers.length))},dependencies:[dm,fm,Qu,am,Qf,oD,J0,vK]})}}return e})(),apt=(()=>{class e{transform(n,i){return"string"==typeof n?n:Number.isNaN(n)?null:n<1e3?n:(r=Math.floor(Math.log(n)/Math.log(1e3)),(n/Math.pow(1e3,r)).toFixed(i)+["k","M","B","T","P","E"][r-1]);var r}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=lr({name:"bigNumSuff",type:e,pure:!0})}}return e})(),lpt=(()=>{class e{constructor(n){this.http=n,this.total_market_cap="unknown",this.total_employees="Unknown",this.number_of_suppliers="Unknown",this.workers_in_supply_chain="Unknown",this.selectedYear="latest"}ngOnInit(){this.updateSection()}ngAfterViewInit(){}updateSection(){this.http.get("https://wikirate.org/Core+Market_Cap+Answer.json?filter[not_ids]=&filter[year]="+this.selectedYear+"&filter[company_group][]=Apparel%20100%20Companies&limit=0&view=answer_list").subscribe(s=>{this.total_market_cap=this.getSum(s),gy("div#vis",{$schema:"https://vega.github.io/schema/vega/v5.json",description:"Market Cap of Apparel Top 100 Companies",width:900,height:560,autosize:"none",signals:[{name:"type",value:"equalEarth"},{name:"rotate0",value:-15},{name:"rotate1",value:0},{name:"rotate2",value:0},{name:"center0",value:0},{name:"center1",value:0},{name:"translate0",update:"width / 2"},{name:"translate1",update:"height / 2"},{name:"borderWidth",value:1},{name:"hover",value:null,on:[{events:"@circles:mouseover",update:"datum"},{events:"@circles:mouseout",update:"null"}]},{name:"title",value:"Market Cap of Apparel Top 100 Companies",update:"hover ? hover.name + ' (' + hover.market_cap_text + ')' : 'Market Cap of Apparel Top 100 Companies'"},{name:"cell_stroke",value:null,on:[{events:"dblclick",update:"cell_stroke ? null : 'brown'"},{events:"mousedown!",update:"cell_stroke"}]},{name:"tx",update:"width / 2"},{name:"ty",update:"height / 2"}],data:[{name:"world",url:"assets/world-110m.json",format:{type:"topojson",feature:"countries"},transform:[{type:"geopath",projection:"projection"}]},{name:"market_cap",values:s,format:{type:"json",parse:{value:"number"}}},{name:"apparel_top_100_geo",values:[{company:"Puma",lat:49.5755269,lng:10.8714149},{company:"H&M",lat:59.3317973,lng:18.0583112},{company:"Gap inc.",lat:37.79081085,lng:-122.3909804},{company:"Marks and Spencer Group plc",lat:51.51865225,lng:-.175000995},{company:"Asos",lat:51.5333888,lng:-.139905636},{company:"Nike Inc.",lat:45.507191,lng:-122.827393},{company:"Adidas AG",lat:49.58253265,lng:10.91048856},{company:"Louis Vuitton Malletier SA (LVMH)",lat:48.8586162,lng:2.3429393},{company:"Burberry Group plc",lat:51.49437555,lng:-.126392473},{company:"Guess? Inc",lat:34.02410214,lng:-118.2391726},{company:"Zalando SE",lat:52.50655705,lng:13.44148723},{company:"Nordstrom",lat:47.614361,lng:-122.335852},{company:"Fossil Group, Inc.",lat:32.939486,lng:-96.745425},{company:"Inditex",lat:43.32307,lng:-8.49019},{company:"American Eagle Outfitters",lat:40.4282854,lng:-79.9606724},{company:"Hugo Boss AG",lat:48.54694115,lng:9.271591308},{company:"Urban Outfitters",lat:39.9046154,lng:-75.1739344},{company:"Skechers USA Inc",lat:33.88490024,lng:-118.4100629},{company:"Ralph Lauren Corporation",lat:40.7638797,lng:-73.97161599},{company:"Prada",lat:43.5463209,lng:11.5707173},{company:"Under Armour",lat:39.27516635,lng:-76.5903856},{company:"Tapestry Inc",lat:40.75274965,lng:-74.00152052},{company:"Columbia Sportswear",lat:45.52966955,lng:-122.8248874},{company:"Foot Locker Inc.",lat:40.7526738,lng:-73.9950505},{company:"Abercrombie & Fitch",lat:40.0904919,lng:-82.7755106},{company:"Macy's",lat:40.7509149,lng:-73.98933149},{company:"DSW Inc.",lat:39.98864,lng:-82.89824},{company:"Esprit Holdings Limited",lat:22.2924077,lng:114.20294},{company:"Moncler",lat:45.4540887,lng:9.1588378},{company:"Asics Corporation",lat:34.6913,lng:135.183},{company:"Ross Stores",lat:37.7079277,lng:-121.8881302},{company:"Chico's FAS Inc",lat:28.75054,lng:-82.5001},{company:"Gildan Activewear Inc.",lat:45.504205,lng:-73.571125},{company:"Boohoo.com",lat:53.480813,lng:-2.2326412},{company:"Anta Sports Products",lat:24.66745455,lng:118.5540534},{company:"Gerry Weber",lat:52.0603355,lng:8.3615619},{company:"Brunello Cucinelli",lat:43.0830538,lng:12.277156},{company:"Next",lat:52.6071351,lng:-1.2418189},{company:"Salvatore Ferragamo SpA",lat:43.7722809,lng:11.2513491},{company:"Express Inc",lat:40.001342,lng:-83.094886},{company:"Tiffany & Co.",lat:42.7158328,lng:-73.7079487},{company:"Hermes International",lat:48.8688993,lng:2.3217376},{company:"Hudson's Bay Company",lat:43.7823924,lng:-79.7718789},{company:"United Arrows",lat:35.706766,lng:139.7616265},{company:"Canada Goose",lat:43.6954839,lng:-79.46397981},{company:"Bosideng International Holdings Limited",lat:31.2322758,lng:121.4692071},{company:"Metersbonwe",lat:31.2322758,lng:121.4692071},{company:"Dick's Sporting Goods",lat:40.465624,lng:-80.205892},{company:"Capri Holdings Ltd (formerly Michael Kors)",lat:51.51414,lng:-.11828},{company:"Buckle Inc",lat:40.699424,lng:-99.105033},{company:"TOD'S",lat:43.2627,lng:13.7203},{company:"Dillard's, Inc.",lat:34.753373,lng:-92.287569},{company:"Li-Ning",lat:39.812904,lng:116.547259},{company:"Children's Place Inc",lat:40.78885,lng:-74.056035},{company:"Steve Madden",lat:40.75017166,lng:-73.91508484},{company:"lululemon athletica",lat:49.272004,lng:-123.147121},{company:"PVH",lat:40.74969101,lng:-73.98155975},{company:"Ted Baker",lat:51.537667,lng:-.132265},{company:"Fast Retailing",lat:34.0372,lng:131.3577},{company:"JD Sports Fashion plc",lat:53.573908,lng:-2.278928},{company:"Burlington Stores Inc",lat:40.094145,lng:-74.812232},{company:"Sports Direct",lat:53.2063042,lng:-1.2205319},{company:"Superdry plc",lat:51.9202605,lng:-2.0968209},{company:"VF",lat:39.751618,lng:-105.002998},{company:"Christian Dior",lat:48.8697044,lng:2.325038},{company:"Semir",lat:27.9963899,lng:120.695345},{company:"L Brands",lat:39.981797,lng:-83.033627},{company:"Deckers Outdoor Corporation",lat:34.4314978,lng:-119.8635551},{company:"Hanesbrands",lat:36.18900595,lng:-80.2640623},{company:"Carter's Inc",lat:33.848681,lng:-84.366387},{company:"TJX",lat:42.308755,lng:-71.382745},{company:"Oxford Industries Inc",lat:33.7811172,lng:-84.3837092},{company:"Cato Corp",lat:35.128699,lng:-80.87873},{company:"JC Penney",lat:33.0136764,lng:-96.6925096},{company:"G-III Apparel Group, LTD.",lat:40.6256945,lng:-73.9870861},{company:"Lojas Renner S.A.",lat:-30.0324999,lng:-51.2303767},{company:"Kering",lat:48.8464177,lng:2.3153025},{company:"Caleres Inc",lat:38.6526865,lng:-90.3477704},{company:"Genesco Inc.",lat:36.114742,lng:-86.693776},{company:"Ascena Retail Group Inc",lat:41.07202702,lng:-74.17060403},{company:"Wolverine World Wide",lat:43.13425389,lng:-85.54185089},{company:"Mulberry Group Plc",lat:51.50370825,lng:-.191581413},{company:"Luxottica Group SpA",lat:45.4673878,lng:9.1775777},{company:"Arvind Limited",lat:23.0583877,lng:72.6371753},{company:"Aditya Birla Fashion & Retail Ltd",lat:19.0652797,lng:72.8793805},{company:"Vipshop Holdings",lat:23.1025812,lng:113.2245207},{company:"Geox SpA",lat:45.7883555,lng:12.0476363},{company:"Alpargatas - Havaianas",lat:-23.5506507,lng:-46.6333824},{company:"Onward Holdings",lat:35.666255,lng:139.775565},{company:"Lao Feng Xiang Jewelry",lat:31.2322758,lng:121.4692071},{company:"Richemont",lat:46.2587,lng:6.1351},{company:"Cia Hering",lat:-7.33561,lng:-47.46218},{company:"Vera Bradley Inc.",lat:40.9570408,lng:-85.3015323},{company:"Boot Barn Holdings Inc.",lat:33.6596704,lng:-117.7380569},{company:"Swatch Group",lat:47.1354263,lng:7.234641},{company:"Francesca's",lat:29.83278726,lng:-95.51077112},{company:"Chow Tai Fook",lat:22.28365,lng:114.15494},{company:"Van de Velde",lat:51.01324,lng:3.9258203},{company:"YOOX NET-A-PORTER Group SpA",lat:45.4450409,lng:9.1514221},{company:"Grendene",lat:-3.68611,lng:-40.34972}]},{name:"apparel_top_100_companies",url:"../../assets/content/Apparel-100-Companies.json",format:{type:"json",property:"items"},transform:[{type:"lookup",from:"market_cap",key:"company",fields:["id"],values:["value"],as:["market_cap"],default:0},{type:"lookup",from:"apparel_top_100_geo",key:"company",fields:["name"],values:["lat","lng"],as:["lat","lng"],default:0},{type:"geopoint",projection:"projection",fields:["lng","lat"]},{type:"formula",as:"market_cap_text",expr:"replace(format(datum.market_cap,'$,.4s'), 'G', 'B')"}]},{name:"graticule",transform:[{type:"graticule",step:[15,15]}]}],projections:[{name:"projection",type:"mercator"}],scales:[{name:"size",domain:{data:"apparel_top_100_companies",field:"market_cap"},zero:!1,range:[30,500]},{name:"color",type:"linear",nice:!0,domain:{data:"apparel_top_100_companies",field:"market_cap"},range:["#fef1eb","#F7733D"]}],marks:[{type:"shape",from:{data:"graticule"},encode:{update:{strokeWidth:{value:1},fill:{value:null}}},transform:[{type:"geoshape",projection:"projection"}]},{type:"shape",from:{data:"world"},encode:{update:{fill:{value:"#1D1E3F"},stroke:{value:"rgba(247,247,248, 0.8)"},strokeWidth:{signal:"+borderWidth"},zindex:{value:0}}},transform:[{type:"geoshape",projection:"projection"}]},{name:"circles",type:"symbol",from:{data:"apparel_top_100_companies"},encode:{enter:{x:{field:"x"},y:{field:"y"},size:{scale:"size",field:"market_cap"},fillOpacity:{value:1},stroke:{value:"white"},strokeWidth:{value:.5},tooltip:{signal:"{'title': datum.name,'Headquarters': datum.headquarters, 'Market Cap': datum.market_cap_text}"}},update:{fill:{scale:"color",field:"market_cap"},stroke:{value:"#171832"}},hover:{fill:{value:"#912E06"},stroke:{value:"#171832"}}},transform:[{type:"force",static:!0,forces:[{force:"collide",radius:{expr:"1 + sqrt(datum.size) / 2"}},{force:"x",x:"datum.x"},{force:"y",y:"datum.y"}]}]},{type:"text",interactive:!1,encode:{enter:{x:{value:895},y:{value:550},fill:{value:"#F7F7F8"},fontSize:{value:12},align:{value:"right"}},update:{text:{signal:"title"}}}}],legends:[{fill:"color",orient:"bottom-left",title:"Market Cap (in USD$)",labelColor:"#F7F7F8",titleColor:"#F7F7F8"}]},{renderer:"svg",actions:{source:!1,editor:!1}}).catch(console.warn)}),this.http.get("https://wikirate.org/Commons+Employee+Answer.json?filter[not_ids]=&filter[company_name]=&filter[year]="+this.selectedYear+"&filter[company_group][]=Apparel%20100%20Companies&limit=0&view=answer_list").subscribe(s=>{this.total_employees=this.getSum(s)}),this.http.get("https://wikirate.org/Commons+Supplied_By+Answers.json?filter[not_ids]=&filter[company_name]=&filter[company_group][]=Apparel%20100%20Companies&filter[year]="+this.selectedYear+"&limit=100&view=answer_list").subscribe(s=>{this.number_of_suppliers=this.getSum(s)}),this.http.get("https://wikirate.org/Clean_Clothes_Campaign+Number_of_Workers+Answers.json?filter[not_ids]=&filter[company_name]=&filter[company_group][]=Supplier of Apparel 100&view=answer_list").subscribe(s=>{this.workers_in_supply_chain=this.getSum(s)})}getSum(n){let i=0;for(var r=0;r{class e{constructor(){}ngOnInit(){this.createChart()}createChart(){gy("div#line-chart",{$schema:"https://vega.github.io/schema/vega/v5.json",description:"Apparel Top 100 Companies Reporting their Suppliers.",width:500,height:200,padding:5,signals:[{name:"interpolate",value:"cardinal"}],data:[{name:"supplier_lists",url:"https://wikirate.org/Commons+Supplier_List_all+Answer.json?filter[not_ids]=&filter[company_name]=&filter[value][]=Yes&filter[company_group][]=Apparel%20100%20Companies&limit=0&view=answer_list",format:{type:"json",property:"items"},transform:[{type:"aggregate",groupby:["year"],fields:["company"],ops:["count"],as:["number_of_lists"]},{type:"filter",expr:"datum.year > 2016 && datum.year < 2021"}]}],scales:[{name:"x",type:"linear",range:"width",nice:!0,zero:!1,round:!0,domain:[2016,2021]},{name:"y",type:"linear",domain:[0,100],range:"height",nice:!0,zero:!1,round:!0},{name:"align",type:"ordinal",domain:["left","right","top","bottom"],range:["right","left","center","center"]},{name:"base",type:"ordinal",domain:["left","right","top","bottom"],range:["middle","middle","bottom","top"]},{name:"dx",type:"ordinal",domain:["left","right","top","bottom"],range:[-7,6,0,0]},{name:"dy",type:"ordinal",domain:["left","right","top","bottom"],range:[1,1,-5,8]}],axes:[{orient:"bottom",scale:"x",tickMinStep:1,format:""},{orient:"left",scale:"y",tickMinStep:2}],marks:[{type:"line",from:{data:"supplier_lists"},encode:{enter:{interpolate:{value:"linear"},x:{scale:"x",field:"year"},y:{scale:"y",field:"number_of_lists"},stroke:{value:"#000"},strokeWidth:{value:3}}}},{type:"symbol",from:{data:"supplier_lists"},encode:{enter:{x:{scale:"x",field:"year"},y:{scale:"y",field:"number_of_lists"},fill:{value:"#fff"},stroke:{value:"#000"},strokeWidth:{value:1},size:{value:60},tooltip:{signal:"{'Number of Companies': datum.number_of_lists, 'Year': datum.year}"}},update:{fill:{value:"#fff"},stroke:{value:"#000"}},hover:{fill:{value:"#000"},stroke:{value:"#fff"}}}}]},{renderer:"svg",actions:{source:!1,editor:!1}})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=Cn({type:e,selectors:[["app-supplier-lists-on-wikirate"]],decls:20,vars:0,consts:[[1,"wikirate-container"],[1,"row"],[1,"col-md-8"],[1,"showcase-title"],[1,"showcase-subtitle"],[1,"col-md"],[1,"wikirate","chart-container","mt-2"],["id","line-chart",1,"m-2"],[1,"col-md-9"],[1,"showcase-main-text","mt-2"],[1,"col-md-3","d-flex","align-items-end"],[1,"explore","mt-1","d-none","d-md-block","ml-auto"],["target","_blank","href","https://wikirate.org/Apparel_100_Analysis?filter%5Bnot_ids%5D=&filter%5Bcompany_name%5D=&filter%5Bmetric_name%5D=Supplier%20List%20(all)"],[1,"bi","bi-arrow-right","ml-1"]],template:function(i,r){1&i&&(U(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2",3),X(4," Companies reporting their suppliers "),z(),U(5,"h3",4),X(6," Number of the top 100 apparel companies publishing their list of suppliers "),z()()(),U(7,"div",1)(8,"div",5)(9,"div",6),Ke(10,"div",7),z()()(),U(11,"div",1)(12,"div",8)(13,"div",9),X(14," The number of the top 100 apparel companies reporting their suppliers more than doubled from 10 to 23 between 2017 and 2020. "),z()(),U(15,"div",10)(16,"div",11)(17,"a",12),X(18,"Dive Deeper"),Ke(19,"i",13),z()()()()())},styles:[".explore[_ngcontent-%COMP%]{font-family:IBMPlexSans;font-style:normal;font-weight:700;font-size:14px;line-height:16px;letter-spacing:.3px;color:#484c9d;text-transform:uppercase;text-align:center}a[_ngcontent-%COMP%]{color:inherit;text-decoration:inherit}"]})}}return e})(),upt=(()=>{class e{transform(n,i){return"string"==typeof n?n:Number.isNaN(n)?null:n<1e3?n:n.toString().slice(0,n.toString().length-3)+","+n.toString().slice(-3)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=lr({name:"numFormat",type:e,pure:!0})}}return e})();function dpt(e,t){if(1&e&&(U(0,"span")(1,"i"),X(2),z()()),2&e){const n=Qe();re(2),kr("For "+n.selectedYear)}}function fpt(e,t){1&e&&(U(0,"i"),X(1,"For the most recent years"),z())}let hpt=(()=>{class e{constructor(n,i){this.http=n,this.route=i,this.number_of_reporting_companies="Unknown",this.unique_suppliers="Unknown",this.selectedYear="latest"}ngOnInit(){this.updateSection(),this.updateChart()}ngAfterViewInit(){}updateChart(){gy("div#bar-chart",{$schema:"https://vega.github.io/schema/vega/v5.json",description:"Number of Published Supplier Lists",width:750,height:510,padding:5,autosize:"fit",data:[{name:"companies",url:"../../assets/content/Apparel-100-Companies.json",format:{type:"json",property:"items"}},{name:"published_supplier_lists",url:"https://wikirate.org/Commons+Supplier_List_all+Answers.json?filter[not_ids]=&filter[company_name]=&filter[value][]=Yes&filter[company_group][]=Apparel%20100%20Companies&view=answer_list&limit=0",transform:[{type:"lookup",from:"companies",key:"id",fields:["company"],values:["name","headquarters"],as:["company_name","headquarters"],default:0},{type:"aggregate",groupby:["company_name","headquarters"]}]}],marks:[{type:"rect",from:{data:"published_supplier_lists"},encode:{update:{y:{scale:"y",value:0},y2:{scale:"y",field:"count"},x:{scale:"x",field:"company_name"},width:{scale:"x",band:1},tooltip:{signal:"{'Company':datum.company_name, 'Headquarters':datum.headquarters , 'No. of Supplier Lists':datum.count}"},fill:{scale:"color",field:"count"},cornerRadiusTopRight:{value:5},cornerRadiusTopLeft:{value:5}},hover:{fill:{value:"#912E06"}}}}],scales:[{name:"y",type:"linear",domain:{data:"published_supplier_lists",field:"count"},range:"height",nice:!0},{name:"x",type:"band",domain:{data:"published_supplier_lists",field:"company_name",sort:{op:"max",field:"count",order:"descending"}},range:"width",padding:.1},{name:"color",type:"linear",nice:!0,domain:{data:"published_supplier_lists",field:"count"},range:["#fef1eb","#F7733D"]}],axes:[{scale:"y",orient:"left",format:",d",tickCount:5,labelFontSize:14,tickColor:"#F7F7F8",labelColor:"#F7F7F8",domainColor:"#F7F7F8"},{scale:"x",orient:"bottom",labelAngle:55,labelAlign:"left",labelLimit:100,labelFontSize:14,tickColor:"#F7F7F8",labelColor:"#F7F7F8",domainColor:"#F7F7F8"}]},{renderer:"svg",actions:{source:!1,editor:!1}})}updateSection(){this.http.get("https://wikirate.org/Commons+Supplied_By+Answer.json?filter[not_ids]=&filter[company_name]=&filter[company_group][]=Apparel%20100%20Companies&view=answer_list&limit=0&filter[year]="+this.selectedYear).subscribe(r=>{this.number_of_reporting_companies=0;for(var o=0;o{this.unique_suppliers=r.length})}static{this.\u0275fac=function(i){return new(i||e)(ee(ww),ee(Cl))}}static{this.\u0275cmp=Cn({type:e,selectors:[["app-number-of-suppliers-per-company"]],decls:43,vars:12,consts:[[1,"wikirate-navy-box"],[1,"wikirate-container"],[1,"row"],[1,"col-md-8"],[1,"showcase-title","text-white"],[1,"showcase-subtitle-white"],[1,"col-md-4","mt-2","mb-2"],[1,"year-filter","col-md-5","ml-md-auto"],["id","inputYear",1,"form-control-navy","form-control-sm",3,"ngModelChange","change","ngModel"],["selected","","value","latest",3,"ngValue"],["value","2020",3,"ngValue"],["value","2019",3,"ngValue"],["value","2018",3,"ngValue"],[1,"row","mt-2"],[1,"col-md"],[1,"wikirate-box","chart-container"],["id","bar-chart",1,"m-2"],[1,"showcase-main-text-white","col-md-9"],[4,"ngIf"],[1,"col-md-3","d-flex","align-items-end"],[1,"explore","mt-1","d-none","d-md-block","ml-auto"],["target","_blank","href","https://wikirate.org/Apparel_100_Analysis?filter%5Bnot_ids%5D=&filter%5Bcompany_name%5D=&filter%5Bmetric_name%5D=Supplied%20By&filter%5Byear%5D=latest"],[1,"bi","bi-arrow-right","ml-1"]],template:function(i,r){1&i&&(U(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h2",4),X(5," Published supplier lists "),z(),U(6,"h3",5),X(7,"Number of published supplier lists per company since 2017"),z()(),U(8,"div",6)(9,"div",7)(10,"select",8),kc("ngModelChange",function(s){return zu(r.selectedYear,s)||(r.selectedYear=s),s}),nt("change",function(){return r.updateSection()}),U(11,"option",9),X(12,"latest"),z(),U(13,"option",10),X(14,"2020"),z(),U(15,"option",11),X(16,"2019"),z(),U(17,"option",12),X(18,"2018"),z()()()()(),U(19,"div",13)(20,"div",14)(21,"div",15),Ke(22,"div",16),z()()(),U(23,"div",13)(24,"div",17),mt(25,dpt,3,1,"span",18)(26,fpt,2,0,"i",18),X(27," Wikirate's researchers retrieved the supplier lists of "),U(28,"i"),X(29),z(),X(30," out of the top 100 companies. In total, these "),U(31,"i"),X(32),z(),X(33," were supplied by "),U(34,"i"),X(35),Ug(36,"numFormat"),z(),X(37,". "),z(),U(38,"div",19)(39,"div",20)(40,"a",21),X(41,"Dive Deeper"),Ke(42,"i",22),z()()()()()()),2&i&&(re(10),Ic("ngModel",r.selectedYear),re(),Ae("ngValue","latest"),re(2),Ae("ngValue",2020),re(2),Ae("ngValue",2019),re(2),Ae("ngValue",2018),re(8),Ae("ngIf","latest"!==r.selectedYear),re(),Ae("ngIf","latest"===r.selectedYear),re(3),Or("",r.number_of_reporting_companies," companies"),re(3),Or("",r.number_of_reporting_companies," companies"),re(3),Or("",function $q(e,t,n){const i=e+Ie,r=Q(),o=Tf(r,i);return V0(r,i)?Oq(r,Mr(),t,o.transform,n,o):o.transform(n)}(36,10,r.unique_suppliers)," different suppliers"))},dependencies:[dm,fm,Qu,am,Qf,J0,upt],styles:[".explore[_ngcontent-%COMP%]{font-family:IBMPlexSans;font-style:normal;font-weight:700;font-size:14px;line-height:16px;letter-spacing:.3px;color:#f7f7f8;text-transform:uppercase;text-align:center}a[_ngcontent-%COMP%]{color:inherit;text-decoration:inherit}"]})}}return e})(),ppt=(()=>{class e{constructor(n){this.router=n}ngOnInit(){}static{this.\u0275fac=function(i){return new(i||e)(ee(Uo))}}static{this.\u0275cmp=Cn({type:e,selectors:[["more-data"]],decls:12,vars:0,consts:[[1,"wikirate-box"],[1,"wikirate-container","align-content-center"],[1,"row","justify-content-center"],[1,"showcase-title","call-to-action-title","text-center","mb-2","col-8"],[1,"mini-text","col-8"],[1,"row","justify-content-center","mt-4"],[1,"explore","mt-1"],["target","_blank","href","https://docs.google.com/forms/d/e/1FAIpQLSf4vZZ25-LQ1_xxriPxFH-Iwm6Mgok6exzAe1B3Hus1Yj8ifg/viewform"],[1,"bi","bi-arrow-right","ml-1"]],template:function(i,r){1&i&&(U(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2",3),X(4,"We need more open data"),z(),U(5,"div",4),X(6," The top 100 apparel companies in the world disclose only half of key environmental, social and governance indicators assessed here. To create systemic change and achieve the environmental and societal goals of the 21st century, we need more comparable, open data! "),z()(),U(7,"div",5)(8,"div",6)(9,"a",7),X(10,"Learn More"),Ke(11,"i",8),z()()()()())},styles:[".explore[_ngcontent-%COMP%]{font-family:IBMPlexSans;font-style:normal;font-weight:700;font-size:14px;line-height:16px;letter-spacing:.3px;color:#484c9d;text-transform:uppercase;text-align:center}a[_ngcontent-%COMP%]{cursor:pointer;color:inherit;text-decoration:inherit}"]})}}return e})();const gpt=["radarChartContainer"];function mpt(e,t){if(1&e&&(U(0,"option",16),X(1),z()),2&e){const n=t.$implicit;Ae("ngValue",n.id),re(),kr(n.name)}}function _pt(e,t){1&e&&(U(0,"div",21),Ke(1,"img",22),U(2,"p",23),X(3,"You explored unresearched areas, no data available."),z()())}let ypt=(()=>{class e{constructor(n,i,r,o){this.http=n,this.route=i,this.apparelService=r,this.renderer=o,this.environmental_disclosure_rate=0,this.social_disclosure_rate=0,this.governance_disclosure_rate=0,this.nodata=!0,this.selectedYear="latest",this.selectedCompany=0,this.apparelTop100=[],this.apparelTop100=r.getCompanies()}ngOnInit(){this.updateSection()}updateSection(){null!=this.radarChart&&this.renderer.removeChild(this.radarChartContainer.nativeElement,this.radarChart),this.nodata=!0,0!=this.selectedCompany?this.http.get("https://wikirate.org/Apparel_Research_Group+Environmental_Disclosure_Rate+~"+this.selectedCompany+"+Answer.json?filter[not_ids]=&filter[company_name]=&filter[year]="+this.selectedYear+"&limit=0&view=answer_list").subscribe(n=>{n.length>0&&(this.environmental_disclosure_rate=n[0].value,this.http.get("https://wikirate.org/Apparel_Research_Group+Social_Disclosure_Rate+~"+this.selectedCompany+"+Answer.json?filter[not_ids]=&filter[company_name]=&filter[year]="+this.selectedYear+"&limit=0&view=answer_list").subscribe(i=>{i.length>0&&(this.social_disclosure_rate=i[0].value,this.http.get("https://wikirate.org/Apparel_Research_Group+Governance_Disclosure_Rate+~"+this.selectedCompany+"+Answer.json?filter[not_ids]=&filter[company_name]=&filter[year]="+this.selectedYear+"&limit=0&view=answer_list").subscribe(r=>{r.length>0&&(this.governance_disclosure_rate=r[0].value,this.nodata=!1,this.radarChart=this.renderer.createElement("div"),this.radarChart.id="esg-performance",this.radarChart.class="radar-chart-container m-2",this.renderer.appendChild(this.radarChartContainer.nativeElement,this.radarChart),this.updateRadarChart("of "+this.apparelService.getCompany(+this.selectedCompany).name))}))}))}):this.http.get("https://wikirate.org/Apparel_Research_Group+Environmental_Disclosure_Rate+Answer.json?filter[not_ids]=&filter[company_name]=&filter[year]="+this.selectedYear+"&limit=0&view=answer_list").subscribe(n=>{this.environmental_disclosure_rate=0;for(var i=0;i{this.social_disclosure_rate=0;for(var o=0;o{this.governance_disclosure_rate=0;for(var a=0;a PI / 2",value:"right"},{value:"left"}],baseline:[{test:"scale('angular', datum.key) > 0",value:"top"},{test:"scale('angular', datum.key) == 0",value:"middle"},{value:"bottom"}],fill:{value:"#F7F7F8"},fontWeight:{value:"bold"}}}},{type:"line",name:"outer-line",from:{data:"radial-grid"},encode:{enter:{interpolate:{value:"linear-closed"},x:{field:"x2"},y:{field:"y2"},stroke:{value:"#F7F7F8"},strokeWidth:{value:1}}}}]},{renderer:"svg",actions:{source:!1,editor:!1}})}static{this.\u0275fac=function(i){return new(i||e)(ee(ww),ee(Cl),ee(sm),ee(aa))}}static{this.\u0275cmp=Cn({type:e,selectors:[["app-esg-performance"]],viewQuery:function(i,r){if(1&i&&ua(gpt,5),2&i){let o;Wt(o=qt())&&(r.radarChartContainer=o.first)}},decls:30,vars:8,consts:[["radarChartContainer",""],[1,"wikirate-navy-box"],[1,"wikirate-container"],[1,"row"],[1,"col-md-8","vertical-center"],[1,"content-container"],[1,"showcase-title","text-white"],[1,"showcase-subtitle-white"],[1,"filters","col-md-4"],[1,"row","col","justify-content-md-end"],[1,"company-filter","mt-1","mr-1"],["id","inputCompany",1,"form-control-navy","form-control-sm",3,"ngModelChange","change","ngModel"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"year-filter","mt-1"],["id","inputYear",1,"form-control-navy","form-control-sm",3,"ngModelChange","change","ngModel"],["selected","",3,"ngValue"],[3,"ngValue"],[1,"row","col-12","mt-2"],[1,"col-md"],[1,"chart-container"],["id","no_data","class","text-center mt-5",4,"ngIf"],["id","no_data",1,"text-center","mt-5"],["src","assets/moon-light.svg","width","60px",1,"mb-1"],[1,"mt-3","showcase-main-text","text-white"]],template:function(i,r){if(1&i){const o=$o();U(0,"div",1),Ke(1,"hr"),U(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"h2",6),X(7," Broken-down company ESG disclosure rating "),z(),U(8,"h3",7),X(9," The top 100 apparel companies\u2019 ESG disclosure rates per axis by year "),z()()(),U(10,"div",8)(11,"div",9)(12,"div",10)(13,"select",11),kc("ngModelChange",function(a){return Fn(o),zu(r.selectedCompany,a)||(r.selectedCompany=a),Pn(a)}),nt("change",function(){return Fn(o),Pn(r.updateSection())}),mt(14,mpt,2,2,"option",12),z()(),U(15,"div",13)(16,"select",14),kc("ngModelChange",function(a){return Fn(o),zu(r.selectedYear,a)||(r.selectedYear=a),Pn(a)}),nt("change",function(){return Fn(o),Pn(r.updateSection())}),U(17,"option",15),X(18,"latest"),z(),U(19,"option",16),X(20,"2020"),z(),U(21,"option",16),X(22,"2019"),z(),U(23,"option",16),X(24,"2018"),z()()()()(),U(25,"div",17)(26,"div",18)(27,"div",19,0),mt(29,_pt,4,0,"div",20),z()()()()()()}2&i&&(re(13),Ic("ngModel",r.selectedCompany),re(),Ae("ngForOf",r.apparelTop100),re(2),Ic("ngModel",r.selectedYear),re(),Ae("ngValue","latest"),re(2),Ae("ngValue",2020),re(2),Ae("ngValue",2019),re(2),Ae("ngValue",2018),re(6),Ae("ngIf",r.nodata))},dependencies:[dm,fm,Qu,am,Qf,oD,J0],styles:[".radar-chart-container[_ngcontent-%COMP%]{width:470px;height:380px;border-radius:5px}"]})}}return e})(),vpt=(()=>{class e{constructor(){this.selectedYear="latest",this.innerWidth=0}ngOnInit(){this.innerWidth=window.innerWidth,console.log(this.innerWidth),this.updateBarChart()}updateBarChart(){let n=20;this.innerWidth>=1200?n=40:this.innerWidth>=800&&(n=30),gy("div#esg-overall-wikirating",{$schema:"https://vega.github.io/schema/vega/v5.json",description:"ESG Disclosure Rate",width:1080,height:510,padding:5,signals:[{name:"companies",value:n,bind:{input:"range",min:20,max:100,step:1}},{name:"order",value:"descending",bind:{input:"select",options:["ascending","descending"]}}],data:[{name:"apparel_companies",url:"../../assets/content/Apparel-100-Companies.json",format:{type:"json",property:"items"}},{name:"suppplier_info",url:"https://wikirate.org/Apparel_Research_Group+ESG_Disclosure_Rate+Answers.json?filter[not_ids]=&filter[company_name]=&filter[year]="+this.selectedYear+"&filter[company_group][]=Apparel%20100%20Companies&view=answer_list&limit=0",format:{type:"json",parse:{value:"number"}},transform:[{type:"lookup",from:"apparel_companies",key:"id",fields:["company"],values:["name","headquarters"],as:["company_name","headquarters"],default:0},{type:"window",sort:{field:"value",order:{signal:"order"}},ops:["row_number"],as:["rank"]},{type:"filter",expr:"datum.rank <= companies"},{type:"formula",as:"rate",expr:"format(datum.value,',.2f')"}]}],marks:[{type:"rect",from:{data:"suppplier_info"},encode:{update:{y:{scale:"y",value:0},y2:{scale:"y",field:"value"},x:{scale:"x",field:"company_name"},width:{scale:"x",band:1},tooltip:{signal:"{'Company':datum.company_name, 'Headquarters':datum.headquarters , 'ESG Disclosure Rate':datum.rate}"},fill:{scale:"color",field:"value"},cornerRadiusTopRight:{value:3},cornerRadiusTopLeft:{value:3}},hover:{fill:{value:"black"}}}}],scales:[{name:"y",type:"linear",domain:[0,10],range:"height",nice:!0},{name:"x",type:"band",domain:{data:"suppplier_info",field:"company_name",sort:{op:"max",field:"value",order:{signal:"order"}}},range:"width",padding:.1},{name:"color",type:"linear",nice:!0,domain:{data:"suppplier_info",field:"value"},range:["#fef1eb","#F7733D"]}],axes:[{scale:"y",orient:"left",format:",d",tickCount:5,labelFontSize:{signal:"10 + 300 / companies"}},{scale:"x",orient:"bottom",labelAngle:55,labelAlign:"left",labelLimit:130,labelFontSize:{signal:"10 + 300 / companies"}}]},{renderer:"svg",actions:{source:!1,editor:!1}})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=Cn({type:e,selectors:[["app-esg-disclosure-rates"]],decls:29,vars:7,consts:[[1,"wikirate-box"],[1,"wikirate-container"],[1,"row"],[1,"col-md-8"],[1,"showcase-title"],[1,"showcase-subtitle"],[1,"filters","col-md-4","mt-1"],[1,"year-filter","col-md-5","ml-auto"],["id","inputYear",1,"form-control","form-control-sm",3,"ngModelChange","change","ngModel"],["selected","","value","latest",3,"ngValue"],["value","2020",3,"ngValue"],["value","2019",3,"ngValue"],[1,"col-12","mt-2"],[1,"bar-chart-container"],["id","esg-overall-wikirating",1,"m-2"],[1,"showcase-main-text","mt-2","col-md-9"],[1,"col-md-3","d-flex","align-items-end"],[1,"explore","mt-1","d-none","d-md-block","ml-auto"],["target","_blank",3,"href"],[1,"bi","bi-arrow-right","ml-1"]],template:function(i,r){1&i&&(U(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h2",4),X(5),z(),U(6,"h3",5),X(7," Based on ESG data shared by companies publicly "),z()(),U(8,"div",6)(9,"div",7)(10,"select",8),kc("ngModelChange",function(s){return zu(r.selectedYear,s)||(r.selectedYear=s),s}),nt("change",function(){return r.updateBarChart()}),U(11,"option",9),X(12,"latest"),z(),U(13,"option",10),X(14,"2020"),z(),U(15,"option",11),X(16,"2019"),z()()()()(),U(17,"div",2)(18,"div",12)(19,"div",13),Ke(20,"div",14),z()()(),U(21,"div",2)(22,"div",15),X(23," Nearly a third of the top 100 apparel companies don\u2019t publish a recent report with sustainability information. For example, only half share information about their greenhouse gas (GHG) emissions. "),z(),U(24,"div",16)(25,"div",17)(26,"a",18),X(27,"Dive Deeper"),Ke(28,"i",19),z()()()()()()),2&i&&(re(5),Or(" Company ESG disclosure rating (",r.selectedYear,") "),re(5),Ic("ngModel",r.selectedYear),re(),Ae("ngValue","latest"),re(2),Ae("ngValue",2020),re(2),Ae("ngValue",2019),re(11),Uu("href","https://wikirate.org/Apparel_100_Analysis?filter%5Bnot_ids%5D=&filter%5Bcompany_name%5D=&filter%5Bmetric_name%5D=ESG%20Disclosure&filter%5Byear%5D=",r.selectedYear,"",Oo))},dependencies:[dm,fm,Qu,am,Qf],styles:[".explore[_ngcontent-%COMP%]{font-family:IBMPlexSans;font-style:normal;font-weight:700;font-size:14px;line-height:16px;letter-spacing:.3px;color:#484c9d;text-transform:uppercase;text-align:center}a[_ngcontent-%COMP%]{color:inherit;text-decoration:inherit}"]})}}return e})(),bpt=(()=>{class e{constructor(n,i,r,o){this.route=n,this.scroll=i,this.meta=r,this.titleService=o,o.setTitle("Apparel companies' ESG data disclosure ratings & supplier transparency"),r.addTags([{name:"keywords",content:"wikirate, esg data,apparel supply chain,apparel company esg ratings,manufacturing supply chain,supply chain,supply transparency,apparel esg data,fashion esg data,esg company,esg companies,esg company rating,esg rating,esg ratings,esg ranking,esg rankings,esg data ranking,esg data rating,environmental,environmental concerns,social concerns,environmental social corporate governance,adidas esg data,data visualizations,data infographics, Laureen van Breen"},{name:"description",content:"Discover ESG data disclosure ratings and supplier transparency of the biggest 100 apparel companies in infographics, charts, and maps by Wikirate."},{name:"author",content:"Theresa Heithaus, Tom Howie, Laureen van Breen, Melanie Twele, Vasiliki Gkatziaki"}])}ngOnInit(){this.route.params.subscribe(n=>{this.report_params={id:+n.id,year:n.year}}),this.scrollToTop()}scrollToTop(){this.scroll.scrollToPosition([0,0])}static{this.\u0275fac=function(i){return new(i||e)(ee(Cl),ee(tv),ee(qK),ee(MR))}}static{this.\u0275cmp=Cn({type:e,selectors:[["dynamic-report"]],decls:8,vars:0,consts:[["id","market-cap-map"]],template:function(i,r){1&i&&Ke(0,"intro")(1,"app-market-cap-map",0)(2,"app-esg-disclosure-rates")(3,"app-esg-performance")(4,"app-supplier-lists-on-wikirate")(5,"app-number-of-suppliers-per-company")(6,"app-suppliers-map")(7,"more-data")},dependencies:[MBe,spt,lpt,cpt,hpt,ppt,ypt,vpt]})}}return e})();function Gye(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Wye(e){return[Lr,Ho,zo,$r].some(function(t){return e[t]>=0})}const qye={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function wpt(e){var t=e.state,n=e.name,i=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,s=vm(t,{elementContext:"reference"}),a=vm(t,{altBoundary:!0}),l=Gye(s,i),c=Gye(a,r,o),u=Wye(l),d=Wye(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};var kV=XD({defaultModifiers:[QF,ZF,JF,eP,tP,qF,KF,XF,qye]});const hf=new Map,OV={set(e,t,n){hf.has(e)||hf.set(e,new Map);const i=hf.get(e);i.has(t)||0===i.size?i.set(t,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(e,t)=>hf.has(e)&&hf.get(e).get(t)||null,remove(e,t){if(!hf.has(e))return;const n=hf.get(e);n.delete(t),0===n.size&&hf.delete(e)}},RV="transitionend",Yye=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(t,n)=>`#${CSS.escape(n)}`)),e),Kye=e=>{e.dispatchEvent(new Event(RV))},Cu=e=>!(!e||"object"!=typeof e)&&(typeof e.jquery<"u"&&(e=e[0]),typeof e.nodeType<"u"),pf=e=>Cu(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(Yye(e)):null,_y=e=>{if(!Cu(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const i=e.closest("summary");if(i&&i.parentNode!==n||null===i)return!1}return t},gf=e=>!(e&&e.nodeType===Node.ELEMENT_NODE&&!e.classList.contains("disabled"))||(typeof e.disabled<"u"?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")),Xye=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?Xye(e.parentNode):null},TN=()=>{},Qye=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,FV=[],Xs=()=>"rtl"===document.documentElement.dir,Qs=e=>{(e=>{"loading"===document.readyState?(FV.length||document.addEventListener("DOMContentLoaded",()=>{for(const t of FV)t()}),FV.push(e)):e()})(()=>{const t=Qye();if(t){const n=e.NAME,i=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=i,e.jQueryInterface)}})},Ao=(e,t=[],n=e)=>"function"==typeof e?e(...t):n,Zye=(e,t,n=!0)=>{if(!n)return void Ao(e);const r=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const i=Number.parseFloat(t),r=Number.parseFloat(n);return i||r?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0})(t)+5;let o=!1;const s=({target:a})=>{a===t&&(o=!0,t.removeEventListener(RV,s),Ao(e))};t.addEventListener(RV,s),setTimeout(()=>{o||Kye(t)},r)},PV=(e,t,n,i)=>{const r=e.length;let o=e.indexOf(t);return-1===o?!n&&i?e[r-1]:e[0]:(o+=n?1:-1,i&&(o=(o+r)%r),e[Math.max(0,Math.min(o,r-1))])},Mpt=/[^.]*(?=\..*)\.|.*/,Npt=/\..*/,Ipt=/::\d+$/,LV={};let Jye=1;const e0e={mouseenter:"mouseover",mouseleave:"mouseout"},kpt=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function t0e(e,t){return t&&`${t}::${Jye++}`||e.uidEvent||Jye++}function n0e(e){const t=t0e(e);return e.uidEvent=t,LV[t]=LV[t]||{},LV[t]}function i0e(e,t,n=null){return Object.values(e).find(i=>i.callable===t&&i.delegationSelector===n)}function r0e(e,t,n){const i="string"==typeof t,r=i?n:t||n;let o=s0e(e);return kpt.has(o)||(o=e),[i,r,o]}function o0e(e,t,n,i,r){if("string"!=typeof t||!e)return;let[o,s,a]=r0e(t,n,i);var p;t in e0e&&(p=s,s=function(g){if(!g.relatedTarget||g.relatedTarget!==g.delegateTarget&&!g.delegateTarget.contains(g.relatedTarget))return p.call(this,g)});const l=n0e(e),c=l[a]||(l[a]={}),u=i0e(c,s,o?n:null);if(u)return void(u.oneOff=u.oneOff&&r);const d=t0e(s,t.replace(Mpt,"")),f=o?function Rpt(e,t,n){return function i(r){const o=e.querySelectorAll(t);for(let{target:s}=r;s&&s!==this;s=s.parentNode)for(const a of o)if(a===s)return BV(r,{delegateTarget:s}),i.oneOff&&le.off(e,r.type,t,n),n.apply(s,[r])}}(e,n,s):function Opt(e,t){return function n(i){return BV(i,{delegateTarget:e}),n.oneOff&&le.off(e,i.type,t),t.apply(e,[i])}}(e,s);f.delegationSelector=o?n:null,f.callable=s,f.oneOff=r,f.uidEvent=d,c[d]=f,e.addEventListener(a,f,o)}function $V(e,t,n,i,r){const o=i0e(t[n],i,r);o&&(e.removeEventListener(n,o,!!r),delete t[n][o.uidEvent])}function Fpt(e,t,n,i){const r=t[n]||{};for(const[o,s]of Object.entries(r))o.includes(i)&&$V(e,t,n,s.callable,s.delegationSelector)}function s0e(e){return e=e.replace(Npt,""),e0e[e]||e}const le={on(e,t,n,i){o0e(e,t,n,i,!1)},one(e,t,n,i){o0e(e,t,n,i,!0)},off(e,t,n,i){if("string"!=typeof t||!e)return;const[r,o,s]=r0e(t,n,i),a=s!==t,l=n0e(e),c=l[s]||{},u=t.startsWith(".");if(typeof o<"u"){if(!Object.keys(c).length)return;$V(e,l,s,o,r?n:null)}else{if(u)for(const d of Object.keys(l))Fpt(e,l,d,t.slice(1));for(const[d,f]of Object.entries(c)){const h=d.replace(Ipt,"");(!a||t.includes(h))&&$V(e,l,s,f.callable,f.delegationSelector)}}},trigger(e,t,n){if("string"!=typeof t||!e)return null;const i=Qye();let s=null,a=!0,l=!0,c=!1;t!==s0e(t)&&i&&(s=i.Event(t,n),i(e).trigger(s),a=!s.isPropagationStopped(),l=!s.isImmediatePropagationStopped(),c=s.isDefaultPrevented());const u=BV(new Event(t,{bubbles:a,cancelable:!0}),n);return c&&u.preventDefault(),l&&e.dispatchEvent(u),u.defaultPrevented&&s&&s.preventDefault(),u}};function BV(e,t={}){for(const[n,i]of Object.entries(t))try{e[n]=i}catch{Object.defineProperty(e,n,{configurable:!0,get:()=>i})}return e}function a0e(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch{return e}}function jV(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const Du={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${jV(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${jV(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter(i=>i.startsWith("bs")&&!i.startsWith("bsConfig"));for(const i of n){let r=i.replace(/^bs/,"");r=r.charAt(0).toLowerCase()+r.slice(1,r.length),t[r]=a0e(e.dataset[i])}return t},getDataAttribute:(e,t)=>a0e(e.getAttribute(`data-bs-${jV(t)}`))};class Dw{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,n){const i=Cu(n)?Du.getDataAttribute(n,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...Cu(n)?Du.getDataAttributes(n):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,n=this.constructor.DefaultType){for(const[i,r]of Object.entries(n)){const o=t[i],s=Cu(o)?"element":null==(e=o)?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(r).test(s))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${s}" but expected type "${r}".`)}var e}}class el extends Dw{constructor(t,n){super(),(t=pf(t))&&(this._element=t,this._config=this._getConfig(n),OV.set(this._element,this.constructor.DATA_KEY,this))}dispose(){OV.remove(this._element,this.constructor.DATA_KEY),le.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,n,i=!0){Zye(t,n,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return OV.get(pf(t),this.DATA_KEY)}static getOrCreateInstance(t,n={}){return this.getInstance(t)||new this(t,"object"==typeof n?n:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const VV=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&"#"!==n?n.trim():null}return t?t.split(",").map(n=>Yye(n)).join(","):null},Ve={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter(n=>n.matches(t)),parents(e,t){const n=[];let i=e.parentNode.closest(t);for(;i;)n.push(i),i=i.parentNode.closest(t);return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(n=>`${n}:not([tabindex^="-"])`).join(",");return this.find(t,e).filter(n=>!gf(n)&&_y(n))},getSelectorFromElement(e){const t=VV(e);return t&&Ve.findOne(t)?t:null},getElementFromSelector(e){const t=VV(e);return t?Ve.findOne(t):null},getMultipleElementsFromSelector(e){const t=VV(e);return t?Ve.find(t):[]}},xN=(e,t="hide")=>{const i=e.NAME;le.on(document,`click.dismiss${e.EVENT_KEY}`,`[data-bs-dismiss="${i}"]`,function(r){if(["A","AREA"].includes(this.tagName)&&r.preventDefault(),gf(this))return;const o=Ve.getElementFromSelector(this)||this.closest(`.${i}`);e.getOrCreateInstance(o)[t]()})};class AN extends el{static get NAME(){return"alert"}close(){if(le.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const n=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,n)}_destroyElement(){this._element.remove(),le.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(t){return this.each(function(){const n=AN.getOrCreateInstance(this);if("string"==typeof t){if(void 0===n[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);n[t](this)}})}}xN(AN,"close"),Qs(AN);const c0e='[data-bs-toggle="button"]';class MN extends el{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each(function(){const n=MN.getOrCreateInstance(this);"toggle"===t&&n[t]()})}}le.on(document,"click.bs.button.data-api",c0e,e=>{e.preventDefault();const t=e.target.closest(c0e);MN.getOrCreateInstance(t).toggle()}),Qs(MN);const yy=".bs.swipe",Ypt=`touchstart${yy}`,Kpt=`touchmove${yy}`,Xpt=`touchend${yy}`,Qpt=`pointerdown${yy}`,Zpt=`pointerup${yy}`,igt={endCallback:null,leftCallback:null,rightCallback:null},rgt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class NN extends Dw{constructor(t,n){super(),this._element=t,t&&NN.isSupported()&&(this._config=this._getConfig(n),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return igt}static get DefaultType(){return rgt}static get NAME(){return"swipe"}dispose(){le.off(this._element,yy)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),Ao(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const n=t/this._deltaX;this._deltaX=0,n&&Ao(n>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(le.on(this._element,Qpt,t=>this._start(t)),le.on(this._element,Zpt,t=>this._end(t)),this._element.classList.add("pointer-event")):(le.on(this._element,Ypt,t=>this._start(t)),le.on(this._element,Kpt,t=>this._move(t)),le.on(this._element,Xpt,t=>this._end(t)))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const mf=".bs.carousel",sgt="ArrowLeft",agt="ArrowRight",Sw="next",vy="prev",by="left",IN="right",cgt=`slide${mf}`,UV=`slid${mf}`,ugt=`keydown${mf}`,dgt=`mouseenter${mf}`,fgt=`mouseleave${mf}`,hgt=`dragstart${mf}`,pgt=`load${mf}.data-api`,ggt=`click${mf}.data-api`,kN="active",h0e=".carousel-item",wgt=".active"+h0e,Tgt={[sgt]:IN,[agt]:by},xgt={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Agt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Tw extends el{constructor(t,n){super(t,n),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Ve.findOne(".carousel-indicators",this._element),this._addEventListeners(),"carousel"===this._config.ride&&this.cycle()}static get Default(){return xgt}static get DefaultType(){return Agt}static get NAME(){return"carousel"}next(){this._slide(Sw)}nextWhenVisible(){!document.hidden&&_y(this._element)&&this.next()}prev(){this._slide(vy)}pause(){this._isSliding&&Kye(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding)return void le.one(this._element,UV,()=>this.cycle());this.cycle()}}to(t){const n=this._getItems();if(t>n.length-1||t<0)return;if(this._isSliding)return void le.one(this._element,UV,()=>this.to(t));const i=this._getItemIndex(this._getActive());i!==t&&this._slide(t>i?Sw:vy,n[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&le.on(this._element,ugt,t=>this._keydown(t)),"hover"===this._config.pause&&(le.on(this._element,dgt,()=>this.pause()),le.on(this._element,fgt,()=>this._maybeEnableCycle())),this._config.touch&&NN.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const i of Ve.find(".carousel-item img",this._element))le.on(i,hgt,r=>r.preventDefault());this._swipeHelper=new NN(this._element,{leftCallback:()=>this._slide(this._directionToOrder(by)),rightCallback:()=>this._slide(this._directionToOrder(IN)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}})}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const n=Tgt[t.key];n&&(t.preventDefault(),this._slide(this._directionToOrder(n)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const n=Ve.findOne(".active",this._indicatorsElement);n.classList.remove(kN),n.removeAttribute("aria-current");const i=Ve.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(kN),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const n=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=n||this._config.defaultInterval}_slide(t,n=null){if(this._isSliding)return;const i=this._getActive(),r=t===Sw,o=n||PV(this._getItems(),i,r,this._config.wrap);if(o===i)return;const s=this._getItemIndex(o),a=h=>le.trigger(this._element,h,{relatedTarget:o,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:s});if(a(cgt).defaultPrevented||!i||!o)return;const c=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(s),this._activeElement=o;const u=r?"carousel-item-start":"carousel-item-end",d=r?"carousel-item-next":"carousel-item-prev";o.classList.add(d),i.classList.add(u),o.classList.add(u),this._queueCallback(()=>{o.classList.remove(u,d),o.classList.add(kN),i.classList.remove(kN,d,u),this._isSliding=!1,a(UV)},i,this._isAnimated()),c&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Ve.findOne(wgt,this._element)}_getItems(){return Ve.find(h0e,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return Xs()?t===by?vy:Sw:t===by?Sw:vy}_orderToDirection(t){return Xs()?t===vy?by:IN:t===vy?IN:by}static jQueryInterface(t){return this.each(function(){const n=Tw.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===n[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);n[t]()}}else n.to(t)})}}le.on(document,ggt,"[data-bs-slide], [data-bs-slide-to]",function(e){const t=Ve.getElementFromSelector(this);if(!t||!t.classList.contains("carousel"))return;e.preventDefault();const n=Tw.getOrCreateInstance(t),i=this.getAttribute("data-bs-slide-to");return i?(n.to(i),void n._maybeEnableCycle()):"next"===Du.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())}),le.on(window,pgt,()=>{const e=Ve.find('[data-bs-ride="carousel"]');for(const t of e)Tw.getOrCreateInstance(t)}),Qs(Tw);const xw=".bs.collapse",Igt=`show${xw}`,kgt=`shown${xw}`,Ogt=`hide${xw}`,Rgt=`hidden${xw}`,Fgt=`click${xw}.data-api`,zV="show",wy="collapse",ON="collapsing",Lgt=`:scope .${wy} .${wy}`,HV='[data-bs-toggle="collapse"]',Ugt={parent:null,toggle:!0},zgt={parent:"(null|element)",toggle:"boolean"};class Aw extends el{constructor(t,n){super(t,n),this._isTransitioning=!1,this._triggerArray=[];const i=Ve.find(HV);for(const r of i){const o=Ve.getSelectorFromElement(r),s=Ve.find(o).filter(a=>a===this._element);null!==o&&s.length&&this._triggerArray.push(r)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Ugt}static get DefaultType(){return zgt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(a=>a!==this._element).map(a=>Aw.getOrCreateInstance(a,{toggle:!1}))),t.length&&t[0]._isTransitioning||le.trigger(this._element,Igt).defaultPrevented)return;for(const a of t)a.hide();const i=this._getDimension();this._element.classList.remove(wy),this._element.classList.add(ON),this._element.style[i]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const s=`scroll${i[0].toUpperCase()+i.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(ON),this._element.classList.add(wy,zV),this._element.style[i]="",le.trigger(this._element,kgt)},this._element,!0),this._element.style[i]=`${this._element[s]}px`}hide(){if(this._isTransitioning||!this._isShown()||le.trigger(this._element,Ogt).defaultPrevented)return;const n=this._getDimension();this._element.style[n]=`${this._element.getBoundingClientRect()[n]}px`,this._element.classList.add(ON),this._element.classList.remove(wy,zV);for(const r of this._triggerArray){const o=Ve.getElementFromSelector(r);o&&!this._isShown(o)&&this._addAriaAndCollapsedClass([r],!1)}this._isTransitioning=!0,this._element.style[n]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(ON),this._element.classList.add(wy),le.trigger(this._element,Rgt)},this._element,!0)}_isShown(t=this._element){return t.classList.contains(zV)}_configAfterMerge(t){return t.toggle=!!t.toggle,t.parent=pf(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(HV);for(const n of t){const i=Ve.getElementFromSelector(n);i&&this._addAriaAndCollapsedClass([n],this._isShown(i))}}_getFirstLevelChildren(t){const n=Ve.find(Lgt,this._config.parent);return Ve.find(t,this._config.parent).filter(i=>!n.includes(i))}_addAriaAndCollapsedClass(t,n){if(t.length)for(const i of t)i.classList.toggle("collapsed",!n),i.setAttribute("aria-expanded",n)}static jQueryInterface(t){const n={};return"string"==typeof t&&/show|hide/.test(t)&&(n.toggle=!1),this.each(function(){const i=Aw.getOrCreateInstance(this,n);if("string"==typeof t){if(typeof i[t]>"u")throw new TypeError(`No method named "${t}"`);i[t]()}})}}le.on(document,Fgt,HV,function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const t of Ve.getMultipleElementsFromSelector(this))Aw.getOrCreateInstance(t,{toggle:!1}).toggle()}),Qs(Aw);const Fp=".bs.dropdown",GV=".data-api",Ggt="ArrowUp",m0e="ArrowDown",qgt=`hide${Fp}`,Ygt=`hidden${Fp}`,Kgt=`show${Fp}`,Xgt=`shown${Fp}`,_0e=`click${Fp}${GV}`,y0e=`keydown${Fp}${GV}`,Qgt=`keyup${Fp}${GV}`,Ey="show",Pp='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',imt=`${Pp}.${Ey}`,RN=".dropdown-menu",amt=Xs()?"top-end":"top-start",lmt=Xs()?"top-start":"top-end",cmt=Xs()?"bottom-end":"bottom-start",umt=Xs()?"bottom-start":"bottom-end",dmt=Xs()?"left-start":"right-start",fmt=Xs()?"right-start":"left-start",gmt={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},mmt={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class gc extends el{constructor(t,n){super(t,n),this._popper=null,this._parent=this._element.parentNode,this._menu=Ve.next(this._element,RN)[0]||Ve.prev(this._element,RN)[0]||Ve.findOne(RN,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return gmt}static get DefaultType(){return mmt}static get NAME(){return"dropdown"}toggle(){return this._isShown()?this.hide():this.show()}show(){if(gf(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!le.trigger(this._element,Kgt,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const i of[].concat(...document.body.children))le.on(i,"mouseover",TN);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Ey),this._element.classList.add(Ey),le.trigger(this._element,Xgt,t)}}hide(){!gf(this._element)&&this._isShown()&&this._completeHide({relatedTarget:this._element})}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!le.trigger(this._element,qgt,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const i of[].concat(...document.body.children))le.off(i,"mouseover",TN);this._popper&&this._popper.destroy(),this._menu.classList.remove(Ey),this._element.classList.remove(Ey),this._element.setAttribute("aria-expanded","false"),Du.removeDataAttribute(this._menu,"popper"),le.trigger(this._element,Ygt,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!Cu(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${"dropdown".toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(typeof $w>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:Cu(this._config.reference)?t=pf(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const n=this._getPopperConfig();this._popper=kV(t,this._menu,n)}_isShown(){return this._menu.classList.contains(Ey)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return dmt;if(t.classList.contains("dropstart"))return fmt;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const n="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?n?lmt:amt:n?umt:cmt}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(n=>Number.parseInt(n,10)):"function"==typeof t?n=>t(n,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(Du.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...Ao(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:n}){const i=Ve.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(r=>_y(r));i.length&&PV(i,n,t===m0e,!i.includes(n)).focus()}static jQueryInterface(t){return this.each(function(){const n=gc.getOrCreateInstance(this,t);if("string"==typeof t){if(typeof n[t]>"u")throw new TypeError(`No method named "${t}"`);n[t]()}})}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const n=Ve.find(imt);for(const i of n){const r=gc.getInstance(i);if(!r||!1===r._config.autoClose)continue;const o=t.composedPath(),s=o.includes(r._menu);if(o.includes(r._element)||"inside"===r._config.autoClose&&!s||"outside"===r._config.autoClose&&s||r._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const a={relatedTarget:r._element};"click"===t.type&&(a.clickEvent=t),r._completeHide(a)}}static dataApiKeydownHandler(t){const n=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,r=[Ggt,m0e].includes(t.key);if(!r&&!i||n&&!i)return;t.preventDefault();const o=this.matches(Pp)?this:Ve.prev(this,Pp)[0]||Ve.next(this,Pp)[0]||Ve.findOne(Pp,t.delegateTarget.parentNode),s=gc.getOrCreateInstance(o);if(r)return t.stopPropagation(),s.show(),void s._selectMenuItem(t);s._isShown()&&(t.stopPropagation(),s.hide(),o.focus())}}le.on(document,y0e,Pp,gc.dataApiKeydownHandler),le.on(document,y0e,RN,gc.dataApiKeydownHandler),le.on(document,_0e,gc.clearMenus),le.on(document,Qgt,gc.clearMenus),le.on(document,_0e,Pp,function(e){e.preventDefault(),gc.getOrCreateInstance(this).toggle()}),Qs(gc);const w0e="mousedown.bs.backdrop",ymt={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},vmt={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class E0e extends Dw{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return ymt}static get DefaultType(){return vmt}static get NAME(){return"backdrop"}show(t){if(!this._config.isVisible)return void Ao(t);this._append();this._getElement().classList.add("show"),this._emulateAnimation(()=>{Ao(t)})}hide(t){this._config.isVisible?(this._getElement().classList.remove("show"),this._emulateAnimation(()=>{this.dispose(),Ao(t)})):Ao(t)}dispose(){this._isAppended&&(le.off(this._element,w0e),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=pf(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),le.on(t,w0e,()=>{Ao(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){Zye(t,this._getElement(),this._config.isAnimated)}}const FN=".bs.focustrap",wmt=`focusin${FN}`,Emt=`keydown.tab${FN}`,Smt={autofocus:!0,trapElement:null},Tmt={autofocus:"boolean",trapElement:"element"};class D0e extends Dw{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Smt}static get DefaultType(){return Tmt}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),le.off(document,FN),le.on(document,wmt,t=>this._handleFocusin(t)),le.on(document,Emt,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,le.off(document,FN))}_handleFocusin(t){const{trapElement:n}=this._config;if(t.target===document||t.target===n||n.contains(t.target))return;const i=Ve.focusableChildren(n);0===i.length?n.focus():"backward"===this._lastTabNavDirection?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?"backward":"forward")}}const S0e=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",T0e=".sticky-top",PN="padding-right",x0e="margin-right";class WV{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,PN,n=>n+t),this._setElementAttributes(S0e,PN,n=>n+t),this._setElementAttributes(T0e,x0e,n=>n-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,PN),this._resetElementAttributes(S0e,PN),this._resetElementAttributes(T0e,x0e)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,n,i){const r=this.getWidth();this._applyManipulationCallback(t,s=>{if(s!==this._element&&window.innerWidth>s.clientWidth+r)return;this._saveInitialAttribute(s,n);const a=window.getComputedStyle(s).getPropertyValue(n);s.style.setProperty(n,`${i(Number.parseFloat(a))}px`)})}_saveInitialAttribute(t,n){const i=t.style.getPropertyValue(n);i&&Du.setDataAttribute(t,n,i)}_resetElementAttributes(t,n){this._applyManipulationCallback(t,r=>{const o=Du.getDataAttribute(r,n);null!==o?(Du.removeDataAttribute(r,n),r.style.setProperty(n,o)):r.style.removeProperty(n)})}_applyManipulationCallback(t,n){if(Cu(t))n(t);else for(const i of Ve.find(t,this._element))n(i)}}const Zs=".bs.modal",Nmt=`hide${Zs}`,Imt=`hidePrevented${Zs}`,A0e=`hidden${Zs}`,M0e=`show${Zs}`,kmt=`shown${Zs}`,Omt=`resize${Zs}`,Rmt=`click.dismiss${Zs}`,Fmt=`mousedown.dismiss${Zs}`,Pmt=`keydown.dismiss${Zs}`,Lmt=`click${Zs}.data-api`,N0e="modal-open",qV="modal-static",zmt={backdrop:!0,focus:!0,keyboard:!0},Hmt={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Cy extends el{constructor(t,n){super(t,n),this._dialog=Ve.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new WV,this._addEventListeners()}static get Default(){return zmt}static get DefaultType(){return Hmt}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||le.trigger(this._element,M0e,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(N0e),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t)))}hide(){!this._isShown||this._isTransitioning||le.trigger(this._element,Nmt).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove("show"),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){le.off(window,Zs),le.off(this._dialog,Zs),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new E0e({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new D0e({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const n=Ve.findOne(".modal-body",this._dialog);n&&(n.scrollTop=0),this._element.classList.add("show"),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,le.trigger(this._element,kmt,{relatedTarget:t})},this._dialog,this._isAnimated())}_addEventListeners(){le.on(this._element,Pmt,t=>{if("Escape"===t.key){if(this._config.keyboard)return void this.hide();this._triggerBackdropTransition()}}),le.on(window,Omt,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),le.on(this._element,Fmt,t=>{le.one(this._element,Rmt,n=>{if(this._element===t.target&&this._element===n.target){if("static"===this._config.backdrop)return void this._triggerBackdropTransition();this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(N0e),this._resetAdjustments(),this._scrollBar.reset(),le.trigger(this._element,A0e)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(le.trigger(this._element,Imt).defaultPrevented)return;const n=this._element.scrollHeight>document.documentElement.clientHeight,i=this._element.style.overflowY;"hidden"===i||this._element.classList.contains(qV)||(n||(this._element.style.overflowY="hidden"),this._element.classList.add(qV),this._queueCallback(()=>{this._element.classList.remove(qV),this._queueCallback(()=>{this._element.style.overflowY=i},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,n=this._scrollBar.getWidth(),i=n>0;if(i&&!t){const r=Xs()?"paddingLeft":"paddingRight";this._element.style[r]=`${n}px`}if(!i&&t){const r=Xs()?"paddingRight":"paddingLeft";this._element.style[r]=`${n}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,n){return this.each(function(){const i=Cy.getOrCreateInstance(this,t);if("string"==typeof t){if(typeof i[t]>"u")throw new TypeError(`No method named "${t}"`);i[t](n)}})}}le.on(document,Lmt,'[data-bs-toggle="modal"]',function(e){const t=Ve.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),le.one(t,M0e,r=>{r.defaultPrevented||le.one(t,A0e,()=>{_y(this)&&this.focus()})});const n=Ve.findOne(".modal.show");n&&Cy.getInstance(n).hide(),Cy.getOrCreateInstance(t).toggle(this)}),xN(Cy),Qs(Cy);const Su=".bs.offcanvas",Wmt=`load${Su}.data-api`,P0e=".offcanvas.show",Kmt=`show${Su}`,Xmt=`shown${Su}`,Qmt=`hide${Su}`,L0e=`hidePrevented${Su}`,$0e=`hidden${Su}`,Zmt=`resize${Su}`,Jmt=`click${Su}.data-api`,e_t=`keydown.dismiss${Su}`,n_t={backdrop:!0,keyboard:!0,scroll:!1},i_t={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class _f extends el{constructor(t,n){super(t,n),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return n_t}static get DefaultType(){return i_t}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||le.trigger(this._element,Kmt,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new WV).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add("showing"),this._queueCallback(()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add("show"),this._element.classList.remove("showing"),le.trigger(this._element,Xmt,{relatedTarget:t})},this._element,!0))}hide(){this._isShown&&!le.trigger(this._element,Qmt).defaultPrevented&&(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add("hiding"),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove("show","hiding"),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new WV).reset(),le.trigger(this._element,$0e)},this._element,!0))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const n=!!this._config.backdrop;return new E0e({className:"offcanvas-backdrop",isVisible:n,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:n?()=>{"static"!==this._config.backdrop?this.hide():le.trigger(this._element,L0e)}:null})}_initializeFocusTrap(){return new D0e({trapElement:this._element})}_addEventListeners(){le.on(this._element,e_t,t=>{if("Escape"===t.key){if(this._config.keyboard)return void this.hide();le.trigger(this._element,L0e)}})}static jQueryInterface(t){return this.each(function(){const n=_f.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);n[t](this)}})}}le.on(document,Jmt,'[data-bs-toggle="offcanvas"]',function(e){const t=Ve.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),gf(this))return;le.one(t,$0e,()=>{_y(this)&&this.focus()});const n=Ve.findOne(P0e);n&&n!==t&&_f.getInstance(n).hide(),_f.getOrCreateInstance(t).toggle(this)}),le.on(window,Wmt,()=>{for(const e of Ve.find(P0e))_f.getOrCreateInstance(e).show()}),le.on(window,Zmt,()=>{for(const e of Ve.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(e).position&&_f.getOrCreateInstance(e).hide()}),xN(_f),Qs(_f);const B0e={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},r_t=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),o_t=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,s_t=(e,t)=>{const n=e.nodeName.toLowerCase();return t.includes(n)?!r_t.has(n)||!!o_t.test(e.nodeValue):t.filter(i=>i instanceof RegExp).some(i=>i.test(n))},c_t={allowList:B0e,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},u_t={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},d_t={entry:"(string|element|function|null)",selector:"(string|element)"};class f_t extends Dw{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return c_t}static get DefaultType(){return u_t}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(t=>this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[r,o]of Object.entries(this._config.content))this._setContent(t,o,r);const n=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&n.classList.add(...i.split(" ")),n}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[n,i]of Object.entries(t))super._typeCheckConfig({selector:n,entry:i},d_t)}_setContent(t,n,i){const r=Ve.findOne(i,t);if(r){if(!(n=this._resolvePossibleFunction(n)))return void r.remove();if(Cu(n))return void this._putElementInTemplate(pf(n),r);if(this._config.html)return void(r.innerHTML=this._maybeSanitize(n));r.textContent=n}}_maybeSanitize(t){return this._config.sanitize?function a_t(e,t,n){if(!e.length)return e;if(n&&"function"==typeof n)return n(e);const r=(new window.DOMParser).parseFromString(e,"text/html"),o=[].concat(...r.body.querySelectorAll("*"));for(const s of o){const a=s.nodeName.toLowerCase();if(!Object.keys(t).includes(a)){s.remove();continue}const l=[].concat(...s.attributes),c=[].concat(t["*"]||[],t[a]||[]);for(const u of l)s_t(u,c)||s.removeAttribute(u.nodeName)}return r.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return Ao(t,[this])}_putElementInTemplate(t,n){if(this._config.html)return n.innerHTML="",void n.append(t);n.textContent=t.textContent}}const p_t=new Set(["sanitize","allowList","sanitizeFn"]),YV="fade",LN="show",m_t=".tooltip-inner",V0e="hide.bs.modal",Mw="hover",KV="focus",M_t={AUTO:"auto",TOP:"top",RIGHT:Xs()?"left":"right",BOTTOM:"bottom",LEFT:Xs()?"right":"left"},N_t={allowList:B0e,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},I_t={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Dy extends el{constructor(t,n){if(typeof $w>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,n),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return N_t}static get DefaultType(){return I_t}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown())return void this._leave();this._enter()}}dispose(){clearTimeout(this._timeout),le.off(this._element.closest(".modal"),V0e,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=le.trigger(this._element,this.constructor.eventName("show")),i=(Xye(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!i)return;this._disposePopper();const r=this._getTipElement();this._element.setAttribute("aria-describedby",r.getAttribute("id"));const{container:o}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(o.append(r),le.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(r),r.classList.add(LN),"ontouchstart"in document.documentElement)for(const a of[].concat(...document.body.children))le.on(a,"mouseover",TN);this._queueCallback(()=>{le.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!le.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(LN),"ontouchstart"in document.documentElement)for(const r of[].concat(...document.body.children))le.off(r,"mouseover",TN);this._activeTrigger.click=!1,this._activeTrigger[KV]=!1,this._activeTrigger[Mw]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),le.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const n=this._getTemplateFactory(t).toHtml();if(!n)return null;n.classList.remove(YV,LN),n.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e})(this.constructor.NAME).toString();return n.setAttribute("id",i),this._isAnimated()&&n.classList.add(YV),n}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new f_t({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[m_t]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(YV)}_isShown(){return this.tip&&this.tip.classList.contains(LN)}_createPopper(t){const n=Ao(this._config.placement,[this,t,this._element]),i=M_t[n.toUpperCase()];return kV(this._element,t,this._getPopperConfig(i))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(n=>Number.parseInt(n,10)):"function"==typeof t?n=>t(n,this._element):t}_resolvePossibleFunction(t){return Ao(t,[this._element])}_getPopperConfig(t){const n={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:i=>{this._getTipElement().setAttribute("data-popper-placement",i.state.placement)}}]};return{...n,...Ao(this._config.popperConfig,[n])}}_setListeners(){const t=this._config.trigger.split(" ");for(const n of t)if("click"===n)le.on(this._element,this.constructor.eventName("click"),this._config.selector,i=>{this._initializeOnDelegatedTarget(i).toggle()});else if("manual"!==n){const i=this.constructor.eventName(n===Mw?"mouseenter":"focusin"),r=this.constructor.eventName(n===Mw?"mouseleave":"focusout");le.on(this._element,i,this._config.selector,o=>{const s=this._initializeOnDelegatedTarget(o);s._activeTrigger["focusin"===o.type?KV:Mw]=!0,s._enter()}),le.on(this._element,r,this._config.selector,o=>{const s=this._initializeOnDelegatedTarget(o);s._activeTrigger["focusout"===o.type?KV:Mw]=s._element.contains(o.relatedTarget),s._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},le.on(this._element.closest(".modal"),V0e,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,n){clearTimeout(this._timeout),this._timeout=setTimeout(t,n)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const n=Du.getDataAttributes(this._element);for(const i of Object.keys(n))p_t.has(i)&&delete n[i];return t={...n,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:pf(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[n,i]of Object.entries(this._config))this.constructor.Default[n]!==i&&(t[n]=i);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){const n=Dy.getOrCreateInstance(this,t);if("string"==typeof t){if(typeof n[t]>"u")throw new TypeError(`No method named "${t}"`);n[t]()}})}}Qs(Dy);const O_t=".popover-header",R_t=".popover-body",F_t={...Dy.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},P_t={...Dy.DefaultType,content:"(null|string|element|function)"};class XV extends Dy{static get Default(){return F_t}static get DefaultType(){return P_t}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[O_t]:this._getTitle(),[R_t]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each(function(){const n=XV.getOrCreateInstance(this,t);if("string"==typeof t){if(typeof n[t]>"u")throw new TypeError(`No method named "${t}"`);n[t]()}})}}Qs(XV);const QV=".bs.scrollspy",B_t=`activate${QV}`,U0e=`click${QV}`,j_t=`load${QV}.data-api`,Sy="active",ZV="[href]",q_t={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Y_t={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class $N extends el{constructor(t,n){super(t,n),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return q_t}static get DefaultType(){return Y_t}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=pf(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map(n=>Number.parseFloat(n))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(le.off(this._config.target,U0e),le.on(this._config.target,U0e,ZV,t=>{const n=this._observableSections.get(t.target.hash);if(n){t.preventDefault();const i=this._rootElement||window,r=n.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:r,behavior:"smooth"});i.scrollTop=r}}))}_getNewObserver(){return new IntersectionObserver(n=>this._observerCallback(n),{root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin})}_observerCallback(t){const n=s=>this._targetLinks.get(`#${s.target.id}`),i=s=>{this._previousScrollData.visibleEntryTop=s.target.offsetTop,this._process(n(s))},r=(this._rootElement||document.documentElement).scrollTop,o=r>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=r;for(const s of t){if(!s.isIntersecting){this._activeTarget=null,this._clearActiveClass(n(s));continue}const a=s.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(o&&a){if(i(s),!r)return}else!o&&!a&&i(s)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=Ve.find(ZV,this._config.target);for(const n of t){if(!n.hash||gf(n))continue;const i=Ve.findOne(decodeURI(n.hash),this._element);_y(i)&&(this._targetLinks.set(decodeURI(n.hash),n),this._observableSections.set(n.hash,i))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Sy),this._activateParents(t),le.trigger(this._element,B_t,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))Ve.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Sy);else for(const n of Ve.parents(t,".nav, .list-group"))for(const i of Ve.prev(n,".nav-link, .nav-item > .nav-link, .list-group-item"))i.classList.add(Sy)}_clearActiveClass(t){t.classList.remove(Sy);const n=Ve.find(`${ZV}.${Sy}`,t);for(const i of n)i.classList.remove(Sy)}static jQueryInterface(t){return this.each(function(){const n=$N.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);n[t]()}})}}le.on(window,j_t,()=>{for(const e of Ve.find('[data-bs-spy="scroll"]'))$N.getOrCreateInstance(e)}),Qs($N);const Lp=".bs.tab",X_t=`hide${Lp}`,Q_t=`hidden${Lp}`,Z_t=`show${Lp}`,J_t=`shown${Lp}`,eyt=`click${Lp}`,tyt=`keydown${Lp}`,nyt=`load${Lp}`,iyt="ArrowLeft",H0e="ArrowRight",ryt="ArrowUp",G0e="ArrowDown",JV="Home",W0e="End",$p="active",eU="show",Y0e=".dropdown-toggle",tU=`:not(${Y0e})`,K0e='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',nU=`.nav-link${tU}, .list-group-item${tU}, [role="tab"]${tU}, ${K0e}`,uyt=`.${$p}[data-bs-toggle="tab"], .${$p}[data-bs-toggle="pill"], .${$p}[data-bs-toggle="list"]`;class Ty extends el{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),le.on(this._element,tyt,n=>this._keydown(n)))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const n=this._getActiveElem(),i=n?le.trigger(n,X_t,{relatedTarget:t}):null;le.trigger(t,Z_t,{relatedTarget:n}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(n,t),this._activate(t,n))}_activate(t,n){t&&(t.classList.add($p),this._activate(Ve.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),le.trigger(t,J_t,{relatedTarget:n})):t.classList.add(eU)},t,t.classList.contains("fade")))}_deactivate(t,n){t&&(t.classList.remove($p),t.blur(),this._deactivate(Ve.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),le.trigger(t,Q_t,{relatedTarget:n})):t.classList.remove(eU)},t,t.classList.contains("fade")))}_keydown(t){if(![iyt,H0e,ryt,G0e,JV,W0e].includes(t.key))return;t.stopPropagation(),t.preventDefault();const n=this._getChildren().filter(r=>!gf(r));let i;if([JV,W0e].includes(t.key))i=n[t.key===JV?0:n.length-1];else{const r=[H0e,G0e].includes(t.key);i=PV(n,t.target,r,!0)}i&&(i.focus({preventScroll:!0}),Ty.getOrCreateInstance(i).show())}_getChildren(){return Ve.find(nU,this._parent)}_getActiveElem(){return this._getChildren().find(t=>this._elemIsActive(t))||null}_setInitialAttributes(t,n){this._setAttributeIfNotExists(t,"role","tablist");for(const i of n)this._setInitialAttributesOnChild(i)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const n=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",n),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),n||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const n=Ve.getElementFromSelector(t);n&&(this._setAttributeIfNotExists(n,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(n,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,n){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const r=(o,s)=>{const a=Ve.findOne(o,i);a&&a.classList.toggle(s,n)};r(Y0e,$p),r(".dropdown-menu",eU),i.setAttribute("aria-expanded",n)}_setAttributeIfNotExists(t,n,i){t.hasAttribute(n)||t.setAttribute(n,i)}_elemIsActive(t){return t.classList.contains($p)}_getInnerElement(t){return t.matches(nU)?t:Ve.findOne(nU,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each(function(){const n=Ty.getOrCreateInstance(this);if("string"==typeof t){if(void 0===n[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);n[t]()}})}}le.on(document,eyt,K0e,function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),!gf(this)&&Ty.getOrCreateInstance(this).show()}),le.on(window,nyt,()=>{for(const e of Ve.find(uyt))Ty.getOrCreateInstance(e)}),Qs(Ty);const yf=".bs.toast",fyt=`mouseover${yf}`,hyt=`mouseout${yf}`,pyt=`focusin${yf}`,gyt=`focusout${yf}`,myt=`hide${yf}`,_yt=`hidden${yf}`,yyt=`show${yf}`,vyt=`shown${yf}`,BN="show",jN="showing",wyt={animation:"boolean",autohide:"boolean",delay:"number"},Eyt={animation:!0,autohide:!0,delay:5e3};class VN extends el{constructor(t,n){super(t,n),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Eyt}static get DefaultType(){return wyt}static get NAME(){return"toast"}show(){le.trigger(this._element,yyt).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove("hide"),this._element.classList.add(BN,jN),this._queueCallback(()=>{this._element.classList.remove(jN),le.trigger(this._element,vyt),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&!le.trigger(this._element,myt).defaultPrevented&&(this._element.classList.add(jN),this._queueCallback(()=>{this._element.classList.add("hide"),this._element.classList.remove(jN,BN),le.trigger(this._element,_yt)},this._element,this._config.animation))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(BN),super.dispose()}isShown(){return this._element.classList.contains(BN)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,n){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=n;break;case"focusin":case"focusout":this._hasKeyboardInteraction=n}if(n)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){le.on(this._element,fyt,t=>this._onInteraction(t,!0)),le.on(this._element,hyt,t=>this._onInteraction(t,!1)),le.on(this._element,pyt,t=>this._onInteraction(t,!0)),le.on(this._element,gyt,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const n=VN.getOrCreateInstance(this,t);if("string"==typeof t){if(typeof n[t]>"u")throw new TypeError(`No method named "${t}"`);n[t](this)}})}}xN(VN),Qs(VN);const Cyt=["carousel"];function Dyt(e,t){if(1&e&&(U(0,"div",51)(1,"div",52)(2,"div",53),Ke(3,"img",54),z(),U(4,"div",55),X(5),z()()()),2&e){const n=t.$implicit;re(3),Mc("src",n.logo,Oo),Mc("alt",n.contributor),re(2),Or(" ",n.contributor," ")}}const Syt=[{path:"apparel_top_100/reports/0/latest",redirectTo:"/apparel_top_100/home",pathMatch:"full"},{path:"apparel_top_100/home",component:bpt},{path:"apparel_top_100/about",component:(()=>{class e{constructor(n,i,r){this.scroll=n,this.meta=i,this.titleService=r,this.images=[944,1011,984].map(o=>`https://picsum.photos/id/${o}/900/500`),this.currentIndex=1,this.contributors=[{contributor:"Fashion Revolution",logo:"https://dq06ugkuram52.cloudfront.net/files/3765463/22301376-medium.jpg"},{contributor:"Open Supply Hub",logo:"https://dq06ugkuram52.cloudfront.net/files/5661929/40040943-medium.jpeg"},{contributor:"AMD Akademie Mode & Design Berlin",logo:"https://dq06ugkuram52.cloudfront.net/files/5467212/20834915-medium.jpg"},{contributor:"Walk Free Initiative",logo:"https://dq06ugkuram52.cloudfront.net/files/1831839/12602420-medium.png"},{contributor:"Clean Clothes Campaign",logo:"https://dq06ugkuram52.cloudfront.net/files/564260/12604027-medium.png"},{contributor:"Columbia University SIPA",logo:"https://dq06ugkuram52.cloudfront.net/files/8104623/26042255-medium.png"},{contributor:"University of Wollongong",logo:"https://dq06ugkuram52.cloudfront.net/files/2549498/12602498-medium.png"},{contributor:"Glasgow Caledonian University",logo:"https://dq06ugkuram52.cloudfront.net/files/2381047/12602618-medium.png"},{contributor:"Nottingham Trent University",logo:"https://dq06ugkuram52.cloudfront.net/files/3700624/14894897-medium.png"},{contributor:"Universidad EAFIT",logo:"https://dq06ugkuram52.cloudfront.net/files/2593569/15069279-medium.png"},{contributor:"Ewha Womans University",logo:"https://dq06ugkuram52.cloudfront.net/files/2718582/12716390-medium.jpeg"},{contributor:"University of Connecticut",logo:"https://dq06ugkuram52.cloudfront.net/files/2877060/13099154-medium.png"},{contributor:"Australian National University",logo:"https://dq06ugkuram52.cloudfront.net/files/5295432/20444349-medium.png"},{contributor:"University of Nottingham",logo:"https://dq06ugkuram52.cloudfront.net/files/3149947/13561221-medium.png"},{contributor:"Global Reporting Initiative",logo:"https://dq06ugkuram52.cloudfront.net/files/801180/12603989-medium.jpg"},{contributor:"Ellen MacArthur Foundation",logo:"https://dq06ugkuram52.cloudfront.net/files/5405942/20706304-medium.png"},{contributor:"Textile Exchange",logo:"https://dq06ugkuram52.cloudfront.net/files/5406497/20709161-medium.jpg"},{contributor:"Science Based Targets Initiative",logo:"../../assets/SBTI-logo.jpg"},{contributor:"Poverty Footprint",logo:"https://dq06ugkuram52.cloudfront.net/files/1828145/12602552-medium.png"},{contributor:"Business & Human Rights Resource Center",logo:"../../assets/BHRRC-logo.png"},{logo:"https://dq06ugkuram52.cloudfront.net/files/5663399/21715396-medium.jpeg",contributor:"As You Sow"},{contributor:"Responsible Sourcing Network",logo:"https://dq06ugkuram52.cloudfront.net/files/5340655/20553116-medium.jpg"},{contributor:"Accord on Fire and Building Safety in Bangladesh",logo:"https://dq06ugkuram52.cloudfront.net/files/5424763/20734161-medium.png"},{contributor:"Ethical Trading Initiative",logo:"https://dq06ugkuram52.cloudfront.net/files/168320/20704071-medium.jpeg"},{contributor:"Fair Labor Association",logo:"https://dq06ugkuram52.cloudfront.net/files/61327/12604154-medium.gif"},{contributor:"ACT Action, Collaboration, Transformation",logo:"https://dq06ugkuram52.cloudfront.net/files/5417974/20726868-medium.png"},{contributor:"ShareAction",logo:"https://dq06ugkuram52.cloudfront.net/files/3763173/15057247-medium.png"},{contributor:"SustainoMetric",logo:"https://dq06ugkuram52.cloudfront.net/files/8126858/26084088-medium.png"}],r.setTitle("Who made Apparel 100 and why?"),i.addTags([{name:"keywords",content:"wikirate, esg data,apparel supply chain,apparel company esg ratings,manufacturing supply chain,supply chain,supply transparency,apparel esg data,fashion esg data,esg company,esg companies,esg company rating,esg rating,esg ratings,esg ranking,esg rankings,esg data ranking,esg data rating,environmental,environmental concerns,social concerns,environmental social corporate governance,adidas esg data,data visualizations,data infographics, Laureen van Breen"},{name:"description",content:"Apparel 100 was made by Wikirate to showcase supply chain transparency and ESG data in an engaging and accessible way. These maps and infographics create a sector snapshot that tells a story the world deserves to know."}]),i.updateTag({name:"og:title",content:"Behind Apparel 100"},"property='og:title'"),i.updateTag({name:"og:url",content:"//showcase.wikirate.org/#/apparel_top_100/about"},"property='og:url'"),i.updateTag({name:"og:description",content:"Apparel 100 was made by Wikirate.org to showcase our supply chain transparency and ESG data in an engaging and accessible way."},"property='og:description'"),i.updateTag({name:"twitter:description",content:"Apparel 100 was made by Wikirate.org to showcase our supply chain transparency and ESG data in an engaging and accessible way."},"property='twitter:description'"),i.updateTag({name:"twitter:title",content:"Behind Apparel 100"},"property='twitter:title'")}ngOnInit(){this.scrollToTop()}scrollToTop(){this.scroll.scrollToPosition([0,0])}static{this.\u0275fac=function(i){return new(i||e)(ee(tv),ee(qK),ee(MR))}}static{this.\u0275cmp=Cn({type:e,selectors:[["app-about"]],viewQuery:function(i,r){if(1&i&&ua(Cyt,7),2&i){let o;Wt(o=qt())&&(r.carousel=o.first)}},decls:152,vars:1,consts:[[1,"wikirate-creme-box"],[1,"wikirate-container"],[1,"row"],[1,"col","mt-2","text-center"],[1,"mini-title","text-center"],[1,"showcase-main-text","mt-3"],[1,"row","mt-4"],[1,"col-4","text-center","mb-4"],[1,"primary-info-navy"],[1,"secondary-info-navy","mt-1"],[1,"col-4","text-center"],[1,"wikirate-navy-box"],[1,"col-md-8"],[1,"showcase-title","text-white","mt-2","mb-2"],[1,"showcase-main-text-white"],[1,"col-md-4","vertical-center","justify-content-center"],["onclick","window.open('https://forms.gle/8ru3Wh8QMoJ8NZ8Y7','_blank')",1,"btn","btn-highlight","pr-4","pl-4","mt-2"],[1,"wikirate-box"],[1,"mini-title","text-center","mt-4"],[1,"row","mt-5","mb-4"],[1,"secondary-info-navy"],["id","quotes","data-ride","carousel",1,"carousel","slide","pointer-event"],[1,"carousel-inner"],[1,"carousel-item","mt-4","mb-4","active"],[1,"row","justify-content-center"],[1,"col-9"],[1,"image-box","col-3","vertical-center","justify-content-center","d-none","d-md-inline-flex"],["src","https://dq06ugkuram52.cloudfront.net/files/3765463/22301376-medium.jpg"],[1,"showcase-main-text","font-italic"],[1,"note","mt-3"],[1,"note"],[1,"carousel-item","mt-4","mb-4"],["src","https://dq06ugkuram52.cloudfront.net/files/564260/12604027-medium.png"],["src","https://dq06ugkuram52.cloudfront.net/files/5467212/20834915-medium.jpg"],[1,"col-3","image-box","vertical-center","justify-content-center","d-none","d-md-inline-flex"],["src","https://dq06ugkuram52.cloudfront.net/files/2549498/12602498-medium.png"],["src","https://dq06ugkuram52.cloudfront.net/files/1831839/12602420-medium.png"],["type","button","data-bs-target","#quotes","data-bs-slide","prev",1,"carousel-control-prev"],["aria-hidden","true",1,"carousel-control-prev-icon"],[1,"visually-hidden"],["type","button","data-bs-target","#quotes","data-bs-slide","next",1,"carousel-control-next"],["aria-hidden","true",1,"carousel-control-next-icon"],[1,"wikirate-box","wikirate-container","d-none","d-md-block"],["id","partners-logos","data-ride","carousel",1,"carousel","slide"],[1,"container","mt-4","mb-4"],[1,"section"],[1,"col-lg-12","p-3"],[1,"mb-3"],[1,"slider","mt-3"],[1,"slide-track"],["class","slide",4,"ngFor","ngForOf"],[1,"slide"],[1,"row","col-12","justify-content-center"],[1,"image-box","d-flex","justify-content-center","align-items-center","m-2"],[3,"src","alt"],[1,"contributor-name","m3","text-center"]],template:function(i,r){1&i&&(U(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),X(5," Who made Apparel 100 and why? "),z(),U(6,"div",5)(7,"p"),X(8,"Apparel 100 was made by Wikirate to showcase supply chain transparency and ESG data in an engaging and accessible way. These maps and infographics create a sector snapshot that tells a story the world deserves to know. "),z(),U(9,"p"),X(10," This showcase came together with the support of the Wikirate community. "),z()(),U(11,"div",6)(12,"div",7)(13,"div",8),X(14,"335"),z(),U(15,"div",9),X(16,"RESEARCHERS"),z()(),U(17,"div",10)(18,"div",8),X(19,"10"),z(),U(20,"div",9),X(21,"UNIVERSITIES"),z()(),U(22,"div",10)(23,"div",8),X(24,"17"),z(),U(25,"div",9),X(26,"NGOs"),z()()()()()()(),U(27,"div",11)(28,"div",1)(29,"div",2)(30,"div",12)(31,"h2",13),X(32,"Create your own open data showcase "),z(),U(33,"div",14)(34,"p"),X(35,"With our flexible data infrastructure and committed community we have created an open data ecosystem that you can be part of. "),z()()(),U(36,"div",15)(37,"button",16),X(38," Contact Us "),z()()()()(),U(39,"div",17)(40,"div",1)(41,"p",18),X(42," The research in numbers "),z(),U(43,"div",19)(44,"div",10)(45,"div",8),X(46,"31K+"),z(),U(47,"div",20),X(48,"DATA POINTS"),z()(),U(49,"div",10)(50,"div",8),X(51,"171"),z(),U(52,"div",20),X(53,"METRICS"),z()(),U(54,"div",10)(55,"div",8),X(56,"30K+"),z(),U(57,"div",20),X(58,"CORPORATE RELATIONSHIPS"),z()()()()(),U(59,"div",0)(60,"div",1)(61,"div",21)(62,"div",22)(63,"div",23)(64,"div",24)(65,"div",25)(66,"div",24)(67,"div",26),Ke(68,"img",27),z(),U(69,"div",12)(70,"div",28),X(71,'"We believe in collaborating to improve the fashion industry and are delighted to be continuing our partnership with Wikirate into 2022. Using the Wikirate platform to host FTI research has made our work more accessible and impactful across a range of stakeholders who use our data to enable their activism and research." '),z(),U(72,"div",29)(73,"b"),X(74," Fashion Revolution "),z()(),Ke(75,"div",30),z()()()()(),U(76,"div",31)(77,"div",24)(78,"div",25)(79,"div",2)(80,"div",26),Ke(81,"img",32),z(),U(82,"div",12)(83,"div",28),X(84,'"Wikirate has proven an invaluable partner for our Fashion Checker campaign. The platform\u2019s sophisticated functionalities and open data approach has given us the flexibility we needed to bring our data to the public so that it can be used by advocates to create real change." '),z(),U(85,"div",29)(86,"b"),X(87," Anne Bienias "),z()(),U(88,"div",30),X(89,"Clean Clothes Campaign"),z()()()()()(),U(90,"div",31)(91,"div",24)(92,"div",25)(93,"div",2)(94,"div",26),Ke(95,"img",33),z(),U(96,"div",12)(97,"div",28),X(98,'"This collaborative project was a great opportunity to further develop our research skills which in turn allowed us to be more critical and analytical of fashion labels. Working with Wikirate made us understand the importance of finding the right and accurate information that backs up or contradicts the image that a fashion label is trying to portray" '),z(),U(99,"div",29)(100,"b"),X(101," Student of Akademie Mode & Design (AMD) Berlin "),z()(),Ke(102,"div",30),z()()()()(),U(103,"div",31)(104,"div",24)(105,"div",25)(106,"div",2)(107,"div",34),Ke(108,"img",35),z(),U(109,"div",12)(110,"div",28),X(111,'"Wikirate provides the opportunity for students to get a real-life experience with CSR, which helps develop their social awareness, problem-solving and critical thinking skills" '),z(),U(112,"div",29)(113,"b"),X(114," Dr. Stephanie Perkiss "),z()(),U(115,"div",30),X(116,"University of Wollongong, Australia"),z()()()()()(),U(117,"div",31)(118,"div",24)(119,"div",25)(120,"div",2)(121,"div",26),Ke(122,"img",36),z(),U(123,"div",12)(124,"div",28),X(125,'"We\'ve worked with the Wikirate for the last five years to scale our research on modern slavery. The Wikirate team maintains our methodology on their platform and each year coordinates hundreds of university students to contribute new data for analysis that we use to improve legislation to end modern slavery." '),z(),U(126,"div",29)(127,"b"),X(128," Katharine Bryant "),z()(),U(129,"div",30),X(130,"Walk Free Initiative"),z()()()()()()(),U(131,"button",37),Ke(132,"span",38),U(133,"span",39),X(134,"Previous"),z()(),U(135,"button",40),Ke(136,"span",41),U(137,"span",39),X(138,"Next"),z()()()()(),U(139,"div",42)(140,"div",43)(141,"div",44)(142,"div",45)(143,"div",2)(144,"div",46)(145,"h3",47),X(146,"Research Contributors"),z(),U(147,"p"),X(148,"This research was performed with the contribution of the following organisations"),z(),U(149,"div",48)(150,"div",49),mt(151,Dyt,6,3,"div",50),z()()()()()()()()),2&i&&(re(151),Ae("ngForOf",r.contributors))},dependencies:[oD],styles:[".roadmap[_ngcontent-%COMP%]{height:500px}.showcase-circle-purple[_ngcontent-%COMP%]{width:4.25rem;height:4.25rem;background-color:#484c9d!important}.showcase-circle-orange[_ngcontent-%COMP%]{width:4.25rem;height:4.25rem;background-color:#f7733d!important}.img[_ngcontent-%COMP%]{width:250px!important;height:250px!important;min-width:250px!important;min-height:250px!important}.image-box[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%!important;max-height:100%!important;height:auto!important}.contributor-name[_ngcontent-%COMP%]{text-transform:uppercase;font-size:.6em}.image-box[_ngcontent-%COMP%]{width:140px!important;height:140px!important}.image-box-small-screen[_ngcontent-%COMP%]{height:auto!important;max-width:200px!important}@keyframes _ngcontent-%COMP%_scroll{0%{transform:translate(0)}to{transform:translate(-1750px)}}.slider[_ngcontent-%COMP%]{height:200px;margin:auto;overflow:hidden;position:relative;width:auto}.slider[_ngcontent-%COMP%] .slide-track[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_scroll 60s linear infinite;display:flex;width:3500px}.slider[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%]{height:100px;width:250px}"]})}}return e})()},{path:"**",redirectTo:"/apparel_top_100/home",pathMatch:"full"}];let Tyt=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({providers:[{provide:Gu,useClass:iR}],imports:[dF.forRoot(Syt,{anchorScrolling:"enabled"}),dF]})}}return e})();const xyt=["search_text"];let Ayt=(()=>{class e{constructor(n,i,r){this.route=n,this.router=i,this.apparelService=r,this.exploreMore=!1,this.apparelTop100=[],this.apparelTop100=r.getCompanies()}ngOnInit(){this.report_params={id:0,year:"latest"},this.router.events.pipe(Wn(n=>n instanceof qR&&Object.keys(n.snapshot.params).length>0),at(n=>n instanceof qR?n.snapshot.params:{})).subscribe(n=>{this.report_params.id=n.id,this.report_params.year=n.year,this.selectedCompany=this.apparelService.getCompany(+this.report_params.id).name}),this.apparelService.exploreMore.subscribe(n=>{this.exploreMore=n})}setValue(n){this.search_text.nativeElement.value=n.name,this.report_params.id=n.id,null===n&&(this.search_text.nativeElement.value="overview",this.report_params.id=0)}navigateToYear(n){let i=n.target.value;i&&(null===this.report_params.id&&(this.report_params.id=0),this.router.navigate(["/apparel_top_100/reports/"+this.report_params.id+"/"+i]))}navigateToCompany(n){this.router.navigate(["/apparel_top_100/reports/"+n.id+"/"+this.report_params.year])}static{this.\u0275fac=function(i){return new(i||e)(ee(Cl),ee(Uo),ee(sm))}}static{this.\u0275cmp=Cn({type:e,selectors:[["header-component"]],viewQuery:function(i,r){if(1&i&&ua(xyt,5),2&i){let o;Wt(o=qt())&&(r.search_text=o.first)}},decls:9,vars:0,consts:[[1,"wikirate-box","bg-navy"],[1,"container"],[1,"navbar","bg-navy","navbar-expand","nomargin","drop-shadow","navbar-light"],["routerLink","apparel_top_100/home",1,"navbar-brand","title","mr-3"],[1,"navbar-nav","mr-auto"],[1,"nav-item"],["routerLink","apparel_top_100/about",1,"nav-link","ml-3","mr-3"]],template:function(i,r){1&i&&(U(0,"div",0)(1,"div",1)(2,"nav",2)(3,"a",3),X(4,"Apparel 100"),z(),U(5,"ul",4)(6,"li",5)(7,"a",6),X(8,"ABOUT"),z()()()()()())},dependencies:[OD],styles:["a[_ngcontent-%COMP%]{color:#000}hr[_ngcontent-%COMP%]{margin:.5em}.nav[_ngcontent-%COMP%]{margin-top:.5em;background:#fff}.title[_ngcontent-%COMP%]{font-weight:700;letter-spacing:0em;text-align:left;color:#fff!important}.dropdown-menu[_ngcontent-%COMP%]{max-height:280px;overflow-y:auto}.dropdown-toggle[_ngcontent-%COMP%]:after{content:none!important}"]})}}return e})(),Myt=(()=>{class e{constructor(){this.current_year=2022,this.current_year=(new Date).getFullYear()}ngOnInit(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=Cn({type:e,selectors:[["footer"]],decls:32,vars:1,consts:[[1,"wikirate-creme-purple-box"],[1,"wikirate-container"],[1,"row","text-center"],[1,"col-12"],[1,"row","justify-content-center","mb-3"],[1,"tiny-text"],[1,"row","justify-content-center"],["href","https://wikirate.org","target","_blank"],["src","assets/wikirate_logo.svg",1,"logo"],[1,"col-sm-7","mini-text","mt-3","justify-content-center"],[1,"wikirate-navy-box"],[1,"footer-container"],[1,"row"],[1,"col-11"],[1,"note","mt-3","text-light-white","mb-3"],["href","https://wikirate.org/~8079639","target","_blank"],["href","https://wikirate.org/~836561","target","_blank"],["href","https://creativecommons.org/licenses/by/4.0","target","_blank"]],template:function(i,r){1&i&&(U(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),X(6,"Powered by "),z()(),U(7,"div",6)(8,"a",7),Ke(9,"img",8),z()(),U(10,"div",6)(11,"div",9),X(12," Wikirate is an open data platform that brings corporate ESG data together in one place, making it accessible, comparable, and free for all. "),z()()()()()(),U(13,"div",10)(14,"div",11)(15,"div",12)(16,"div",13)(17,"div",14),X(18," This showcase was created by using data from "),U(19,"a",7),X(20,"Wikirate.org"),z(),X(21,", '"),U(22,"a",15),X(23,"Apparel 100 Analysis"),z(),X(24,"' by "),U(25,"a",16),X(26,"theresah"),z(),X(27,", licensed under "),U(28,"a",17),X(29,"CC BY 4.0"),z()(),U(30,"div",14),X(31),z()()()()()),2&i&&(re(31),Or(" Copyright \xa9 ",r.current_year," Wikirate.org All rights reserved "))},styles:[".nopadding[_ngcontent-%COMP%]{padding:0!important}.text-light-white[_ngcontent-%COMP%]{color:#f7f7f8!important}"]})}}return e})();function Nyt(e,t){if(1&e){const n=$o();U(0,"div",2),nt("click",function(){return Fn(n),Pn(Qe().scrollToTop())}),U(1,"button",3),nt("click",function(){return Fn(n),Pn(Qe().scrollToTop())}),Ke(2,"i",4),z()()}}let Iyt=(()=>{class e{onScroll(n){this.pageYoffset=window.pageYOffset}constructor(n,i){this.scroll=n,this.router=i,this.pageYoffset=0}ngOnInit(){this.setUpAnalytics()}scrollToTop(){this.scroll.scrollToPosition([0,0])}setUpAnalytics(){this.router.events.pipe(Wn(n=>n instanceof El)).subscribe(n=>{gtag("config","UA-34941429-8",{page_path:n.urlAfterRedirects})})}static{this.\u0275fac=function(i){return new(i||e)(ee(tv),ee(Uo))}}static{this.\u0275cmp=Cn({type:e,selectors:[["app-root"]],hostBindings:function(i,r){1&i&&nt("scroll",function(s){return r.onScroll(s)},0,Mz)},decls:6,vars:1,consts:[["report",""],["class","scroll-to-top show-scrollTop",3,"click",4,"ngIf"],[1,"scroll-to-top","show-scrollTop",3,"click"],[1,"btn","btn-highlight","btn-circle",3,"click"],[1,"bi","bi-chevron-up"]],template:function(i,r){1&i&&(U(0,"div",null,0),Ke(2,"header-component")(3,"router-outlet"),mt(4,Nyt,3,0,"div",1),z(),Ke(5,"footer")),2&i&&(re(4),Ae("ngIf",r.pageYoffset>0))},dependencies:[J0,eF,Ayt,Myt],styles:[".scroll-to-top[_ngcontent-%COMP%]{position:fixed;bottom:15px;right:15px;opacity:0;transition:all .2s ease-in-out}.show-scrollTop[_ngcontent-%COMP%]{opacity:1;transition:all .2s ease-in-out}"]})}}return e})(),kyt=(()=>{class e{constructor(n){this.apparelService=n}resolve(n,i){return this.apparelService.getCompany(+n.params.id)}static{this.\u0275fac=function(i){return new(i||e)(Ne(sm))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();function Q0e(e){return new q(3e3,!1)}function vf(e){switch(e.length){case 0:return new Dv;case 1:return e[0];default:return new CQ(e)}}function Z0e(e,t,n=new Map,i=new Map){const r=[],o=[];let s=-1,a=null;if(t.forEach(l=>{const c=l.get("offset"),u=c==s,d=u&&a||new Map;l.forEach((f,h)=>{let p=h,g=f;if("offset"!==h)switch(p=e.normalizePropertyName(p,r),g){case"!":g=n.get(h);break;case Bc:g=i.get(h);break;default:g=e.normalizeStyleValue(h,p,g,r)}d.set(p,g)}),u||o.push(d),a=d,s=c}),r.length)throw function t0t(){return new q(3502,!1)}();return o}function iU(e,t,n,i){switch(t){case"start":e.onStart(()=>i(n&&rU(n,"start",e)));break;case"done":e.onDone(()=>i(n&&rU(n,"done",e)));break;case"destroy":e.onDestroy(()=>i(n&&rU(n,"destroy",e)))}}function rU(e,t,n){const o=oU(e.element,e.triggerName,e.fromState,e.toState,t||e.phaseName,n.totalTime??e.totalTime,!!n.disabled),s=e._data;return null!=s&&(o._data=s),o}function oU(e,t,n,i,r="",o=0,s){return{element:e,triggerName:t,fromState:n,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function fs(e,t,n){let i=e.get(t);return i||e.set(t,i=n),i}function J0e(e){const t=e.indexOf(":");return[e.substring(1,t),e.slice(t+1)]}const h0t=typeof document>"u"?null:document.documentElement;function sU(e){const t=e.parentNode||e.host||null;return t===h0t?null:t}let Bp=null,eve=!1;function tve(e,t){for(;t;){if(t===e)return!0;t=sU(t)}return!1}function nve(e,t,n){if(n)return Array.from(e.querySelectorAll(t));const i=e.querySelector(t);return i?[i]:[]}let aU=(()=>{class e{validateStyleProperty(n){return function g0t(e){Bp||(Bp=function m0t(){return typeof document<"u"?document.body:null}()||{},eve=!!Bp.style&&"WebkitAppearance"in Bp.style);let t=!0;return Bp.style&&!function p0t(e){return"ebkit"==e.substring(1,6)}(e)&&(t=e in Bp.style,!t&&eve&&(t="Webkit"+e.charAt(0).toUpperCase()+e.slice(1)in Bp.style)),t}(n)}containsElement(n,i){return tve(n,i)}getParentElement(n){return sU(n)}query(n,i,r){return nve(n,i,r)}computeStyle(n,i,r){return r||""}animate(n,i,r,o,s,a=[],l){return new Dv(r,o)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})();class lU{static{this.NOOP=new aU}}class cU{}const y0t=1e3,uU="ng-enter",UN="ng-leave",zN="ng-trigger",HN=".ng-trigger",rve="ng-animating",dU=".ng-animating";function Tu(e){if("number"==typeof e)return e;const t=e.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:fU(parseFloat(t[1]),t[2])}function fU(e,t){return"s"===t?e*y0t:e}function GN(e,t,n){return e.hasOwnProperty("duration")?e:function b0t(e,t,n){let r,o=0,s="";if("string"==typeof e){const a=e.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return t.push(Q0e()),{duration:0,delay:0,easing:""};r=fU(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(o=fU(parseFloat(l),a[4]));const c=a[5];c&&(s=c)}else r=e;if(!n){let a=!1,l=t.length;r<0&&(t.push(function Oyt(){return new q(3100,!1)}()),a=!0),o<0&&(t.push(function Ryt(){return new q(3101,!1)}()),a=!0),a&&t.splice(l,0,Q0e())}return{duration:r,delay:o,easing:s}}(e,t,n)}function mc(e,t,n){t.forEach((i,r)=>{const o=pU(r);n&&!n.has(r)&&n.set(r,e.style[o]),e.style[o]=i})}function jp(e,t){t.forEach((n,i)=>{const r=pU(i);e.style[r]=""})}function Nw(e){return Array.isArray(e)?1==e.length?e[0]:function yFe(e,t=null){return{type:Xe.Sequence,steps:e,options:t}}(e):e}const hU=new RegExp("{{\\s*(.+?)\\s*}}","g");function sve(e){let t=[];if("string"==typeof e){let n;for(;n=hU.exec(e);)t.push(n[1]);hU.lastIndex=0}return t}function Iw(e,t,n){const i=`${e}`,r=i.replace(hU,(o,s)=>{let a=t[s];return null==a&&(n.push(function Pyt(){return new q(3003,!1)}()),a=""),a.toString()});return r==i?e:r}const C0t=/-+([a-z0-9])/g;function pU(e){return e.replace(C0t,(...t)=>t[1].toUpperCase())}function hs(e,t,n){switch(t.type){case Xe.Trigger:return e.visitTrigger(t,n);case Xe.State:return e.visitState(t,n);case Xe.Transition:return e.visitTransition(t,n);case Xe.Sequence:return e.visitSequence(t,n);case Xe.Group:return e.visitGroup(t,n);case Xe.Animate:return e.visitAnimate(t,n);case Xe.Keyframes:return e.visitKeyframes(t,n);case Xe.Style:return e.visitStyle(t,n);case Xe.Reference:return e.visitReference(t,n);case Xe.AnimateChild:return e.visitAnimateChild(t,n);case Xe.AnimateRef:return e.visitAnimateRef(t,n);case Xe.Query:return e.visitQuery(t,n);case Xe.Stagger:return e.visitStagger(t,n);default:throw function Lyt(){return new q(3004,!1)}()}}function gU(e,t){return window.getComputedStyle(e)[t]}const T0t=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class ave extends cU{normalizePropertyName(t,n){return pU(t)}normalizeStyleValue(t,n,i,r){let o="";const s=i.toString().trim();if(T0t.has(n)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function $yt(){return new q(3005,!1)}())}return s+o}}const WN="*";const qN=new Set(["true","1"]),YN=new Set(["false","0"]);function lve(e,t){const n=qN.has(e)||YN.has(e),i=qN.has(t)||YN.has(t);return(r,o)=>{let s=e==WN||e==r,a=t==WN||t==o;return!s&&n&&"boolean"==typeof r&&(s=r?qN.has(e):YN.has(e)),!a&&i&&"boolean"==typeof o&&(a=o?qN.has(t):YN.has(t)),s&&a}}const N0t=new RegExp("s*:selfs*,?","g");function mU(e,t,n,i){return new I0t(e).build(t,n,i)}class I0t{constructor(t){this._driver=t}build(t,n,i){const r=new R0t(n);return this._resetContextStyleTimingState(r),hs(this,Nw(t),r)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles=new Map,t.collectedStyles.set("",new Map),t.currentTime=0}visitTrigger(t,n){let i=n.queryCount=0,r=n.depCount=0;const o=[],s=[];return"@"==t.name.charAt(0)&&n.errors.push(function Byt(){return new q(3006,!1)}()),t.definitions.forEach(a=>{if(this._resetContextStyleTimingState(n),a.type==Xe.State){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,o.push(this.visitState(l,n))}),l.name=c}else if(a.type==Xe.Transition){const l=this.visitTransition(a,n);i+=l.queryCount,r+=l.depCount,s.push(l)}else n.errors.push(function jyt(){return new q(3007,!1)}())}),{type:Xe.Trigger,name:t.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(t,n){const i=this.visitStyle(t.styles,n),r=t.options&&t.options.params||null;if(i.containsDynamicStyles){const o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{sve(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&n.errors.push(function Vyt(){return new q(3008,!1)}(0,o.values()))}return{type:Xe.State,name:t.name,style:i,options:r?{params:r}:null}}visitTransition(t,n){n.queryCount=0,n.depCount=0;const i=hs(this,Nw(t.animation),n),r=function x0t(e,t){const n=[];return"string"==typeof e?e.split(/\s*,\s*/).forEach(i=>function A0t(e,t,n){if(":"==e[0]){const l=function M0t(e,t){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(n,i)=>parseFloat(i)>parseFloat(n);case":decrement":return(n,i)=>parseFloat(i) *"}}(e,n);if("function"==typeof l)return void t.push(l);e=l}const i=e.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return n.push(function Xyt(){return new q(3015,!1)}()),t;const r=i[1],o=i[2],s=i[3];t.push(lve(r,s)),"<"==o[0]&&(r!=WN||s!=WN)&&t.push(lve(s,r))}(i,n,t)):n.push(e),n}(t.expr,n.errors);return{type:Xe.Transition,matchers:r,animation:i,queryCount:n.queryCount,depCount:n.depCount,options:Vp(t.options)}}visitSequence(t,n){return{type:Xe.Sequence,steps:t.steps.map(i=>hs(this,i,n)),options:Vp(t.options)}}visitGroup(t,n){const i=n.currentTime;let r=0;const o=t.steps.map(s=>{n.currentTime=i;const a=hs(this,s,n);return r=Math.max(r,n.currentTime),a});return n.currentTime=r,{type:Xe.Group,steps:o,options:Vp(t.options)}}visitAnimate(t,n){const i=function P0t(e,t){if(e.hasOwnProperty("duration"))return e;if("number"==typeof e)return _U(GN(e,t).duration,0,"");const n=e;if(n.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=_U(0,0,"");return o.dynamic=!0,o.strValue=n,o}const r=GN(n,t);return _U(r.duration,r.delay,r.easing)}(t.timings,n.errors);n.currentAnimateTimings=i;let r,o=t.styles?t.styles:Ds({});if(o.type==Xe.Keyframes)r=this.visitKeyframes(o,n);else{let s=t.styles,a=!1;if(!s){a=!0;const c={};i.easing&&(c.easing=i.easing),s=Ds(c)}n.currentTime+=i.duration+i.delay;const l=this.visitStyle(s,n);l.isEmptyStep=a,r=l}return n.currentAnimateTimings=null,{type:Xe.Animate,timings:i,style:r,options:null}}visitStyle(t,n){const i=this._makeStyleAst(t,n);return this._validateStyleAst(i,n),i}_makeStyleAst(t,n){const i=[],r=Array.isArray(t.styles)?t.styles:[t.styles];for(let a of r)"string"==typeof a?a===Bc?i.push(a):n.errors.push(new q(3002,!1)):i.push(new Map(Object.entries(a)));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o))for(let l of a.values())if(l.toString().indexOf("{{")>=0){o=!0;break}}),{type:Xe.Style,styles:i,easing:s,offset:t.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(t,n){const i=n.currentAnimateTimings;let r=n.currentTime,o=n.currentTime;i&&o>0&&(o-=i.duration+i.delay),t.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,l)=>{const c=n.collectedStyles.get(n.currentQuerySelector),u=c.get(l);let d=!0;u&&(o!=r&&o>=u.startTime&&r<=u.endTime&&(n.errors.push(function zyt(){return new q(3010,!1)}()),d=!1),o=u.startTime),d&&c.set(l,{startTime:o,endTime:r}),n.options&&function E0t(e,t,n){const i=t.params||{},r=sve(e);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||n.push(function Fyt(){return new q(3001,!1)}())})}(a,n.options,n.errors)})})}visitKeyframes(t,n){const i={type:Xe.Keyframes,styles:[],options:null};if(!n.currentAnimateTimings)return n.errors.push(function Hyt(){return new q(3011,!1)}()),i;let o=0;const s=[];let a=!1,l=!1,c=0;const u=t.steps.map(_=>{const y=this._makeStyleAst(_,n);let v=null!=y.offset?y.offset:function F0t(e){if("string"==typeof e)return null;let t=null;if(Array.isArray(e))e.forEach(n=>{if(n instanceof Map&&n.has("offset")){const i=n;t=parseFloat(i.get("offset")),i.delete("offset")}});else if(e instanceof Map&&e.has("offset")){const n=e;t=parseFloat(n.get("offset")),n.delete("offset")}return t}(y.styles),b=0;return null!=v&&(o++,b=y.offset=v),l=l||b<0||b>1,a=a||b0&&o{const v=f>0?y==h?1:f*y:s[y],b=v*m;n.currentTime=p+g.delay+b,g.duration=b,this._validateStyleAst(_,n),_.offset=v,i.styles.push(_)}),i}visitReference(t,n){return{type:Xe.Reference,animation:hs(this,Nw(t.animation),n),options:Vp(t.options)}}visitAnimateChild(t,n){return n.depCount++,{type:Xe.AnimateChild,options:Vp(t.options)}}visitAnimateRef(t,n){return{type:Xe.AnimateRef,animation:this.visitReference(t.animation,n),options:Vp(t.options)}}visitQuery(t,n){const i=n.currentQuerySelector,r=t.options||{};n.queryCount++,n.currentQuery=t;const[o,s]=function k0t(e){const t=!!e.split(/\s*,\s*/).find(n=>":self"==n);return t&&(e=e.replace(N0t,"")),e=e.replace(/@\*/g,HN).replace(/@\w+/g,n=>HN+"-"+n.slice(1)).replace(/:animating/g,dU),[e,t]}(t.selector);n.currentQuerySelector=i.length?i+" "+o:o,fs(n.collectedStyles,n.currentQuerySelector,new Map);const a=hs(this,Nw(t.animation),n);return n.currentQuery=null,n.currentQuerySelector=i,{type:Xe.Query,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:t.selector,options:Vp(t.options)}}visitStagger(t,n){n.currentQuery||n.errors.push(function Yyt(){return new q(3013,!1)}());const i="full"===t.timings?{duration:0,delay:0,easing:"full"}:GN(t.timings,n.errors,!0);return{type:Xe.Stagger,animation:hs(this,Nw(t.animation),n),timings:i,options:null}}}class R0t{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function Vp(e){return e?(e={...e}).params&&(e.params=function O0t(e){return e?{...e}:null}(e.params)):e={},e}function _U(e,t,n){return{duration:e,delay:t,easing:n}}function yU(e,t,n,i,r,o,s=null,a=!1){return{type:1,element:e,keyframes:t,preStyleProps:n,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}class KN{constructor(){this._map=new Map}get(t){return this._map.get(t)||[]}append(t,n){let i=this._map.get(t);i||this._map.set(t,i=[]),i.push(...n)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const B0t=new RegExp(":enter","g"),V0t=new RegExp(":leave","g");function vU(e,t,n,i,r,o=new Map,s=new Map,a,l,c=[]){return(new U0t).buildKeyframes(e,t,n,i,r,o,s,a,l,c)}class U0t{buildKeyframes(t,n,i,r,o,s,a,l,c,u=[]){c=c||new KN;const d=new bU(t,n,c,r,o,u,[]);d.options=l;const f=l.delay?Tu(l.delay):0;d.currentTimeline.delayNextStep(f),d.currentTimeline.setStyles([s],null,d.errors,l),hs(this,i,d);const h=d.timelines.filter(p=>p.containsAnimation());if(h.length&&a.size){let p;for(let g=h.length-1;g>=0;g--){const m=h[g];if(m.element===n){p=m;break}}p&&!p.allowOnlyTimelineStyles()&&p.setStyles([a],null,d.errors,l)}return h.length?h.map(p=>p.buildKeyframes()):[yU(n,[],[],[],0,f,"",!1)]}visitTrigger(t,n){}visitState(t,n){}visitTransition(t,n){}visitAnimateChild(t,n){const i=n.subInstructions.get(n.element);if(i){const r=n.createSubContext(t.options),o=n.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&n.transformIntoNewTimeline(s)}n.previousNode=t}visitAnimateRef(t,n){const i=n.createSubContext(t.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([t.options,t.animation.options],n,i),this.visitReference(t.animation,i),n.transformIntoNewTimeline(i.currentTimeline.currentTime),n.previousNode=t}_applyAnimationRefDelays(t,n,i){for(const r of t){const o=r?.delay;if(o){const s="number"==typeof o?o:Tu(Iw(o,r?.params??{},n.errors));i.delayNextStep(s)}}}_visitSubInstructions(t,n,i){let o=n.currentTimeline.currentTime;const s=null!=i.duration?Tu(i.duration):null,a=null!=i.delay?Tu(i.delay):null;return 0!==s&&t.forEach(l=>{const c=n.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(t,n){n.updateOptions(t.options,!0),hs(this,t.animation,n),n.previousNode=t}visitSequence(t,n){const i=n.subContextCount;let r=n;const o=t.options;if(o&&(o.params||o.delay)&&(r=n.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){r.previousNode.type==Xe.Style&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=XN);const s=Tu(o.delay);r.delayNextStep(s)}t.steps.length&&(t.steps.forEach(s=>hs(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),n.previousNode=t}visitGroup(t,n){const i=[];let r=n.currentTimeline.currentTime;const o=t.options&&t.options.delay?Tu(t.options.delay):0;t.steps.forEach(s=>{const a=n.createSubContext(t.options);o&&a.delayNextStep(o),hs(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>n.currentTimeline.mergeTimelineCollectedStyles(s)),n.transformIntoNewTimeline(r),n.previousNode=t}_visitTiming(t,n){if(t.dynamic){const i=t.strValue;return GN(n.params?Iw(i,n.params,n.errors):i,n.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,n){const i=n.currentAnimateTimings=this._visitTiming(t.timings,n),r=n.currentTimeline;i.delay&&(n.incrementTime(i.delay),r.snapshotCurrentStyles());const o=t.style;o.type==Xe.Keyframes?this.visitKeyframes(o,n):(n.incrementTime(i.duration),this.visitStyle(o,n),r.applyStylesToKeyframe()),n.currentAnimateTimings=null,n.previousNode=t}visitStyle(t,n){const i=n.currentTimeline,r=n.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=r&&r.easing||t.easing;t.isEmptyStep?i.applyEmptyStep(o):i.setStyles(t.styles,o,n.errors,n.options),n.previousNode=t}visitKeyframes(t,n){const i=n.currentAnimateTimings,r=n.currentTimeline.duration,o=i.duration,a=n.createSubContext().currentTimeline;a.easing=i.easing,t.styles.forEach(l=>{a.forwardTime((l.offset||0)*o),a.setStyles(l.styles,l.easing,n.errors,n.options),a.applyStylesToKeyframe()}),n.currentTimeline.mergeTimelineCollectedStyles(a),n.transformIntoNewTimeline(r+o),n.previousNode=t}visitQuery(t,n){const i=n.currentTimeline.currentTime,r=t.options||{},o=r.delay?Tu(r.delay):0;o&&(n.previousNode.type===Xe.Style||0==i&&n.currentTimeline.hasCurrentStyleProperties())&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=XN);let s=i;const a=n.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,n.errors);n.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{n.currentQueryIndex=u;const d=n.createSubContext(t.options,c);o&&d.delayNextStep(o),c===n.element&&(l=d.currentTimeline),hs(this,t.animation,d),d.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,d.currentTimeline.currentTime)}),n.currentQueryIndex=0,n.currentQueryTotal=0,n.transformIntoNewTimeline(s),l&&(n.currentTimeline.mergeTimelineCollectedStyles(l),n.currentTimeline.snapshotCurrentStyles()),n.previousNode=t}visitStagger(t,n){const i=n.parentContext,r=n.currentTimeline,o=t.timings,s=Math.abs(o.duration),a=s*(n.currentQueryTotal-1);let l=s*n.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=n.currentTimeline;l&&u.delayNextStep(l);const d=u.currentTime;hs(this,t.animation,n),n.previousNode=t,i.currentStaggerTime=r.currentTime-d+(r.startTime-i.currentTimeline.startTime)}}const XN={};class bU{constructor(t,n,i,r,o,s,a,l){this._driver=t,this.element=n,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=XN,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new QN(this._driver,n,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,n){if(!t)return;const i=t;let r=this.options;null!=i.duration&&(r.duration=Tu(i.duration)),null!=i.delay&&(r.delay=Tu(i.delay));const o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!n||!s.hasOwnProperty(a))&&(s[a]=Iw(o[a],s,this.errors))})}}_copyOptions(){const t={};if(this.options){const n=this.options.params;if(n){const i=t.params={};Object.keys(n).forEach(r=>{i[r]=n[r]})}}return t}createSubContext(t=null,n,i){const r=n||this.element,o=new bU(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(t){return this.previousNode=XN,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,n,i){const r={duration:n??t.duration,delay:this.currentTimeline.currentTime+(i??0)+t.delay,easing:""},o=new z0t(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,n,i,r,o,s){let a=[];if(r&&a.push(this.element),t.length>0){t=(t=t.replace(B0t,"."+this._enterClassName)).replace(V0t,"."+this._leaveClassName);let c=this._driver.query(this.element,t,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!o&&0==a.length&&s.push(function Kyt(){return new q(3014,!1)}()),a}}class QN{constructor(t,n,i,r){this._driver=t,this.element=n,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(n),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(n,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const n=1===this._keyframes.size&&this._pendingStyles.size;this.duration||n?(this.forwardTime(this.currentTime+t),n&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,n){return this.applyStylesToKeyframe(),new QN(this._driver,t,n||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,n){this._localTimelineStyles.set(t,n),this._globalTimelineStyles.set(t,n),this._styleSummary.set(t,{time:this.currentTime,value:n})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&this._previousKeyframe.set("easing",t);for(let[n,i]of this._globalTimelineStyles)this._backFill.set(n,i||Bc),this._currentKeyframe.set(n,Bc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,n,i,r){n&&this._previousKeyframe.set("easing",n);const o=r&&r.params||{},s=function H0t(e,t){const n=new Map;let i;return e.forEach(r=>{if("*"===r){i??=t.keys();for(let o of i)n.set(o,Bc)}else for(let[o,s]of r)n.set(o,s)}),n}(t,this._globalTimelineStyles);for(let[a,l]of s){const c=Iw(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Bc),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((t,n)=>{this._currentKeyframe.set(n,t)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((t,n)=>{this._currentKeyframe.has(n)||this._currentKeyframe.set(n,t)}))}snapshotCurrentStyles(){for(let[t,n]of this._localTimelineStyles)this._pendingStyles.set(t,n),this._updateStyle(t,n)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let n in this._currentKeyframe)t.push(n);return t}mergeTimelineCollectedStyles(t){t._styleSummary.forEach((n,i)=>{const r=this._styleSummary.get(i);(!r||n.time>r.time)&&this._updateStyle(i,n.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,n=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=new Map([...this._backFill,...a]);c.forEach((u,d)=>{"!"===u?t.add(d):u===Bc&&n.add(d)}),i||c.set("offset",l/this.duration),r.push(c)});const o=[...t.values()],s=[...n.values()];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return yU(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}}class z0t extends QN{constructor(t,n,i,r,o,s,a=!1){super(t,n,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:n,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&n){const o=[],s=i+n,a=n/s,l=new Map(t[0]);l.set("offset",0),o.push(l);const c=new Map(t[0]);c.set("offset",dve(a)),o.push(c);const u=t.length-1;for(let d=1;d<=u;d++){let f=new Map(t[d]);const h=f.get("offset");f.set("offset",dve((n+h*i)/s)),o.push(f)}i=s,n=0,r="",t=o}return yU(this.element,t,this.preStyleProps,this.postStyleProps,i,n,r,!0)}}function dve(e,t=3){const n=Math.pow(10,t-1);return Math.round(e*n)/n}function fve(e,t,n,i,r,o,s,a,l,c,u,d,f){return{type:0,element:e,triggerName:t,isRemovalTransition:r,fromState:n,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:d,errors:f}}const wU={};class hve{constructor(t,n,i){this._triggerName=t,this.ast=n,this._stateStyles=i}match(t,n,i,r){return function G0t(e,t,n,i,r){return e.some(o=>o(t,n,i,r))}(this.ast.matchers,t,n,i,r)}buildStyles(t,n,i){let r=this._stateStyles.get("*");return void 0!==t&&(r=this._stateStyles.get(t?.toString())||r),r?r.buildStyles(n,i):new Map}build(t,n,i,r,o,s,a,l,c,u){const d=[],f=this.ast.options&&this.ast.options.params||wU,p=this.buildStyles(i,a&&a.params||wU,d),g=l&&l.params||wU,m=this.buildStyles(r,g,d),_=new Set,y=new Map,v=new Map,b="void"===r,w={params:pve(g,f),delay:this.ast.options?.delay},C=u?[]:vU(t,n,this.ast.animation,o,s,p,m,w,c,d);let E=0;return C.forEach(D=>{E=Math.max(D.duration+D.delay,E)}),d.length?fve(n,this._triggerName,i,r,b,p,m,[],[],y,v,E,d):(C.forEach(D=>{const M=D.element,k=fs(y,M,new Set);D.preStyleProps.forEach(F=>k.add(F));const R=fs(v,M,new Set);D.postStyleProps.forEach(F=>R.add(F)),M!==n&&_.add(M)}),fve(n,this._triggerName,i,r,b,p,m,C,[..._.values()],y,v,E))}}function pve(e,t){const n={...t};return Object.entries(e).forEach(([i,r])=>{null!=r&&(n[i]=r)}),n}class W0t{constructor(t,n,i){this.styles=t,this.defaultParams=n,this.normalizer=i}buildStyles(t,n){const i=new Map,r=pve(t,this.defaultParams);return this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=Iw(s,r,n));const l=this.normalizer.normalizePropertyName(a,n);s=this.normalizer.normalizeStyleValue(a,l,s,n),i.set(a,s)})}),i}}class Y0t{constructor(t,n,i){this.name=t,this.ast=n,this._normalizer=i,this.transitionFactories=[],this.states=new Map,n.states.forEach(r=>{this.states.set(r.name,new W0t(r.style,r.options&&r.options.params||{},i))}),gve(this.states,"true","1"),gve(this.states,"false","0"),n.transitions.forEach(r=>{this.transitionFactories.push(new hve(t,r,this.states))}),this.fallbackTransition=function K0t(e,t){return new hve(e,{type:Xe.Transition,animation:{type:Xe.Sequence,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},t)}(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,n,i,r){return this.transitionFactories.find(s=>s.match(t,n,i,r))||null}matchStyles(t,n,i){return this.fallbackTransition.buildStyles(t,n,i)}}function gve(e,t,n){e.has(t)?e.has(n)||e.set(n,e.get(t)):e.has(n)&&e.set(t,e.get(n))}const X0t=new KN;class Q0t{constructor(t,n,i){this.bodyNode=t,this._driver=n,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(t,n){const i=[],o=mU(this._driver,n,i,[]);if(i.length)throw function n0t(){return new q(3503,!1)}();this._animations.set(t,o)}_buildPlayer(t,n,i){const r=t.element,o=Z0e(this._normalizer,t.keyframes,n,i);return this._driver.animate(r,o,t.duration,t.delay,t.easing,[],!0)}create(t,n,i={}){const r=[],o=this._animations.get(t);let s;const a=new Map;if(o?(s=vU(this._driver,n,o,uU,UN,new Map,new Map,i,X0t,r),s.forEach(u=>{const d=fs(a,u.element,new Map);u.postStyleProps.forEach(f=>d.set(f,null))})):(r.push(function i0t(){return new q(3300,!1)}()),s=[]),r.length)throw function r0t(){return new q(3504,!1)}();a.forEach((u,d)=>{u.forEach((f,h)=>{u.set(h,this._driver.computeStyle(d,h,Bc))})});const c=vf(s.map(u=>{const d=a.get(u.element);return this._buildPlayer(u,new Map,d)}));return this._playersById.set(t,c),c.onDestroy(()=>this.destroy(t)),this.players.push(c),c}destroy(t){const n=this._getPlayer(t);n.destroy(),this._playersById.delete(t);const i=this.players.indexOf(n);i>=0&&this.players.splice(i,1)}_getPlayer(t){const n=this._playersById.get(t);if(!n)throw function o0t(){return new q(3301,!1)}();return n}listen(t,n,i,r){const o=oU(n,"","","");return iU(this._getPlayer(t),i,o,r),()=>{}}command(t,n,i,r){if("register"==i)return void this.register(t,r[0]);if("create"==i)return void this.create(t,n,r[0]||{});const o=this._getPlayer(t);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t)}}}const mve="ng-animate-queued",EU="ng-animate-disabled",nvt=[],_ve={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},ivt={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},tl="__ng_removed";class CU{get params(){return this.options.params}constructor(t,n=""){this.namespaceId=n;const i=t&&t.hasOwnProperty("value");if(this.value=function avt(e){return e??null}(i?t.value:t),i){const{value:o,...s}=t;this.options=s}else this.options={};this.options.params||(this.options.params={})}absorbOptions(t){const n=t.params;if(n){const i=this.options.params;Object.keys(n).forEach(r=>{null==i[r]&&(i[r]=n[r])})}}}const kw="void",DU=new CU(kw);class rvt{constructor(t,n,i){this.id=t,this.hostElement=n,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Js(n,this._hostClassName)}listen(t,n,i,r){if(!this._triggers.has(n))throw function s0t(){return new q(3302,!1)}();if(null==i||0==i.length)throw function a0t(){return new q(3303,!1)}();if(!function lvt(e){return"start"==e||"done"==e}(i))throw function l0t(){return new q(3400,!1)}();const o=fs(this._elementListeners,t,[]),s={name:n,phase:i,callback:r};o.push(s);const a=fs(this._engine.statesByElement,t,new Map);return a.has(n)||(Js(t,zN),Js(t,zN+"-"+n),a.set(n,DU)),()=>{this._engine.afterFlush(()=>{const l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(n)||a.delete(n)})}}register(t,n){return!this._triggers.has(t)&&(this._triggers.set(t,n),!0)}_getTrigger(t){const n=this._triggers.get(t);if(!n)throw function c0t(){return new q(3401,!1)}();return n}trigger(t,n,i,r=!0){const o=this._getTrigger(n),s=new SU(this.id,n,t);let a=this._engine.statesByElement.get(t);a||(Js(t,zN),Js(t,zN+"-"+n),this._engine.statesByElement.set(t,a=new Map));let l=a.get(n);const c=new CU(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(n,c),l||(l=DU),c.value!==kw&&l.value===c.value){if(!function dvt(e,t){const n=Object.keys(e),i=Object.keys(t);if(n.length!=i.length)return!1;for(let r=0;r{jp(t,m),mc(t,_)})}return}const f=fs(this._engine.playersByElement,t,[]);f.forEach(g=>{g.namespaceId==this.id&&g.triggerName==n&&g.queued&&g.destroy()});let h=o.matchTransition(l.value,c.value,t,c.params),p=!1;if(!h){if(!r)return;h=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:n,transition:h,fromState:l,toState:c,player:s,isFallbackTransition:p}),p||(Js(t,mve),s.onStart(()=>{xy(t,mve)})),s.onDone(()=>{let g=this.players.indexOf(s);g>=0&&this.players.splice(g,1);const m=this._engine.playersByElement.get(t);if(m){let _=m.indexOf(s);_>=0&&m.splice(_,1)}}),this.players.push(s),f.push(s),s}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(n=>n.delete(t)),this._elementListeners.forEach((n,i)=>{this._elementListeners.set(i,n.filter(r=>r.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const n=this._engine.playersByElement.get(t);n&&(n.forEach(i=>i.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,n){const i=this._engine.driver.query(t,HN,!0);i.forEach(r=>{if(r[tl])return;const o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,n,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(t,n,i,r){const o=this._engine.statesByElement.get(t),s=new Map;if(o){const a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){const u=this.trigger(t,c,kw,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,n,s),i&&vf(a).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const n=this._elementListeners.get(t),i=this._engine.statesByElement.get(t);if(n&&i){const r=new Set;n.forEach(o=>{const s=o.name;if(r.has(s))return;r.add(s);const l=this._triggers.get(s).fallbackTransition,c=i.get(s)||DU,u=new CU(kw),d=new SU(this.id,s,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:s,transition:l,fromState:c,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(t,n){const i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,n),this.triggerLeaveAnimation(t,n,!0))return;let r=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(t):[];if(o&&o.length)r=!0;else{let s=t;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(t),r)i.markElementAsRemoved(this.id,t,!1,n);else{const o=t[tl];(!o||o===_ve)&&(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,n))}}insertNode(t,n){Js(t,this._hostClassName)}drainQueuedTransitions(t){const n=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){const l=oU(o,i.triggerName,i.fromState.value,i.toState.value);l._data=t,iU(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):n.push(i)}),this._queue=[],n.sort((i,r)=>{const o=i.transition.ast.depCount,s=r.transition.ast.depCount;return 0==o||0==s?o-s:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(t){this.players.forEach(n=>n.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}}class ovt{_onRemovalComplete(t,n){this.onRemovalComplete(t,n)}constructor(t,n,i){this.bodyNode=t,this.driver=n,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){const t=[];return this._namespaceList.forEach(n=>{n.players.forEach(i=>{i.queued&&t.push(i)})}),t}createNamespace(t,n){const i=new rvt(t,n,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,n)?this._balanceNamespaceList(i,n):(this.newHostElements.set(n,i),this.collectEnterElement(n)),this._namespaceLookup[t]=i}_balanceNamespaceList(t,n){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(n);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,t),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(t)}else i.push(t);return r.set(n,t),t}register(t,n){let i=this._namespaceLookup[t];return i||(i=this.createNamespace(t,n)),i}registerTrigger(t,n,i){let r=this._namespaceLookup[t];r&&r.register(n,i)&&this.totalAnimations++}destroy(t,n){t&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{const i=this._fetchNamespace(t);this.namespacesByHostElement.delete(i.hostElement);const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1),i.destroy(n),delete this._namespaceLookup[t]}))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const n=new Set,i=this.statesByElement.get(t);if(i)for(let r of i.values())if(r.namespaceId){const o=this._fetchNamespace(r.namespaceId);o&&n.add(o)}return n}trigger(t,n,i,r){if(ZN(n)){const o=this._fetchNamespace(t);if(o)return o.trigger(n,i,r),!0}return!1}insertNode(t,n,i,r){if(!ZN(n))return;const o=n[tl];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const s=this.collectedLeaveElements.indexOf(n);s>=0&&this.collectedLeaveElements.splice(s,1)}if(t){const s=this._fetchNamespace(t);s&&s.insertNode(n,i)}r&&this.collectEnterElement(n)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,n){n?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Js(t,EU)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),xy(t,EU))}removeNode(t,n,i){if(ZN(n)){const r=t?this._fetchNamespace(t):null;r?r.removeNode(n,i):this.markElementAsRemoved(t,n,!1,i);const o=this.namespacesByHostElement.get(n);o&&o.id!==t&&o.removeNode(n,i)}else this._onRemovalComplete(n,i)}markElementAsRemoved(t,n,i,r,o){this.collectedLeaveElements.push(n),n[tl]={namespaceId:t,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(t,n,i,r,o){return ZN(n)?this._fetchNamespace(t).listen(n,i,r,o):()=>{}}_buildInstruction(t,n,i,r,o){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,i,r,t.fromState.options,t.toState.options,n,o)}destroyInnerAnimations(t){let n=this.driver.query(t,HN,!0);n.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(n=this.driver.query(t,dU,!0),n.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(t){const n=this.playersByElement.get(t);n&&n.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(t){const n=this.playersByQueriedElement.get(t);n&&n.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return vf(this.players).onDone(()=>t());t()})}processLeaveNode(t){const n=t[tl];if(n&&n.setForRemoval){if(t[tl]=_ve,n.namespaceId){this.destroyInnerAnimations(t);const i=this._fetchNamespace(n.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,n.setForRemoval)}t.classList?.contains(EU)&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(t=-1){let n=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],n.length?vf(n).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(t){throw function u0t(){return new q(3402,!1)}()}_flushAnimations(t,n){const i=new KN,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(x=>{u.add(x);const I=this.driver.query(x,".ng-animate-queued",!0);for(let A=0;A{const A=uU+g++;p.set(I,A),x.forEach(N=>Js(N,A))});const m=[],_=new Set,y=new Set;for(let x=0;x_.add(N)):y.add(I))}const v=new Map,b=bve(f,Array.from(_));b.forEach((x,I)=>{const A=UN+g++;v.set(I,A),x.forEach(N=>Js(N,A))}),t.push(()=>{h.forEach((x,I)=>{const A=p.get(I);x.forEach(N=>xy(N,A))}),b.forEach((x,I)=>{const A=v.get(I);x.forEach(N=>xy(N,A))}),m.forEach(x=>{this.processLeaveNode(x)})});const w=[],C=[];for(let x=this._namespaceList.length-1;x>=0;x--)this._namespaceList[x].drainQueuedTransitions(n).forEach(A=>{const N=A.player,O=A.element;if(w.push(N),this.collectedEnterElements.length){const Y=O[tl];if(Y&&Y.setForMove){if(Y.previousTriggersValues&&Y.previousTriggersValues.has(A.triggerName)){const ue=Y.previousTriggersValues.get(A.triggerName),W=this.statesByElement.get(A.element);if(W&&W.has(A.triggerName)){const ne=W.get(A.triggerName);ne.value=ue,W.set(A.triggerName,ne)}}return void N.destroy()}}const $=!d||!this.driver.containsElement(d,O),B=v.get(O),V=p.get(O),j=this._buildInstruction(A,i,V,B,$);if(j.errors&&j.errors.length)return void C.push(j);if($)return N.onStart(()=>jp(O,j.fromStyles)),N.onDestroy(()=>mc(O,j.toStyles)),void r.push(N);if(A.isFallbackTransition)return N.onStart(()=>jp(O,j.fromStyles)),N.onDestroy(()=>mc(O,j.toStyles)),void r.push(N);const H=[];j.timelines.forEach(Y=>{Y.stretchStartingKeyframe=!0,this.disabledNodes.has(Y.element)||H.push(Y)}),j.timelines=H,i.append(O,j.timelines),s.push({instruction:j,player:N,element:O}),j.queriedElements.forEach(Y=>fs(a,Y,[]).push(N)),j.preStyleProps.forEach((Y,ue)=>{if(Y.size){let W=l.get(ue);W||l.set(ue,W=new Set),Y.forEach((ne,ie)=>W.add(ie))}}),j.postStyleProps.forEach((Y,ue)=>{let W=c.get(ue);W||c.set(ue,W=new Set),Y.forEach((ne,ie)=>W.add(ie))})});if(C.length){const x=[];C.forEach(I=>{x.push(function d0t(){return new q(3505,!1)}())}),w.forEach(I=>I.destroy()),this.reportError(x)}const E=new Map,D=new Map;s.forEach(x=>{const I=x.element;i.has(I)&&(D.set(I,I),this._beforeAnimationBuild(x.player.namespaceId,x.instruction,E))}),r.forEach(x=>{const I=x.element;this._getPreviousPlayers(I,!1,x.namespaceId,x.triggerName,null).forEach(N=>{fs(E,I,[]).push(N),N.destroy()})});const M=m.filter(x=>Eve(x,l,c)),k=new Map;vve(k,this.driver,y,c,Bc).forEach(x=>{Eve(x,l,c)&&M.push(x)});const F=new Map;h.forEach((x,I)=>{vve(F,this.driver,new Set(x),l,"!")}),M.forEach(x=>{const I=k.get(x),A=F.get(x);k.set(x,new Map([...I?.entries()??[],...A?.entries()??[]]))});const P=[],T=[],S={};s.forEach(x=>{const{element:I,player:A,instruction:N}=x;if(i.has(I)){if(u.has(I))return A.onDestroy(()=>mc(I,N.toStyles)),A.disabled=!0,A.overrideTotalTime(N.totalTime),void r.push(A);let O=S;if(D.size>1){let B=I;const V=[];for(;B=B.parentNode;){const j=D.get(B);if(j){O=j;break}V.push(B)}V.forEach(j=>D.set(j,O))}const $=this._buildAnimation(A.namespaceId,N,E,o,F,k);if(A.setRealPlayer($),O===S)P.push(A);else{const B=this.playersByElement.get(O);B&&B.length&&(A.parentPlayer=vf(B)),r.push(A)}}else jp(I,N.fromStyles),A.onDestroy(()=>mc(I,N.toStyles)),T.push(A),u.has(I)&&r.push(A)}),T.forEach(x=>{const I=o.get(x.element);if(I&&I.length){const A=vf(I);x.setRealPlayer(A)}}),r.forEach(x=>{x.parentPlayer?x.syncPlayerEvents(x.parentPlayer):x.destroy()});for(let x=0;x!$.destroyed);O.length?cvt(this,I,O):this.processLeaveNode(I)}return m.length=0,P.forEach(x=>{this.players.push(x),x.onDone(()=>{x.destroy();const I=this.players.indexOf(x);this.players.splice(I,1)}),x.play()}),P}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,n,i,r,o){let s=[];if(n){const a=this.playersByQueriedElement.get(t);a&&(s=a)}else{const a=this.playersByElement.get(t);if(a){const l=!o||o==kw;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(t,n,i){const o=n.element,s=n.isRemovalTransition?void 0:t,a=n.isRemovalTransition?void 0:n.triggerName;for(const l of n.timelines){const c=l.element,u=c!==o,d=fs(i,c,[]);this._getPreviousPlayers(c,u,s,a,n.toState).forEach(h=>{const p=h.getRealPlayer();p.beforeDestroy&&p.beforeDestroy(),h.destroy(),d.push(h)})}jp(o,n.fromStyles)}_buildAnimation(t,n,i,r,o,s){const a=n.triggerName,l=n.element,c=[],u=new Set,d=new Set,f=n.timelines.map(p=>{const g=p.element;u.add(g);const m=g[tl];if(m&&m.removedBeforeQueried)return new Dv(p.duration,p.delay);const _=g!==l,y=function uvt(e){const t=[];return wve(e,t),t}((i.get(g)||nvt).map(E=>E.getRealPlayer())).filter(E=>!!E.element&&E.element===g),v=o.get(g),b=s.get(g),w=Z0e(this._normalizer,p.keyframes,v,b),C=this._buildPlayer(p,w,y);if(p.subTimeline&&r&&d.add(g),_){const E=new SU(t,a,g);E.setRealPlayer(C),c.push(E)}return C});c.forEach(p=>{fs(this.playersByQueriedElement,p.element,[]).push(p),p.onDone(()=>function svt(e,t,n){let i=e.get(t);if(i){if(i.length){const r=i.indexOf(n);i.splice(r,1)}0==i.length&&e.delete(t)}return i}(this.playersByQueriedElement,p.element,p))}),u.forEach(p=>Js(p,rve));const h=vf(f);return h.onDestroy(()=>{u.forEach(p=>xy(p,rve)),mc(l,n.toStyles)}),d.forEach(p=>{fs(r,p,[]).push(h)}),h}_buildPlayer(t,n,i){return n.length>0?this.driver.animate(t.element,n,t.duration,t.delay,t.easing,i):new Dv(t.duration,t.delay)}}class SU{constructor(t,n,i){this.namespaceId=t,this.triggerName=n,this.element=i,this._player=new Dv,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((n,i)=>{n.forEach(r=>iU(t,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const n=this._player;n.triggerCallback&&t.onStart(()=>n.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,n){fs(this._queuedCallbacks,t,[]).push(n)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const n=this._player;n.triggerCallback&&n.triggerCallback(t)}}function ZN(e){return e&&1===e.nodeType}function yve(e,t){const n=e.style.display;return e.style.display=t??"none",n}function vve(e,t,n,i,r){const o=[];n.forEach(l=>o.push(yve(l)));const s=[];i.forEach((l,c)=>{const u=new Map;l.forEach(d=>{const f=t.computeStyle(c,d,r);u.set(d,f),(!f||0==f.length)&&(c[tl]=ivt,s.push(c))}),e.set(c,u)});let a=0;return n.forEach(l=>yve(l,o[a++])),s}function bve(e,t){const n=new Map;if(e.forEach(a=>n.set(a,[])),0==t.length)return n;const r=new Set(t),o=new Map;function s(a){if(!a)return 1;let l=o.get(a);if(l)return l;const c=a.parentNode;return l=n.has(c)?c:r.has(c)?1:s(c),o.set(a,l),l}return t.forEach(a=>{const l=s(a);1!==l&&n.get(l).push(a)}),n}function Js(e,t){e.classList?.add(t)}function xy(e,t){e.classList?.remove(t)}function cvt(e,t,n){vf(n).onDone(()=>e.processLeaveNode(t))}function wve(e,t){for(let n=0;nr.add(o)):t.set(e,i),n.delete(e),!0}class Ow{constructor(t,n,i){this._driver=n,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new ovt(t.body,n,i),this._timelineEngine=new Q0t(t.body,n,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(t,n,i,r,o){const s=t+"-"+r;let a=this._triggerCache[s];if(!a){const l=[],u=mU(this._driver,o,l,[]);if(l.length)throw function e0t(){return new q(3404,!1)}();a=function q0t(e,t,n){return new Y0t(e,t,n)}(r,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(n,r,a)}register(t,n){this._transitionEngine.register(t,n)}destroy(t,n){this._transitionEngine.destroy(t,n)}onInsert(t,n,i,r){this._transitionEngine.insertNode(t,n,i,r)}onRemove(t,n,i){this._transitionEngine.removeNode(t,n,i)}disableAnimations(t,n){this._transitionEngine.markElementAsDisabled(t,n)}process(t,n,i,r){if("@"==i.charAt(0)){const[o,s]=J0e(i);this._timelineEngine.command(o,n,s,r)}else this._transitionEngine.trigger(t,n,i,r)}listen(t,n,i,r,o){if("@"==i.charAt(0)){const[s,a]=J0e(i);return this._timelineEngine.listen(s,n,a,o)}return this._transitionEngine.listen(t,n,i,r,o)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(t){this._transitionEngine.afterFlushAnimationsDone(t)}}class Rw{static{this.initialStylesByElement=new WeakMap}constructor(t,n,i){this._element=t,this._startStyles=n,this._endStyles=i,this._state=0;let r=Rw.initialStylesByElement.get(t);r||Rw.initialStylesByElement.set(t,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&mc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(mc(this._element,this._initialStyles),this._endStyles&&(mc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(Rw.initialStylesByElement.delete(this._element),this._startStyles&&(jp(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(jp(this._element,this._endStyles),this._endStyles=null),mc(this._element,this._initialStyles),this._state=3)}}function TU(e){let t=null;return e.forEach((n,i)=>{(function hvt(e){return"display"===e||"position"===e})(i)&&(t=t||new Map,t.set(i,n))}),t}class Cve{constructor(t,n,i,r){this.element=t,this.keyframes=n,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:new Map;const n=()=>this._onFinish();this.domPlayer.addEventListener("finish",n),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",n)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(t){const n=[];return t.forEach(i=>{n.push(Object.fromEntries(i))}),n}_triggerWebAnimation(t,n,i){return t.animate(this._convertKeyframesToObject(n),i)}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&t.set(r,this._finished?i:gU(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const n="start"===t?this._onStartFns:this._onDoneFns;n.forEach(i=>i()),n.length=0}}class Dve{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}containsElement(t,n){return tve(t,n)}getParentElement(t){return sU(t)}query(t,n,i){return nve(t,n,i)}computeStyle(t,n,i){return gU(t,n)}animate(t,n,i,r,o,s=[]){const l={duration:i,delay:r,fill:0==r?"both":"forwards"};o&&(l.easing=o);const c=new Map,u=s.filter(h=>h instanceof Cve);(function D0t(e,t){return 0===e||0===t})(i,r)&&u.forEach(h=>{h.currentSnapshot.forEach((p,g)=>c.set(g,p))});let d=function w0t(e){return e.length?e[0]instanceof Map?e:e.map(t=>new Map(Object.entries(t))):[]}(n).map(h=>new Map(h));d=function S0t(e,t,n){if(n.size&&t.length){let i=t[0],r=[];if(n.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;os.set(a,gU(e,a)))}}return t}(t,d,c);const f=function fvt(e,t){let n=null,i=null;return Array.isArray(t)&&t.length?(n=TU(t[0]),t.length>1&&(i=TU(t[t.length-1]))):t instanceof Map&&(n=TU(t)),n||i?new Rw(e,n,i):null}(t,d);return new Cve(t,d,l,f)}}const Sve="@.disabled";class Tve{constructor(t,n,i,r){this.namespaceId=t,this.delegate=n,this.engine=i,this._onDestroy=r,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(t){this.delegate.destroyNode?.(t)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(t,n){return this.delegate.createElement(t,n)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,n){this.delegate.appendChild(t,n),this.engine.onInsert(this.namespaceId,n,t,!1)}insertBefore(t,n,i,r=!0){this.delegate.insertBefore(t,n,i),this.engine.onInsert(this.namespaceId,n,t,r)}removeChild(t,n,i){this.parentNode(n)&&this.engine.onRemove(this.namespaceId,n,this.delegate)}selectRootElement(t,n){return this.delegate.selectRootElement(t,n)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,n,i,r){this.delegate.setAttribute(t,n,i,r)}removeAttribute(t,n,i){this.delegate.removeAttribute(t,n,i)}addClass(t,n){this.delegate.addClass(t,n)}removeClass(t,n){this.delegate.removeClass(t,n)}setStyle(t,n,i,r){this.delegate.setStyle(t,n,i,r)}removeStyle(t,n,i){this.delegate.removeStyle(t,n,i)}setProperty(t,n,i){"@"==n.charAt(0)&&n==Sve?this.disableAnimations(t,!!i):this.delegate.setProperty(t,n,i)}setValue(t,n){this.delegate.setValue(t,n)}listen(t,n,i){return this.delegate.listen(t,n,i)}disableAnimations(t,n){this.engine.disableAnimations(t,n)}}class pvt extends Tve{constructor(t,n,i,r,o){super(n,i,r,o),this.factory=t,this.namespaceId=n}setProperty(t,n,i){"@"==n.charAt(0)?"."==n.charAt(1)&&n==Sve?this.disableAnimations(t,i=void 0===i||!!i):this.engine.process(this.namespaceId,t,n.slice(1),i):this.delegate.setProperty(t,n,i)}listen(t,n,i){if("@"==n.charAt(0)){const r=function gvt(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(t);let o=n.slice(1),s="";return"@"!=o.charAt(0)&&([o,s]=function mvt(e){const t=e.indexOf(".");return[e.substring(0,t),e.slice(t+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(t,n,i)}}class _vt{constructor(t,n,i){this.delegate=t,this.engine=n,this._zone=i,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,n.onRemovalComplete=(r,o)=>{o?.removeChild(null,r)}}createRenderer(t,n){const r=this.delegate.createRenderer(t,n);if(!t||!n?.data?.animation){const c=this._rendererCache;let u=c.get(r);return u||(u=new Tve("",r,this.engine,()=>c.delete(r)),c.set(r,u)),u}const o=n.id,s=n.id+"-"+this._currentId;this._currentId++,this.engine.register(s,t);const a=c=>{Array.isArray(c)?c.forEach(a):this.engine.registerTrigger(o,s,t,c.name,c)};return n.data.animation.forEach(a),new pvt(this,s,r,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(t,n,i){if(t>=0&&tn(i));const r=this._animationCallbacksBuffer;0==r.length&&queueMicrotask(()=>{this._zone.run(()=>{r.forEach(o=>{const[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),r.push([n,i])}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}const xve=[{provide:cU,useFactory:function vvt(){return new ave}},{provide:Ow,useClass:(()=>{class e extends Ow{constructor(n,i,r){super(n,i,r)}ngOnDestroy(){this.flush()}static{this.\u0275fac=function(i){return new(i||e)(Ne(Ln),Ne(lU),Ne(cU))}}static{this.\u0275prov=pe({token:e,factory:e.\u0275fac})}}return e})()},{provide:lC,useFactory:function bvt(e,t,n){return new _vt(e,t,n)},deps:[TR,Ow,ct]}],xU=[{provide:lU,useFactory:()=>new Dve},{provide:Z7,useValue:"BrowserAnimations"},...xve],Ave=[{provide:lU,useClass:aU},{provide:Z7,useValue:"NoopAnimations"},...xve];let wvt=(()=>{class e{static withConfig(n){return{ngModule:e,providers:n.disableAnimations?Ave:xU}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e})}static{this.\u0275inj=Lt({providers:xU,imports:[WK]})}}return e})(),Evt=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=zt({type:e,bootstrap:[Iyt]})}static{this.\u0275inj=Lt({providers:[sm,kyt,Hht(Rp(ff.LegacyInterceptors,[{provide:Lye,useFactory:Oht},{provide:Ew,useExisting:Lye,multi:!0}]))],imports:[YPe,WK,Tyt,dF,ABe,wvt]})}}return e})();YIe().bootstrapModule(Evt).catch(e=>console.error(e))}},e2=>{e2(e2.s=394)}]); \ No newline at end of file diff --git a/src/app/about/about.component.html b/src/app/about/about.component.html index ad4edfc..b1ee6fc 100644 --- a/src/app/about/about.component.html +++ b/src/app/about/about.component.html @@ -6,12 +6,12 @@ Who made Apparel 100 and why?
-

Apparel 100 was made by WikiRate to showcase supply chain transparency and ESG data in an engaging and +

Apparel 100 was made by Wikirate to showcase supply chain transparency and ESG data in an engaging and accessible way. These maps and infographics create a sector snapshot that tells a story the world deserves to know.

- This showcase came together with the support of the WikiRate community. + This showcase came together with the support of the Wikirate community.

@@ -88,7 +88,7 @@

Create your own open data showca
"We believe in collaborating to improve the fashion industry - and are delighted to be continuing our partnership with WikiRate into 2022. Using the WikiRate + and are delighted to be continuing our partnership with Wikirate into 2022. Using the Wikirate platform to host FTI research has made our work more accessible and impactful across a range of stakeholders who use our data to enable their activism and research."
@@ -111,7 +111,7 @@

Create your own open data showca

-
"WikiRate has proven an invaluable partner for our +
"Wikirate has proven an invaluable partner for our Fashion Checker campaign. The platform’s sophisticated functionalities and open data approach has given us the @@ -141,7 +141,7 @@

Create your own open data showca
"This collaborative project was a great opportunity to further develop our research skills which in turn allowed us to be more critical and analytical of - fashion labels. Working with WikiRate made us understand the importance of finding the right and + fashion labels. Working with Wikirate made us understand the importance of finding the right and accurate information that backs up or contradicts the image that a fashion label is trying to portray"
@@ -164,7 +164,7 @@

Create your own open data showca

-
"WikiRate provides the opportunity for students to get +
"Wikirate provides the opportunity for students to get a real-life experience with CSR, which helps develop their social awareness, problem-solving and critical thinking skills" @@ -188,9 +188,9 @@

Create your own open data showca

-
"We've worked with the WikiRate for the last five +
"We've worked with the Wikirate for the last five years to - scale our research on modern slavery. The WikiRate team maintains our methodology on their + scale our research on modern slavery. The Wikirate team maintains our methodology on their platform and each year coordinates hundreds of university students to contribute new data for analysis that we diff --git a/src/app/about/about.component.ts b/src/app/about/about.component.ts index cb72d64..9b812ab 100644 --- a/src/app/about/about.component.ts +++ b/src/app/about/about.component.ts @@ -122,7 +122,7 @@ export class AboutComponent implements OnInit { }, { name: 'description', - content: 'Apparel 100 was made by WikiRate to showcase supply chain transparency and ESG data in an engaging and accessible way. These maps and infographics create a sector snapshot that tells a story the world deserves to know.' + content: 'Apparel 100 was made by Wikirate to showcase supply chain transparency and ESG data in an engaging and accessible way. These maps and infographics create a sector snapshot that tells a story the world deserves to know.' } ]) meta.updateTag({ diff --git a/src/app/dynamic-report/intro/intro.component.html b/src/app/dynamic-report/intro/intro.component.html index 80ad47d..12a23c6 100644 --- a/src/app/dynamic-report/intro/intro.component.html +++ b/src/app/dynamic-report/intro/intro.component.html @@ -10,7 +10,7 @@

Discover what we do and don't know about the top 100 apparel companies through interactive maps and infographics.

-

WikiRate's biggest data showcase unearths; who the top 100 are, how much we know about their environmental, +

Wikirate's biggest data showcase unearths; who the top 100 are, how much we know about their environmental, social and governance performance, and where their suppliers are located.

diff --git a/src/app/dynamic-report/number-of-suppliers-per-company/number-of-suppliers-per-company.component.html b/src/app/dynamic-report/number-of-suppliers-per-company/number-of-suppliers-per-company.component.html index 66cf94f..5e2c3bd 100644 --- a/src/app/dynamic-report/number-of-suppliers-per-company/number-of-suppliers-per-company.component.html +++ b/src/app/dynamic-report/number-of-suppliers-per-company/number-of-suppliers-per-company.component.html @@ -29,7 +29,7 @@

Number of published supplier lists per compa
{{'For ' + this.selectedYear}}For the most recent years WikiRate's researchers + *ngIf="this.selectedYear === 'latest'">For the most recent years Wikirate's researchers retrieved the supplier lists of {{number_of_reporting_companies}} companies out of the top 100 companies. In total, these {{number_of_reporting_companies}} companies were supplied diff --git a/src/app/footer/footer.component.html b/src/app/footer/footer.component.html index 7b8f17b..56de239 100644 --- a/src/app/footer/footer.component.html +++ b/src/app/footer/footer.component.html @@ -12,7 +12,7 @@
- WikiRate is + Wikirate is an open data platform that brings corporate ESG data together in one place, making it accessible, comparable, and free for all.